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

Allow discarding ad breaks #6405

Open
raunakyadav opened this issue Sep 6, 2019 · 5 comments
Open

Allow discarding ad breaks #6405

raunakyadav opened this issue Sep 6, 2019 · 5 comments

Comments

@raunakyadav
Copy link

[REQUIRED] Searched documentation and issues

Found it in a comment in medium post

[REQUIRED] Question

Is manual ad break supported by IMA extension? I am not receiving "AD_BREAK_READY" event if i make changes for it as mentioned here
I have a use case where I want to select whether or not to play an ad basis some time calculations. For that, I need to listen to ad_break_ready event from IMA and play the ad only if condition is met.
Note that I have customised ImaAdsLoader class for these changes.

A full bug report captured from the device

N/A

Link to test content

Any test vmap ad tag would do.

@andrewlewis
Copy link
Collaborator

I'm afraid we don't support this. For VMAP we show ad break at the time given in the VMAP file and single VAST ads play as prerolls.

@raunakyadav
Copy link
Author

Hi Andrew,
Thanks for replying.

Our main requirement is to be able to skip loading few (pre/midroll) ads if time 'x' has not passed since the last ad played anywhere in the app.
If I follow this comment,
a. the ad is skipped but I can see load/play callbacks and some errors in IMA logs.
b. Most of the times I do not get the "ALL_ADS_COMPLETED" callback.
c. In case of postroll being skipped, I see the player showing the play state icon until the ad timeout log.
d. I am worried it would mess up with the error tracking that we do for ads.

Logs:
2019-09-10 12:29:24.462 10906-10906/com.ry.exodemo D/ImaAdsLoader: Initialized with ads rendering settings: AdsRenderingSettings [bitrate=-1, mimeTypes=[video/mp4, video/webm, video/3gpp, audio/mp4, audio/mpeg], uiElements=null, enablePreloading=true, playAdsAfterTime=-1.0]
2019-09-10 12:29:24.810 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: LOADED
2019-09-10 12:29:24.822 10906-10906/com.ry.exodemo D/ImaAdsLoader: loadAd in ad group -1
2019-09-10 12:29:24.822 10906-10906/com.ry.exodemo W/ImaAdsLoader: Unexpected loadAd without LOADED event; assuming ad group index is actually 0
2019-09-10 12:29:24.823 10906-10906/com.ry.exodemo W/ImaAdsLoader: Unexpected loadAd in an ad group with no remaining unavailable ads
2019-09-10 12:29:24.829 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: CONTENT_PAUSE_REQUESTED
2019-09-10 12:29:24.862 10906-10906/com.ry.exodemo D/ImaAdsLoader: playAd
2019-09-10 12:29:32.830 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: LOG
2019-09-10 12:29:32.830 10906-10906/com.ry.exodemo I/ImaAdsLoader: AdEvent: {errorMessage=VAST media file loading reached a timeout of 8 seconds., errorCode=402, type=adPlayError}
2019-09-10 12:29:32.852 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: CONTENT_RESUME_REQUESTED
2019-09-10 12:29:32.852 10906-10906/com.ry.exodemo D/ImaAdsLoader: Unexpected CONTENT_RESUME_REQUESTED without stopAd
2019-09-10 12:29:32.872 10906-10906/com.ry.exodemo D/ImaAdsLoader: pauseAd
2019-09-10 12:29:36.969 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: LOADED
2019-09-10 12:29:36.969 10906-10906/com.ry.exodemo D/ImaAdsLoader: Loaded ad 1 of 1 in group 0
2019-09-10 12:29:36.969 10906-10906/com.ry.exodemo W/ImaAdsLoader: Unexpected ad count in LOADED, 1, expected 0
2019-09-10 12:29:36.989 10906-10906/com.ry.exodemo D/ImaAdsLoader: loadAd in ad group 0
2019-09-10 12:29:36.989 10906-10906/com.ry.exodemo W/ImaAdsLoader: Unexpected loadAd in an ad group with no remaining unavailable ads
2019-09-10 12:29:40.753 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: CONTENT_PAUSE_REQUESTED
2019-09-10 12:29:40.801 10906-10906/com.ry.exodemo D/ImaAdsLoader: playAd
2019-09-10 12:29:48.797 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: LOG
2019-09-10 12:29:48.797 10906-10906/com.ry.exodemo I/ImaAdsLoader: AdEvent: {errorMessage=VAST media file loading reached a timeout of 8 seconds., errorCode=402, type=adPlayError}
2019-09-10 12:29:48.829 10906-10906/com.ry.exodemo D/ImaAdsLoader: onAdEvent: CONTENT_RESUME_REQUESTED
2019-09-10 12:29:48.830 10906-10906/com.ry.exodemo D/ImaAdsLoader: Unexpected CONTENT_RESUME_REQUESTED without stopAd
2019-09-10 12:29:48.882 10906-10906/com.ry.exodemo D/ImaAdsLoader: pauseAd
/////////////////////////////////

Just a side question, how big of a change would supporting manual ad break be if I want to implement that? It gives a better control over ads and looks like an important feature that is missing in IMA extension.

@andrewlewis andrewlewis reopened this Sep 22, 2019
@andrewlewis
Copy link
Collaborator

This does indeed sound like it might be useful, but I don't think we will have time to look into it soon. You might want to experiment with calling AdsManager.discardAdBreak() but there is probably going to be some extra complexity in updating state in ImaAdsLoader when doing this (depending what callbacks IMA makes). I will mark this as a low-priority enhancement for now, to investigate whether we can expose that method and still use auto-playing ads.

@andrewlewis andrewlewis changed the title Is manual ad break supported by IMA extension? Allow discarding ad breaks Sep 22, 2019
@LouisLin0706

This comment has been minimized.

@andrewlewis

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants