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:

  • "android.permission.CAMERA" for sharing video.

  • "android.permission.RECORD_AUDIO" for sharing audio.

Properties

Link copied to clipboard

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

Link copied to clipboard
val conferenceType: ConferenceType

Current conference type.

Link copied to clipboard
val currentMediaTypes: List<MediaType>

Current conference mediatypes.

Link copied to clipboard

Current conference participants.

Link copied to clipboard
lateinit var currentState: JanusConference.State

Current conference state.

Link copied to clipboard
val id: String

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

True if the conference is being recorded.

Link copied to clipboard

True if the remote audio is enabled.

Link copied to clipboard

Access to the reactive API of the conference.

Functions

Link copied to clipboard

Accepts an attended transfer in progress.

Link copied to clipboard
fun acceptTransfer(context: Context, transfer: Transfer, mediaTypes: List<MediaType>? = null)

Accept an incoming transfer.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

Cancels an attended transfer in progress.

Link copied to clipboard
fun cancelInviteToParticipant(participant: Participant, onCompletion: (ConferenceError?) -> Unit)

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

Link copied to clipboard
fun displayLocalVideo(videoRenderer: SurfaceViewRenderer, aspect: RendererCommon.ScalingType, pip: Boolean)

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.

Link copied to clipboard
fun displayRemoteVideo(participantName: String, videoRenderer: SurfaceViewRenderer, aspect: RendererCommon.ScalingType, pip: Boolean)

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.

Link copied to clipboard
fun enableLocalAudio(isEnabled: Boolean)

Enables/disables the local audio.

Link copied to clipboard
fun enableLocalVideo(isEnabled: Boolean)

Enables/disables the local video.

Link copied to clipboard
fun enableRemoteAudio(isEnabled: Boolean)

Enables/disables the remote audio of the current Conference.

Link copied to clipboard
fun enableRemoteVideo(participantName: String, isEnabled: Boolean)

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

Link copied to clipboard
fun expelParticipant(participant: Participant, onCompletion: (ConferenceError?) -> Unit)

Expels the specified participant from this conference.

Link copied to clipboard
fun getInvitations(onCompletion: (List<Invitation>) -> Unit)

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

Link copied to clipboard
fun hangup()

Declines this conference.

Link copied to clipboard
fun hold(onCompletion: (ConferenceError?) -> Unit)

Hold the current conference.

Link copied to clipboard
fun inviteParticipant(callee: String, context: Context, requestedMediaTypes: List<MediaType> = listOf(MediaType.AUDIO, MediaType.VIDEO), joinOnAnswer: Boolean = true, onCompletion: (Either<QssInvitation.State, ConferenceError>) -> Unit)

Invites a new participant to this conference.

Link copied to clipboard
fun join(context: Context, mediaTypes: List<MediaType>? = null, onCompletion: (ConferenceError?) -> Unit)

Allows the user to join this conference.

Link copied to clipboard

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.

Link copied to clipboard

Removes the specified listener.

Link copied to clipboard

Removes the specified listener.

Link copied to clipboard
fun sendDtmf(digit: Dtmf, onCompletion: (ConferenceError?) -> Unit)

Sends the provided digit tone to the current Conference.

Link copied to clipboard
fun swapVideos(participantNameA: String, participantNameB: String)

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.

Link copied to clipboard

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

Link copied to clipboard
fun transferConference(callee: String, mediaTypes: List<MediaType>? = null, onCompletion: (ConferenceError?) -> Unit)

Transfer the current conference to the specified Callee.

Link copied to clipboard
fun unhold(onCompletion: (ConferenceError?) -> Unit)

Unhold the current conference.

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

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