Anthony watchman integration #6799

Merged
mayeaux merged 20 commits from anthony-watchman-integration into master 2021-08-10 22:42:50 +02:00
Showing only changes of commit e70803814d - Show all commits

View file

@ -185,14 +185,17 @@ const analytics: Analytics = {
var playerToUse = videoPlayer || passedPlayer;
// have to use this because videojs pauses/unpauses during seek
var playerIsSeeking = playerToUse.seeking();
console.log('player is seeking');
console.log(playerIsSeeking);
// sometimes the seeking function isn't populated yet so check for it as well
if(playerToUse && playerToUse.seeking){
var playerIsSeeking = playerToUse.seeking();
}
// if player isn't seeking it's not a seeking caused start or pause
if (!playerIsSeeking) {
// if it's a play signal, start tracking
if (isPlaying) {
startWatchmanIntervalIfNotRunning();
// if it's a stop signal, stop tracking
} else {
stopWatchmanInterval();
}