docs: function setSlideVideo(slide, data, callback) {
          var _this2 = this;
  
          var videoID = 'gvideo' + data.index;
          // const slideMedia = slide.querySelector('.gslide-media');
          var slideMedia = slide.querySelector('.gvideo-wrapper');
  
          var url = data.href;
          var protocol = location.protocol.replace(':', '');
  
          if (protocol == 'file') {
              protocol = 'http';
          }
  
          // Set vimeo videos
          if (url.match(/vimeo\.com\/([0-9]*)/)) {
              var vimeoID = /vimeo.*\/(\d+)/i.exec(url);
              var params = parseUrlParams(this.settings.vimeo.params);
              var videoUrl = protocol + '://player.vimeo.com/video/' + vimeoID[1] + '?' + params;
  
              injectVideoApi(this.settings.vimeo.api);
  
              var finalCallback = function finalCallback() {
                  waitUntil(function () {
                      return typeof Vimeo !== 'undefined';
                  }, function () {
                      var player = new Vimeo.Player(iframe);
                      videoPlayers[videoID] = player;
  
                      if (utils.isFunction(callback)) {
                          callback();
                      }
                  });
              };
  
              slideMedia.parentNode.style.maxWidth = data.width + 'px';
              slideMedia.style.width = data.width + 'px';
              slideMedia.style.maxHeight = data.height + 'px';
  
              var iframe = createIframe({
                  url: videoUrl,
                  callback: finalCallback,
                  allow: 'autoplay; fullscreen',
                  appendTo: slideMedia
              });
              iframe.id = videoID;
              iframe.className = 'vimeo-video gvideo';
  
              if (this.settings.autoplayVideos && !isMobile) {
                  iframe.className += ' wait-autoplay';
              }
          }
  
          // Set youtube videos
          if (url.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || url.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)) {
              var youtubeParams = extend(this.settings.youtube.params, {
                  playerapiid: videoID
              });
              var yparams = parseUrlParams(youtubeParams);
              var youtubeID = getYoutubeID(url);
              var _videoUrl = protocol + '://www.youtube.com/embed/' + youtubeID + '?' + yparams;
  
              injectVideoApi(this.settings.youtube.api);
  
              var _finalCallback = function _finalCallback() {
                  if (!utils.isNil(YT) && YT.loaded) {
                      var player = new YT.Player(_iframe);
                      videoPlayers[videoID] = player;
                  } else {
                      YTTemp.push(_iframe);
                  }
                  if (utils.isFunction(callback)) {
                      callback();
                  }
              };
  
              slideMedia.parentNode.style.maxWidth = data.width + 'px';
              slideMedia.style.width = data.width + 'px';
              slideMedia.style.maxHeight = data.height + 'px';
  
              var _iframe = createIframe({
                  url: _videoUrl,
                  callback: _finalCallback,
                  allow: 'autoplay; fullscreen',
                  appendTo: slideMedia
              });
              _iframe.id = videoID;
              _iframe.className = 'youtube-video gvideo';
  
              if (this.settings.autoplayVideos && !isMobile) {
                  _iframe.className += ' wait-autoplay';
              }
          }
  
          // Set local videos
          if (url.match(/\.(mp4|ogg|webm)$/) !== null) {
              var _html = '<video id="' + videoID + '" ';
              _html += 'style="background:#000; width: ' + data.width + 'px; height: ' + data.height + 'px;" ';
              _html += 'preload="metadata" ';
              _html += 'x-webkit-airplay="allow" ';
              _html += 'webkit-playsinline="" ';
              _html += 'controls ';
              _html += 'class="gvideo">';
  
              var format = url.toLowerCase().split('.').pop();
              var sources = { 'mp4': '', 'ogg': '', 'webm': '' };
              sources[format] = url;
  
              for (var key in sources) {
                  if (sources.hasOwnProperty(key)) {
                      var videoFile = sources[key];
                      if (data.hasOwnProperty(key)) {
                          videoFile = data[key];
                      }
                      if (videoFile !== '') {
                          _html += '<source src="' + videoFile + '" type="video/' + key + '">';
                      }
                  }
              }
  
              _html += '</video>';
  
              var video = createHTML(_html);
              slideMedia.appendChild(video);
  
              var vnode = document.getElementById(videoID);
              if (this.settings.jwplayer !== null && this.settings.jwplayer.api !== null) {
                  var jwplayerConfig = this.settings.jwplayer;
                  var jwplayerApi = this.settings.jwplayer.api;
  
                  if (!jwplayerApi) {
                      console.warn('Missing jwplayer api file');
                      if (utils.isFunction(callback)) callback();
                      return false;
                  }
  
                  injectVideoApi(jwplayerApi, function () {
                      var jwconfig = extend(_this2.settings.jwplayer.params, {
                          width: data.width + 'px',
                          height: data.height + 'px',
                          file: url
                      });
  
                      jwplayer.key = _this2.settings.jwplayer.licenseKey;
  
                      var player = jwplayer(videoID);
  
                      player.setup(jwconfig);
  
                      videoPlayers[videoID] = player;
                      player.on('ready', function () {
                          vnode = slideMedia.querySelector('.jw-video');
                          addClass(vnode, 'gvideo');
                          vnode.id = videoID;
                          if (utils.isFunction(callback)) callback();
                      });
                  });
              } else {
                  addClass(vnode, 'html5-video');
                  videoPlayers[videoID] = vnode;
                  if (utils.isFunction(callback)) callback();
              }
          }
      }