fix error

This commit is contained in:
邱博亞 2021-11-14 13:17:32 +08:00
parent c62dedbcb3
commit 95ce33ea96
1 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,8 @@
}else{ }else{
audio_div = $('<div class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></div>'); audio_div = $('<div class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></div>');
} }
audio_div.click(function(){ audio_div.click(function(event){
event.stopPropagation();
var $video = $(ele).find('video'); var $video = $(ele).find('video');
if ($(ele).hasClass('have-audio')){ if ($(ele).hasClass('have-audio')){
$(ele).removeClass('have-audio'); $(ele).removeClass('have-audio');
@ -59,7 +60,7 @@
if ($video.length>0){ if ($video.length>0){
$video[0].muted = !$video[0].muted; $video[0].muted = !$video[0].muted;
}else{//youtube }else{//youtube
console.log('control youtube audio');
} }
}) })
$(ele).append(audio_div); $(ele).append(audio_div);