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 |
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 |
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
modulesOrigin
The data center.
@property (nonatomic, strong, nullable) @property ( nonatomic , copy , nullable ) NSString *modulesOrigin
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."eu"
: Frankfurt, Europe. 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
floatBar
Whether to enable the floatbar.
@property (nonatomic, assign) BOOL floatBar
Discussion
YES
: Enable the floatbar.NO
: (Default) Disable the floatbar.
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
Disables/Enables the new pencil.
@property (nonatomic, assign) BOOL disableNewPencil
Availability
2.12.2
Note:
- In v2.12.2, the SDK sets the default value of
disableNewPencil
asfalse
; as of v2.12.3, the SDK changes the default value ofdisableNewPencil
toYES
. - To enable the new pencil, 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
Discussion
Sets whether to disables the new pencil:
YES
: (Default) Disable the new pencil. The SDK applies the old stroke smoothing algorithm to pencil.NO
: Enable the new pencil. This allows the SDK to apply the new stroke smoothing algorithm to pencil, which results in smoother, more natural handwriting with a stroke effect.
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
drawOnlyApplePencil
Set whether users can only draw and write on the whiteboard using the Apple Pencil.
@property (nonatomic, assign) BOOL drawOnlyApplePencil
Discussion
YES
: Users can only draw and write using the Apple Pencil.NO
: (Default) Users can draw and write using either the Apple Pencil or their fingers.
After setting drawOnlyApplePencil(YES)
, users can only draw and write on the whiteboard using the Apple Pencil. If users touch the whiteboard with their fingers, the SDK immediately changes the memberState
property from AppliancePencil
to ApplianceClicker
and then from ApplianceClicker
back to AppliancePencil
to prevent the whiteboard tool currently in use being
switched. The SDK triggers two fireRoomStateChanged callbacks to report these internal changes.
Note:
- This property takes effect on iPad only.
- Agora recommends that you set this property following the setting of
UIPencilInteraction.prefersPencilOnlyDrawing
.
Declared In
WhiteRoomConfig.h