fix error
This commit is contained in:
parent
65c9baeed3
commit
8e387dc35c
|
@ -259,9 +259,14 @@
|
||||||
var cyclediv = $(this).parents("div.cycle-slideshow").eq(0);
|
var cyclediv = $(this).parents("div.cycle-slideshow").eq(0);
|
||||||
if(!is_frontend || (is_frontend && cyclediv.find('[data-autoplay=1]').length != 0)){
|
if(!is_frontend || (is_frontend && cyclediv.find('[data-autoplay=1]').length != 0)){
|
||||||
cyclediv.cycle("pause").cycle("next");
|
cyclediv.cycle("pause").cycle("next");
|
||||||
var current_cycle = cyclediv.find(".cycle-slide-active")
|
var current_cycle = cyclediv.find(".cycle-slide-active");
|
||||||
if(current_cycle.hasClass("jplayer_slide"))
|
if(current_cycle.hasClass("jplayer_slide")){
|
||||||
|
var $video_ele = current_cycle.find('.jp-jplayer video');
|
||||||
|
if ($video_ele.length>0){
|
||||||
|
$video_ele.eq(0).attr('autoplay','autoplay').attr('muted','muted').attr('playsinline',true);
|
||||||
|
}
|
||||||
current_cycle.find('.jp-jplayer').jPlayer("mute", true).jPlayer("play",0);
|
current_cycle.find('.jp-jplayer').jPlayer("mute", true).jPlayer("play",0);
|
||||||
|
}
|
||||||
else if(current_cycle.find('iframe').length>0){
|
else if(current_cycle.find('iframe').length>0){
|
||||||
current_cycle.find('iframe').data("yt_player").mute().playVideo();
|
current_cycle.find('iframe').data("yt_player").mute().playVideo();
|
||||||
}
|
}
|
||||||
|
@ -347,6 +352,10 @@
|
||||||
$(this).jPlayer("setMedia", jPlayer_<%= i %>_data);
|
$(this).jPlayer("setMedia", jPlayer_<%= i %>_data);
|
||||||
if ($(this).parents(".ba-banner-widget-youtube").eq(0).find(".w-ba-banner__slide").index($(this).parents(".w-ba-banner__slide").eq(0))==0){
|
if ($(this).parents(".ba-banner-widget-youtube").eq(0).find(".w-ba-banner__slide").index($(this).parents(".w-ba-banner__slide").eq(0))==0){
|
||||||
<% if @autoplay_video == true %>
|
<% if @autoplay_video == true %>
|
||||||
|
var $video_ele = $(this).find('video');
|
||||||
|
if ($video_ele.length>0){
|
||||||
|
$video_ele.eq(0).attr('autoplay','autoplay').attr('muted','muted').attr('playsinline',true);
|
||||||
|
}
|
||||||
$(this).jPlayer("mute", true).jPlayer("play",0);
|
$(this).jPlayer("mute", true).jPlayer("play",0);
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue