fix error
This commit is contained in:
parent
69d56fcd6a
commit
a9d252a1ec
|
@ -34,6 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var ad_trigger_time;
|
||||||
if (typeof ad_banners_count === 'undefined'){
|
if (typeof ad_banners_count === 'undefined'){
|
||||||
var ad_banners_count = 0;
|
var ad_banners_count = 0;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +50,12 @@
|
||||||
audio_div = $('<button class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></button>');
|
audio_div = $('<button class="jarallax-video-audio"><i class="fas fa-volume-mute"></i></button>');
|
||||||
}
|
}
|
||||||
audio_div.click(function(event) {
|
audio_div.click(function(event) {
|
||||||
|
var currentTime = new Date();
|
||||||
|
if (ad_trigger_time&¤tTime-ad_trigger_time<500){
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
ad_trigger_time = currentTime;
|
||||||
|
}
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
var $video = $self.find('video');
|
var $video = $self.find('video');
|
||||||
if ($self.hasClass('have-audio')){
|
if ($self.hasClass('have-audio')){
|
||||||
|
@ -81,9 +88,9 @@
|
||||||
ad_banners_count++;
|
ad_banners_count++;
|
||||||
})
|
})
|
||||||
if (typeof onYouTubeIframeAPIReady !== 'function'){
|
if (typeof onYouTubeIframeAPIReady !== 'function'){
|
||||||
/*$(document).on('touchstart',".jarallax-video-audio",function(event){
|
$(document).on('touchstart',".jarallax-video-audio",function(event){
|
||||||
$(this).trigger('click');
|
$(this).trigger('click');
|
||||||
});*/
|
});
|
||||||
if(window.yt_players == undefined)
|
if(window.yt_players == undefined)
|
||||||
window.yt_players = {};
|
window.yt_players = {};
|
||||||
function onYouTubeIframeAPIReady(){
|
function onYouTubeIframeAPIReady(){
|
||||||
|
|
Loading…
Reference in New Issue