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

improve beacon

This commit is contained in:
Daniel 2021-08-02 17:16:47 -03:00
parent 43c0b02220
commit 30ee6d40af

View file

@ -470,10 +470,10 @@ function addViewBeacon() {
url = addGetParam(url, 'id', mediaId);
url = addGetParam(url, 'currentTime', playerCurrentTime);
url = addGetParam(url, 'seconds_watching_video', seconds_watching_video);
seconds_watching_video = 0;
var beacon = new Image();
beacon.src = url;
console.log('addViewBeacon will be sent', mediaId, playerCurrentTime, seconds_watching_video, beacon);
seconds_watching_video = 0;
} else {
if (typeof mediaId !== 'undefined') {
console.log('addViewBeacon mediaId is undefined');