@netless/app-slide 0.2.39 → 0.2.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 netless
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README-zh.md CHANGED
@@ -1,53 +1,53 @@
1
- ## @netless/app-slide
2
-
3
- WebGL 版 PPT 展示插件。
4
-
5
- ### 用法
6
-
7
- ```ts
8
- import type { Attributes as SlideAttributes } from "@netless/app-slide";
9
-
10
- // 1. 在加入房间前注册此 app
11
- WindowManager.register({
12
- kind: "Slide",
13
- appOptions: {
14
- // 打开这个选项显示 debug 工具栏
15
- debug: false,
16
- },
17
- src: async () => {
18
- const app = await import("@netless/app-slide");
19
- return app.default ?? app;
20
- },
21
- });
22
-
23
- // 2. 加入房间后,这样插入 PPT
24
- manager.addApp({
25
- kind: "Slide",
26
- options: {
27
- scenePath: `/ppt/${uuid}`, // [1]
28
- title: "a.pptx",
29
- },
30
- attributes: {
31
- taskId: "1234567...", // [2]
32
- url: "https://convertcdn.netless.link/dynamicConvert", // [3]
33
- } as SlideAttributes,
34
- });
35
- ```
36
-
37
- 参数:
38
-
39
- 1. (**必须**) `scenePath`
40
-
41
- 全局唯一路径,建议为 `"/ppt/" + taskId`。
42
-
43
- 2. (**必须**) `taskId`
44
-
45
- [PPT 转换](https://developer.netless.link/server-en/home/server-conversion) 任务 ID。
46
-
47
- 3. (可选) `url`
48
-
49
- PPT 转码后资源存储服务器链接前缀,默认为 `https://convertcdn.netless.link/dynamicConvert`。
50
-
51
- ### 协议
52
-
53
- MIT @ [netless](https://github.com/netless-io)
1
+ ## @netless/app-slide
2
+
3
+ WebGL 版 PPT 展示插件。
4
+
5
+ ### 用法
6
+
7
+ ```ts
8
+ import type { Attributes as SlideAttributes } from "@netless/app-slide";
9
+
10
+ // 1. 在加入房间前注册此 app
11
+ WindowManager.register({
12
+ kind: "Slide",
13
+ appOptions: {
14
+ // 打开这个选项显示 debug 工具栏
15
+ debug: false,
16
+ },
17
+ src: async () => {
18
+ const app = await import("@netless/app-slide");
19
+ return app.default ?? app;
20
+ },
21
+ });
22
+
23
+ // 2. 加入房间后,这样插入 PPT
24
+ manager.addApp({
25
+ kind: "Slide",
26
+ options: {
27
+ scenePath: `/ppt/${uuid}`, // [1]
28
+ title: "a.pptx",
29
+ },
30
+ attributes: {
31
+ taskId: "1234567...", // [2]
32
+ url: "https://convertcdn.netless.link/dynamicConvert", // [3]
33
+ } as SlideAttributes,
34
+ });
35
+ ```
36
+
37
+ 参数:
38
+
39
+ 1. (**必须**) `scenePath`
40
+
41
+ 全局唯一路径,建议为 `"/ppt/" + taskId`。
42
+
43
+ 2. (**必须**) `taskId`
44
+
45
+ [PPT 转换](https://developer.netless.link/server-en/home/server-conversion) 任务 ID。
46
+
47
+ 3. (可选) `url`
48
+
49
+ PPT 转码后资源存储服务器链接前缀,默认为 `https://convertcdn.netless.link/dynamicConvert`。
50
+
51
+ ### 协议
52
+
53
+ MIT @ [netless](https://github.com/netless-io)
package/README.md CHANGED
@@ -1,68 +1,68 @@
1
- ## @netless/app-slide
2
-
3
- Netless App for viewing animated slides, in our new engine.
4
-
5
- [中文](./README-zh.md)
6
-
7
- ### Usage
8
-
9
- ```ts
10
- import type { Attributes as SlideAttributes } from "@netless/app-slide";
11
-
12
- // 1. register before joining room
13
- WindowManager.register({
14
- kind: "Slide",
15
- appOptions: {
16
- // turn on to show debug controller
17
- debug: false,
18
- },
19
- src: async () => {
20
- const app = await import("@netless/app-slide");
21
- return app.default ?? app;
22
- },
23
- });
24
-
25
- // 2. when joined room, add ppt to whiteboard
26
- manager.addApp({
27
- kind: "Slide",
28
- options: {
29
- scenePath: `/ppt/${uuid}`, // [1]
30
- title: "a.pptx",
31
- },
32
- attributes: {
33
- taskId: "1234567...", // [2]
34
- url: "https://convertcdn.netless.link/dynamicConvert", // [3]
35
- } as SlideAttributes,
36
- });
37
- ```
38
-
39
- Parameters:
40
-
41
- 1. (**required**) `scenePath`
42
-
43
- Which scene to be put on top of slides.
44
-
45
- 2. (**required**) `taskId`
46
-
47
- The [PPT conversion](https://developer.netless.link/server-en/home/server-conversion) task id.
48
-
49
- 3. (optional) `url`
50
-
51
- The base url of ppt resources, `https://convertcdn.netless.link/dynamicConvert` by default.
52
-
53
- ### Preview
54
-
55
- ```ts
56
- import { previewSlide } from "@netless/app-slide";
57
-
58
- const previewer = previewSlide({
59
- container: document.getElementById("preview"),
60
- taskId: "1234567...",
61
- });
62
-
63
- previewer.destroy();
64
- ```
65
-
66
- ### License
67
-
68
- MIT @ [netless](https://github.com/netless-io)
1
+ ## @netless/app-slide
2
+
3
+ Netless App for viewing animated slides, in our new engine.
4
+
5
+ [中文](./README-zh.md)
6
+
7
+ ### Usage
8
+
9
+ ```ts
10
+ import type { Attributes as SlideAttributes } from "@netless/app-slide";
11
+
12
+ // 1. register before joining room
13
+ WindowManager.register({
14
+ kind: "Slide",
15
+ appOptions: {
16
+ // turn on to show debug controller
17
+ debug: false,
18
+ },
19
+ src: async () => {
20
+ const app = await import("@netless/app-slide");
21
+ return app.default ?? app;
22
+ },
23
+ });
24
+
25
+ // 2. when joined room, add ppt to whiteboard
26
+ manager.addApp({
27
+ kind: "Slide",
28
+ options: {
29
+ scenePath: `/ppt/${uuid}`, // [1]
30
+ title: "a.pptx",
31
+ },
32
+ attributes: {
33
+ taskId: "1234567...", // [2]
34
+ url: "https://convertcdn.netless.link/dynamicConvert", // [3]
35
+ } as SlideAttributes,
36
+ });
37
+ ```
38
+
39
+ Parameters:
40
+
41
+ 1. (**required**) `scenePath`
42
+
43
+ Which scene to be put on top of slides.
44
+
45
+ 2. (**required**) `taskId`
46
+
47
+ The [PPT conversion](https://developer.netless.link/server-en/home/server-conversion) task id.
48
+
49
+ 3. (optional) `url`
50
+
51
+ The base url of ppt resources, `https://convertcdn.netless.link/dynamicConvert` by default.
52
+
53
+ ### Preview
54
+
55
+ ```ts
56
+ import { previewSlide } from "@netless/app-slide";
57
+
58
+ const previewer = previewSlide({
59
+ container: document.getElementById("preview"),
60
+ taskId: "1234567...",
61
+ });
62
+
63
+ previewer.destroy();
64
+ ```
65
+
66
+ ### License
67
+
68
+ MIT @ [netless](https://github.com/netless-io)