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:
val caller: String?
Who has started this conference if the user was invited. If not, it will be null. |
|
lateinit var currentState: State
Current conference state. |
|
val id: String
Conference identifier (which is the same as the room identifier). |
|
val isLocalAudioEnabled: Boolean
True if the user is sharing audio and it is enabled. |
|
val isLocalVideoEnabled: Boolean
True if the user is sharing video and it is enabled. |
|
val isRecordingEnabled: Boolean
True if the conference is being recorded. |
|
val rx: ConferenceRx
Access to the reactive API of the conference. |
fun addListener(listener: ConferenceListener): Unit
Adds a listener to receive different events related to this conference. |
|
fun cancelInviteToParticipant(participantId: String): Unit
Cancels the invitation made for the user to the specified participant. |
|
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. |
|
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. |
|
fun enableLocalAudio(isEnabled: Boolean): Unit
Enables/disables the local audio. |
|
fun enableLocalVideo(isEnabled: Boolean): Unit
Enables/disables the local video. |
|
fun enableRemoteVideo(participantName: String, isEnabled: Boolean): Unit
Enables/disables the remote video of the participant specified by participantName. |
|
fun expelParticipant(participant: Participant, onCompletion: (ConferenceError?) -> Unit): Unit
Expels the specified participant from this conference. |
|
fun getInvitations(onCompletion: (List<Invitation>) -> Unit): Unit
Fetches all the invitations made for the user to this conference. |
|
fun getParticipants(onCompletion: (Either<List<Participant>, ConferenceError>) -> Unit): Unit
Fetches the current conference participants, including the local user. |
|
fun hangup(): Unit
Declines this conference. |
|
fun inviteParticipant(participantId: String, context: Context, requestedMediaTypes: List<MediaType> = listOf(MediaType.AUDIO, MediaType.VIDEO), joinOnAnswer: Boolean = true): Unit
Invites a new participant to this conference. |
|
fun join(context: Context, mediaTypes: List<MediaType>? = null): Unit
Allows the user to join this conference. |
|
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. |
|
fun removeListener(listener: ConferenceListener): Unit
Removes the specified listener. |
|
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. |
|
fun switchCamera(): Unit
Swaps the physical device used to capture the video. It should be used when the local user is already sharing video. |
|
fun updateMedia(context: Context, mediaTypes: List<MediaType>, onCompletion: (ConferenceError?) -> Unit): Unit
Updates the media types shared by the user, overridden the current ones. |