ConferenceService

The ConferenceService allows the application to manage the conference life cycle and interact with the conference.

Typical application APIs workflow:

1. The application creates a conference.

2. The application uses the fetchConference method to obtain the conference object.

3. The application can choose to either:

4. The application can request a specific quality of Simulcast video streams through the Simulcast method.

5. The application can start and stop streaming audio.

6. The application can start and stop streaming video.

7. During a conference, the application can:

8. The application calls the leave method to leave a conference.

The application can interact with the service through these events:

Warning: Always implement the error for each called promise. You can also use the execute method, but in case of exceptions, you will trigger errors.

Available in the package com.voxeet.sdk.services.ConferenceService.

Methods

mute

mute(mute: boolean): boolean

Stops playing the local participant's audio to the conference. The mute method does not notify the server to stop audio stream transmission.

Parameters

NameTypeDescription
mutebooleanA boolean, true indicates that the participant is muted, false indicates that a participant is not muted

Returns: boolean - informs if the mute state has changed.

mute

mute(@NonNull participant: Participant,mute: boolean): boolean

Stops playing the specified remote participants' audio to the local participant. The mute method does not notify the server to stop audio stream transmission.

Note: This API is no longer supported when the client connects to a Dolby Voice conference.

Parameters

NameTypeDescription
mutebooleanA boolean, true indicates that the local participant is muted, false indicates that a participant is not muted
participantParticipantA remote participant

Returns: boolean - informs if the mute state has changed.

isMuted

isMuted(): boolean

Informs whether the local participant is muted.

Note: This API is no longer supported for remote participants.

Returns: boolean - information if the local participant is muted. Returns false if the participant is not muted or is not present at the conference. Returns true if the participant is muted.

muteOutput

muteOutput(mute: boolean): boolean

Controls playing remote participants' audio to the local participant.

Note: This API is only supported when the client connects to a Dolby Voice conference.

Parameters

NameTypeDescription
mutebooleanA boolean, true indicates that remote participants are muted, false indicates that remote participants are not muted.

Returns: boolean - a boolean indicating whether remote participants are muted.

setAudioProcessing

setAudioProcessing(@NonNull audioProcessing: AudioProcessing): boolean

Enables and disables audio processing for the local participant.

Parameters

NameTypeDescription
audioProcessingAudioProcessingnon null The audio processing mode

Returns: boolean - a boolean indicating whether the audio processing mode is updated.

getAudioProcessing

getAudioProcessing(): AudioProcessing

Gets the current audio processing state for a conference.

Returns: @NonNull AudioProcessing - the audio processing mode.

isOutputMuted

isOutputMuted(): boolean

Informs whether the application plays the remote participants' audio to the local participant.

Returns: boolean - a boolean indicating whether the application plays the remote participants' audio to the local participant.

isSpeaking

isSpeaking(@NonNull participant: Participant): boolean

Indicates whether the current participant is speaking.

Parameters

NameTypeDescription
participantParticipantnon null participant

Returns: boolean - a boolean indicating whether the current participant is speaking.

findParticipantById

findParticipantById(@NonNull participantId: String): Participant

Provides the instance of the desired participant.

Parameters

NameTypeDescription
participantIdStringnon null participant's ID

Returns: @Nullable Participant - the instance of the participant. The null value informs that the conference or the participant does not exist in the current time session.

getConferenceType

getConferenceType(): LocalConferenceType

Gets the current conference type.

Returns: @NonNull LocalConferenceType - the ConferenceType. the ConferenceType.NONE is a default value.

getConference

getConference(): Conference

Gets the current Conference object.

Returns: @Nullable Conference - the nullable object.

isInConference

isInConference(): boolean

Informs if the specific conference exists. It can be used together with the ConferenceStatus.

Returns: boolean - Returns true if the conference exists or if the connection attempt to the conference is pending.

audioLevel

audioLevel(@Nullable participant: Participant): double

Gets the volume unit (VU) meter of a specific participant.

Parameters

NameTypeDescription
participantParticipantnullable participant, the value can be safely set to an incorrect one

Returns: double - the value between 0 and 1.

cancelTimeout

cancelTimeout(): ConferenceService

Cancels the timeout.

Returns: @NonNull ConferenceService

startVideo

startVideo(): Promise<Boolean>

Notifies the server to either start sending the local participant's video stream to the conference or start sending a remote participant's video stream to the local participant. The startVideo method does not control the remote participant's video stream; if a remote participant does not transmit any video stream, the local participant cannot change it using the startVideo method.

The reject value informs about PromisePermissionRefusedEventException or MediaException.

If the application does not have a permission sto start a video stream, it emits PermissionRefusedEvent.

Returns: @NonNull Promise<Boolean>

stopVideo

stopVideo(): Promise<Boolean>

Notifies the server to either stop sending the local participant's video stream to the conference or stop sending a remote participant's video stream to the local participant. Use this method only when the current participant is at the conference, otherwise the application emits an exception in the catch block of the promise.

