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

Player cannot enter midroll when the response of preroll is empty #7956

Closed
rsmbovct opened this issue Sep 21, 2020 · 1 comment
Closed

Player cannot enter midroll when the response of preroll is empty #7956

rsmbovct opened this issue Sep 21, 2020 · 1 comment
Assignees
Labels

Comments

@rsmbovct
Copy link

rsmbovct commented Sep 21, 2020

[REQUIRED] Issue description

I am facing a problem that player is getting stuck in 3-4 seconds and it skips the midroll when the response of preroll is empty.

When I start the video with empty preroll, and jump the timeline before first midroll, the player stucks in BUFFERING state in some seconds, then skips the midroll and continues playing the video.

However, if I start the video with empty preroll, and jump the timeline after first midroll, the player can enter midroll successfully. I can reproduce it in the Exoplayer demo app. Below is the error log.

2020-09-21 16:30:25.078 12445-12445/com.google.android.exoplayer2.demo E/EventLogger: internalError [eventTime=32.57, mediaPos=680.45, window=0, loadError
com.google.android.exoplayer2.source.ads.AdsMediaSource$AdLoadException: java.io.IOException: Failed to load ad group 1
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.handleAdGroupLoadError(ImaAdsLoader.java:1411)
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.access$1400(ImaAdsLoader.java:103)
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader$ComponentListener.getContentProgress(ImaAdsLoader.java:1719)
at com.google.ads.interactivemedia.v3.internal.aku.c(IMASDK:2)
at com.google.ads.interactivemedia.v3.internal.aku.handleMessage(IMASDK:10)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:359)
at android.app.ActivityThread.main(ActivityThread.java:7418)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Caused by: java.io.IOException: Failed to load ad group 1
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.handleAdGroupLoadError(ImaAdsLoader.java:1411) 
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.access$1400(ImaAdsLoader.java:103) 
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader$ComponentListener.getContentProgress(ImaAdsLoader.java:1719) 
at com.google.ads.interactivemedia.v3.internal.aku.c(IMASDK:2) 
at com.google.ads.interactivemedia.v3.internal.aku.handleMessage(IMASDK:10) 
at android.os.Handler.dispatchMessage(Handler.java:103) 
at android.os.Looper.loop(Looper.java:359) 
at android.app.ActivityThread.main(ActivityThread.java:7418) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935) 
Caused by: java.io.IOException: Ad preloading timed out
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader$ComponentListener.getContentProgress(ImaAdsLoader.java:1719) 
at com.google.ads.interactivemedia.v3.internal.aku.c(IMASDK:2) 
at com.google.ads.interactivemedia.v3.internal.aku.handleMessage(IMASDK:10) 
at android.os.Handler.dispatchMessage(Handler.java:103) 
at android.os.Looper.loop(Looper.java:359) 
at android.app.ActivityThread.main(ActivityThread.java:7418) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935) 
]

[REQUIRED] Reproduction steps

  • Prepare Empty preroll and non-empty midroll
  • Just use Exoplayer demo app to reproduce
  1. start the video with empty preroll
  2. Jump the timeline before first midroll
  3. Wait for the start time of midroll
    
  4. The player stucks in BUFFERING state in some seconds, then it skips the midroll and continues playing the video.

[REQUIRED] Link to test content

I will email a JSON snippet for the demo app’s media.exolist.json file to you.

[REQUIRED] A full bug report captured from the device

I will email a full bug report to you.

[REQUIRED] Version of ExoPlayer being used

2.12.0

[REQUIRED] Device(s) and version(s) of Android being used

Sony Xperia 1, Android 10

@andrewlewis
Copy link
Collaborator

Thanks for reporting this. The pending content position wasn't cleared when there was a fetch error (for an empty ad group), so we wouldn't send an updated player position to the IMA SDK after that, preventing loading later ad groups. There is a possible fix in review and this issue will be updated once it's available on the development branch.

andrewlewis added a commit that referenced this issue Sep 30, 2020
On receiving a fetch error for an ad that would otherwise play based on an
initial/seek position, the pending content position wasn't cleared which meant
that position reporting was broken after a fetch error. Fix this by always
clearing the pending position (if there was a pending position that will have
triggered the fetch error).

Also deduplicate the code for handling empty ad groups (fetch errors)
and ad group load errors.

Issue: #7956
PiperOrigin-RevId: 334113131
ojw28 pushed a commit that referenced this issue Oct 21, 2020
On receiving a fetch error for an ad that would otherwise play based on an
initial/seek position, the pending content position wasn't cleared which meant
that position reporting was broken after a fetch error. Fix this by always
clearing the pending position (if there was a pending position that will have
triggered the fetch error).

Also deduplicate the code for handling empty ad groups (fetch errors)
and ad group load errors.

Issue: #7956
PiperOrigin-RevId: 334113131
@google google locked and limited conversation to collaborators Dec 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants