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

feat(ads): Add control AdsRenderingSettings #5027

Closed

Conversation

rizalibnu
Copy link

Closes #5011

This add the possibility to control the rendering of ads

@google-cla
Copy link

google-cla bot commented Feb 24, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@avelad avelad added type: enhancement New feature or request component: ads The issue involves the Shaka Player ads API or the use of other ad SDKs priority: P3 Useful but not urgent labels Feb 27, 2023
@avelad avelad added this to the v4.4 milestone Feb 27, 2023
@avelad
Copy link
Member

avelad commented Feb 27, 2023

@rizalibnu can you fix the tests? Thanks for your contribution!

@@ -26,7 +26,7 @@ shaka.ads.ClientSideAdManager = class {
* @param {string} locale
* @param {function(!shaka.util.FakeEvent)} onEvent
Copy link
Contributor

Choose a reason for hiding this comment

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

You should add adsRenderingSettings to the JSDoc here.

* @param {!google.ima.AdsRenderingSettings} adsRenderingSettings
*/
updateAdsRenderingSettings(adsRenderingSettings) {
if (this.imaAdsManager_) {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should also change the value of this.adsRenderingSettings_, so that this method will still work if called before we receive an ADS_MANAGER_LOADED event and create this.imaAdsManager_.

};


/** @const */
google.ima.AdsManagerLoadedEvent = class extends Event {
/**
* @param {!HTMLElement} video
* @param {!google.ima.AdsRenderingSettings=} adsRenderingSettings
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm... actually not sure if you need to define the google.ima.AdsRenderingSettings type in the externs?

At no point in the code do we actually access the inner variables of the type, we just take it in as a parameter and then pass it unmodified to the IMA SDK. We also never make an google.ima.AdsRenderingSettings object in-code.

So it might just be enough to say that this is an Object=. We do stuff like for other pass-through config objects in other externs, like in externs/mux.js (for the constructor of muxjs.mp4.Transmuxer).

Copy link
Member

Choose a reason for hiding this comment

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

@theodab I think that adding the definition is not bad, and it can help people in the integration. I would not take away the work that has already been done.

@avelad
Copy link
Member

avelad commented Mar 16, 2023

@rizalibnu can you review the latest comments? Thanks!

@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Mar 16, 2023
@joeyparrish
Copy link
Member

Closing due to inactivity. If you need to reopen this PR, just put @shaka-bot reopen in a comment. Thanks!

@github-actions github-actions bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jul 25, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Aug 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 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 priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates the IMA sdk ads rendering settings
4 participants