-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Support changing ad break positions #5067
Comments
The midroll position is defined in the data of your ad tag uri (at 15 seconds in the example you provided). If your question is related to configure the server to generate these ad tags, that goes beyond what we can answer here. I suppose the server should know the content duration before generating ad tags for it. @andrewlewis may be able to clarify if that's wrong. If the problem is that you don't control the content but need to know the duration before constructing the AdsMediaSource, then it's just not possible without loading at least some part of the media. We plan to release a metadata extractor some time soon which helps you with that. Until then, you can just prepare the media without ads in the background and wait until the duration becomes known. |
@tonihei This is my use case:
// init the ad playback state with adGroupTimesUs
Modifying the code like this, we are not sure if it will affect the playback process of the player. Help you give some advice. |
Thanks for the clarification. Using C.TIME_UNSET as the ad group position is probably not a good idea because we don't support that in the player. Also, we currently don't support changing the ad position dynamically. However, we are planning to add support for this soon anyway and we can use this issue to track this. Besides that, you could try to wrap the content source in a another media source which lets you access the content timeline: |
@tonihei As you said, i custom a wrapper source to container the content media source. @OverRide |
Not yet, sorry. This is an enhancement currently tracked by #4727. |
The player already supports changing durations of periods and ads. The only thing not yet supported is a change in ad break positions which changes the duration of clipped content ending in an ad break. Adding support for this requires updating the end position in MediaPeriodInfo and changing the clip end position of the respective ClippingMediaPeriod. Issue: #5067 PiperOrigin-RevId: 373139724
Closing issue as it has been marked fixed in 08fb7bd. The commit will be included in release 2.15.0 |
This is reproducible as below configured in the media.exolist.json.
{
"name": "VMAP pre-, mid- and post-rolls, single ads",
"uri": "http://192.168.75.251:8081/test/hls/multirate/multirate.m3u8",
"ad_tag_uri": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator="
},
The text was updated successfully, but these errors were encountered: