createRTCRoom abstract method

Future<RTCRoom?> createRTCRoom(
  1. String roomId
)

Creates a room instance.

This API only returns a room instance. You still need to call RTCRoom.joinRoom to actually create/join the room.
A new RTCRoom instance is created every time this API is called.
Call RTCRoom.joinRoom in each RTCRoom instance separately to join multiple rooms at the same time.
In multi-room mode, users can subscribe to the audio and video streams of each room at the same time.

roomId: An non-empty string within 128 bytes. Each room created by calling this API requires a unique roomId, so that the room can be distinguished from each other.
The following characters can be used:

  • 26 uppercase letters A~Z.
  • 26 lowercase letters a~z.
  • 10 numbers: 0~9.
  • "_", "@" or "-".
    In multi-room mode, you need to use different roomId to create multiple rooms, otherwise the newly created room instance will replace the old one.

Notes:

  • If the room that you wish to join already exists, you still need to call this API first to create the RTCRoom instance, and then call RTCRoom.joinRoom.
  • To publish streams to the multiple rooms, call RTCRoom.startForwardStreamToRooms instead of enabling multi-room mode.

Implementation

Future<RTCRoom?> createRTCRoom(String roomId);