Returns: @NonNull Promise<Boolean> - the promise to resolve.

startRemoteVideo

startRemoteVideo(@NonNull participant: Participant): Promise<Boolean>

Informs the server to start sending video streams of a specific participant.

Parameters

NameTypeDescription
participantParticipantnon null

Returns: @NonNull Promise<Boolean>

stopRemoteVideo

stopRemoteVideo(@NonNull participant: Participant): Promise<Boolean>

Informs the server to stop sending video streams of a specific participant. Use this method to decrease network bandwidth consumption.

Parameters

NameTypeDescription
participantParticipantnon null

Returns: @NonNull Promise<Boolean>

startAudio

startAudio(): Promise<Boolean>

Notifies the server to either start sending the local participant's audio stream to the conference or start sending a remote participant's audio stream to the local participant. The startAudio method does not control the remote participant's audio stream; if a remote participant does not transmit any audio stream, the local participant cannot change it using the startAudio method.

The audio track status is either starting, started, or stopped. Calling this method when a previous call is not finished, results in IllegalStateException.

Note: This API is no longer supported when the client connects to a Dolby Voice conference.

Returns: @NonNull Promise<Boolean> - a promise to resolve.

stopAudio

stopAudio(): Promise<Boolean>

Notifies the server to either stop sending the local participant's audio stream to the conference or stop sending a remote participant's audio stream to the local participant.

The audio track status is either stopping or started. Calling this method when a previous call has not finished, results in IllegalStateException.

Note: This API is no longer supported when the client connects to a Dolby Voice conference.

Returns: @NonNull Promise<Boolean> - a promise to resolve.

create

create(@Nullable conferenceAlias: String): Promise<CreateConferenceResult>

Creates a conference based on the provided conference alias.

Parameters

NameTypeDescription
conferenceAliasStringnullable alias of the conference

Returns: @NonNull Promise<CreateConferenceResult> - the promise to resolve.

create

create(@NonNull conferenceCreateOptions: ConferenceCreateOptions): Promise<CreateConferenceResult>

Creates the conference based on information from the ConferenceCreateOptions.

Parameters

NameTypeDescription
conferenceCreateOptionsConferenceCreateOptionsnon null information holder where the ID, parameters, and metadata can be passed

Returns: @NonNull Promise<CreateConferenceResult> - the conference creation information holder.

listen

listen(@NonNull conference: Conference): Promise<Conference>

Joins the conference in the listener mode in which the conference participant can only receive video and audio and cannot transmit any media.

Possible rejection causes :

  • ServerErrorException
  • InConferenceException
  • MediaEngineException
  • ParticipantAddedErrorEventException

Parameters

NameTypeDescription
conferenceConferencenon null conference

Returns: @NonNull Promise<Conference> - the promise to resolve.

broadcast

broadcast(@NonNull conference: Conference): Promise<Conference>

Joins the conference in the broadcaster mode which allows transmitting audio and video.

Possible rejection causes:

  • ServerErrorException
  • InConferenceException
  • MediaEngineException
  • ParticipantAddedErrorEventException

Parameters

NameTypeDescription
conferenceConferencenon null conference

Returns: @NonNull Promise<Conference> - the promise to resolve.

join

join(@NonNull conference: Conference): Promise<Conference>

Joins the conference.

The possible exceptions are:

  • ServerErrorException
  • InConferenceException
  • MediaEngineException
  • ParticipantAddedErrorEventException

Parameters

NameTypeDescription
conferenceConferencenon null conference

Returns: @NonNull Promise<Conference> - the promise to resolve.

join

join(@NonNull options: ConferenceJoinOptions): Promise<Conference>

Joins the conference with the conference.

The possible exception in the rejection:

  • ServerErrorException
  • InConferenceException
  • MediaEngineException
  • ParticipantAddedErrorEventException

Parameters

NameTypeDescription
optionsConferenceJoinOptionsnon null the holder of the options to join

Returns: @NonNull Promise<Conference> - the promise to resolve.

replay

replay(@NonNull conference: Conference, offset: long): Promise<Conference>

Replays the previously recorded conference. For more information, see the Recording mechanism article.

Possible rejection causes:

  • ServerErrorException
  • InConferenceException
  • MediaEngineException
  • ParticipantAddedErrorEventException

Parameters

NameTypeDescription
conferenceConferencenon null conference
offsetlongthe offset to start with

Returns: @NonNull Promise<Conference> - the promise to resolve that indicates the result of the request.

localStats

localStats(): Map<String, JSONArray>

Provides standard WebRTC statistics for the application to implement its own quality monitoring mechanisms.

Returns: @NonNull Map<String, JSONArray> - The WebRTC Stat Matrix.

getConferenceStatus

getConferenceStatus(conferenceId: String): Promise<ConferenceStatusResult>

Gets the conference status.

Parameters

NameTypeDescription
conferenceIdStringthe conference ID

