media
media copied to clipboard
getUserMedia() mocking
It would be nice if Servo could request the backend to mock getUserMedia().
A simple enable_mediadevices_mocking() function that basically makes the mediadevices code proxy to https://github.com/servo/media/blob/121f943462b0b5e54fdd7a7546e1b8ffd19a87c9/servo-media/lib.rs#L32-L33 would be nice
Alternatively, we can do this entirely on the Servo side. I'm worried this would impact the fidelity of the tests: for example, we currently have a bug where one of the tests requests an impossible constraint which we pass down to gstreamer, and gstreamer asserts.
Overall making this still work with the constraint stuff might be tricky. It might just be a matter of testing against caps, though.
cc @jdm
For mocking you could use audiotestsrc and videotestsrc :)
Yep, that's what create_audiostream and create_videostream do for gstreamer :)
However we'd need to internally capsfilter them.
Indeed :)
https://github.com/servo/media/pull/262 added some mocking support, however it doesn't take the capsfilter into account (yet)