Skip to content

Commit

Permalink
store dvr window offset in ms
Browse files Browse the repository at this point in the history
  • Loading branch information
wjoosen committed Sep 13, 2024
1 parent 9da96d0 commit bd490c0
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,14 @@ export class ComscoreStreamingAnalyticsTHEOIntegration {
}
const dvrWindowEnd = seekable.end(seekable.length - 1);
const dvrWindowOffsetInSeconds = dvrWindowEnd - currentTime;
this.streamingAnalytics.startFromDvrWindowOffset(dvrWindowOffsetInSeconds * 1000);
if (this.configuration.debug && LOG_STREAMINGANALYTICS)
console.log(
`[COMSCORE - StreamingAnalytics] startFromDvrWindowOffset ${dvrWindowOffsetInSeconds * 1000}`
);
this.dvrWindowOffsetMs = toMilliSeconds(dvrWindowOffsetInSeconds)
if (this.state === ComscoreState.VIDEO || this.state === ComscoreState.VIDEO_PAUSED) {
this.streamingAnalytics.startFromDvrWindowOffset(this.dvrWindowOffsetMs);
if (this.configuration.debug && LOG_STREAMINGANALYTICS)
console.log(
`[COMSCORE - StreamingAnalytics] startFromDvrWindowOffset ${this.dvrWindowOffsetMs}`
);
}
} else {
if (this.configuration.debug) console.log(`[COMSCORE] seeked in a VOD stream`);
const currentTimeInMilliSeconds = toMilliSeconds(currentTime)
Expand Down

0 comments on commit bd490c0

Please sign in to comment.