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.
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
- 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.
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.
- How to bypass the popup to grant the media permissions by selecting the default device
- List of command line chromium options