Closed Bug 1587522 Opened 6 years ago Closed 5 years ago

[EME] Surface events to GeckoView to approve or deny MediaKeySystemAccess

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: bryce, Assigned: bryce)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

GeckoView would like to be able to approve or deny Navigator.requestMediaKeySystemAccess(). This allows for flexibility in Apps interaction with EME. The way Gecko currently handles EME does not enable this. We'd want to do something similar to what gUM does.

Useful references:

Summary: [EME] Surface events to GeckoView it can approve or deny MediaKeySystemAccess → [EME] Surface events to GeckoView to approve or deny MediaKeySystemAccess

Bug 1593843 has done this for the autoplay side and is a good reference for how to do it using ContentPermissionRequestBase based machinery rather than JS level message managers.

My current WIP uses the message manager approach, similar to some of our existing EME and gUM code. However the ContentPermissionRequestBase based approach looks like it has benefits as it's been suggested to me it may be more robust for Fission use cases and enabling flexibility in permissions for nested contexts.

See Also: → 1577596

Add a pref that we can gate the EME app approval behaviour behind. If the pref
is true we'll ask app for approval via a permission request. The intended use
for this is to allow GeckoView to seek explicit approval from the embedding app.

Having this pref is also useful for testing outside of GeckoView as it allows
runtime configuration of the permission check.

This class will be used to surface permission requests to GeckoView.

Depends on D56102

Add a test to cover app approval for EME. The test is not currently targeted at
android despite the feature being made for GeckoView. This is because we do not
have clearkey support on Android, and cannot guarantee Widevine support. If we
have broad Widevine support on Android we could rework the test to use that when
on Android.

For now having some test coverage on clearkey platforms seems better than having
no test coverage.

Depends on D56104

Pushed by bvandyk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5243ee8be876 Add media.eme.require-app-approval pref to control if EME needs app permission. r=alwu https://hg.mozilla.org/integration/autoland/rev/a95e3da9c1b5 Add MediaKeySystemAccessPermissionRequest. r=alwu https://hg.mozilla.org/integration/autoland/rev/f9ef7c41805c Surface events from MediaKeySystemAccessManager to let the app wrapping gecko allow or deny EME. r=alwu https://hg.mozilla.org/integration/autoland/rev/76602e77f731 Use default initializer for MediaKeySystemAccessManager::mAddedObservers. r=alwu https://hg.mozilla.org/integration/autoland/rev/0bc46cd428e4 Add test for EME app approval. r=alwu
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: