createRTSRoom method

FutureOr<RTSRoom> createRTSRoom(
  1. String roomId
)

@detail api @brief Create a RTSRoom{@link #RTSRoom} instance.
This API only returns a room instance. You still need to call joinRTSRoom{@link #RTSRoom#joinRTSRoom} to actually create/join the room.
Each call of this API creates one RTSRoom{@link #RTSRoom} instance. Call this API as many times as the number of rooms you need, and then call joinRTSRoom{@link #RTSRoom#joinRTSRoom} of each RTSRoom instance to join multiple rooms at the same time.
@param roomId The string matches the regular expression: [a-zA-Z0-9_\@\\-\\.]{1,128}. @return RTSRoom{@link #RTSRoom} instance. If you get NULL instead of an RTSRoom instance, please ensure the roomId is valid. And the specified room is not yet created. @note - If the room that you wish to join already exists, you still need to call this API first to create the RTSRoom instance, and then call joinRTSRoom{@link #RTSRoom#joinRTSRoom}. - Do not create multiple rooms with the same roomId, otherwise the newly created room instance will replace the old one.

Implementation

FutureOr<RTSRoom> createRTSRoom(String roomId) async {
  final result = await nativeCall('createRTSRoom', [roomId]);
  return packObject(
      result, () => RTSRoom(const NativeClassOptions([], disableInit: true)));
}