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

Dispatch a player event for client-side ad errors #4335

Closed
sachaelkaim opened this issue Jul 6, 2022 · 1 comment · Fixed by #5045
Closed

Dispatch a player event for client-side ad errors #4335

sachaelkaim opened this issue Jul 6, 2022 · 1 comment · Fixed by #5045
Labels
component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@sachaelkaim
Copy link
Contributor

sachaelkaim commented Jul 6, 2022

Have you read the Tutorials?
yes

Have you read the FAQ and checked for duplicate open issues?
yes

What version of Shaka Player are you using?
3.3.5

Please ask your question
I would like to log google.ima.AdErrorEvent.Type.AD_ERROR on loading to my console and
google.ima.AdErrorEvent.Type.AD_ERROR while playing ads, but I do not see any event listeners for this in the documentation.
Is there any way to call these event listeners to output messages on my console without using the Shaka debugger?

@sachaelkaim sachaelkaim added the type: question A question from the community label Jul 6, 2022
@joeyparrish
Copy link
Member

It looks like we don't expose those events in any way today. I'll convert this into a feature request.

If anyone is interested in adding that, please take a look at onAdError_ in lib/ads/client_side_ad_manager.js. This could dispatch events through the player via this.onEvent_(), and there are several examples of this in that file.

We recently started collecting event names into shaka.util.FakeEvent.EventName, and event types are documented at the top of lib/player.js. So please use these when you add a new ad-error event to the player.

Does this help?

@joeyparrish joeyparrish added type: enhancement New feature or request flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this flag: good first issue This might be a relatively easy issue; good for new contributors component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs priority: P2 Smaller impact or easy workaround and removed type: question A question from the community labels Jul 22, 2022
@joeyparrish joeyparrish changed the title How to log IMA AD_ERROR's Dispatch a player event for client-side ad errors Jul 22, 2022
@github-actions github-actions bot added this to the Backlog milestone Jul 22, 2022
@avelad avelad modified the milestones: Backlog, v4.4 Feb 28, 2023
avelad added a commit that referenced this issue Mar 2, 2023
Closes #4335

The errors are now forwarded to the player

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label May 1, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs flag: good first issue This might be a relatively easy issue; good for new contributors flag: seeking PR We are actively seeking PRs for this; we do not currently expect the core team will resolve this priority: P2 Smaller impact or easy workaround status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants