mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 02:09:22 +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 () {
|
||||
pauseIfIsPlayinAds();
|
||||
}, 500);
|
||||
_startCountPlayingTime = setInterval(function(){
|
||||
_startCountPlayingTime = setInterval(function () {
|
||||
seconds_watching_video++;
|
||||
},1000);
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
$("#mainVideo .vjs-mute-control").click(function () {
|
||||
|
@ -438,7 +438,7 @@ function addView(videos_id, currentTime) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (videoViewAdded && videoViewAdded==videos_id) {
|
||||
if (videoViewAdded && videoViewAdded == videos_id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1246,8 +1246,7 @@ function checkDescriptionArea() {
|
|||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$(window).bind('beforeunload', function () {
|
||||
$(window).on("unload", function () {
|
||||
addViewBeacon();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue