New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 622956 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

MediaKeySession does not fire keystatuseschange on close per specification

Reported by wats...@netflix.com, Jun 24 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Example URL:
See attached modified version of Blink encrypted media test

Steps to reproduce the problem:
1. Obtain a MediaKeySession object
2. Populate it with some keys
3. Close the session

What is the expected behavior?
A keystatuseschange event should be fired on the MediaKeySession after the closed attribute and close() method return promises are resolved.

What went wrong?
No keystatuseschanged event is observed after close()

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? N/A 

Chrome version: 51.0.2704.103  Channel: n/a
OS Version: OS X 10.11.5
Flash Version: Shockwave Flash 22.0 r0
 
encrypted-media-keystatuses.html
8.1 KB View Download
Components: -Internals>Media Internals>Media>Encrypted
Labels: -OS-Mac EME-compat OS-All
Owner: jrumm...@chromium.org
Status: Assigned (was: Unconfirmed)
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7166975fdb70c379be724825394c20c01e606606

commit 7166975fdb70c379be724825394c20c01e606606
Author: jrummell <jrummell@chromium.org>
Date: Sat Jul 02 02:38:56 2016

EME: Clear Key CDM now generates keystatuseschange event on close()

EME spec requires a CDM to generate a keystatuseschange event when
close() is called (as any available keys for that session are now
gone). This updates the Clear Key CDM to generate the required event.

BUG= 622956 
TEST=updated EME tests passes

Review-Url: https://codereview.chromium.org/2108033002
Cr-Commit-Position: refs/heads/master@{#403595}

[modify] https://crrev.com/7166975fdb70c379be724825394c20c01e606606/media/cdm/aes_decryptor.cc
[modify] https://crrev.com/7166975fdb70c379be724825394c20c01e606606/media/cdm/aes_decryptor_unittest.cc
[modify] https://crrev.com/7166975fdb70c379be724825394c20c01e606606/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses.html

Status: Fixed (was: Started)
Labels: M-54

Comment 6 by wats...@netflix.com, Jul 22 2016

This seems to be fixed for Clear Key, but I still see the same problem for Widevine:

https://web-platform.test:8443/encrypted-media/drm-mp4-playback-temporary.html
Status: Assigned (was: Fixed)
jrummell, PTAL.
Update to #6: The failure now ppears to be in http://www.w3c-test.org/encrypted-media/drm-mp4-playback-temporary-events.html. (encrypted-media/drm-mp4-playback-temporary.html passes.)

Clear Key (http://www.w3c-test.org/encrypted-media/clearkey-mp4-playback-temporary-events.html) passes.
Owner: tinskip@chromium.org
Assigning to tinskip@ to make the change for Widevine, as requested.
Cc: rkuroiwa@chromium.org ericde@chromium.org
Labels: -Pri-2 -M-54 M-55 eme-bin Pri-1
This is preventing us from passing a spec test, which is blocking PR.
Interestingly, this test was passing on Firefox 51 with Widevine last time the tests were run.
Will fix for m55.
Confirming #11, http://www.w3c-test.org/encrypted-media/drm-mp4-playback-temporary-events.html is passing in Firefox 51 (with Widevine).
Firefox 51 also fires an extra `"keystatuseschange"` event with all keys: https://github.com/w3c/web-platform-tests/pull/3746#issuecomment-247726552
Owner: jrumm...@chromium.org
Status: Started (was: Assigned)
Will do this in Chromium for both Widevine and Clear Key (replacing what was done in #3 so it works for both key systems).
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/beab77818bad0932063375097110e6048632a193

commit beab77818bad0932063375097110e6048632a193
Author: jrummell <jrummell@chromium.org>
Date: Tue Oct 11 20:17:22 2016

EME: Implement Session Closed algorithm

Update MediaKeySession to implement the Session Closed algorithm
as outlined in the EME spec. This replaces a previous change that
implemented this as part of Clear Key key system only.

BUG= 622956 , 624192 
TEST=updated test passes

Review-Url: https://codereview.chromium.org/2406073002
Cr-Commit-Position: refs/heads/master@{#424524}

[modify] https://crrev.com/beab77818bad0932063375097110e6048632a193/media/cdm/aes_decryptor.cc
[modify] https://crrev.com/beab77818bad0932063375097110e6048632a193/media/cdm/aes_decryptor_unittest.cc
[modify] https://crrev.com/beab77818bad0932063375097110e6048632a193/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-keystatuses.html
[modify] https://crrev.com/beab77818bad0932063375097110e6048632a193/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp

Sign in to add a comment