Closed Bug 1016709 Opened 10 years ago Closed 9 years ago

[EME] Shutdown existing MediaKeys if HTMLMediaElement.mediaKeys is non null when set

Categories

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

29 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: cpearce, Unassigned)

References

(Blocks 1 open bug, )

Details

As per Bug 1016162 comment 2, if we set HTMLMediaElement.mediaKeys and it's already non null, we need to either shutdown the existing instance, or throw an error or something.
Spec: https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#dom-setmediakeys

We also need to ensure that we associate a MediaKeys instance with a single HTMLMediaElement.

I don't think shutting down the MediaKeys/CDM is the right thing to do here, we should shut it down once the MediaKeys refcount reaches 0 (which may very well happen when HTMLMediaElement.setMediaKeys(null) is called).
These bugs are necessary for vouching and sandboxing a third-party CDM.
Blocks: eme-m2
No longer blocks: eme-m2
Component: Audio/Video → Audio/Video: Playback
Chrome doesn't shutdown the any MediaKeys already set on an HTMLMediaElement when HTMLMediaElement.setMediaKeys() is called again. I filed bug 1233274 to match our behaviour.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.