Issue description
If you set an initial position beyond a mid-roll ad break, the content fails to play and the player just gets stuck (for demo player this is just a black sceen, there are no error logs present). Setting the position before the mid-roll will play the pre-roll ad and then start content its only when seeking past a mid-roll that the player fails.
Use Case: Continue watching feature with content that contains ad breaks.
Reproduction steps
Reproducible on the ExoPlayer demo app using the IMA demo.
Set the
content_url and ad_tag_url to the values below taken from assets in demo:
{
"name": "VMAP pre-roll single ad, mid-roll standard pod with 3 ads, post-roll single ad",
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/mkv/android-screens-lavf-56.36.100-aac-avc-main-1280x720.mkv",
"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%3Dpremidpostpod&cmsid=496&vid=short_onecue&correlator="
}
Then within the PlayerManager class set the initial contentPosition to 25000 (the mid-roll for this ad tag is 15 secs in).
If you want to see it work correctly just set the contentPosition to 10000.
Link to test content
Reproducible on all content I've tested. Links above to demo player.
Version of ExoPlayer being used
2.6.0
Device(s) and version(s) of Android being used
- Galaxy S8 (SM-G950FD) / Android Version 7.0
- Huawei Nexus 6P / Android Version 8.0.0
A full bug report captured from the device
Not much to go off of here with the DEBUG flag in ImaAdsLoader set to true we get:
11-30 12:06:49.286 15257-15257/com.google.android.exoplayer2.imademo D/ImaAdsLoader: Initialized with preloading
11-30 12:06:49.390 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: onAdEvent: LOG
11-30 12:06:49.391 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: errorMessage: The response does not contain any valid ads.
11-30 12:06:49.391 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: errorCode: 1009
11-30 12:06:49.391 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: type: adLoadError
11-30 12:06:49.405 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: onAdEvent: LOG
11-30 12:06:49.405 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: errorMessage: The response does not contain any valid ads.
11-30 12:06:49.405 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: errorCode: 1009
11-30 12:06:49.405 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: type: adLoadError
11-30 12:06:49.412 15257-15257/com.google.android.exoplayer2.imademo W/ImaAdsLoader: onAdEvent: CONTENT_RESUME_REQUESTED
Issue description
If you set an initial position beyond a mid-roll ad break, the content fails to play and the player just gets stuck (for demo player this is just a black sceen, there are no error logs present). Setting the position before the mid-roll will play the pre-roll ad and then start content its only when seeking past a mid-roll that the player fails.
Use Case: Continue watching feature with content that contains ad breaks.
Reproduction steps
Reproducible on the ExoPlayer demo app using the IMA demo.
Set the
content_urlandad_tag_urlto the values below taken fromassetsin demo:Then within the PlayerManager class set the initial contentPosition to
25000(the mid-roll for this ad tag is 15 secs in).If you want to see it work correctly just set the contentPosition to
10000.Link to test content
Reproducible on all content I've tested. Links above to demo player.
Version of ExoPlayer being used
2.6.0
Device(s) and version(s) of Android being used
A full bug report captured from the device
Not much to go off of here with the DEBUG flag in ImaAdsLoader set to true we get: