larksr_websdk 3.2.404 → 3.3.101

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 CHANGED
@@ -1,4 +1,112 @@
1
- # LarkSR WebClient 接入 SDK
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/pingxingyun/lark_sr_websdk_demos/releases/tag/V3.2.10)
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/pingxingyun/lark_sr_websdk_demos)
210
+ [Demos](https://github.com/ParaverseTechnology/lark_sr_websdk_demos)
103
211
 
104
- [Docs](https://pingxingyun.github.io/webclient_sdk/)
212
+ [Docs](https://ParaverseTechnology.github.io/webclient_sdk/)