RemoteAudio

The RemoteAudio model allows the local participant to locally mute and unmute remote participants.

This model is supported only in SDK 3.7 and later.

Methods

setOutputVolume

setOutputVolume(volume: Float) -> Bool
Sets the conference volume for the local participant. The method sets the volume of all remote participants to a preferred value between 0 and 1. Providing an unsupported volume results in constraining volume to a either 0 or 1. This method is supported in SDK 3.11 and later.

Parameters

NameTypeDescription
volumeFloatThe preferred volume level between 0 (no audio) and 1 (full volume).

setVolume

setVolume(participant: VTParticipant, volume: Float) -> Bool

Sets the volume of a selected participant in non-Dolby Voice conferences to a preferred value between 0 and 1. Providing an unsupported number results in constraining the volume to either 0 or 1. Using the method for a selected participant after calling setOutputVolume overwrites the participant's volume. This method is supported in SDK 3.11 and later.

Parameters

NameTypeDescription
participantVTParticipantThe selected remote participant.
volumeFloatThe preferred volume level between 0 (no audio) and 1 (full volume).

setVolume

setVolume(mediaStream: MediaStream, volume: Float) -> Bool

Sets the volume of a selected media stream in non-Dolby Voice conferences to a preferred value between 0 and 1. Providing an unsupported number results in constraining volume to a either 0 or 1. Using the method for a selected media stream after calling setOutputVolume or other setVolume methods overwrites the media stream's volume. This method is supported in SDK 3.11 and later.

Parameters

NameTypeDescription
mediaStreamMediaStreamThe selected media stream.
volumeFloatThe preferred volume level between 0 (no audio) and 1 (full volume).

setVolume

setVolume(audioTrack: [AudioTrack], volume: Float) -> Bool

Sets the volume of a selected audio track in non-Dolby Voice conferences to a preferred value between 0 and 1. Providing an unsupported number results in constraining volume to a either 0 or 1. Using the method for a selected audio track after calling setOutputVolume or other setVolume methods overwrites the audio track's volume. This method is supported in SDK 3.11 and later.

Parameters

NameTypeDescription
audioTrack[AudioTrack]The selected audio track.
volumeFloatThe preferred volume level between 0 (no audio) and 1 (full volume).

start

start(participant: VTParticipant, completion: ((_ error: NSError) -> Void)?)

Allows the local participant to start receiving audio from a specific remote participant. The start method does not impact audio transmission between remote participants and a conference and does not allow the local participant to force sending remote participants’ streams to the conference or to the local participant. The method requires a few seconds to become effective.

In Dolby Voice conferences and in the case of mixed listeners, the method works as mute, so it locally starts playing audio from a remote participant.

The start method requires a few seconds to become effective.

Parameters:

NameTypeDescription
participantVTParticipantThe selected remote participant who is locally muted through the stop method.
completion((_ error: NSError) -> Void)?The block to execute when the query completes.

stop

stop(participant: VTParticipant, completion: ((_ error: NSError) -> Void)?)

Allows the local participant to stop receiving audio from specific remote participants. This method does not impact audio transmission between remote participants and a conference and does not allow the local participant to stop sending remote participants’ streams to the conference. The method requires up to a few seconds to become effective.

In Dolby Voice conferences and in the case of mixed listeners, the method works as mute, so it locally stops playing audio while the audio stream is still received.

Parameters:

NameTypeDescription
participantVTParticipantThe selected remote participant who should be locally muted.
completion((_ error: NSError) -> Void)?The block to execute when the query completes.