You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exoplayer IMA Extention will throw a VIDEO_PLAY_ERROR when attempting to call Exoplayer$seekTo() while ad is playing.
Reproduction steps
Once player state changes to STATE_READY and playWhenReady is set to true, we can call seekTo and causes the playback of the ad to stop playing.
Ideally, calling seekTo() while an ad is playing would either buffer the seek position for the video that will play after the ad, or simply be ignored.
Link to test content
I've reproduced the issue in this repo (cloned from Exoplayer on 9/27)
The primary difference between the above file and this project's PlayerActivity.java is in Lines 486-488 which I have copied here with context.
@Override
public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
if(playbackState == Player.STATE_READY) {
player.seekTo(1000);
}
if (playbackState == Player.STATE_ENDED) {
showControls();
}
updateButtonVisibilities();
}
Adding lines 486-488 in the linked file above will cause exoplayer to start playing the ad and then skip directly to the video. The Logcat prints that an "Ad load error" occured.
W/ImaAdsMediaSource: Ad load error
java.io.IOException: Ad error: com.google.obf.gk@c3a5729
at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.onAdError(ImaAdsLoader.java:416)
at com.google.obf.he.a(IMASDK:8)
at com.google.obf.gy.a(IMASDK:60)
at com.google.obf.gy.a(IMASDK:95)
at com.google.obf.gq.a(IMASDK:71)
at com.google.obf.hj.f(IMASDK:202)
at com.google.obf.hj.a(IMASDK:41)
at com.google.obf.hk.b(IMASDK:39)
at com.google.obf.hk$1.shouldOverrideUrlLoading(IMASDK:4)
at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73)
at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:354)
at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:168)
at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:352)
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:41)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Note: The seek position is irrelevant. Calling player.seekTo(0) produces the same result.
Version of ExoPlayer being used
Exoplayer 2.5.3 on branch dev-v2-r2.5.3
Device(s) and version(s) of Android being used
Nexus 5 with Android 6.0.1
Emulator with Android 8.0.0
Seeking while an ad is playing is quite difficult to do in general, because it may be necessary to play a different ad once the current ad finishes if the seek destination has a different preceding midroll ad. Initially I plan to ignore seeks and log a warning.
With v2.6.0 play will freeze using HLS if you try to seek past the midroll ad after the pre roll ad has finished. Seeking anywhere before the midroll is fine. Tested on Nexus 6P running 8.1.
Issue description
Exoplayer IMA Extention will throw a VIDEO_PLAY_ERROR when attempting to call Exoplayer$seekTo() while ad is playing.
Reproduction steps
Once player state changes to STATE_READY and playWhenReady is set to true, we can call seekTo and causes the playback of the ad to stop playing.
Ideally, calling seekTo() while an ad is playing would either buffer the seek position for the video that will play after the ad, or simply be ignored.
Link to test content
I've reproduced the issue in this repo (cloned from Exoplayer on 9/27)
https://github.com/ntkachov/ExoPlayer/blob/dev-v2-r2.5.3/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java#L486
The primary difference between the above file and this project's PlayerActivity.java is in Lines 486-488 which I have copied here with context.
Adding lines 486-488 in the linked file above will cause exoplayer to start playing the ad and then skip directly to the video. The Logcat prints that an "Ad load error" occured.
Note: The seek position is irrelevant. Calling
player.seekTo(0)
produces the same result.Version of ExoPlayer being used
Exoplayer 2.5.3 on branch dev-v2-r2.5.3
Device(s) and version(s) of Android being used
Nexus 5 with Android 6.0.1
Emulator with Android 8.0.0
A full bug report captured from the device
bugreport-sdk_gphone_x86-OSR1.170720.005-2017-09-28-11-06-27.zip
The text was updated successfully, but these errors were encountered: