function closeVideo()

in src/assets/js/youtubeplayer.js [184:215]


    function closeVideo(options) {
      if (!yt_player || !yt_player.stopVideo) {
        console.log(
          'Bailing early from closeVideo due to yt_player being undefined or stopVideo method missing.'
        );
        return;
      }

      var v = $.extend(
        {
          fast: false,
        },
        options
      );

      yt_player.stopVideo();
      playing = false;
      $container.removeClass('playing');
      $link_container.removeClass('playing');
      if (!$('#' + $link.data(settings.target_data)).length) {
        $target.velocity('fadeOut');
      }
      if (v.fast) {
        yt_player = null;
        $container.remove();
      } else {
        setTimeout(function () {
          yt_player = null;
          $container.remove();
        }, 1000);
      }
    }