2026/10/27 17:43:29
教具插件介绍与启用
适用于 Fastboard iOS 1.4.6。本页通过 Fastboard 公开的原生 SDK 对象配置教具插件。
在创建 FastRoom 前设置配置,入房成功后使用 fastRoom.room 和 fastRoom.whiteSDK。delegate 通过 fastRoom.commonDelegate、roomDelegate 设置,避免覆盖 Fastboard 内部代理。
Swift
let config = FastRoomConfiguration(appIdentifier: appIdentifier,
roomUUID: uuid, roomToken: roomToken, region: .CN, userUID: uid)
config.whiteSdkConfiguration.useMultiViews = true
config.whiteSdkConfiguration.enableAppliancePlugin = true
let pluginOptions = WhiteAppliancePluginOptions()
pluginOptions.extras = ["useBackgroundThread": true]
config.whiteRoomConfig.appliancePluginOptions = pluginOptions
let fastRoom = Fastboard.createFastRoom(withFastRoomConfig: config)
教具与操作
| 教具 | 用途 |
|---|---|
| Selector | 框选、移动、缩放和旋转可编辑元素 |
| Pencil | 自由书写,可设置颜色、粗细、线型与透明度 |
| Eraser | 整元素擦除 |
| Pencil Eraser | 局部笔迹擦除 |
| Shape | 直线、箭头、矩形、椭圆、三角形、菱形、多边形与星形 |
| Text | 文字输入、排版和样式设置 |
| Hand | 移动视角 |
同一房间各端应一致开启插件;建议先在测试房间验证已有笔迹的显示、编辑与撤销重做。操作类 API 需要可写权限,教具配置应在入房和初始化完成后使用。
扩展能力
| 功能 | 本端接入 |
|---|---|
| 教具和样式 | 自定义教具与样式 |
| 背景图 | 背景图加载与恢复 |
| Auto Shape | Auto Shape |