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

DRM-protected content playback stuck after ad playback (VMAP) #7188

Closed
07steven01 opened this issue Apr 4, 2020 · 3 comments
Closed

DRM-protected content playback stuck after ad playback (VMAP) #7188

07steven01 opened this issue Apr 4, 2020 · 3 comments
Assignees
Labels

Comments

@07steven01
Copy link

07steven01 commented Apr 4, 2020

[REQUIRED] Issue description

When playing a Widevine DRM protected video content (secure) along with VMAP ads the player does not resume content playback when a pre-roll ad has completed. This doesn't happen with Widevine Clear streams.

[REQUIRED] Reproduction steps

  1. In ExoPlayer demo app code, in demos/main/media.exolist.json edit the entry VW Secure HD (MP4,H265) to include the ad info of the "VMAP pre-, mid- and post-rolls, single ads" entry (to be found further down in the media.exolist.json file)
    [combined entry]
    "name": "WV: Secure HD (MP4,H265)",
    "uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_hd.mpd",
    "drm_scheme": "widevine",
    "drm_license_url": "https://proxy.uat.widevine.com/proxy?provider=widevine_test",
    "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%3Dpremidpost&cmsid=496&vid=short_onecue&correlator="
  2. Compile and run the exoplayer demo with extenstions flavour
  3. Now choose the VW Secure HD (MP4, H265) entry for playback
  4. Wait until pre-roll ad playback completes

Expected result: Video playback is resumed
Actual result: Video playback is stuck

[REQUIRED] Link to test content

https://drive.google.com/open?id=115Vdcs80frzeoYtgapZDmqn1l0z07TdH
{
"name": "WV: Secure HD (MP4,H265)",
"uri": "https://storage.googleapis.com/wvmedia/cenc/hevc/tears/tears_hd.mpd",
"drm_scheme": "widevine",
"drm_license_url": "https://proxy.uat.widevine.com/proxy?provider=widevine_test",
"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%3Dpremidpost&cmsid=496&vid=short_onecue&correlator="
}

[REQUIRED] A full bug report captured from the device

https://drive.google.com/open?id=1ARnREKjruCI5r0tyUfD-M8QosA-w0K2G

[REQUIRED] Version of ExoPlayer being used

2.11.1

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

Android Emulator/Android 10; Xiaomi Mi A3/Android 9

@07steven01 07steven01 changed the title Player stuck when a VMAP ad completed (only DRM-protected content) Player stuck when a VMAP ad playback completed (only DRM-protected content) Apr 4, 2020
@07steven01 07steven01 changed the title Player stuck when a VMAP ad playback completed (only DRM-protected content) DRM-protected content playback stuck when a VMAP ad playback completed Apr 4, 2020
@07steven01 07steven01 changed the title DRM-protected content playback stuck when a VMAP ad playback completed DRM-protected content playback stuck after a VMAP ad completes Apr 4, 2020
@07steven01 07steven01 changed the title DRM-protected content playback stuck after a VMAP ad completes DRM-protected content playback stuck after ad playback (VMAP) Apr 4, 2020
@AquilesCanta
Copy link
Contributor

AquilesCanta commented Apr 6, 2020

I think this is an issue we are already aware of and working on.

The underlying cause is that since we moved DRM to the SampleQueue, an assumption made by the ClippingMediaPeriod is no longer true. We'll be adding a workaround to fix clipping in the short term sometime soon, and then work towards a longer term solution. Once we push the fix to the dev branch, a commit will be referenced here.

ojw28 pushed a commit that referenced this issue Apr 7, 2020
When ClippingMediaPeriod first tried to read a buffer, if its end
position was before the end of the stream and it was buffered to its end
position, it would sometimes erroneously signal end-of-stream for
protected content because the sample queue might be waiting for DRM keys
at this point.

Work around the issue temporarily by signaling this specific case back
to ClippingMediaPeriod via the DecoderInputBuffer.

There will likely be a cleaner fix as a result of adding support for
dynamic clip end points in the future, at which point this can be
reverted.

issue:#7188
PiperOrigin-RevId: 305081757
ojw28 pushed a commit that referenced this issue Apr 7, 2020
When ClippingMediaPeriod first tried to read a buffer, if its end
position was before the end of the stream and it was buffered to its end
position, it would sometimes erroneously signal end-of-stream for
protected content because the sample queue might be waiting for DRM keys
at this point.

Work around the issue temporarily by signaling this specific case back
to ClippingMediaPeriod via the DecoderInputBuffer.

There will likely be a cleaner fix as a result of adding support for
dynamic clip end points in the future, at which point this can be
reverted.

issue:#7188
PiperOrigin-RevId: 305081757
@ojw28
Copy link
Contributor

ojw28 commented Apr 7, 2020

This will be fixed in 2.11.4. Please verify using dev-v2-r2.11.4 or dev-v2 if possible.

@ojw28 ojw28 closed this as completed Apr 7, 2020
@07steven01
Copy link
Author

07steven01 commented Apr 7, 2020 via email

@google google locked and limited conversation to collaborators Jun 7, 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

4 participants