mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
Make sure unload works
This commit is contained in:
parent
55b5ca32f5
commit
786e48d71a
1 changed files with 4 additions and 5 deletions
|
@ -191,9 +191,9 @@ function setPlayerListners() {
|
||||||
pauseIfIsPlayinAdsInterval = setInterval(function () {
|
pauseIfIsPlayinAdsInterval = setInterval(function () {
|
||||||
pauseIfIsPlayinAds();
|
pauseIfIsPlayinAds();
|
||||||
}, 500);
|
}, 500);
|
||||||
_startCountPlayingTime = setInterval(function(){
|
_startCountPlayingTime = setInterval(function () {
|
||||||
seconds_watching_video++;
|
seconds_watching_video++;
|
||||||
},1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#mainVideo .vjs-mute-control").click(function () {
|
$("#mainVideo .vjs-mute-control").click(function () {
|
||||||
|
@ -438,7 +438,7 @@ function addView(videos_id, currentTime) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videoViewAdded && videoViewAdded==videos_id) {
|
if (videoViewAdded && videoViewAdded == videos_id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,8 +1246,7 @@ function checkDescriptionArea() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
$(window).on("unload", function () {
|
||||||
$(window).bind('beforeunload', function () {
|
|
||||||
addViewBeacon();
|
addViewBeacon();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue