dist/js/glightbox.js
function youtubeApiHandle() {
        for (var i = 0; i < YTTemp.length; i++) {
            var iframe = YTTemp[i];
            var player = new YT.Player(iframe);
            videoPlayers[iframe.id] = player;
        }
    }
function youtubeApiHandle() {
        for (var i = 0; i < YTTemp.length; i++) {
            var iframe = YTTemp[i];
            var player = new YT.Player(iframe);
            videoPlayers[iframe.id] = player;
        }
    }
function youtubeApiHandle ( ) { for ( var i = 0 ; i < YTTemp . length ; i ++ ) { var iframe = YTTemp [ i ] ; var player = new YT . Player ( iframe ) ; videoPlayers [ iframe . id ] = player ; } }
Handle youtube Api
This is a simple fix, when the video
is ready sometimes the youtube api is still
loading so we can not autoplay or pause
we need to listen onYouTubeIframeAPIReady and
register the videos if required
Handle youtube Api This is a simple fix when the video is ready sometimes the youtube api is still loading so we can not autoplay or pause we need to listen onYouTubeIframeAPIReady and register the videos if required