@plasosdk/plaso-electron-sdk 1.2.5 → 1.2.7
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 +3 -7
- package/js/render.js +13 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
- macOs支持 x64 、arm64
|
|
4
4
|
- windows支持 ia32 、 x64
|
|
5
|
-
- electron支持
|
|
5
|
+
- electron支持 14.0.0~22.3.27
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -113,12 +113,10 @@ PlasoElectronSdk.createPrepareClassWindow(classObj)
|
|
|
113
113
|
| classMembers | 否 | object[] | 无 | 1、课对应的班级用户信息<br />2、初始化课堂参与人<br /><br />3、最多支持2000人,需要支持更多学生需要联系伯索平台进行额外申请<br />{<br /><br />/** 唯一标识该用户的id */<br />loginName: string,<br /><br />/** 用户显示的姓名 */<br />name: string,<br />/** 用户角色,"speaker","assistant","listener","superlistener" 之一 */<br />upimeRole: string,<br />/** 用户的id,和云学堂业务强相关,sdk用户非必要 */<br />unique_id: number \| string<br />/** 用户头像图片的url,非必要 */<br />displayAvatarUrl: string,<br />} |
|
|
114
114
|
| enableENC | 否 | boolean | true | 是否启用降噪 |
|
|
115
115
|
| enableRTC3A | 否 | boolean | true | 是否启用3A。<br />false:关闭回音消除、关闭降噪、关闭增益控制 |
|
|
116
|
-
| version | 是 | string | 无 | 正式使用时的线上对应的sdk版本,具体的版本需要在对接时确定,格式参考:1.53.901<br />**对接时一般不在线上环境测试**,所以需要在classOptions里传入对应环境的 **dhost、rhost**,具体格式参考如下 |
|
|
117
116
|
| query | 是 | string | 无 | 进课堂必传字段,具体拼接逻辑见下文 |
|
|
118
117
|
| supportShowResourceCenter | 否 | boolean | false | true:显示资料中心,但核心的云盘和获取云盘文件地址的逻辑需要用户自己实现 |
|
|
119
118
|
| supportSaveBoard | 否 | boolean | false | 是否支持保存板书 |
|
|
120
|
-
|
|
|
121
|
-
| rhost | 否 | string | 无 | https://${environment}.plaso.cn/static/yxtsdk/<br /><br />environment可选值:dev、test、itest、ftest |
|
|
119
|
+
| env | 否 | string | 无 | sdk数据环境参数,支持dev、test、itest、ftest、www |
|
|
122
120
|
| enableLiveNewShareRegion | 否 | boolean | false | 是否允许区域共享 |
|
|
123
121
|
| enableLiveNewShareInTouch | 否 | boolean | false | 是否支持触屏模式下的新桌面共享(左侧新增按钮窗口来切换显示工具栏)<br />建议开启 |
|
|
124
122
|
| enableLiveNewShare | 否 | boolean | false | 是否支持新桌面共享<br />开启新桌面共享需要开启electron透明窗口,且可能触发electron本身存在的长时间透传导致的在应用上鼠标失焦问题 |
|
|
@@ -274,7 +272,6 @@ appId=plaso&appType=liveclassSDK&d_dimension=1280x720&dhost=https%3A%2F%2Fdev.pl
|
|
|
274
272
|
| --------- | ------ | ------------------------------------------------------------ |
|
|
275
273
|
| loginName | String | **唯一标识该用户的id**,不能为空,相同的loginName登录,后面一个会使前面一个登出; |
|
|
276
274
|
| username | String | 登录的用户名,在列表中显示用 |
|
|
277
|
-
| version | String | 正式使用时的线上对应的sdk版本,具体的版本需要在对接时确定,格式参考:1.53.901<br />**对接时一般不在线上环境测试**,所以需要在classOptions里传入对应环境的 **dhost、rhost**,具体格式参考 以下 可选参数中的说明 |
|
|
278
275
|
| | | |
|
|
279
276
|
|
|
280
277
|
### 3.1.2、可选参数
|
|
@@ -284,8 +281,7 @@ appId=plaso&appType=liveclassSDK&d_dimension=1280x720&dhost=https%3A%2F%2Fdev.pl
|
|
|
284
281
|
| displayAvatarUrl | String | 用户头像地址 |
|
|
285
282
|
| topic | String | 默认值是中文的 “备课课堂” |
|
|
286
283
|
| **d_enableObjectEraser** | number | 新板书配置,二进制位存储<br />default: 0;默认关闭对象擦<br />7:手写(对象擦);<br />**注意:该值需要和实时课堂的传值一样** |
|
|
287
|
-
|
|
|
288
|
-
| rhost | String | https://${environment}.plaso.cn/static/yxtsdk/<br />environment可选值:dev、test、itest、ftest |
|
|
284
|
+
| env | String | sdk数据环境参数,支持:dev、test、itest、ftest、www |
|
|
289
285
|
| | | |
|
|
290
286
|
|
|
291
287
|
**注意:**
|
package/js/render.js
CHANGED
|
@@ -99,22 +99,18 @@ function createClassWindow(classWindowProps) {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// 环境确认
|
|
102
|
-
const
|
|
103
|
-
let rhost
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} else if (classOptions.version) {
|
|
114
|
-
rhost = `https://wwwr.plaso.cn/static/sdk/styleupime/${classOptions.version}/`;
|
|
115
|
-
}
|
|
102
|
+
const env = classOptions.env ? classOptions.env.toLowerCase() : 'www';
|
|
103
|
+
let rhost, dhost;
|
|
104
|
+
if (env == 'local') {
|
|
105
|
+
rhost = 'http://localhost:4399/';
|
|
106
|
+
dhost = 'https://dev.plaso.cn/';
|
|
107
|
+
} else if (env == 'dev' || env == 'test') {
|
|
108
|
+
rhost = `https://${env}.plaso.cn/static/yxtelectronsdk/`;
|
|
109
|
+
dhost = `https://${env}.plaso.cn/`;
|
|
110
|
+
} else {
|
|
111
|
+
rhost = `https://wwwr.plaso.cn/static/sdk/styleupime/${classOptions.version ?? '1.53.414'}/`;
|
|
112
|
+
dhost = 'https://www.plaso.cn/';
|
|
116
113
|
}
|
|
117
|
-
const environment = getEnvironment(rhost);
|
|
118
114
|
|
|
119
115
|
// 截图和虚拟声卡地址确认
|
|
120
116
|
let flameshotPath = path.join(__dirname, '../lib/flameshot/flameshot.exe');
|
|
@@ -131,8 +127,8 @@ function createClassWindow(classWindowProps) {
|
|
|
131
127
|
dhost,
|
|
132
128
|
query: classOptions.query,
|
|
133
129
|
appType: classOptions.appType,
|
|
134
|
-
markString:
|
|
135
|
-
env
|
|
130
|
+
markString: env,
|
|
131
|
+
env,
|
|
136
132
|
classType: classOptions.classType,
|
|
137
133
|
// 让课堂里退出时标识状态,详情见commFunction.js
|
|
138
134
|
onClose: 'close',
|