ezuikit-js 8.0.8-beta.2 → 8.0.9

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/CHANGELOG.md CHANGED
@@ -7,8 +7,9 @@
7
7
 
8
8
  ### Fixed
9
9
 
10
- - 修复 PC 浏览器模拟移动端页面全屏问题
10
+ - 修复 Mac PC 浏览器模拟移动端页面全屏问题 [#227](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/227), [#208](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/208), [#177](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/177)
11
11
  - 修复播放暂停后倍速重置问题
12
+ - 修复fetch被劫持的bug [#212](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/212), [#184](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/184), [#139](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/139)
12
13
 
13
14
  ### Optimized
14
15
 
package/README.md CHANGED
@@ -181,7 +181,7 @@ ezopen://open.ys7.com/${设备序列号}/{通道号}.cloud.rec?begin=yyyyMMddhhm
181
181
  <tr><td>自定义themeId</td><td>自定义主题,<a href="https://open.ys7.com/console/ezuikit/template.html" target="_blank">前往开放平台控制台配置页面获取</a><br />(v0.6.2版本及以上支持,建议使用 自定义themeId,或者使用themeData本地<br />配置);</td></tr>
182
182
  </table>
183
183
 
184
- </td></tr>
184
+ </td><td>N</td></tr>
185
185
  <tr><td>themeData</td><td>Object</td><td>
186
186
  themeData将主题数据本地化,设置本地数据,需要删除template参数 <br />
187
187
  你可以通过themeData修改按钮位置,颜色,头部底部颜色等配置。
@@ -313,6 +313,7 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
313
313
  <tr><td>handleSuccess</td><td>function</td><td>自动播放成功回调</td><td>N</td></tr>
314
314
  <tr><td>handleError</td><td>function</td><td>错误回调</td><td>N</td></tr>
315
315
  <tr><td>seekFrequency </td><td>function</td><td>为避免频繁拖动播放异常,可设置模板回放时间轴拖动防抖间隔,默认值为2000(2秒),可取2000(2秒),3000(3秒),4000(4秒),5000(5秒)</td><td>N</td></tr>
316
+ <tr><td>language</td><td>String</td><td>多语言 (zh | en), 默认zh (v8.0.8版本及以上支持)</td><td>N</td></tr>
316
317
  </table>
317
318
 
318
319
 
@@ -418,6 +419,49 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
418
419
  player.fullScreen();
419
420
  ```
420
421
 
422
+ #### 对讲设置麦克风增益
423
+
424
+ ```
425
+ // 设置音频增益系数 0 ~ 10
426
+ player.setVolumeGain(volume);
427
+ ```
428
+
429
+ #### 获取麦克风权限
430
+
431
+ ```
432
+ player.getMicrophonePermission().then(data => {
433
+ if (data.code === 0) {
434
+ // 成功....
435
+ }
436
+ })
437
+ ```
438
+
439
+ #### 获取麦克风列表
440
+
441
+ ```
442
+ // 需要在麦克风已授权的情况下调用,才能获取到麦克风列表,可以和getMicrophonePermission配合使用,或在初始化后先调用getMicrophonePermission获取授权
443
+ player.getMicrophonesList().then(data => {
444
+ if (data.code === 0) {
445
+ // 成功....
446
+ }
447
+ })
448
+ ```
449
+
450
+ #### 切换麦克风
451
+
452
+ ```
453
+ // microphoneId 为获取到的麦克风列表中的deviceId,如果当前处于对讲中,调用setProfile会先关闭,重新发起对讲
454
+ player.setProfile({ microphoneId })
455
+ ```
456
+
457
+ #### 监听麦克风音量变化
458
+ ```
459
+ player.eventEmitter.on('volumeChange', ({ data }) => {
460
+ // 动态显示音柱,100ms触发一次
461
+ console.log(`${data * 100}%`)
462
+ })
463
+ ```
464
+
421
465
  #### 取消全屏
422
466
 
423
467
  ```js
@@ -531,6 +575,12 @@ template参数说明
531
575
  player.setFECCorrectType({place: 3 , type:4}, "cavnas1,canvas2,canvas3") // cavnas1,canvas2,canvas3 是分屏是需要的
532
576
  ```
533
577
 
578
+
579
+
580
+ ### 非正式版说明
581
+
582
+ 非正式版需要配置 `staticPath`
583
+
534
584
  ### 使用示例
535
585
 
536
586
  > 如果使用原生js,可参考demos => [base-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/base-demo)