I use slider revolution plugin of wordpress and i load a youtube in a popup when click play button using fancybox. The video is loaded by i receive this message before loading the video :
“youtube api could not be loaded revolution slider”
/* change revapi1 to whatever api number is being used for your slider */
var api = revapi1;
/* no need to edit below unless you want to change the default FancyBox settings */
api.on('revolution.slide.onloaded', function() {
jQuery(this).find('.fancybox').each(function() {
var $this = jQuery(this);
if(!$this.is('a')) $this = $this.removeClass('fancybox').find('a');
$this.addClass('fancybox').fancybox({
/* begin FancyBox options */
width: 960,
height: 540,
autoSize: true,
aspectRatio: true,
fitToView: true,
autoCenter: true,
scrolling: 'no',
type: 'iframe',
onClosed: function() {api.revresume()}
}).on('click', function() {api.revpause()});
});
});
Read more here: youtube api could not be loaded revolution slider