Skip to content

Commit 4d21ba4

Browse files
committed
docs: update
1 parent 1b28979 commit 4d21ba4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/en/faq.md

+14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ This means that your bundler does not handle CJS-ESM interop well, see
1313

1414
Please try another bundler like [esbuild](https://esbuild.github.io/) or [vite](https://vitejs.dev/).
1515

16+
### \[WindowManger\]: room must be switched to be writable
17+
18+
Fastboard requires at least one `writer` user to initialize the states.
19+
If the first user is not a `writer`, then the error will occur on the joinning room.
20+
It is recommended to give all users `writer` tokens no matter what their initial permissions should be.
21+
22+
By giving all users `writer` tokens, it is also convenient to implement things like
23+
switching whiteboard permissions. It only needs relevant users to call the API:
24+
25+
```js
26+
// disallow current user to operate the whiteboard
27+
fastboard.room.setWritable(false);
28+
```
29+
1630
### How to customize the toolbar's apps panel
1731

1832
You can use the `apps` variable to do so, see

docs/zh/faq.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
> [!NOTE]
88
> 这个错误在 0.3.8 后已经被修复了,请检查你的依赖版本。
99
10+
### \[WindowManger\]: room must be switched to be writable
11+
12+
Fastboard 需要至少一个有 `writer` 权限的用户进入房间来初始化数据,如果第一位用户没有这个权限就会报错。这里推荐给所有用户 (无论是你业务里的老师、学生、助教) 发放 `writer` 权限的 room token。同时,这种做法也有利于实现例如白板权限切换等业务,只需要相关用户调用 `fastboard.room.setWritable(true / false)` 即可。
13+
1014
### 如何使用代码操作 App
1115

1216
不支持。或者说这部分交互完全由 App 本身定义,Fastboard (Window Manager) 只是提供了一些基建让他们实现同步。内置的那些 App(包括 PPT/PDF 文档查看器、音视频播放器、代码编辑器、倒计时、GeoGebra 等)均不支持任何外部操作。

0 commit comments

Comments
 (0)