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

[Video Module] Include a type property in all events #9771

Merged
merged 1 commit into from May 12, 2023

Conversation

karimMourra
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

The type property is missing from certain events fired by the video module. For consistency, we have added a util.

@pm-harshad-mane
Copy link
Contributor

I re-ran the CircleCI job and we have all the checks passed now.
@musikele, Can you please review the code changes?

@karimMourra
Copy link
Collaborator Author

Hi @pm-harshad-mane and @musikele this has been open for a while. Any blockers to merging ?

@musikele
Copy link
Contributor

just struggled with tasks at my regular work. Will check out now.

Copy link
Contributor

@musikele musikele left a comment

Choose a reason for hiding this comment

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

LGTM but, do we need a second review for library code?

@@ -1,5 +1,19 @@
import { videoKey } from '../constants/constants.js'

export function getExternalVideoEventName(eventName) {
if (!eventName) {
return '';
}
return videoKey + eventName.replace(/^./, eventName[0].toUpperCase());
Copy link
Contributor

Choose a reason for hiding this comment

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

Here are we assuming that all video players have the event names have the prefix video ?
Should it be configurable with the default value video?
Refer: https://github.com/prebid/Prebid.js/blob/master/libraries/video/constants/constants.js#L1

Copy link
Contributor

Choose a reason for hiding this comment

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

@musikele the library code has very limited functionality, looks good to me but I have one doubt (mentioned in the above comment)
@karimMourra please check the above comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@pm-harshad-mane these events are part of the module's API. When video players surface events, they surface them using the following constants https://github.com/prebid/Prebid.js/blob/master/libraries/video/constants/events.js and we append the video portion. It keeps the char count lower.
This is already documented https://docs.prebid.org/prebid-video/video-module.html

@pm-harshad-mane
Copy link
Contributor

@karimMourra do we want to update some documentation along with these code changes?
Please create /share the PR link for the same.

@karimMourra
Copy link
Collaborator Author

@pm-harshad-mane the documentation is already up to date https://docs.prebid.org/prebid-video/video-module.html , see the Events section

@pm-harshad-mane
Copy link
Contributor

Thanks @karimMourra and @musikele, I will merge these changes then.

@pm-harshad-mane pm-harshad-mane merged commit 5db8560 into prebid:master May 12, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants