1
0
Fork 0
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:
Daniel 2021-08-02 15:00:13 -03:00
parent 55b5ca32f5
commit 786e48d71a

View file

@ -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();
});