Live Streaming Through Web

Saleh

New Member
I want to know about to have the feature to change between the front end and back end camera through the web, and how to flip the camera from left to right ?
 
Last edited:

Max

Administrator
Staff member
Good day.
Using WebSDK, you can enumerate the media devices then select camera before stream publishing:
Code:
Flashphoner.getMediaDevices(null, true).then(function (list) {
    ...
    list.video.forEach(function (device) {
        ...
    });
}).catch(function (error) {
    $("#notifyFlash").text("Failed to get media devices");
});
Also, you can switch camera on the fly while publishing stream:
Code:
$("#switchBtn").text("Switch").off('click').click(function () {
    publishStream.switchCam();
}).prop('disabled', $('#sendCanvasStream').is(':checked'));
Camera flipping is not supported by WebSDK.
Please read here how to manage camera. Also please explore Media Devices example source code on GitHub.
 
Top