typedef NS_ENUM( NSInteger, ByteWhiteBoardAddImage )
添加图片返回枚举类型。
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardAddImageFailure | 0 | 添加失败。 |
| ByteWhiteBoardAddImageSuccess | 1 | 添加成功。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardAddMedia )
添加媒体资源返回枚举类型。
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardAddMediaFailure | 0 | 添加失败。 |
| ByteWhiteBoardAddMediaSuccess | 1 | 添加成功。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardConnectionState )
SDK 与 RTC 服务器连接状态。
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardConnectionStateDisconnected | 1 | 连接断开,且断开时长超过 12s,SDK 会自动重连。 |
| ByteWhiteBoardConnectionStateConnecting | 2 | 首次请求建立连接,正在连接中。 |
| ByteWhiteBoardConnectionStateConnected | 3 | 首次连接成功。 |
| ByteWhiteBoardConnectionStateReconnecting | 4 | 涵盖了以下情况:
|
| ByteWhiteBoardConnectionStateReconnected | 5 | 连接断开后,重连成功。 |
| ByteWhiteBoardConnectionStateLost | 6 | 处于 CONNECTION_STATE_DISCONNECTED 状态超过 10 秒,且期间重连未成功。SDK 仍将继续尝试重连。 |
| ByteWhiteBoardConnectionStateFailed | 7 | 连接失败,服务端状态异常。SDK 不会自动重连,请重新进房,或联系技术支持。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardShapeType )
光标和画笔类型
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardShapeTypePen | 0 | 普通画笔 |
| ByteWhiteBoardShapeTypeLine | 1 | 直线 |
| ByteWhiteBoardShapeTypeArrow | 2 | 箭头 |
| ByteWhiteBoardShapeTypeRect | 3 | 矩形 |
| ByteWhiteBoardShapeTypeCircle | 4 | 圆 |
| ByteWhiteBoardShapeTypeText | 5 | 文本框 |
| ByteWhiteBoardShapeTypeLaserPen | 7 | 激光笔 |
| ByteWhiteBoardShapeTypeFluorescentPen | 8 | 荧光笔 |
| ByteWhiteBoardShapeTypeMagicPen | 9 | 魔法画笔 |
| ByteWhiteBoardShapeTypeErase | 100 | 橡皮擦 |
| ByteWhiteBoardShapeTypeSelect | 1000 | 选择模式 |
| ByteWhiteBoardShapeTypeDrag | 1001 | 拖拽工具,设置后SDK处理触摸事件实现缩放&平移操作 |
| ByteWhiteBoardFileArrow | 1002 | PPT 操作工具。选择这个工具后,可以对 PPT 进行翻页、播放页面上的多媒体等操作。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardFillType )
背景图片填充方式。
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardFillTypeFill | 0 | 平铺窗口,按照白板比例缩放图片进行填充。 |
| ByteWhiteBoardFillTypeCenter | 1 | 居中放置,不缩放。 |
| ByteWhiteBoardFillTypeHidden | 2 | 等比例缩放,如果画布和图片比例不一致,将对图片进行裁切。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardEditMode )
编辑权限
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardEditModeReadOnly | 0 | 只读 |
| ByteWhiteBoardEditModeEditAll | 1 | 所有人可编辑 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardLockBoardReason )
锁定原因
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardLockBoardReasonBoardDataError | 0 | 数据错误 |
| ByteWhiteBoardLockBoardReasonNetworkCongestion | 1 | 网络阻塞 |
| ByteWhiteBoardLockBoardReasonNetworkDisconnect | 2 | 网络断开 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardLockBoardElementReason )
图片加载状态
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardLockBoardElementReasonLock | 0 | 元素被锁 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardImageLoadStatus )
图片加载状态
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardImageLoadStatusLoading | 0 | 加载中。 |
| ByteWhiteBoardImageLoadStatusEnd | 1 | 加载完成。 |
| ByteWhiteBoardImageLoadStatusError | 2 | 加载错误。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardBoardStatus )
白板状态
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardBoardStatusActive | 0 | 可用 |
| ByteWhiteBoardBoardStatusInActive | 1 | 不可用。房间中有用户调用 destroyRoom 关闭白板后,再次进房时,白板状态将为不可用。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardRoomStatus )
房间状态
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardRoomStatusActive | 0 | 正在上课状态 |
| ByteWhiteBoardRoomStatusInActive | 1 | 下课状态。房间中有用户调用 destroyRoom 下课后,再次进房时,房间状态将为不可用。 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardWindowConfigRenderMode )
渲染方式
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardWindowConfigRenderModeFill | 0 | 填满窗口 |
| ByteWhiteBoardWindowConfigRenderModeFit | 1 | 按比例缩放,可能填充不满 |
| ByteWhiteBoardWindowConfigRenderModeHidden | 2 | 按比例缩放,填充满,白板可能被裁剪 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardCursorType )
自定义光标类型
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardCursorTypePointer | 0 | 鼠标选择工具 |
| ByteWhiteBoardCursorTypePen | 2 | 画笔工具。画笔的设置接口如下。
|
| ByteWhiteBoardCursorTypeShape | 3 | 形状绘制工具。形状的设置接口如下。
|
| ByteWhiteBoardCursorTypeText | 4 | 文本工具。文本的设置接口如下。
|
| ByteWhiteBoardCursorTypeErase | 5 | 橡皮擦工具 |
| ByteWhiteBoardCursorTypeLaser | 6 | 激光笔工具 |
typedef NS_ENUM( NSInteger, ByteWhiteBoardMotionType )
锚点形状
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardMotionTypeRect | 0 | 矩形 |
| ByteWhiteBoardMotionTypeCircle | 1 | 圆形 |
WHITE_BOARD_EXPORT @interface ByteWhiteBoardWindowConfig : NSObject
窗口配置
| 类型 | 名称 |
|---|---|
| UIView* | view |
| ByteWhiteBoardWindowConfigRenderMode | renderMode |
| float | aspectRatio |
@property (nonatomic, strong) UIView *_Nullable view;
视图
@property (nonatomic, assign) ByteWhiteBoardWindowConfigRenderMode renderMode;
渲染方式
@property (nonatomic, assign) float aspectRatio;
显示比例(长/宽)
typedef NS_ENUM( NSInteger, ByteWhiteBoardViewMode )
视图模式
| 类型 | 值 | 说明 |
|---|---|---|
| ByteWhiteBoardViewModeCast | 0 | 视角设置者 |
| ByteWhiteBoardViewModeFollow | 1 | 视角跟随者 |
| ByteWhiteBoardViewModeFree | 2 | 自由模式 |
WHITE_BOARD_EXPORT @interface ByteWhiteBoardBackgroundInfo : NSObject
页面配置
| 类型 | 名称 |
|---|---|
| UIColor* | bkColor |
| NSString* | bkImage |
| CGSize | bkImageSize |
| ByteWhiteBoardFillType | bkImageFillType |
@property (nonatomic, strong) UIColor *_Nullable bkColor;
背景颜色
@property (nonatomic, strong) NSString *_Nullable bkImage;
背景图片
@property (nonatomic, assign) CGSize bkImageSize;
背景图片尺寸
@property (nonatomic, assign) ByteWhiteBoardFillType bkImageFillType;
背景图片填充方式。详见 ByteWhiteBoardFillType。
WHITE_BOARD_EXPORT @interface ByteWhiteBoardZoomInfo : NSObject
视图缩放信息
| 类型 | 名称 |
|---|---|
| CGFloat | zoom |
| int | centerX |
| int | centerY |
@property (nonatomic, assign) CGFloat zoom;
放大倍数
@property (nonatomic, assign) int centerX;
距离原点 X 方向上的偏移,白板右方为正方向
@property (nonatomic, assign) int centerY;
距离原点 Y 方向上的偏移,白板下方为正方向
WHITE_BOARD_EXPORT @interface ByteWhiteBoardPageInfo : NSObject
页面信息
| 类型 | 名称 |
|---|---|
| NSString* | pageID |
| ByteWhiteBoardBackgroundInfo* | bkInfo |
| NSString* | extraMsg |
@property (nonatomic, strong) NSString *_Nullable pageID;
页面唯一标识。传空值时,将自动生成 ID。
@property (nonatomic, strong) ByteWhiteBoardBackgroundInfo* _Nullable bkInfo;
背景设置,详见 ByteWhiteBoardBackgroundInfo
@property (nonatomic, strong) NSString *_Nullable extraMsg; //(最大512字节)
附加信息,最大 512 字节
WHITE_BOARD_EXPORT @interface ByteWhiteBoardInfo : NSObject
白板信息
| 类型 | 名称 |
|---|---|
| NSInteger | boardID |
| NSString* | boardName |
| NSArray<ByteWhiteBoardPageInfo*>* | pageInfos |
| NSString* | currentBoardID |
| ByteWhiteBoardBackgroundInfo* | backgroundInfo |
| ByteWhiteBoardBoardStatus | boradStatus |
| ByteWhiteBoardZoomInfo* | zoomInfo |
| NSInteger | createTime |
@property (nonatomic, assign) NSInteger boardID;
白板 ID
@property (nonatomic, strong) NSString *_Nullable boardName;
白板名字
@property (nonatomic, strong) NSArray<ByteWhiteBoardPageInfo *> *_Nullable pageInfos;
白板内所有页的信息
@property (nonatomic, strong) NSString *_Nullable currentBoardID;
当前页ID
@property (nonatomic, strong) ByteWhiteBoardBackgroundInfo *_Nullable backgroundInfo;
当前白板背景信息
@property (nonatomic, assign) ByteWhiteBoardBoardStatus boradStatus;
当前白板状态
@property (nonatomic, strong) ByteWhiteBoardZoomInfo* _Nullable zoomInfo;
视图缩放信息
@property (nonatomic, assign) NSInteger createTime;
当前白板创建时间,为精确到毫秒的 UNIX 时间戳
WHITE_BOARD_EXPORT @interface ByteWhiteBoardAnchor : NSObject
选择框样式
| 类型 | 名称 |
|---|---|
| ByteWhiteBoardMotionType | type |
| int | anchorWidth |
| int | anchorBorderWidth |
| int | anchorBorderColor |
| int | anchorFillColor |
| int | borderWidth |
| int | borderColor |
| NSString* | rotateIcon |
| int | rotateDistance |
@property (nonatomic, assign) ByteWhiteBoardMotionType type;
锚点形状
@property (nonatomic, assign) int anchorWidth;
锚点宽度
@property (nonatomic, assign) int anchorBorderWidth;
锚点边框线条宽度
@property (nonatomic, assign) int anchorBorderColor;
锚点边框颜色
@property (nonatomic, assign) int anchorFillColor;
锚点填充颜色
@property (nonatomic, assign) int borderWidth;
选择框宽度
@property (nonatomic, assign) int borderColor;
选择框颜色
@property (nonatomic, strong) NSString * _Nullable rotateIcon;
旋转手柄图标资源地址
@property (nonatomic, assign) int rotateDistance;
旋转手柄距离选择框顶点的距离
WHITE_BOARD_EXPORT @interface ByteWhiteBoardCursorInfo : NSObject
光标样式
| 类型 | 名称 |
|---|---|
| int | centerX |
| int | centerY |
| NSString* | iconPath |
@property (nonatomic, assign) int centerX;
光标中心点 X 坐标
@property (nonatomic, assign) int centerY;
光标中心点 Y 坐标
@property (nonatomic, copy) NSString *_Nullable iconPath;
icon 资源地址
WHITE_BOARD_EXPORT @interface ByteWhiteBoardImageRect : NSObject
图片位置信息
| 类型 | 名称 |
|---|---|
| int* | width |
| int* | height |
| int* | left |
| int* | top |
@property (nonatomic, assign) int *_Nullable width;
图片宽度,单位为屏幕宽度万分之一
@property (nonatomic, assign) int *_Nullable height;
图片高度,单位为屏幕宽度万分之一
@property (nonatomic, assign) int *_Nullable left;
X 轴坐标
@property (nonatomic, assign) int *_Nullable top;
Y 轴坐标
WHITE_BOARD_EXPORT @interface ByteWhiteBoardPptInfo : NSObject
PPT 白板信息
| 类型 | 名称 |
|---|---|
| NSString* | fileId |
| NSString* | title |
| NSString* | customArgs |
@property (nonatomic, strong) NSString * _Nonnull fileId;
PPT 的 ID。 在 Web 端调用 createTranscodeTask 或服务端调用 WbTranscodeCreate,传入 PPT 的 URL 地址,获取到 fileId。
@property (nonatomic, strong) NSString * _Nonnull title;
PPT 的名称
@property (nonatomic, strong) NSString * _Nonnull customArgs;
业务层自定义参数
WHITE_BOARD_EXPORT @interface ByteWhiteBoardZoomOperation : NSObject
手势缩放拖拽配置信息
| 类型 | 名称 |
|---|---|
| bool | enableTouchZoom |
@property (nonatomic, assign) bool enableTouchZoom;
是否允许双指缩放,双指移动,默认 true