Fix bug.
This commit is contained in:
parent
ddc9f0c256
commit
b4859dfaa4
|
@ -183,7 +183,7 @@ class AdBannersController < ApplicationController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}",
|
}",
|
||||||
"extra_document_ready_script" => ((@autoplay_video == "1") ? "opts.API.pause() && opts.API.jump(0);" : "")
|
"extra_document_ready_script" => ((@autoplay_video == "1") ? "(opts.slides.eq(0).find('iframe,.jp-jplayer').length != 0) && opts.API.pause() && opts.API.jump(0);" : "")
|
||||||
},
|
},
|
||||||
"images" => images
|
"images" => images
|
||||||
}
|
}
|
||||||
|
|
|
@ -327,6 +327,9 @@
|
||||||
event_dict[count_key] = event_dict[array_key].length;
|
event_dict[count_key] = event_dict[array_key].length;
|
||||||
yt_player.addEventListener('onStateChange',onPlayerStateChange);
|
yt_player.addEventListener('onStateChange',onPlayerStateChange);
|
||||||
banner_wrap.trigger('resize');
|
banner_wrap.trigger('resize');
|
||||||
|
if(i == 0 && $iframe.parents(".youtube_slide[data-autoplay=\"1\"]").length != 0){
|
||||||
|
yt_player.mute().playVideo();
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
console.log("YT player changes its variables!")
|
console.log("YT player changes its variables!")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue