Skip to main content

Methods

All methods are called on the Meeting instance.

tip

You will find an Compose example app in the git repository. A very basic View example is also included.

Join meeting with ACCESS_KEY

fun join(
accessKey: String,
frontCamera: Boolean,
audioOnly: Boolean,
local: VideoSink?,
remote: VideoSink?,
eventListener: EyesonEventListener,
microphoneEnabledOnStart: Boolean = true,
videoEnabledOnStart: Boolean = true,
screenShareInfo: ScreenShareInfo? = null
)

Join meeting with GUEST_TOKEN

fun joinAsGuest(
guestToken: String,
name: String,
id: String?,
avatar: String?,
frontCamera: Boolean,
audioOnly: Boolean,
local: VideoSink?,
remote: VideoSink?,
eventListener: EyesonEventListener,
microphoneEnabledOnStart: Boolean = true,
videoEnabledOnStart: Boolean = true,
screenShareInfo: ScreenShareInfo? = null
)
fun connectPermalink(
userToken: String,
frontCamera: Boolean,
audioOnly: Boolean,
local: VideoSink?,
remote: VideoSink?,
eventListener: EyesonEventListener,
microphoneEnabledOnStart: Boolean = true,
videoEnabledOnStart: Boolean = true,
screenShareInfo: ScreenShareInfo? = null,
)

Either the permalink's GUEST_TOKEN or USER_TOKEN can be used.

suspend fun getPermalinkMeetingInfo(token: String): PermalinkMeetingInfo?

Leave meeting

Terminates your connection to the current meeting session. This method disconnects you from the meeting without ending it for other participants. All resources associated with your connection will be released.

fun leave()

Get meeting info

suspend fun getMeetingInfo(): MeetingInfo?

Get egl context

fun getEglContext(): EglBase.Context?

Start screen share

fun startScreenShare(
screenShareInfo: ScreenShareInfo,
asPresentation: Boolean
)

Stop screen share

Stop screen share and resume with local video muted/unmuted

fun stopScreenShare(resumeLocalVideo: Boolean)

Is screen share active

fun isScreenShareActive(): Boolean

Set video as presentation

Set current video (local or shared screen) as sole video

fun setVideoAsPresentation()

Stop presentation

Stop the current presentation, regardless who stated it

fun stopPresentation()

Set local video target

fun setLocalVideoTarget(target: VideoSink?)

Set remote video target

fun setRemoteVideoTarget(target: VideoSink?)

Enable video

Enable/Disable outgoing video

fun setVideoEnabled(enable: Boolean)

Is local video enabled?

fun isVideoEnabled(): Boolean

Switch camera

fun switchCamera()

Switch camera to

fun switchCameraTo(cameraId: String)

Is front camera

fun isFrontCamera(): Boolean?

Mute other participants

Send mute command to other participants

fun sendMuteOthers()

Set microphone enabled

fun setMicrophoneEnabled(enable: Boolean)

Is microphone enabled?

fun isMicrophoneEnabled(): Boolean

Set remote audio enabled

fun setRemoteAudioEnabled(enable: Boolean)

Send chat message

Send chat message to all participants (including self)

fun sendChatMessage(message: String)

Send custom message

Send custom message to all participants (including self)

fun sendCustomMessage(content: String)

Start video playback

Plays webm (preferred) or mp4 in meeting. If replacedUser is null the video will be played as an additional user. In order to stop the video you need to provide a (unique) playId

loopCount can be used to set the number of repetitions. Set -1 for infinite looping. (Doesn't work with h264 video codec. Will only play once)

fun startVideoPlayback(
url: String,
name: String?,
playId: String?,
replacedUser: UserInfo?,
audio: Boolean,
loopCount: Int = 0
)
caution

The feature loopCount will NOT work if video codec is h264! You can check this for example with ffprobe (see ffprobe documentation).

Stop video playback

fun stopVideoPlayback(playId: String)

Enable logging

fun enabledLogging()

Disable logging

fun disableLogging()

Is widescreen

fun isWidescreen(): Boolean

Get user info

fun getUserInfo(): UserInfo?