Closed Bug 1836128 Opened 1 year ago Closed 9 months ago

Implement <source media> for media elements


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




120 Branch
Tracking Status
firefox120 --- fixed


(Reporter: zcorpan, Assigned: scottjehl)



(Keywords: dev-doc-complete)


(1 file)

Component: Audio/Video → Audio/Video: Playback

Hi! I wanted to check in on this issue and see if any additional research (or demo work) would be helpful to facilitate getting this feature re-introduced? Thanks!

No, it's just that it's in our backlog for now.

Thanks Paul. That makes sense!

I've taken a stab at re-implementing this myself in Nightly and it seems to be working as expected. I'll aim to submit it for review as soon as I figure out how and where to wire up the tests.

We have some tests already, merged in

To run them, you can run (from a source dir) e.g.:

./mach wpt html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-source-media-env-change.html

and the same by substituting the path to the other tests (you can also specify multiple paths iirc).

It should run the browser, and run some stuff, and then say something like:

 0:25.62 TEST_START: /html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-source-media-env-change.html
 0:26.35 TEST_END: Test FAIL. Subtests passed 1/1. Unexpected 1

at which point the test is passing, but we expected it to fail. To remove this expectation (so that it's expected to pass), you can remove e.g. this file:

same goes for the other test in the WPT PR of course. If you upload a patch containing all this, I can push it to our CI so that all tests are going to run, and we'll see if we need to modify more things.

The test themselves are at in our source dir. If you need to modify them, or test more things, you can simply modify this file and the modifications will be auto-synchronized to the upstream copy.

Flags: needinfo?(scottjehl)

That's so helpful, thank you. I'm going to read this a couple of times before digging back in :)

Flags: needinfo?(scottjehl)
Assignee: nobody → scottjehl

Okay, I think I did the commit and review steps properly but many parts here are new to me so it's possible I messed something up!

I've reused the original commit's code aside from a small change to account for the passed param types.
Happy to take any direction you have from here.

Thank you for all the advice so far!

Pushed by
Implement source media for media elements and reference/update relevant platform tests r=padenot
Created web-platform-tests PR for changes under testing/web-platform/tests
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1841432
Keywords: dev-doc-needed

MDN doc updates for this change can be tracked through this GitHub issue:

You need to log in before you can comment on or make changes to this bug.