BoardContext
提供白板相关能力。
boardConnectionState: string;
自 v1.1.5 起新增。
白板连接状态。
joinBoard: () => Promise<any>;
自 v1.1.5 起新增。
加入白板房间。
leaveBoard: () => Promise<any>;
自 v1.1.5 起新增。
离开白板房间。
room: object,
白板房间对象。
zoomValue: number,
白板缩放的值。
currentPage: number,
当前白板页数。
totalPage: number,
白板总页数。
courseWareList: array,
课件列表。
currentColor: string,
当前画笔颜色。
currentStrokeWidth: number,
当前画笔宽度。
hasPermission: boolean,
是否拥有白板权限。
currentSelector: string,
当前白板的选择工具。
lineSelector: string,
当前白板的画线工具。
activeMap: Record<string, boolean>,
默认激活的工具。
ready: boolean,
白板是否准备完毕。
tools: any[],
白板基础工具列表。
changeStroke: (value: any) => void,
修改画笔宽度。
changeHexColor: (value: any) => void,
修改颜色。
mountToDOM: (dom: HTMLDivElement | null) => void,
将白板挂载在 DOM 节点上或者卸载白板。
setTool: (tool: string) => void,
切换白板工具。
参数 | 描述 |
---|---|
tool |
工具名称。 |
zoomBoard: (type: string) => void,
全屏白板。
参数 | 描述 |
---|---|
type |
可设为:fullscreen : 全屏。fullscreenExit : 退出全屏。 |
setZoomScale: (operation: string) => void,
放大或缩小白板。
参数 | 描述 |
---|---|
operation |
可设为:out : 缩小白板。in : 放大白板。 |
changeFooterMenu: (itemName: string) => void,
设置白板跳转到哪一页。
参数 | 描述 |
---|---|
itemName |
可设为:first_page : 第一页。last_page : 最后一页。next_page : 下一页。prev_page : 上一页。 |
updatePen: (value: any) => void,
更新画笔。
boardPenIsActive: boolean,
当前白板使用的工具是否为画笔。
setLaserPoint: () => void,
设置当前工具为激光笔。
async installTools(tools: any[]): void
安装白板工具。
async revokeUserPermission(userUuid: string): void
取消白板授权。
async grantUserPermission(userUuid: string): void
给予指定学生白板权限。
showBoardTool: [boolean, boolean];
自 v1.1.2 起新增。
当前是否显示白板基础工具栏和页面控制工具栏。
startOrStopSharing: () => Promise<void>,
自 v1.1.2 起废弃。声网建议改用 ScreenShareContext 中的
startOrStopSharing
。
开始或停止屏幕共享。