Closed Bug 1536102 Opened 4 years ago Closed 3 years ago

Add encryption scheme to MediaKeySystemMediaCapability to enable apps to discover scheme support


(Core :: Audio/Video: Playback, enhancement, P2)




Tracking Status
firefox69 --- fixed


(Reporter: bryce, Assigned: bryce)


(Blocks 1 open bug)


(Whiteboard: [qa-69b-p2])


(4 files)

The changes involved are detailed in this proposal, as well as much of the motivation.

Of note, but not in the scope of this bug: a similar proposal for media capabilities is discussed here.

Created in response to concerns about enum usage for encryption scheme. Please see the PR and issues linked within for further details.

Add encryption scheme member to MediaKeySystemMediaCapability dict, but hide it
behind a pref as the behaviour involved is only proposed at this stage.

Depends on D34300

Enable the web platform tests for clearkey scheme checking. Since these tests
simply check if the functionality is implemented, and do not check if the
browsers actually support different encryption schemes, it's okay to do this
even though we don't have cbcs support in clearkey yet. I.e. it's enough that a
page can ask "do you support cbcs in clearkey?" to Firefox to pass the test, the
answer from Firefox doesn't have to be "yes."

Add the pref setting to the DRM scheme checking test, though leave the
expectations as they are on this test, as in automation the test will still not
pass due to Widevine downloads being blocked. My hope is that we can find a
solution to this Widevine download issue in automation, at which point we'd
expect that tests to start passing due to the pref added in this patch -- at
which point we could toggle the expectations.

Depends on D34302

My current work on this uses a DOMString for the encryption scheme rather than an enum for the reasons detailed in I'm planning on discussing further on GitHub why I think a DOMString is preferred in the coming week.

Pushed by
P1: Add pref to gate encryption scheme check functionality behind. r=cpearce
P2: Add encryption scheme to MediaKeySystemMediaCapability dictionary. r=smaug
P3: Implement filtering behaviour for encryption scheme if passed on MediaKeySystemMediaCapability. r=cpearce
P4: Enabled WPT for encrypted media scheme checking. r=cpearce

I've created a test page to help with testing this functionality in browsers. The readme details how to toggle to feature on in Firefox and Chrome.

Whiteboard: [qa-69b-p2]
You need to log in before you can comment on or make changes to this bug.