The RTKSelfMedia class provides methods to manage the local participant's media.
- RTKSelfMedia
- .audioTrack
- .rawAudioTrack
- .mediaPermissions
- .videoTrack
- .rawVideoTrack
- .screenShareTracks
- .audioEnabled
- .videoEnabled
- .screenShareEnabled
- .addAudioMiddleware(audioMiddleware)
- .removeAudioMiddleware(audioMiddleware)
- .removeAllAudioMiddlewares()
- .addVideoMiddleware(videoMiddleware)
- .setVideoMiddlewareGlobalConfig(config)
- .removeVideoMiddleware(videoMiddleware)
- .removeAllVideoMiddlewares()
- .getCurrentDevices()
- .getAudioDevices()
- .getVideoDevices()
- .getSpeakerDevices()
- .getDeviceById(deviceId, kind)
- .setDevice(device)
Returns the audioTrack.
Kind: instance property of RTKSelfMedia
Returns the rawAudioTrack having no middleware executed on it.
Kind: instance property of RTKSelfMedia
Returns the current audio and video permissions given by the user. 'ACCEPTED' if the user has given permission to use the media. 'CANCELED' if the user has canceled the screenshare. 'DENIED' if the user has denied permission to use the media. 'SYS_DENIED' if the user's system has denied permission to use the media. 'UNAVAILABLE' if the media is not available (or being used by a different application).
Kind: instance property of RTKSelfMedia
Returns the videoTrack.
Kind: instance property of RTKSelfMedia
Returns the videoTrack having no middleware executed on it.
Kind: instance property of RTKSelfMedia
Returns the screen share tracks.
Kind: instance property of RTKSelfMedia
Returns true if audio is enabled.
Kind: instance property of RTKSelfMedia
Returns true if video is enabled.
Kind: instance property of RTKSelfMedia
Returns true if screen share is enabled.
Kind: instance property of RTKSelfMedia
Adds the audio middleware to be executed on the raw audio stream. If there are more than 1 audio middlewares, they will be executed in the sequence they were added in. If you want the sequence to be altered, please remove all previous middlewares and re-add.
Kind: instance method of RTKSelfMedia
| Param | Type |
|---|---|
| audioMiddleware | AudioMiddleware |
Removes the audio middleware, if it is there.
Kind: instance method of RTKSelfMedia
| Param | Type |
|---|---|
| audioMiddleware | AudioMiddleware |
Removes all audio middlewares, if they are there.
Kind: instance method of RTKSelfMedia
Adds the video middleware to be executed on the raw video stream. If there are more than 1 video middlewares, they will be executed in the sequence they were added in. If you want the sequence to be altered, please remove all previous middlewares and re-add.
Kind: instance method of RTKSelfMedia
| Param | Type |
|---|---|
| videoMiddleware | VideoMiddleware |
Sets global config to be used by video middlewares.
Kind: instance method of RTKSelfMedia
| Param | Type | Description |
|---|---|---|
| config | VideoMiddlewareGlobalConfig |
config |
| config.disablePerFrameCanvasRendering | boolean |
If set to true, Instead of calling Middleware for every frame, Middleware will only be called once that too with empty canvas, it is the responsibility of the middleware author to keep updating this canvas. meeting.self.rawVideoTrack can be used to retrieve video track for the periodic updates. |
Removes the video middleware, if it is there.
Kind: instance method of RTKSelfMedia
| Param | Type |
|---|---|
| videoMiddleware | VideoMiddleware |
Removes all video middlewares, if they are there.
Kind: instance method of RTKSelfMedia
Returns the media devices currently being used.
Kind: instance method of RTKSelfMedia
Returns the local participant's audio devices.
Kind: instance method of RTKSelfMedia
Returns the local participant's video devices.
Kind: instance method of RTKSelfMedia
Returns the local participant's speaker devices.
Kind: instance method of RTKSelfMedia
Returns the local participant's device, indexed by ID and kind.
Kind: instance method of RTKSelfMedia
| Param | Type | Description |
|---|---|---|
| deviceId | string |
The ID of the device. |
| kind | 'audio' | 'video' | 'speaker' |
The kind of the device: audio, video, or speaker. |
Change the current media device that is being used by the local participant.
Kind: instance method of RTKSelfMedia
| Param | Type | Description |
|---|---|---|
| device | MediaDeviceInfo |
The device that is to be used. A device of the same kind will be replaced. the primary stream. |