start method

  1. @override
Future<TUIValueCallBack<TUIRoomInfo>> start(
  1. TUIRoomInfo roomInfo
)
override

Implementation

@override
Future<TUIValueCallBack<TUIRoomInfo>> start(TUIRoomInfo roomInfo) async {
  LiveKitLogger.info("$tag($hashCode) createRoom:[roomInfo:${roomInfo.roomId}]");
  final result = await roomEngine.createRoom(roomInfo);
  if (result.code == TUIError.success) {
    LiveKitLogger.info("$tag($hashCode) enterRoom:[roomId:${roomInfo.roomId},roomType:TUIRoomType.livingRoom]");
    return roomEngine.enterRoom(roomInfo.roomId, roomType: TUIRoomType.livingRoom);
  }
  return TUIValueCallBack(code: TUIError.errFailed, message: "failed");
}