-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need mock MediaStream data for some WebRTC tests #7424
Comments
In many of the tests, the only reason There is an alternative hackish way of creating instance of |
@soareschen, doesn't any data need to pass through the |
@youennf @burg @eric-carlson, any thoughts on how to do this? I think we're leaning heavily towards some kind of WebDriver mocking API, see the second bullet of web-platform-tests/results-collection#125. |
@foolip It depends on what is being tested. We haven't done much interoperability tests in WPT to make sure the media content is streamed properly to the other peer. You are right that some tests still need real |
For WebKit, captureStream would be an option but ICE candidate filtering would probably make the test fail. Using getUserMedia seems the best option and is closer to what most web developers will do anyway. |
FWIW it should be simple to whip up fake audio tracks using web audio. See my old blog. |
@agouaillard, can you poke this issue when you have an update on #5563 (comment)? |
Is this still blocked on adding a WebDriver API? |
I think we should prefer the second approach because it will improve coverage of real-world code paths. @youennf is right to point out that using streams produced by Browser support for I've submitted a patch along these lines here: gh-10746. @jan-ivar you may be interested in that because I had to expand on the approach from your blog post in order to get things working in Chromium.
@alijuma: we may get some clarity from the review of that patch. |
@jugglinmike if we go with something like #10746, I wonder what you think we should do for testing of |
I have some ideas about this, but I'll need a little more space to explain. I'll follow up with you offline before elaborating here on GitHub. |
With #10746 this is arguably resolved, but testing of getUserMedia() itself is still a problem. I'll file another issue. |
Currently 6 files in webrtc/ use
getUserMedia()
, and these will simply time out if run on a vanilla browser with no extra command line flags.To run these WebRTC tests, a MediaStream is needed, so one of the following is needed:
getUserMedia()
calls work, bypassing permissions and providing mock data.canvas.captureStream()
orvideo.captureStream()
(not widely supported)See also #5671, the permissions problem would also have to be addressed to make the tests work.
The text was updated successfully, but these errors were encountered: