fix error

This commit is contained in:
邱博亞 2021-11-14 13:28:44 +08:00
parent 95ce33ea96
commit 53ab232e11
2 changed files with 3 additions and 2 deletions

View File

@ -262,8 +262,9 @@
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"))
current_cycle.find('.jp-jplayer').jPlayer("mute", true).jPlayer("play",0); current_cycle.find('.jp-jplayer').jPlayer("mute", true).jPlayer("play",0);
else 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();
}
} }
<% end %> <% end %>
window.console.log("end"); window.console.log("end");

View File

@ -58,7 +58,7 @@
$(this).find('i.fas').attr('class','fas fa-volume-up'); $(this).find('i.fas').attr('class','fas fa-volume-up');
} }
if ($video.length>0){ if ($video.length>0){
$video[0].muted = !$video[0].muted; $(ele).jPlayer("mute", !$(ele).data().jPlayer.options.muted);
}else{//youtube }else{//youtube
console.log('control youtube audio'); console.log('control youtube audio');
} }