Skip to content

Commit

Permalink
report dvr window properties to comscore after setting main content m…
Browse files Browse the repository at this point in the history
…etadata
  • Loading branch information
wjoosen committed Jun 13, 2024
1 parent b2a6cf2 commit 9582bfe
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ export class ComscoreStreamingAnalyticsTHEOIntegration {
console.log(`[COMSCORE - STATE] State change ${this.state} -> VIDEO`);
this.state = ComscoreState.VIDEO;
this.setContentMetadata();
if (this.dvrWindowLengthMs) {
this.streamingAnalytics.setDvrWindowLength(this.dvrWindowLengthMs)
if (this.configuration.debug && LOG_STREAMINGANALYTICS) console.log(`[COMSCORE - StreamingAnalytics] setDvrWindowLength ${this.dvrWindowLengthMs}`);
this.streamingAnalytics.startFromDvrWindowOffset(this.dvrWindowOffsetMs ?? 0)
if (this.configuration.debug && LOG_STREAMINGANALYTICS) console.log(`[COMSCORE - StreamingAnalytics] startFromDvrWindowOffset ${this.dvrWindowOffsetMs}`);
}
break;
case ComscoreState.ADVERTISEMENT:
case ComscoreState.ADVERTISEMENT_PAUSED:
Expand All @@ -186,6 +192,12 @@ export class ComscoreStreamingAnalyticsTHEOIntegration {
console.log(`[COMSCORE - STATE] State change ${this.state} -> VIDEO`);
this.state = ComscoreState.VIDEO;
this.setContentMetadata();
if (this.dvrWindowLengthMs) {
this.streamingAnalytics.setDvrWindowLength(this.dvrWindowLengthMs)
if (this.configuration.debug && LOG_STREAMINGANALYTICS) console.log(`[COMSCORE - StreamingAnalytics] setDvrWindowLength ${this.dvrWindowLengthMs}`);
this.streamingAnalytics.startFromDvrWindowOffset(this.dvrWindowOffsetMs ?? 0)
if (this.configuration.debug && LOG_STREAMINGANALYTICS) console.log(`[COMSCORE - StreamingAnalytics] startFromDvrWindowOffset ${this.dvrWindowOffsetMs}`);
}
break;
case ComscoreState.VIDEO_PAUSED:
if (this.configuration.debug && LOG_STATE_CHANGES)
Expand Down

0 comments on commit 9582bfe

Please sign in to comment.