fix error
This commit is contained in:
parent
8bf2305a77
commit
b764d2e4af
|
@ -48,22 +48,6 @@
|
|||
}else{
|
||||
audio_div = $('<button class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></button>');
|
||||
}
|
||||
audio_div.on('click touchstart',function(event){
|
||||
event.stopPropagation();
|
||||
var $video = $self.find('video');
|
||||
if ($self.hasClass('have-audio')){
|
||||
$self.removeClass('have-audio');
|
||||
$(this).find('i.fas').attr('class','fas fa-volume-mute');
|
||||
}else{
|
||||
$self.addClass('have-audio');
|
||||
$(this).find('i.fas').attr('class','fas fa-volume-up');
|
||||
}
|
||||
if ($video.length>0){
|
||||
$self.jPlayer("mute", !$self.data().jPlayer.options.muted);
|
||||
}else{//youtube
|
||||
$self.find('iframe').data("yt_player").unmute();
|
||||
}
|
||||
})
|
||||
$self.append(audio_div);
|
||||
}
|
||||
}
|
||||
|
@ -81,6 +65,23 @@
|
|||
ad_banners_count++;
|
||||
})
|
||||
if (typeof onYouTubeIframeAPIReady !== 'function'){
|
||||
$(document).on('click touchstart',".jarallax-video-audio",function(event){
|
||||
event.stopPropagation();
|
||||
var $self = $(this).parent();
|
||||
var $video = $self.find('video');
|
||||
if ($self.hasClass('have-audio')){
|
||||
$self.removeClass('have-audio');
|
||||
$(this).find('i.fas').attr('class','fas fa-volume-mute');
|
||||
}else{
|
||||
$self.addClass('have-audio');
|
||||
$(this).find('i.fas').attr('class','fas fa-volume-up');
|
||||
}
|
||||
if ($video.length>0){
|
||||
$self.jPlayer("mute", !$self.data().jPlayer.options.muted);
|
||||
}else{//youtube
|
||||
$self.find('iframe').data("yt_player").unmute();
|
||||
}
|
||||
});
|
||||
if(window.yt_players == undefined)
|
||||
window.yt_players = {};
|
||||
function onYouTubeIframeAPIReady(){
|
||||
|
|
Loading…
Reference in New Issue