larksr_websdk 3.2.405 → 3.3.102
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/README.md +112 -4
- package/dist/larksr-web-sdk.min.js +1 -1
- package/dist/types/api.d.ts +23 -11
- package/dist/types/appli_params.d.ts +2 -2
- package/dist/types/lark/peer_connection.d.ts +3 -1
- package/dist/types/lark/webcodec.d.ts +23 -2
- package/dist/types/lark/websocket_waitqueue.d.ts +36 -0
- package/dist/types/larksr.d.ts +8 -2
- package/dist/types/localization/message.d.ts +1 -0
- package/package.json +2 -2
- package/types/api.d.ts +23 -11
- package/types/appli_params.d.ts +2 -2
- package/types/lark/peer_connection.d.ts +3 -1
- package/types/lark/webcodec.d.ts +23 -2
- package/types/lark/websocket_waitqueue.d.ts +36 -0
- package/types/larksr.d.ts +8 -2
- package/types/localization/message.d.ts +1 -0
package/README.md
CHANGED
|
@@ -1,4 +1,112 @@
|
|
|
1
|
-
|
|
1
|
+
* [English](##LarkSR-WebClient-SDK-En)
|
|
2
|
+
* [中文](##LarkSR-WebClient-SDK-Zh)
|
|
3
|
+
|
|
4
|
+
## LarkSR-WebClient-SDK-En
|
|
5
|
+
|
|
6
|
+
Develop webclient for LarkSR cloudrending or LarkSR VR monitor client. Free design UI and define operate.
|
|
7
|
+
|
|
8
|
+
Links:
|
|
9
|
+
|
|
10
|
+
[Paraverse](https://www.paraverse.cc/)
|
|
11
|
+
|
|
12
|
+
[LarkSR Doc](https://www.pingxingyun.com/devCenter.html)
|
|
13
|
+
|
|
14
|
+
[Experience](https://www.paraverse.cc/)
|
|
15
|
+
|
|
16
|
+
SDK include:
|
|
17
|
+
|
|
18
|
+
* LarkSR restful request.
|
|
19
|
+
* CloudRending Video.
|
|
20
|
+
* Handle input, keyboard, gamepad, touchscreen.
|
|
21
|
+
* Scale mode.
|
|
22
|
+
* Fullscreen mode.
|
|
23
|
+
* Landscap mode.
|
|
24
|
+
|
|
25
|
+
### Notice
|
|
26
|
+
|
|
27
|
+
> SDK V3.2.30 only support server version above [V3.2.3.1](https://www.pingxingyun.com/devCenter.html)
|
|
28
|
+
> [Old verion SDK Demo](https://github.com/ParaverseTechnology/lark_sr_websdk_demos/releases/tag/V3.2.10)
|
|
29
|
+
> V3.2.314 server and datachannel above 3.2.5.1
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### install
|
|
34
|
+
|
|
35
|
+
1. npm
|
|
36
|
+
|
|
37
|
+
```cmd
|
|
38
|
+
npm i larksr_websdk
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
2. plain html
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<script src="larksr-web-sdk.min.js"></script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Use
|
|
48
|
+
|
|
49
|
+
Import websdk with plain html SDK under global object larksr_websdk.
|
|
50
|
+
|
|
51
|
+
Connect cloud resource and all event access with new LarkSR object.
|
|
52
|
+
|
|
53
|
+
> SDK default config html 100% height 100% width viewport. Auto handle input.
|
|
54
|
+
|
|
55
|
+
> SDK mainly contain loading page and cloud video page no other ui.efore start:
|
|
56
|
+
|
|
57
|
+
1. Lark SR server address, exp:http://222.128.6.137:8181/
|
|
58
|
+
2. SDK auth code,connect business@paraverse.cc
|
|
59
|
+
3. App id from Lark SR admin server applist.
|
|
60
|
+
|
|
61
|
+
```javascript
|
|
62
|
+
var client = new LarkSR({
|
|
63
|
+
// root html element
|
|
64
|
+
// WARNING not document.documentElement
|
|
65
|
+
rootElement: document.getElementById('container'),
|
|
66
|
+
// Sever address
|
|
67
|
+
serverAddress: "Lark Sever address",
|
|
68
|
+
// SDK ID or set by call initSDKAuthCode
|
|
69
|
+
// authCode: 'your SDK ID',
|
|
70
|
+
// test backgroud url
|
|
71
|
+
// loadingBgUrl: 'https://home-obs.pingxingyun.com/homePage_4_0/bg.jpg',
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Set sdk auth code.
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
client.initSDKAuthCode('Your SDK ID')
|
|
79
|
+
.then(() => {
|
|
80
|
+
// start connect;
|
|
81
|
+
client.connect({
|
|
82
|
+
// LarkSR cloud appid from LarkSR admin server.
|
|
83
|
+
// doc
|
|
84
|
+
// https://www.pingxingyun.com/online/api3_2.html?id=476
|
|
85
|
+
appliId: "appid from LarkSR admin"
|
|
86
|
+
})
|
|
87
|
+
.then(() => {
|
|
88
|
+
console.log('enter success');
|
|
89
|
+
})
|
|
90
|
+
.catch((e) => {
|
|
91
|
+
console.error(e);
|
|
92
|
+
});
|
|
93
|
+
})
|
|
94
|
+
.catch((e) => {
|
|
95
|
+
console.error(e);
|
|
96
|
+
});
|
|
97
|
+
// ...
|
|
98
|
+
// close connection.
|
|
99
|
+
// client.close();
|
|
100
|
+
// release DOM element.
|
|
101
|
+
// client.destroy();
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Doc
|
|
105
|
+
|
|
106
|
+
[LarkSR WebClient SDK](https://ParaverseTechnology.github.io/en/webclient_sdk/)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## LarkSR-WebClient-SDK-Zh
|
|
2
110
|
|
|
3
111
|
SDK 适用于自定义 LarkSR 云渲 Web 客户端或者自定义 VR 监控画面客户端的二次开发,自定义 UI 和操作逻辑等。有较高的灵活性。
|
|
4
112
|
|
|
@@ -24,7 +132,7 @@ SDK 功能包括:
|
|
|
24
132
|
### 注意
|
|
25
133
|
|
|
26
134
|
> V3.2.30 开始仅支持服务端 [V3.2.3.1](https://www.pingxingyun.com/devCenter.html) 以上版本。
|
|
27
|
-
> [老版本 SDK Demo 下载](https://github.com/
|
|
135
|
+
> [老版本 SDK Demo 下载](https://github.com/ParaverseTechnology/lark_sr_websdk_demos/releases/tag/V3.2.10)
|
|
28
136
|
> V3.2.314 版本对应服务器版本和数据通道版本为 3.2.5.1 及以上
|
|
29
137
|
|
|
30
138
|
## 快速接入
|
|
@@ -99,6 +207,6 @@ SDK 加载成功之后,非模块模式下,SDK 挂载为全局对象 larksr_w
|
|
|
99
207
|
|
|
100
208
|
更多使用方式和 API 文档可以参考下面项目和 doc 文件夹下的详细文档
|
|
101
209
|
|
|
102
|
-
[Demos](https://github.com/
|
|
210
|
+
[Demos](https://github.com/ParaverseTechnology/lark_sr_websdk_demos)
|
|
103
211
|
|
|
104
|
-
[Docs](https://
|
|
212
|
+
[Docs](https://ParaverseTechnology.github.io/webclient_sdk/)
|