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

How to use IMA extension without autoplay? #4300

Closed
Anton111111 opened this issue May 25, 2018 · 5 comments
Closed

How to use IMA extension without autoplay? #4300

Anton111111 opened this issue May 25, 2018 · 5 comments
Assignees

Comments

@Anton111111
Copy link
Contributor

Hi!
I want to show ads without autoplay enabled. For example if i remove player.setPlayWhenReady(true); in the example:

I don't see ad.
How to start show ad only when user click on play button ?

@andrewlewis andrewlewis self-assigned this May 25, 2018
@Anton111111
Copy link
Contributor Author

@Anton111111
Copy link
Contributor Author

Anton111111 commented May 25, 2018

Also if i set player.setPlayWhenReady(false); how in example above i see in log the following Error:

05-25 18:15:02.683 16994-16994/com.google.android.exoplayer2.imademo D/ImaAdsLoader: onAdError
    AdError [errorType: PLAY, errorCode: AdErrorCode [name: VIDEO_PLAY_ERROR, number: 400], message: There was an error playing the video ad.]
        at com.google.obf.ir.a(IMASDK:102)
        at com.google.obf.ij.a(IMASDK:73)
        at com.google.obf.jd.f(IMASDK:213)
        at com.google.obf.jd.a(IMASDK:44)
        at com.google.obf.je.b(IMASDK:39)
        at com.google.obf.je$1.shouldOverrideUrlLoading(IMASDK:4)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:73)
        at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:339)
        at org.chromium.android_webview.AwContentsClient.shouldIgnoreNavigation(AwContentsClient.java:168)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:256)
        at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
        at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6077)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
05-25 18:15:02.691 16994-16994/com.google.android.exoplayer2.imademo D/ImaAdsLoader: onAdEvent: CONTENT_RESUME_REQUESTED
    Unexpected CONTENT_RESUME_REQUESTED without stopAd
05-25 18:15:02.696 16994-16994/com.google.android.exoplayer2.imademo D/ImaAdsLoader: onAdEvent: ALL_ADS_COMPLETED

@Anton111111
Copy link
Contributor Author

I think this issue is not question. I think status must be changed to bug.

@andrewlewis
Copy link
Collaborator

#3764 may be related.

@andrewlewis
Copy link
Collaborator

This is the same failure mode as #3764: we pause the ad immediately but IMA raises an error and forces us to start playing the content. Marking this as a duplicate of that issue. I've asked the IMA SDK team to take a look and will update that issue when I hear back. Thanks!

@google google locked and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants