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

ExoPlayer with IMA SDK not playing mid-roll ads for Live Channels stream type #7322

Closed
bhaskarraj opened this issue May 3, 2020 · 10 comments
Assignees

Comments

@bhaskarraj
Copy link

bhaskarraj commented May 3, 2020

I am using Exoplayer for streaming Live TV channels and movies. Also, I have integrated IMA SDK which allows playing instream ads and its working perfectly for movies. Pre, Mid and Post-roll Ads are working fine for movies but for Live TV Channel streaming it's only able to load pre-roll ads and mid-roll is not working for this condition. While trying to play mid-roll ads the player freezes.

The reference to my code is the same as this:
https://qiita.com/mehdi/items/e1de77dbbfd595314c41

I am using the following adTagUrl to test:

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=

Also, I am not getting error in logcat

@andrewlewis
Copy link
Collaborator

We don't currently support midrolls in live streams (see #4565). I will mark this as a low-priority enhancement for now, but if you need a fix soon you may want to look into doing server-side ad insertion.

@andrewlewis
Copy link
Collaborator

At the moment, I don't think we have a sensible way to address this issue from #4546: "The ad tags have fixed cue points and it's unclear how to handle the player position when resuming the live stream after playing a midroll."

@bhaskarraj
Copy link
Author

Thank you for the information.

@andrewlewis
Copy link
Collaborator

Reopening to track the enhancement.

@okycelt
Copy link

okycelt commented Jun 2, 2020

@andrewlewis, we're also interested in having midrolls in live streams. Actually, Shaka Player already supports this. The way it works is that it resumes the live stream in the same position where it stopped before. So the delay from the live edge is gradually increasing. In our tests, we've used fixed cue points and it wasn't a problem.

If it helps, we could provide a testing live stream together with VMAP URL which you could use for development.

@andrewlewis
Copy link
Collaborator

@okycelt That would be helpful, especially if the stream/ad tag don't expire for a while (I'm not sure when we will get round to doing this). Thanks.

@okycelt
Copy link

okycelt commented Jun 2, 2020

@andrewlewis, I've sent you the links via email. The VMAP is generated dynamically. There should be a midroll every 20 seconds or so for the following 5 hours after you request the VMAP. If any of the links expire, just ping us here or via email. We'll provide new links.

Thank you

@okycelt
Copy link

okycelt commented Jun 9, 2020

Btw. while in 2.11.4 the player freezes when trying to play a mid-roll on live stream, in 2.11.5 the player crashes with the following exception:

E/ImaAdsLoader: Internal error in loadAd
      java.lang.IllegalStateException: Failed to find cue point
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.getAdGroupIndexForAdPod(ImaAdsLoader.java:1457)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.loadAd(ImaAdsLoader.java:845)
        at com.google.ads.interactivemedia.v3.internal.akf.a(IMASDK:23)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:177)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:44)
        at com.google.ads.interactivemedia.v3.internal.ake.b(IMASDK:28)
        at com.google.ads.interactivemedia.v3.internal.akc.shouldOverrideUrlLoading(IMASDK:6)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:83)
        at Dx.a(PG:1)
        at ic.a(PG:22)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(PG:152)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:336)
        at android.os.Looper.loop(Looper.java:174)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        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:930)
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: xxx, PID: 3880
    java.lang.NullPointerException: throw with null exception
        at com.google.android.exoplayer2.util.Assertions.checkNotNull(Assertions.java:147)
        at com.google.android.exoplayer2.ext.ima.ImaAdsLoader.playAd(ImaAdsLoader.java:910)
        at com.google.ads.interactivemedia.v3.internal.akf.a(IMASDK:16)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:177)
        at com.google.ads.interactivemedia.v3.internal.akb.a(IMASDK:44)
        at com.google.ads.interactivemedia.v3.internal.ake.b(IMASDK:28)
        at com.google.ads.interactivemedia.v3.internal.akc.shouldOverrideUrlLoading(IMASDK:6)
        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:83)
        at Dx.a(PG:1)
        at ic.a(PG:22)
        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(PG:152)
        at android.os.MessageQueue.nativePollOnce(Native Method)
        at android.os.MessageQueue.next(MessageQueue.java:336)
        at android.os.Looper.loop(Looper.java:174)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        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:930)

@ojw28
Copy link
Contributor

ojw28 commented Jun 11, 2020

Is this tracking something different to #6388, and if not can they be duped together?

@andrewlewis
Copy link
Collaborator

Duplicate of #6388

@andrewlewis andrewlewis marked this as a duplicate of #6388 Jun 11, 2020
@google google locked and limited conversation to collaborators Aug 11, 2020
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

4 participants