typedef NS_ENUM(NSInteger, ByteWhiteBoardConnectionState)
objectivecSDK 与 RTC 服务器连接状态。
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardConnectionStateDisconnected | 1 | 连接断开,且断开时长超过 12s,SDK 会自动重连。 |
| ByteWhiteBoardConnectionStateConnecting | 2 | 首次请求建立连接,正在连接中。 |
| ByteWhiteBoardConnectionStateConnected | 3 | 首次连接成功。 |
| ByteWhiteBoardConnectionStateReconnecting | 4 | 涵盖了以下情况: + 首次连接时,10 秒内未连接成功; + 连接成功后,断连 10 秒。自动重连中。 |
| ByteWhiteBoardConnectionStateReconnected | 5 | 连接断开后,重连成功。 |
| ByteWhiteBoardConnectionStateLost | 6 | 处于 CONNECTION_STATE_DISCONNECTED 状态超过 10 秒,且期间重连未成功。SDK 仍将继续尝试重连。 |
| ByteWhiteBoardConnectionStateFailed | 7 | 连接失败,服务端状态异常。SDK 不会自动重连,请重新进房,或联系技术支持。 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardShapeType)
objectivec光标和画笔类型
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardShapeTypePen | 0 | 普通画笔 |
| ByteWhiteBoardShapeTypeLine | 1 | 直线 |
| ByteWhiteBoardShapeTypeArrow | 2 | 箭头 |
| ByteWhiteBoardShapeTypeRect | 3 | 矩形 |
| ByteWhiteBoardShapeTypeCircle | 4 | 圆 |
| ByteWhiteBoardShapeTypeText | 5 | 文本框 |
| ByteWhiteBoardShapeTypeLaserPen | 7 | 激光笔 |
| ByteWhiteBoardShapeTypeFluorescentPen | 8 | 荧光笔 |
| ByteWhiteBoardShapeTypeMagicPen | 9 | 魔法画笔 |
| ByteWhiteBoardShapeTypeErase | 100 | 橡皮擦 |
| ByteWhiteBoardShapeTypeSelect | 1000 | 选择模式 |
| ByteWhiteBoardShapeTypeDrag | 1001 | 拖拽工具,屏幕触摸事件触发平移操作,缩放手势事件触发视图缩放。 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardFillType)
objectivec背景图片填充方式。
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardFillTypeFill | 0 | 平铺窗口,按照白板比例缩放图片进行填充。 |
| ByteWhiteBoardFillTypeCenter | 1 | 居中放置,不缩放。 |
| ByteWhiteBoardFillTypeHidden | 2 | 等比例缩放,如果画布和图片比例不一致,将对图片进行裁切。 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardEditMode)
objectivec编辑权限
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardEditModeReadOnly | 0 | 只读 |
| ByteWhiteBoardEditModeEditSelf | 1 | 仅当前用户可编辑 |
| ByteWhiteBoardEditModeEditAll | 2 | 所有人可编辑 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardLockBoardReason)
objectivec锁定原因
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardLockBoardReasonBoardDataError | 0 | 数据错误 |
| ByteWhiteBoardLockBoardReasonNetworkCongestion | 1 | 网络阻塞 |
| ByteWhiteBoardLockBoardReasonNetworkDisconnect | 2 | 网络断开 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardBoardStatus)
objectivec白板状态
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardBoardStatusActive | 0 | 可用 |
| ByteWhiteBoardBoardStatusInActive | 1 | 不可用。房间中有用户调用 closeWhiteBoard: 关闭白板后,再次进房时,白板状态将为不可用。 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardWindowConfigRenderMode)
objectivec渲染方式
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardWindowConfigRenderModeFill | 0 | 填满窗口 |
| ByteWhiteBoardWindowConfigRenderModeFit | 1 | 按比例缩放,可能填充不满 |
| ByteWhiteBoardWindowConfigRenderModeHidden | 2 | 按比例缩放,填充满,白板可能被裁剪 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardCursorType)
objectivec自定义光标类型
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardCursorTypeNormal | 0 | 鼠标选择工具 |
| ByteWhiteBoardCursorTypePen | 2 | 画笔工具。画笔的设置接口如下。 + 调用 setPenSize: 设置笔尖宽度。 + 调用 setPenColor: 设置画笔颜色。 |
| ByteWhiteBoardCursorTypeShape | 3 | 形状绘制工具。形状的设置接口如下。 + 调用 setShapeWidth: 设置边框线条宽度。 + 调用 setShapeColor: 设置边框线条颜色。 |
| ByteWhiteBoardCursorTypeText | 4 | 文本工具。文本的设置接口如下。 + 调用 setTextFontSize: 设置文字高度。 + 调用 setTextColor: 设置文字颜色。 |
| ByteWhiteBoardCursorTypeErase | 5 | 橡皮擦工具 |
| ByteWhiteBoardCursorTypeLaser | 6 | 激光笔工具 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardMotionType)
objectivec锚点形状
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardMotionTypeRect | 0 | 矩形 |
| ByteWhiteBoardMotionTypeCircle | 1 | 圆形 |
typedef NS_ENUM(NSInteger, ByteWhiteBoardViewMode)
objectivec视图缩放同步选项
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardViewModeCast | 0 | 视图控制模式。本端的视图设置将同步给其他用户,设置为自由模式的用户除外。 同一个白板可以有多个控制方,缩放设置为最近一次调用 API 传入的设置。 |
| ByteWhiteBoardViewModeFollow | 1 | 视图跟随模式 |
| ByteWhiteBoardViewModeFree | 2 | 自由模式,不跟随其他用户的视图缩放设置。同时本地的视图缩放设置也不会影响到设置为跟随的用户。 |
@interface ByteWhiteBoardWindowConfig : NSObject
objectivec窗口配置
| 类型 | 名称 |
|---|---|
| UIView* | view |
| ByteWhiteBoardWindowConfigRenderMode | renderMode |
| float | aspectRatio |
@property (nonatomic, strong) UIView * view;
objectivec视图
@property (nonatomic, assign) ByteWhiteBoardWindowConfigRenderMode renderMode;
objectivec渲染方式
@property (nonatomic, assign) float aspectRatio;
objectivec显示比例(长/宽)
@interface ByteWhiteBoardBackgroundInfo : NSObject
objectivec页面配置
| 类型 | 名称 |
|---|---|
| UIColor* | bkColor |
| NSString* | bkImage |
| CGSize | bkImageSize |
| ByteWhiteBoardFillType | bkImageFillType |
@property (nonatomic, strong) UIColor* bkColor;
objectivec背景颜色
@property (nonatomic, strong) NSString * bkImage;
objectivec背景图片
@property (nonatomic, assign) CGSize bkImageSize;
objectivec背景图片尺寸
@property (nonatomic, assign) ByteWhiteBoardFillType bkImageFillType;
objectivec背景图片填充方式。详见 ByteWhiteBoardFillType。
@interface ByteWhiteBoardZoomInfo : NSObject
objectivec屏幕信息
| 类型 | 名称 |
|---|---|
| CGFloat | zoom |
| int | centerX |
| int | centerY |
@property (nonatomic, assign) CGFloat zoom;
objectivec放大倍数
@property (nonatomic, assign) int centerX;
objectivec距离原点X方向上的偏移(以白板右方为正方向)
@property (nonatomic, assign) int centerY;
objectivec距离原点Y方向上的偏移(以白板下方为正方向)
@interface ByteWhiteBoardPageInfo : NSObject
objectivec页面信息
| 类型 | 名称 |
|---|---|
| NSString* | pageID |
| ByteWhiteBoardBackgroundInfo* | bkInfo |
| NSString* | extraMsg |
@property (nonatomic, strong) NSString* pageID;
objectivec页面 ID
@property (nonatomic, strong) ByteWhiteBoardBackgroundInfo* bkInfo;
objectivec背景设置,详见 ByteWhiteBoardBackgroundInfo
@property (nonatomic, strong) NSString * extraMsg;
objectivec附加信息,最大 512 字节
@interface ByteWhiteBoardInfo : NSObject
objectivec白板信息
| 类型 | 名称 |
|---|---|
| NSInteger | boardID |
| NSString* | boardName |
| NSArray<ByteWhiteBoardPageInfo>** | pageInfos |
| NSString* | currentBoardID |
| ByteWhiteBoardBackgroundInfo* | backgroundInfo |
| ByteWhiteBoardBoardStatus | boradStatus |
| ByteWhiteBoardZoomInfo* | zoomInfo |
| NSInteger | createTimestamp |
@property (nonatomic, assign) NSInteger boardID;
objectivec白板 ID
@property (nonatomic, strong) NSString* boardName;
objectivec白板名字
@property (nonatomic, strong) NSArray<ByteWhiteBoardPageInfo *>* pageInfos;
objectivec白板内所有页的信息
@property (nonatomic, strong) NSString* currentBoardID;
objectivec当前页面 ID
@property (nonatomic, strong) ByteWhiteBoardBackgroundInfo* backgroundInfo;
objectivec当前白板背景信息
@property (nonatomic, assign) ByteWhiteBoardBoardStatus boradStatus;
objectivec当前白板状态
@property (nonatomic, strong) ByteWhiteBoardZoomInfo *zoomInfo;
objectivec当前白板屏幕信息
@property (nonatomic, assign) NSInteger createTimestamp;
objectivec当前白板创建时间
@interface ByteWhiteBoardAnchor : NSObject
objectivec选择框样式
| 类型 | 名称 |
|---|---|
| ByteWhiteBoardMotionType | type |
| int | anchorWidth |
| int | anchorBorderWidth |
| int | anchorBorderColor |
| int | anchorFillColor |
| int | borderWidth |
| int | borderColor |
| NSString* | rotateIcon |
| int | rotateDistance |
@property (nonatomic, assign) ByteWhiteBoardMotionType type;
objectivec锚点形状
@property (nonatomic, assign) int anchorWidth;
objectivec锚点宽度
@property (nonatomic, assign) int anchorBorderWidth;
objectivec锚点边框线条宽度
@property (nonatomic, assign) int anchorBorderColor;
objectivec锚点边框颜色
@property (nonatomic, assign) int anchorFillColor;
objectivec锚点填充颜色
@property (nonatomic, assign) int borderWidth;
objectivec选择框宽度
@property (nonatomic, assign) int borderColor;
objectivec选择框颜色
@property (nonatomic, strong) NSString * rotateIcon;
objectivec旋转手柄图标资源地址
@property (nonatomic, assign) int rotateDistance;
objectivec旋转手柄距离选择框顶点的距离
@interface ByteWhiteBoardCursorInfo : NSObject
objectivec光标样式
| 类型 | 名称 |
|---|---|
| int | width |
| int | height |
| int | centerX |
| int | centerY |
| NSString* | iconPath |
@property (nonatomic, assign) int width;
objectivec光标宽度
@property (nonatomic, assign) int height;
objectivec光标高度
@property (nonatomic, assign) int centerX;
objectivec光标中心点 X 坐标
@property (nonatomic, assign) int centerY;
objectivec光标中心点 Y 坐标
@property (nonatomic, copy) NSString * iconPath;
objectivecicon 资源地址