startForwardStreamToRooms abstract method
Starts relaying media stream across rooms.
Call this API after the user enters the room to achieve the relaying of media streams to multiple rooms, which applies to cross-room concatenation and other scenarios.
forwardStreamInfos
: Information of the rooms where you want to relay the media stream to.
Notes:
- Calling this method will trigger RTCRoomEventHandler.onForwardStreamStateChanged locally.
- After calling this method, listen the events from each room during the relaying by registering RTCRoomEventHandler.onForwardStreamEvent.
- Once the relaying begins, the other users in the target room will receive RTCRoomEventHandler.onUserJoined and RTCRoomEventHandler.onUserPublishStream/RTCRoomEventHandler.onUserPublishScreen.
- Call RTCRoom.updateForwardStreamToRooms o add or remove target room(s) after calling this API.
- Call RTCRoom.stopForwardStreamToRooms to stop relaying to all rooms after calling this API.
- Call RTCRoom.pauseForwardStreamToAllRooms to pause relaying to all rooms after calling this API.
Implementation
Future<int?> startForwardStreamToRooms(
List<ForwardStreamInfo> forwardStreamInfos);