Closed Bug 1313202 Opened 9 years ago Closed 9 years ago

[EME] Resolve MediaKeySession.closed before the promise returned by MediaKeySession.close()

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

Details

Attachments

(3 files)

The EME spec requires us to resolve the promise returned by MediaKeySession.close() after the MediaKeySession.close promise attribute. We're currently doing the opposite for both ClearKey and Widevine. This causes us to fail these WPT: http://www.w3c-test.org/encrypted-media/drm-mp4-playback-temporary-events.html http://www.w3c-test.org/encrypted-media/clearkey-mp4-playback-temporary-events.html WPT issue which updated the WPT to this behaviour: https://github.com/w3c/web-platform-tests/issues/4058
Comment on attachment 8804930 [details] Bug 1313202 - Make ClearKey resolve MediaKeySession.closed promise before promise returned by MediaKeySession.close(). https://reviewboard.mozilla.org/r/88748/#review87830
Attachment #8804930 - Flags: review?(gsquelart) → review+
Comment on attachment 8804931 [details] Bug 1313202 - Update MediaKeySession.close() to match EME spec. https://reviewboard.mozilla.org/r/88750/#review87832
Attachment #8804931 - Flags: review?(gsquelart) → review+
I'm reliably informed that Chrome is converting the Widevine CDM's InvalidAccessErrors to TypeErrors: https://cs.chromium.org/chromium/src/media/blink/cdm_result_promise_helper.cc?sq=package:chromium&dr=CSs&rcl=1477509663&l=42 So we should do the same in the WidevineDecryptor to get the drm variant of this test to pass.
Comment on attachment 8804950 [details] Bug 1313202 - Convert InvalidAccessErrors coming out of the Widevine CDM to TypeErrors like Chrome does. https://reviewboard.mozilla.org/r/88760/#review87856
Attachment #8804950 - Flags: review?(gsquelart) → review+
Pushed by cpearce@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f6ae961e354 Make ClearKey resolve MediaKeySession.closed promise before promise returned by MediaKeySession.close(). r=gerald https://hg.mozilla.org/integration/autoland/rev/2017b66912e8 Update MediaKeySession.close() to match EME spec. r=gerald https://hg.mozilla.org/integration/autoland/rev/b3275f223e26 Convert InvalidAccessErrors coming out of the Widevine CDM to TypeErrors like Chrome does. r=gerald
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: