requestMediaRelay

suspend fun requestMediaRelay(destinationRoomId: String, token: String? = null, kinds: List<StreamKind>? = null)

Asks another room to accept this one's media, so a broadcast can be forwarded into a second room without anyone rejoining.

The destination has to accept: it sees RoomEventListener.onMediaRelayRequestReceived, and the answer comes back on RoomEventListener.onMediaRelayRequestResponse. Once accepted the requested kinds relay, and RoomEventListener.onMediaRelayStarted fires in this room with the destination's ID. The destination sees the relayed participants join instead.

Parameters

destinationRoomId

the room to relay into.

token

a token valid for the destination room, or null to reuse this room's.

kinds

the kinds to offer; null offers all three, and an empty list offers none.

See also

Throws

code 3073 (ERROR_INVALID_PARAMETER) if destinationRoomId is empty, or code 4078 (REQUEST_MEDIA_RELAY_FAILED) if the server refuses.