Room

class Room

Room the user joined. Contains the local and remote participants with their media streams. Also exposes functions such as muting or toggling video. Raises RealtimeSdkListener events when participants join/leave or media streams change.

Functions

cameraFacingMode
Link copied to clipboard
fun cameraFacingMode(): String
Camera facing mode.
hasAudio
Link copied to clipboard
fun hasAudio(): Boolean
Check if user is sending audio.
hasHdVideo
Link copied to clipboard
fun hasHdVideo(): Boolean
Check if user is sending HD video.
hasVideo
Link copied to clipboard
fun hasVideo(): Boolean
Check if user is sending video.
isMuted
Link copied to clipboard
fun isMuted(): Boolean
Check if user is muted.
isVideoScaledDown
Link copied to clipboard
fun isVideoScaledDown(connectionId: String?): Boolean
Checks if video resolution is being scaled down for the given connection or all connections.
leave
Link copied to clipboard
suspend fun leave()
Leave the room.
localParticipant
Link copied to clipboard
fun localParticipant(): LocalParticipant
Local participant.
name
Link copied to clipboard
fun name(): String?
Room name.
remoteParticipants
Link copied to clipboard
fun remoteParticipants(): Array<RemoteParticipant>
Remote participants.
replaceVideoStream
Link copied to clipboard
fun replaceVideoStream(stream: MediaStream)
Replace the sending video stream.
roomId
Link copied to clipboard
fun roomId(): String?
Room identifier generated by the server.
scaleDownVideo
Link copied to clipboard
fun scaleDownVideo(enable: Boolean, connectionId: String?, width: Int?)
Enables/disables scaling down video resolution for a given connection or all connections.
sendMessageToParticipant
Link copied to clipboard
fun sendMessageToParticipant(message: String, address: String? = null)
Sends a message through the active data channel.
switchCamera
Link copied to clipboard
fun switchCamera()
Switch the camera between 'environment' and 'user'.
toggleAudio
Link copied to clipboard
fun toggleAudio(): Boolean
Toggle sending local audio.
toggleHdVideo
Link copied to clipboard
fun toggleHdVideo(): Boolean
Toggle between SD and HD if user is sending video.
toggleMute
Link copied to clipboard
fun toggleMute(): Boolean
Mute/unmute audio input.
toggleVideo
Link copied to clipboard
fun toggleVideo(hdVideo: Boolean = false): Boolean
Toggle sending local video.