toggleVideo(newState?: boolean)

Toggles user's camera state.

If the camera is currently enabled, then it will be disabled. And vice-versa -> if the camera is currently disabled, then it will be enabled. There is also an optional param to set a concrete target camera state, but you may use disableVideo() and enableVideo() to achieve similar functionality.

//This will toggle the camera state

//This will enable the camera, equivalent to sambaFrame.enableVideo();

//This will disable the camera, equivalent to sambaFrame.disableVideo();

Sample use case: Have a custom toolbar in your integration and want user to control camera from it.

Last updated