Skip to main content

Class: MediaProcessorConnector

Helper class implementing the media Media Processor Connector Interface. This class should always be created on the application main thread and it should be used by Vonage SDKs. An example can be found here.

Implements

Constructors

constructor

new MediaProcessorConnector(vonageMediaProcessor)

  • When running insertable streams on the main MediaProcessorInterface should be instance of MediaProcessor class.
  • When running insertable streams on WebWorker MediaProcessorInterface should be instance of bridge calss created by the user. Example can be found here

Parameters

NameTypeDescription
vonageMediaProcessorMediaProcessorInterfaceMediaProcessorInterface.

Methods

setTrack

setTrack(track): Promise<MediaStreamTrack>

Sets the media stream track instance to be processed.

Parameters

NameTypeDescription
trackMediaStreamTrackMediaStreamTrack (audio or video) to be processed.

Returns

Promise<MediaStreamTrack>

New track to be used.

Implementation of

MediaProcessorConnectorInterface.setTrack


destroy

destroy(): Promise<void>

Stops the media processing being performed.

Returns

Promise<void>

Implementation of

MediaProcessorConnectorInterface.destroy