bugfix seek event
This commit is contained in:
parent
e95e790424
commit
e70803814d
1 changed files with 7 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue