Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Automated testing of webcam / video feeds in webRTC application

Test­ing webRTC based appli­ca­tion, con­sis­tently auto­mated fash­ion is a chal­leng­ing prob­lem. Mainly due to the real time nature of the appli­ca­tion includ­ing the media streams related fea­tures like the audio, video and screen­shar­ing. There are use­ful flags in which browser ven­dors pro­vide to make life eas­ier. Here, we will look at the flags related to web­cam sharing.

Phys­i­cal webcam

webRTC-1

Fake web­cam

webRTC-3

To test the web cam­era streams with­out using an actual cam­era, chrome pro­vides few use­ful flags. The eas­i­est one is the fol­low­ing : use-fake-device-for-media-stream

Fake web­cam preview

fake_device_0

I call the green pack­man with counter

Lim­i­ta­tions

  • Allows only a sin­gle fake web­cam stream. Hence, can not test muti­ple web­cam streams using this approach.

Auto­mate the local y4m video files via automation

You can use the fol­low­ing 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 ver­ify the con­tent of the web­cam feed.
For exam­ple, sender can share a video show­ing the bar­code and on the receiver can ver­ify the con­tent of the bar­code using library such as zxing.


Fur­ther reading


You may also like...