Skip to main content

DyteSelfMedia

This module allows users to initialize media before initializing the root DyteClient.init object

.audioTrack

Returns the audioTrack.

.rawAudioTrack

Returns the rawAudioTrack having no middleware executed on it.

.mediaPermissions

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).

.videoTrack

Returns the videoTrack.

.rawVideoTrack

Returns the videoTrack having no middleware executed on it.

.screenShareTracks

Returns the screen share tracks.

.audioEnabled

Returns true if audio is enabled.

.videoEnabled

Returns true if video is enabled.

.screenShareEnabled

Returns true if screen share is enabled.

.addAudioMiddleware()

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 DyteSelfMedia

.removeAudioMiddleware()

Removes the audio middleware, if it is there.

Kind: instance method of DyteSelfMedia

.addVideoMiddleware()

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 DyteSelfMedia

.removeVideoMiddleware()

Removes the video middleware, if it is there.

Kind: instance method of DyteSelfMedia

.getCurrentDevices()

Returns the media devices currently being used.

Kind: instance method of DyteSelfMedia

.getAudioDevices()

Returns the local participant's audio devices.

Kind: instance method of DyteSelfMedia

.getVideoDevices()

Returns the local participant's video devices.

Kind: instance method of DyteSelfMedia

.getSpeakerDevices()

Returns the local participant's speaker devices.

Kind: instance method of DyteSelfMedia

.getDeviceById(deviceId, kind)

Returns the local participant's device, indexed by ID and kind.

Kind: instance method of DyteSelfMedia

ParamDescription
deviceIdThe ID of the device.
kindThe kind of the device: audio, video, or speaker.

.setDevice(device)

Change the current media device that is being used by the local participant.

Kind: instance method of DyteSelfMedia

ParamDescription
deviceThe device that is to be used. A device of the same kind will be replaced. the primary stream.