SIGN UP

StreamManager

Interface for extended management of local audio/video streams.

Methods

get

get(): StreamManager

Get the StreamManager instance

Returns

getLocalMediaRenderers

getLocalMediaRenderers(): MediaRenderer[]

List of currently used containers for local audio and video streams.

Returns

  • Return:

    MediaRenderer[]

hideLocalVideo

hideLocalVideo(): Promise<void>

Turn off local video. Use the showLocalVideo method to turn on local video.

Returns

  • Return:

    Promise<void>

off

off(event: HardwareEvents, handler: (ev: any) => void): 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

Type declaration

(ev: any) => void

Parameters

  • ev:

    any

Returns

  • Return:

    void

on

on(event: HardwareEvents, handler: (ev: any) => void, 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

Type declaration

(ev: any) => void

Parameters

  • ev:

    any

Returns

  • Return:

    void

showLocalVideo

showLocalVideo(placeOnDom: boolean): Promise<MediaRenderer>

Turn on local video. The container for local video elements must be specified via in the Config.localVideoContainerId field in the Client.init config. If it's not specified, local videos will be appended to end of the element. Use the hideLocalVideo method to turn off local video.

Parameters

  • placeOnDom:

    boolean

Returns