Be the first user to complete this post
|
Add to List |
Automated testing of webcam / video feeds in webRTC application
Testing webRTC based application, consistently automated fashion is a challenging problem. Mainly due to the real time nature of the application including the media streams related features like the audio, video and screensharing. There are useful flags in which browser vendors provide to make life easier. Here, we will look at the flags related to webcam sharing.
Physical webcam
Fake webcam
To test the web camera streams without using an actual camera, chrome provides few useful flags. The easiest one is the following : use-fake-device-for-media-stream
Fake webcam preview
I call the green packman with counter
Limitations
- Allows only a single fake webcam stream. Hence, can not test mutiple webcam streams using this approach.
Automate the local y4m video files via automation
You can use the following chrome flags to feed the local video file in the video feed.[use-file-for-fake-video-capture](http://peter.sh/experiments/chromium-command-line-switches/#use-file-for-fake-video-capture)You can use this flag to verify the content of the webcam feed. For example, sender can share a video showing the barcode and on the receiver can verify the content of the barcode using library such as zxing.
Further reading
- How to bypass the popup to grant the media permissions by selecting the default device
- List of command line chromium options
- force-qtkit
- use-file-for-fake-video-capture
- workaround-testing-y4m-files-chrome
- [gist with useful resources](https://gist.github.com/DamonOehlman/7329833)
Also Read:
- Chromium flag to by pass the popup to grant media permissions in webRTC
- Run a single test in jasmine
- How to return a value from a jasmine spy