WhiteRoomConfig Class Reference

Inherits from WhiteObject
Declared in WhiteRoomConfig.h

Overview

Configurations for a WhiteRoom object.

Note:

All methods in this class must be called before joining a room. Any methods in this class that are called after successfully joining a room do not take effect.

– initWithUUID:roomToken:uid:

Sets the room UUID and initialize the WhiteRoomConfig object.

- (instancetype)initWithUUID:(NSString *)uuid roomToken:(NSString *)roomToken uid:(NSString *)uid

Parameters

uuid

Room UUID, the unique identifier of a room.

roomToken

The Room Token for authentication.

uid

Since v2.15.0. The unique identifier of a user in a string format. The maximum length is 1024 bytes. If you upgrade the SDK to v2.15.0 or later, this parameter is required. Ensure that the uid of each user in the same room is unique.

Return Value

Initialized WhiteRoomConfig object.

Declared In

WhiteRoomConfig.h

– initWithUUID:roomToken:uid:userPayload:

Sets the room UUID and user payload and initialize the WhiteRoomConfig object.

- (instancetype)initWithUUID:(NSString *)uuid roomToken:(NSString *)roomToken uid:(NSString *)uid userPayload:(id _Nullable)userPayload

Parameters

uuid

Room UUID, the unique identifier of a room.

roomToken

The Room Token for authentication.

uid

Since v2.15.0. The unique identifier of a user in a string format. The maximum length is 1024 bytes. If you upgrade the SDK to v2.15.0 or later, this parameter is required. Ensure that the uid of each user in the same room is unique.

userPayload

The user payload.

Return Value

An initialized WhiteRoomConfig object.

Declared In

WhiteRoomConfig.h

  uuid

Room UUID, the unique identifier of a room.

@property (nonatomic, copy) NSString *uuid

Declared In

WhiteRoomConfig.h

  roomToken

The Room Token for authentication.

@property (nonatomic, copy) NSString *roomToken

Declared In

WhiteRoomConfig.h

  uid

The unique identifier of a user in a string format. The maximum length is 1024 bytes. Since v2.15.0.

@property (nonatomic, copy, readonly) NSString *uid

Declared In

WhiteRoomConfig.h

  region

The data center.

@property (nonatomic, strong, nullable) WhiteRegionKey region

Availability

2.11.0

The data center can be set to the following values:

  • "cn-hz": Hangzhou, China. This data center provides services to the regions that are not covered by other data centers.
  • "us-sv": Silicon Valley, US. This data center provides services to North America and South America.
  • "in-mum": Mumbai, India.This data center provides services to India.
  • "sg": Singapore.This data center provides services to Singapore, East Asia, and Southeast Asia.
  • "gb-lon": London, England. This data center provides services to Europe.

Note:

  • The data center set in this method must be the same as the data center of the live Interactive Whiteboard room to be joined; otherwise, the SDK fails to connect to the room.
  • You can call either this method or the region method in the WhiteSdkConfiguration class to set the data center. If you call both,this method overrides the region method.

Declared In

WhiteRoomConfig.h

  disableDeviceInputs

Whether to disable the whiteboard tools from responding to users' inputs.

@property (nonatomic, assign) BOOL disableDeviceInputs

Discussion

  • YES: Disable the whiteboard tools from responding to users' inputs.
  • NO: (Default) Enable the whiteboard tools to respond to users' inputs.

Declared In

WhiteRoomConfig.h

  disableCameraTransform

Whether to disable the local user from adjusting the view of the whiteboard, including moving and zooming the view.

@property (nonatomic, assign) BOOL disableCameraTransform

Discussion

  • YES: Disable the local user from adjusting the view of the whiteboard.
  • NO: (Default) Enable the local user to adjust the view of the whiteboard.

Declared In

WhiteRoomConfig.h

  disableBezier

Whether to disable the Bézier curve optimization.

@property (nonatomic, assign) BOOL disableBezier

Discussion

  • YES: The Bézier curve optimization is disabled.
  • NO: (Default) The Bézier curve optimization is enabled.

Declared In

WhiteRoomConfig.h

  disableOperations

Whether to disable the whiteboard from responding to users' operations. (Deprecated: This property is deprecated. Use disableDeviceInputs and disableCameraTransform instead.)

@property (nonatomic, assign) BOOL disableOperations

Discussion

  • YES: Disable the whiteboard from responding to users' operations.
  • NO: (Default) Enable the whiteboard to respond to users' operations.

Declared In

WhiteRoomConfig.h

  disableEraseImage

Whether to disable the eraser from erasing images on the whiteboard.

@property (nonatomic, assign) BOOL disableEraseImage

Discussion

  • YES: Disable the eraser from erasing images.
  • NO: (Default) Enable the eraser to erase images.

Declared In

WhiteRoomConfig.h

  cameraBound

The boundary of the view. See WhiteCameraBound

@property (nonatomic, strong, nullable) WhiteCameraBound *cameraBound

Declared In

WhiteRoomConfig.h

  userPayload

Customized user information in key-value pairs, for example, "avatar", "https://example.com/user.png".

@property (nonatomic, copy, nullable) id userPayload

Discussion

Note:

  • You can pass in customized user information, such as user ID, nickname, and avatar, in the userPayload and call this method to send the information to the application.
  • To ensure the format of the customized user information is correct, the userPayload must extend the WhiteRoomConfig class.
  • The user information can be in JSON, NSString, NSNumber format, and the recommended format is NSDictionary.

Declared In

WhiteRoomConfig.h

  memberInfo

This property is deprecated. Use userPayload instead.

@property (nonatomic, copy, nullable) WhiteMemberInformation *memberInfo

Discussion

Customized user information.

Declared In

WhiteRoomConfig.h

  isWritable

Whether the user joins the whiteboard room in interactive mode.

@property (nonatomic, assign) BOOL isWritable

Discussion

  • Interactive mode, in which users have read and write permissions on the whiteboard, appear in the member list of the room, and are visible to all other users in the room.
  • Subscription mode, in which users have read-only access to the whiteboard, do not appear in the member list of the room, and are invisible to all other users in the room.

After joining the room, you can also switch to the subscription mode through the setWritable method.

  • YES: (Default) Join the room in interactive mode.
  • NO: Join the room in subscription mode.

Declared In

WhiteRoomConfig.h

  disableNewPencil

Whether to disables the stroke effect of the pencil.

@property (nonatomic, assign) BOOL disableNewPencil

Availability

2.12.2

Note:

  • In v2.12.2, the SDK sets the default value of disableNewPencil as false; as of v2.12.3, the SDK changes the default value of disableNewPencil to YES.
  • To enable the stroke effect, ensure that every user in the room uses one of the following SDKs:
    • Android SDK v2.12.3 or later
    • iOS SDK v2.12.3 or later
    • Web SDK v2.12.5 or later
  • YES: (Default) Disable the stroke effect of the pencil.
  • NO: Enable the stroke effect of the pencil.

Declared In

WhiteRoomConfig.h

  timeout

The timeout for joining a room.

@property (nonatomic, strong) NSNumber *timeout

Discussion

After the SDK times out, it will actively disconnect and trigger the firePhaseChanged callback. At the same time, it triggers the fireDisconnectWithError callback and returns the prompt “Reconnection time exceeds xx milliseconds”.

Declared In

WhiteRoomConfig.h