sippo-sdk / com.quobis.sippo.sipposdk.conference / Conference

Conference

class Conference

A conference instance.

This class allows performing actions over this specific conference like joining the conference, hanging up or managing its participants. It also allows adding a listener to receive events related to this particular instance (@see ConferenceListener).

In order to share the media successfully, it is necessary to declare the pertinent permissions on the manifest:

Properties

caller

val caller: Caller?

Who has started this conference if the user was invited. If not, it will be null.

currentState

lateinit var currentState: State

Current conference state.

id

val id: String

Conference identifier (which is the same as the room identifier).

isLocalAudioEnabled

val isLocalAudioEnabled: Boolean

True if the user is sharing audio and it is enabled.

isLocalVideoEnabled

val isLocalVideoEnabled: Boolean

True if the user is sharing video and it is enabled.

isRecordingEnabled

val isRecordingEnabled: Boolean

True if the conference is being recorded.

rx

val rx: ConferenceRx

Access to the reactive API of the conference.

Functions

acceptTransfer

fun acceptTransfer(context: Context, transfer: Transfer, mediaTypes: List<MediaType>? = null): Unit

Accept an incoming transfer.

addListener

fun addListener(listener: ConferenceListener): Unit

Adds a listener to receive different events related to this conference.

cancelInviteToParticipant

fun cancelInviteToParticipant(participantId: String): Unit

Cancels the invitation made for the user to the specified participant.

displayLocalVideo

fun displayLocalVideo(videoRenderer: SurfaceViewRenderer, aspect: ScalingType, pip: Boolean): Unit

Displays the local video in the specified videoRenderer if the user is sharing it. It should be called after receiving the event notifying that the local video has been added to the conference or when, once the video is being rendered, the videoRenderer needs to be changed. IMPORTANT: The videoRenderer used should be released (videoRenderer.release()) once the view is destroyed.

displayRemoteVideo

fun displayRemoteVideo(participantName: String, videoRenderer: SurfaceViewRenderer, aspect: ScalingType, pip: Boolean): Unit

Displays the remote video of the participant specified by participantName in the indicated videoRenderer if they are sharing it. It should be called after receiving the event notifying that the video for that participant has been added to the conference or when, once the video is being rendered, the videoRenderer needs to be changed. IMPORTANT: The videoRenderer used should be released (videoRenderer.release()) once the view is destroyed.

enableLocalAudio

fun enableLocalAudio(isEnabled: Boolean): Unit

Enables/disables the local audio.

enableLocalVideo

fun enableLocalVideo(isEnabled: Boolean): Unit

Enables/disables the local video.

enableRemoteVideo

fun enableRemoteVideo(participantName: String, isEnabled: Boolean): Unit

Enables/disables the remote video of the participant specified by participantName.

expelParticipant

fun expelParticipant(participant: Participant, onCompletion: (ConferenceError?) -> Unit): Unit

Expels the specified participant from this conference.

getInvitations

fun getInvitations(onCompletion: (List<Invitation>) -> Unit): Unit

Fetches all the invitations made for the user to this conference.

getParticipants

fun getParticipants(onCompletion: (Either<List<Participant>, ConferenceError>) -> Unit): Unit

Fetches the current conference participants, including the local user.

hangup

fun hangup(): Unit

Declines this conference.

hold

fun hold(onCompletion: (ConferenceError?) -> Unit): Unit

Hold the current conference.

inviteParticipant

fun inviteParticipant(callee: Callee, context: Context, requestedMediaTypes: List<MediaType> = listOf(MediaType.AUDIO, MediaType.VIDEO), joinOnAnswer: Boolean = true): Unit

Invites a new participant to this conference.

join

fun join(context: Context, mediaTypes: List<MediaType>? = null): Unit

Allows the user to join this conference.

previewRemoteVideo

fun previewRemoteVideo(): Unit

Allows the user to preview remote media before joining/declining the conference. IMPORTANT: This method does not join the user to the conference. The join action has to be explicit.

removeListener

fun removeListener(listener: ConferenceListener): Unit

Removes the specified listener.

swapVideos

fun swapVideos(participantNameA: String, participantNameB: String): Unit

Swaps the videos of the specified participants. It should be called once both videos are being displayed if the surfaces on which they are being rendered are to be exchanged.

switchCamera

fun switchCamera(): Unit

Swaps the physical device used to capture the video. It should be used when the local user is already sharing video.

transferConference

fun transferConference(callee: Callee, mediaTypes: List<MediaType>? = null, onCompletion: (ConferenceError?) -> Unit): Unit

Transfer the current conference to the specified Callee.

unhold

fun unhold(onCompletion: (ConferenceError?) -> Unit): Unit

Unhold the current conference.

updateMedia

fun updateMedia(context: Context, mediaTypes: List<MediaType>, onCompletion: (ConferenceError?) -> Unit): Unit

Updates the media types shared by the user, overridden the current ones.