-
Notifications
You must be signed in to change notification settings - Fork 10
Testing WebRTC
Testing WebRTC applications and libraries is hard. You need to be able to test for correct operation with a particular browser, and also interoperability with other browsers. Additionally, you need to simulate different network conditions to ensure that your browser correctly uses ICE.
I originally believed that Selenium would not work for our needs, but on further investigation I believe that the use of ChromeOptions
and firefox profile settings in selenium configuration options will let us do exactly what we want.
Related information:
- https://sites.google.com/a/chromium.org/chromedriver/capabilities
- https://github.com/admc/wd/issues/147#issuecomment-21191552
- https://github.com/saadtazi/firefox-profile-js
Have tested loopback video driver (v4l for linux) and also the new --use-file-for-fake-video-capture
(requires Chrome 33+). Both provide the expected result, but minus any sound input. Depending on the type of testing that we are going to try and create audio may be important... I don't know. Also, getting the loopback device to play a source video file is proving difficult (will ask JJ to help out on that).
Related information:
Much of the documentation on the loopback video driver site provides instructions for gstreamer-0.10 rather than gstreamer-1.0 so the following are some tips on how to set it up to work with video sources:
Convert an input video file to a set of YUV frame files:
gst-launch-1.0 -v filesrc location=$1 ! decodebin ! videoconvert ! pngenc snapshot=false ! multifilesink location=test/%05d.png
And then you can set up an infinite producer using those frame files:
gst-launch-1.0 -v multifilesrc location=~/test/%05d.png loop=1 caps="image/png,framerate=30/1" ! pngdec ! videoconvert ! v4l2sink device=/dev/video2
Desktop Capture (getting close, but not there yet):
gst-launch-1.0 -v ximagesrc startx=0 starty=0 endx=1279 endy=1023 ! videoconvert ! video/x-raw, width=1280, height=1024, framerate=10/1 ! v4l2sink device=/dev/video2
Requires further investigation.