const dl = document.$("#device-list"); const video = document.$("video.camera"); document.on("ready", function() { for( let dname of video.camera.devices ) dl.append({ dname }); }); dl.on("click", "button", function(evt, button) { video.camera.streamFrom( button.elementIndex ); });

In order this demo to work you will need to enable camera capture in sdk/incluse/behaviors/behavior_camera_capture.cpp

Select camera device: