1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

improve beacon

This commit is contained in:
Daniel 2021-08-02 17:08:17 -03:00
parent ea184069ac
commit 8cfa614de0

View file

@ -454,7 +454,10 @@ function addView(videos_id, currentTime) {
function addViewBeacon() {
console.log('addViewBeacon');
if (typeof mediaId !== 'undefined' && typeof playerCurrentTime !== 'undefined' && typeof seconds_watching_video !== 'undefined') {
if(seconds_watching_video<=0){
console.log('addViewBeacon seconds_watching_video <= 0 ', seconds_watching_video);
return false;
}
var url = webSiteRootURL + 'objects/videoAddViewCount.json.php?PHPSESSID=' + PHPSESSID;
url = addGetParam(url, 'id', mediaId);
url = addGetParam(url, 'currentTime', playerCurrentTime);