requestMediaRelay

fun requestMediaRelay(destinationMeetingId: String, token: String, userKinds: List<String>)

Requests the server to relay the local participant's media streams to a different meeting room.

Media relay enables cross-room broadcasting: the local participant's audio, video, and/or screen-share streams are forwarded by the server to the specified destination meeting. Participants in the destination room receive these streams as if the local participant had joined their room. The local participant remains in the current meeting.

A relay request is sent to the destination meeting's participants. The request must be accepted by a participant in the destination room via onRelayRequestReceived. To stop an active relay, call stopMediaRelay.

Code Example:


// Relay only audio and video to another meeting
val kinds = listOf("audio", "video")
meeting.requestMediaRelay(
    "dest-meeting-id", // destination meeting ID
    null,              // token (use current)
    kinds              // stream kinds to relay
)

// Relay all stream kinds (audio, video, share)
meeting.requestMediaRelay(
    "dest-meeting-id", // destination meeting ID
    null,              // token (use current)
    null               // null = relay all kinds
)

Parameters

destinationMeetingId

the meeting ID of the destination meeting

token

The authentication token for the destination meeting, or null to use the current token.

userKinds

The list of stream kinds to relay (e.g., "audio", "video", "share"), or null to relay all kinds.

See also

MeetingEventListener.onMediaRelayRequestReceived()

Throws

if destinationMeetingId is null or empty