fix error
This commit is contained in:
parent
24bf89a3a8
commit
c05bf41151
|
@ -50,6 +50,19 @@
|
|||
}
|
||||
audio_div.click(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);
|
||||
}
|
||||
|
@ -68,21 +81,8 @@
|
|||
ad_banners_count++;
|
||||
})
|
||||
if (typeof onYouTubeIframeAPIReady !== 'function'){
|
||||
$(document).on('click touchstart',".jarallax-video-audio",function(event){
|
||||
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();
|
||||
}
|
||||
$(document).on('touchstart',".jarallax-video-audio",function(event){
|
||||
$(this).trigger('click');
|
||||
});
|
||||
if(window.yt_players == undefined)
|
||||
window.yt_players = {};
|
||||
|
|
Loading…
Reference in New Issue