Live Streaming Through Web

Discussion in 'General Discussion' started by Saleh, Aug 28, 2019.

  1. Saleh

    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: Aug 28, 2019
  2. Max

    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.

Share This Page