Returns: @NonNull Promise<ConferenceStatusResult> - the promise to resolve containing the ConferenceStatusResult.

simulcast

simulcast(@NonNull requested: List<ParticipantQuality>): Promise<Boolean>

Requests a specific quality of the received Simulcast video streams. Use this method only for selected conference participants or for all participants that are present at the conference.

Parameters

NameTypeDescription
requestedList<ParticipantQuality>non null list of simulcast configurations

Returns: @NonNull Promise<Boolean> - the promise to resolve.

getInvitedParticipants

getInvitedParticipants(@NonNull conferenceId: String): Promise<ConferenceParticipantsInvitedResult>

Retrieves the list of participants invited to the conference.

Parameters

NameTypeDescription
conferenceIdStringnon null conference ID

Returns: @NonNull Promise<ConferenceParticipantsInvitedResult> - the promise to resolve.

leave

leave(): Promise<Boolean>

Leaves the current conference.

Returns: @NonNull Promise<Boolean>

fetchConference

fetchConference(@NonNull conferenceId: String): Promise<Conference>

Provides a Conference object that allows joining a conference.

Parameters

NameTypeDescription
conferenceIdStringnon null conference ID.

Returns: @NonNull Promise<Conference> - the ConferenceInformation in the Promise to resolve.

hasParticipants

hasParticipants(): boolean

Informs that at least one participant is actively connected.

Returns: boolean - indicates if at least one participant is actively connected to the conference.

Events

ConferenceHistoryResult

Emitted when the application asks about historical conference elements (by calling the history restful endpoint).

Available in the package com.voxeet.sdk.events.sdk.ConferenceHistoryResult.

items (List)

The events list.

ConferenceTimeoutNoParticipantsJoinedEvent

Emitted when within the maximum awaiting time nobody has joined the current participant at the conference.

Available in the package com.voxeet.sdk.events.sdk.ConferenceTimeoutNoParticipantsJoinedEvent.

timeout (long)

A timeout set in the SDK.

IncomingCallEvent

Emitted when the application receives an incoming call. This event is optional when the NotificationService is properly referenced and set up on the developer side.

Available in the package com.voxeet.sdk.events.sdk.IncomingCallEvent.

conferenceId (String)

The conference ID.

VideoStateEvent

Emitted when the local video state information has changed.

Available in the package com.voxeet.sdk.events.v2.VideoStateEvent.

mediaState (MediaState)

The new local video state.

StreamAddedEvent

Emitted in the following situations:

  • A conference participant with disabled audio and video enables audio or video.
  • A conference participant starts sharing a screen.

Each conference participant can be connected to two streams: audio and video stream and screen-share stream. If a participant enables audio or video, the SDK adds the audio and video stream to the participant. However, if a participant connected to the audio and video stream changes the stream, for example, a user with enabled audio also enables a video, the SDK updates the audio and video stream. The following graphic shows this behavior:

Audio streams map

When a participant joins a conference with enabled audio and video, the SDK emits the streamAddedEvent and streamUpdatedEvent events.

Available in the package com.voxeet.sdk.events.v2.StreamAddedEvent.

participant (Participant)

The conference participant.

mediaStream (MediaStream)

The media stream.

StreamRemovedEvent

Emitted when a participant removes audio and video stream or screen-share stream by disabling audio and video or by stopping a screen-share presentation.

Available in the package com.voxeet.sdk.events.v2.StreamRemovedEvent.

participant (Participant)

The conference participant.

mediaStream (MediaStream)

The media stream.

StreamUpdatedEvent

Emitted when a conference participant updates the audio and video stream.

Each conference participant can be connected to two streams: audio and video stream and screen-share stream. If a participant enables audio or video, the SDK adds the audio and video stream to the participant. However, if a participant connected to the audio and video stream changes the stream, for example, a user with enabled audio also enables a video, the SDK updates the audio and video stream. The following graphic shows this behavior:

Audio streams map

Available in the package com.voxeet.sdk.events.v2.StreamUpdatedEvent.

participant (Participant)

The conference participant.

mediaStream (MediaStream)

The media stream.

ParticipantAddedEvent

Emitted when a new participant is invited to a conference or joins a conference. The SDK does not emit ParticipantAddedEvent for a local participant.

Available in the package com.voxeet.sdk.events.v2.ParticipantAddedEvent.

participant (Participant)

The conference participant.

ParticipantUpdatedEvent

Emitted when a status of the Participant changes during a conference.

Available in the package com.voxeet.sdk.events.v2.ParticipantUpdatedEvent.

participant (Participant)

The conference participant.

ConferenceStatusUpdatedEvent

Emitted when ta conference changes status.

Available in the package com.voxeet.sdk.events.sdk.ConferenceStatusUpdatedEvent.

state (ConferenceStatus)

The new status.

conference (Conference)

The conference. It can be a null value in case when nobody joined the conference.

conferenceAlias (String)

The conference alias. It is a mandatory property if nobody has joined the conference.