StreamManager
Interface for extended management of local audio/video streams.
Methods
getLocalMediaRenderers
getLocalMediaRenderers():
Lists the currently used containers for local audio and video streams.
Returns
type:
hideLocalVideo
hideLocalVideo(): Promise<void>
Turns off the local video. Use the showLocalVideo method to turn on the local video.
Returns
type:
Promise<void>
off
off(event: , handler: Function
): void
Remove a handler for the specified event. The method is a shorter equivalent for removeEventListener. If a number of events has the same function as a handler, the method can be called multiple times with the same handler argument.
Parameters
event:
handler:
Function
Optional
Returns
type:
void
on
on(event: , handler: Function
, options: EventListenerOption
): void
Register a handler for the specified event. The method is a shorter equivalent for addEventListener. One event can have more than one handler; handlers are executed in order of registration. Use the StreamManager.off method to delete a handler.
Parameters
event:
handler:
Function
options:
EventListenerOption
Optional
Returns
type:
void
showLocalVideo
showLocalVideo(placeOnDom: boolean
): Promise<MediaRenderer>
Turns on the local video. The container for the local video elements should be specified in the Config.localVideoContainerId field in the Client.init config. If not specified, local videos are appended to end of the element. Use the hideLocalVideo method to turn off local video.
Parameters
placeOnDom:
boolean
Defaults on: true
Returns
type:
Promise<MediaRenderer>
Props
isLocalVideoRequested
isLocalVideoRequested: boolean