Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/comscore improvements #27

Merged
merged 26 commits into from
Sep 27, 2024
Merged

Bugfix/comscore improvements #27

merged 26 commits into from
Sep 27, 2024

Conversation

wjoosen
Copy link
Contributor

@wjoosen wjoosen commented Jun 10, 2024

A variety of improvements to the comscore connector:

  • Report ad / content durations and playhead position related properties in milliseconds
  • Use rounded numbers instead of decimals when reporting content duration / playhead postions
  • call notifyEnd between ads in the same adbreak
  • report dvr window length and offsets only when the currently set metadata is ContentMetadata

Copy link

changeset-bot bot commented Jun 10, 2024

🦋 Changeset detected

Latest commit: 955b853

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@theoplayer/comscore-connector-web Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wjoosen wjoosen marked this pull request as draft June 10, 2024 08:27
@wjoosen wjoosen marked this pull request as ready for review September 13, 2024 15:02
// Execute a function with platform-specific code to retrieve up-to-date information.
runPlatformSpecificCodeToRetrieveValues(onSuccessCallback, onErrorCallback);
}
//
Copy link
Contributor

@Jeroen-Veltmans Jeroen-Veltmans Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty comment can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log(
`[COMSCORE - StreamingAnalytics] startFromDvrWindowOffset ${this.dvrWindowOffsetMs}`
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can maybe include this in a more general setContentMetadata and/or make a separate function for it since it is duplicated below as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to leave it out of setContentMetadata (since it only prepares the metadata object and interacts with only one StreamingAnalyics api) but extracted it to a separate function

private isBeforePreRoll = (): boolean =>
this.player.ads?.scheduledAdBreaks.length ? this.player.ads?.scheduledAdBreaks[0].timeOffset === 0 : false;
private isBeforePreRoll = (): boolean => {
const hasScheduledAdBreaks = this.player.ads?.scheduledAdBreaks.length !== 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can player.ads ever be undefined here? Might want to add an early return if that's the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjoosen wjoosen merged commit c5969f2 into main Sep 27, 2024
1 check passed
@MattiasBuelens MattiasBuelens deleted the bugfix/comscore-improvements branch September 27, 2024 13:18
@MattiasBuelens MattiasBuelens added the 🔌 connector: comscore Affects the Comscore connector label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔌 connector: comscore Affects the Comscore connector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants