Closed Bug 1224080 Opened 9 years ago Closed 9 years ago

[EME] Attaching MediaKeys before MediaSource causes load failure

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

If we set a MediaKeys on an HTMLMediaElement before we attach the MediaSource, when we attach the MediaSource the load fails.

It's because our check in HTMLMediaElement::LoadResource() to ensure we only use EME if we're loading an MSE URL is actually check if we're loading a MediaStream URI, not a MediaSource URI:

http://hg.mozilla.org/mozilla-central/file/a8ed7dd831d1/dom/html/HTMLMediaElement.cpp#l1238

D'oh!
This bug has been here ever since we restricted EME to MSE; bug 1131392.
Fixup the check that is supposed to prevent non MSE loads when we have a MediaKeys attached to actually check that we have a MSE URI instead of a MediaStream URI.

With test!
Attachment #8686399 - Flags: review?(gsquelart)
Comment on attachment 8686399 [details] [diff] [review]
Patch: Ensure attaching MediaKeys before MediaSource doesn't cause load failure

Review of attachment 8686399 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with femto-nit (I had to complain about something).

::: dom/media/test/test_eme_setMediaKeys_before_attach_MediaSource.html
@@ +12,5 @@
> +<script class="testbody" type="text/javascript">
> +
> +function beginTest() {
> +  var video = document.createElement("video");
> +  

Spaces on empty line.
Attachment #8686399 - Flags: review?(gsquelart) → review+
https://hg.mozilla.org/mozilla-central/rev/4a2071b4d965
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: