ezuikit-js 8.1.9 → 8.1.10-beta.1
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 +49 -0
- package/README.md +88 -63
- package/ezuikit.js +11 -18
- package/ezuikit_static/speed/speed.css +10 -0
- package/ezuikit_static/talk/tts-v4.js +7 -7
- package/index.js +8 -8
- package/index.mjs +68 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
### v8.1.9 (2025-04-16)
|
|
3
|
+
|
|
4
|
+
#### Feat
|
|
5
|
+
|
|
6
|
+
- 新增日志打印配置项 `loggerOptions` 和 `setLoggerOptions` api, 具体请参考[参数说明](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm?tab=readme-ov-file#%E9%99%84%E5%BD%95-%E5%88%9D%E5%A7%8B%E5%8C%96%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E), [issues #202](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/202), [issues #176](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/176), [issues #205](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/205), [issues #81](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/81)
|
|
7
|
+
|
|
8
|
+
- 新增一些事件, 如 `videoInfo` 、`audioInfo` 和 `firstFrameDisplay`等, 具体请参考[事件](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm?tab=readme-ov-file#%E4%BA%8B%E4%BB%B6)
|
|
9
|
+
|
|
10
|
+
#### Fixed
|
|
11
|
+
|
|
12
|
+
- 修复调用录制api, ui 没有同步问题
|
|
13
|
+
- 修复调用对讲api, ui 没有同步问题
|
|
14
|
+
- 修复了一些小bug [issues #178](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/178), [issues #199](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/199), [issues #206](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/issues/206),
|
|
15
|
+
|
|
16
|
+
## v8.1.8(2025-03-19)
|
|
17
|
+
|
|
18
|
+
#### Feat
|
|
19
|
+
|
|
20
|
+
- 支持巡检模板
|
|
21
|
+
|
|
22
|
+
- 兼容音频采样率异常设备录制
|
|
23
|
+
|
|
24
|
+
#### Fixed
|
|
25
|
+
|
|
26
|
+
- 修复部分AR设备获取标签信息报错
|
|
27
|
+
|
|
28
|
+
## v8.1.7(2025-03-05)
|
|
29
|
+
|
|
30
|
+
#### Feat
|
|
31
|
+
|
|
32
|
+
- 电子放大模块重构,操作更丝滑~
|
|
33
|
+
|
|
34
|
+
- 移动端支持双指操作电子放大功能
|
|
35
|
+
|
|
36
|
+
## v8.1.6(2025-02-10)
|
|
37
|
+
|
|
38
|
+
#### Feat
|
|
39
|
+
|
|
40
|
+
- 初始化支持配置关闭结束录制的默认下载行为【downloadRecord: false】
|
|
41
|
+
|
|
42
|
+
- 支持初始化设置【stopSaveCallBack】回调事件,在结束录制后通过该回调获取下载地址及文件数据
|
|
43
|
+
|
|
44
|
+
#### Fixed
|
|
45
|
+
|
|
46
|
+
- 修复了token为空时本地缓存地址依然可以播放的问题
|
|
47
|
+
|
|
48
|
+
- 修复了一些小bug
|
|
49
|
+
|
|
1
50
|
## v8.1.5(2025-01-15)
|
|
2
51
|
|
|
3
52
|
#### Feat
|
package/README.md
CHANGED
|
@@ -30,7 +30,21 @@ pnpm add ezuikit-js
|
|
|
30
30
|
### 引入 ezuikit-js
|
|
31
31
|
|
|
32
32
|
```js
|
|
33
|
-
|
|
33
|
+
// >= v8.1.2 ESM
|
|
34
|
+
import { EZUIKitPlayer } from "ezuikit-js";
|
|
35
|
+
|
|
36
|
+
// < v8.1.2
|
|
37
|
+
import EZUIKit from "ezuikit-js";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### 不支持 ESM (not support ESM)
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
// >= v8.1.2 CommonJS
|
|
44
|
+
import { EZUIKitPlayer } from 'ezuikit-js/index.js';
|
|
45
|
+
|
|
46
|
+
// < v8.1.2 CommonJS
|
|
47
|
+
import EZUIKit from 'ezuikit-js/index.js';
|
|
34
48
|
```
|
|
35
49
|
|
|
36
50
|
#### 如果你使用原生方法,可以通过标签引用
|
|
@@ -55,14 +69,16 @@ import EZUIKit from 'ezuikit-js';
|
|
|
55
69
|
### 直播
|
|
56
70
|
|
|
57
71
|
```js
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
import { EZUIKitPlayer } from "ezuikit-js";
|
|
73
|
+
const player = new EZUIKitPlayer({
|
|
74
|
+
id: "video-container", // 视频容器ID
|
|
75
|
+
accessToken:
|
|
76
|
+
"at.3bvmj4ycamlgdwgw1ig1jruma0wpohl6-48zifyb39c-13t5am6-yukyi86mz",
|
|
77
|
+
url: "ezopen://open.ys7.com/BD3957004/1.live",
|
|
62
78
|
width: 600,
|
|
63
79
|
height: 400,
|
|
64
80
|
handleError: (err) => {
|
|
65
|
-
if (err.type ===
|
|
81
|
+
if (err.type === "handleRunTimeInfoError" && err.data.nErrorCode === 5) {
|
|
66
82
|
// 加密设备密码错误
|
|
67
83
|
}
|
|
68
84
|
},
|
|
@@ -72,12 +88,14 @@ const player = new EZUIKit.EZUIKitPlayer({
|
|
|
72
88
|
### 回放
|
|
73
89
|
|
|
74
90
|
```js
|
|
75
|
-
|
|
76
|
-
|
|
91
|
+
import { EZUIKitPlayer } from "ezuikit-js";
|
|
92
|
+
const player = new EZUIKitPlayer({
|
|
93
|
+
id: "video-container", // 视频容器ID
|
|
77
94
|
width: 600,
|
|
78
95
|
height: 400,
|
|
79
|
-
accessToken:
|
|
80
|
-
|
|
96
|
+
accessToken:
|
|
97
|
+
"at.3bvmj4ycamlgdwgw1ig1jruma0wpohl6-48zifyb39c-13t5am6-yukyi86mz",
|
|
98
|
+
url: "ezopen://open.ys7.com/BD3957004/1.rec",
|
|
81
99
|
});
|
|
82
100
|
```
|
|
83
101
|
|
|
@@ -114,15 +132,16 @@ alpha(功能测试)、beta(集成测试)为我们的非正式版本,
|
|
|
114
132
|
> 轻应用支持向接入萤石云海外环境的设备发起取流播放,需要在初始化时配置海外服务域名,示例:
|
|
115
133
|
|
|
116
134
|
```js
|
|
117
|
-
|
|
118
|
-
|
|
135
|
+
import { EZUIKitPlayer } from "ezuikit-js";
|
|
136
|
+
const player = new EZUIKitPlayer({
|
|
137
|
+
id: "playWind",
|
|
119
138
|
width: 600,
|
|
120
139
|
height: 400,
|
|
121
|
-
template:
|
|
122
|
-
url:
|
|
123
|
-
accessToken:
|
|
140
|
+
template: "pcLive",
|
|
141
|
+
url: "",
|
|
142
|
+
accessToken: "",
|
|
124
143
|
env: {
|
|
125
|
-
domain:
|
|
144
|
+
domain: "https://iusopen.ezvizlife.com", // 北美地区
|
|
126
145
|
},
|
|
127
146
|
});
|
|
128
147
|
```
|
|
@@ -203,7 +222,7 @@ ezopen://open.ys7.com/${设备序列号}/{通道号}.hd.live<br/>
|
|
|
203
222
|
|
|
204
223
|
##### 云存储回放
|
|
205
224
|
|
|
206
|
-
初始化参数 url 值为:<br/> ezopen://open.ys7.com/${设备序列号}/{通道号}.cloud.rec?begin=yyyyMMddhhmmss视频 ezopen 协议播放地址 详见:<a href="https://open.ys7.com/help/23" target="_blank">ezopen 协议</a> </td><td>Y</td></tr>
|
|
225
|
+
初始化参数 url 值为:<br/> ezopen://open.ys7.com/${设备序列号}/{通道号}.cloud.rec?begin=yyyyMMddhhmmss 视频 ezopen 协议播放地址 详见:<a href="https://open.ys7.com/help/23" target="_blank">ezopen 协议</a> </td><td>Y</td></tr>
|
|
207
226
|
|
|
208
227
|
<tr><td>audio</td><td>boolean</td><td>是否默认开启声音 true:打开(默认) false:关闭 </td><td>N</td></tr>
|
|
209
228
|
<tr><td>width</td><td>int</td><td>视频宽度,默认值为容器容器DOM宽度 </td><td>Y</td></tr>
|
|
@@ -378,7 +397,7 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
|
|
|
378
397
|
player.play();
|
|
379
398
|
// 方式2
|
|
380
399
|
player.play().then(() => {
|
|
381
|
-
console.log(
|
|
400
|
+
console.log("执行播放成功后其他动作");
|
|
382
401
|
});
|
|
383
402
|
```
|
|
384
403
|
|
|
@@ -389,7 +408,7 @@ player.play().then(() => {
|
|
|
389
408
|
player.stop();
|
|
390
409
|
// 方式2
|
|
391
410
|
player.stop().then(() => {
|
|
392
|
-
console.log(
|
|
411
|
+
console.log("执行停止成功后其他动作");
|
|
393
412
|
});
|
|
394
413
|
```
|
|
395
414
|
|
|
@@ -400,7 +419,7 @@ player.stop().then(() => {
|
|
|
400
419
|
player.openSound();
|
|
401
420
|
// 方式2
|
|
402
421
|
player.openSound().then(() => {
|
|
403
|
-
console.log(
|
|
422
|
+
console.log("执行开启声音成功后其他动作");
|
|
404
423
|
});
|
|
405
424
|
```
|
|
406
425
|
|
|
@@ -417,10 +436,10 @@ player.closeSound();
|
|
|
417
436
|
|
|
418
437
|
```js
|
|
419
438
|
// 方式1
|
|
420
|
-
player.startSave(
|
|
439
|
+
player.startSave("唯一文件名");
|
|
421
440
|
// 方式2
|
|
422
|
-
player.startSave(
|
|
423
|
-
console.log(
|
|
441
|
+
player.startSave("唯一文件名").then(() => {
|
|
442
|
+
console.log("执行开始录制成功后其他动作");
|
|
424
443
|
});
|
|
425
444
|
```
|
|
426
445
|
|
|
@@ -431,7 +450,7 @@ player.startSave('唯一文件名').then(() => {
|
|
|
431
450
|
player.stopSave();
|
|
432
451
|
// 方式2
|
|
433
452
|
player.stopSave().then(() => {
|
|
434
|
-
console.log(
|
|
453
|
+
console.log("执行停止录制成功后其他动作");
|
|
435
454
|
});
|
|
436
455
|
```
|
|
437
456
|
|
|
@@ -439,12 +458,12 @@ player.stopSave().then(() => {
|
|
|
439
458
|
|
|
440
459
|
```js
|
|
441
460
|
// 方式1 - 下载到本地
|
|
442
|
-
player.capturePicture(
|
|
461
|
+
player.capturePicture("文件名");
|
|
443
462
|
// 方式2 - 返回base64格式
|
|
444
463
|
const capCallback = (data) => {
|
|
445
|
-
console.log(
|
|
464
|
+
console.log("data", data);
|
|
446
465
|
};
|
|
447
|
-
player.capturePicture(
|
|
466
|
+
player.capturePicture("default", capCallback);
|
|
448
467
|
```
|
|
449
468
|
|
|
450
469
|
#### 开始对讲
|
|
@@ -497,7 +516,7 @@ player.setProfile({ microphoneId });
|
|
|
497
516
|
#### 监听麦克风音量变化
|
|
498
517
|
|
|
499
518
|
```js
|
|
500
|
-
player.eventEmitter.on(
|
|
519
|
+
player.eventEmitter.on("volumeChange", ({ data }) => {
|
|
501
520
|
// 动态显示音柱,100ms触发一次
|
|
502
521
|
console.log(`${data * 100}%`);
|
|
503
522
|
});
|
|
@@ -519,7 +538,7 @@ player.cancelFullScreen();
|
|
|
519
538
|
|
|
520
539
|
```js
|
|
521
540
|
player.getOSDTime().then((time) => {
|
|
522
|
-
console.log(
|
|
541
|
+
console.log("获取到的当前播放时间", time);
|
|
523
542
|
});
|
|
524
543
|
```
|
|
525
544
|
|
|
@@ -529,7 +548,7 @@ player.getOSDTime().then((time) => {
|
|
|
529
548
|
|
|
530
549
|
```js
|
|
531
550
|
player.changePlayUrl(options).then(() => {
|
|
532
|
-
console.log(
|
|
551
|
+
console.log("切换成功");
|
|
533
552
|
});
|
|
534
553
|
```
|
|
535
554
|
|
|
@@ -554,9 +573,9 @@ options 参数说明
|
|
|
554
573
|
player.Theme.changeTheme(template);
|
|
555
574
|
|
|
556
575
|
// 预览切回放场景示例
|
|
557
|
-
player.changePlayUrl({ type:
|
|
558
|
-
console.log(
|
|
559
|
-
player.Theme.changeTheme(
|
|
576
|
+
player.changePlayUrl({ type: "rec" }).then(() => {
|
|
577
|
+
console.log("地址切换成功,开始切换模板主题");
|
|
578
|
+
player.Theme.changeTheme("pcRec");
|
|
560
579
|
});
|
|
561
580
|
```
|
|
562
581
|
|
|
@@ -575,7 +594,7 @@ template 参数说明
|
|
|
575
594
|
player.enableZoom();
|
|
576
595
|
// 方式2
|
|
577
596
|
player.enableZoom().then(() => {
|
|
578
|
-
console.log(
|
|
597
|
+
console.log("开启电子放大成功");
|
|
579
598
|
});
|
|
580
599
|
```
|
|
581
600
|
|
|
@@ -586,7 +605,7 @@ player.enableZoom().then(() => {
|
|
|
586
605
|
player.closeZoom();
|
|
587
606
|
// 方式2
|
|
588
607
|
player.closeZoom().then(() => {
|
|
589
|
-
console.log(
|
|
608
|
+
console.log("关闭电子放大成功");
|
|
590
609
|
});
|
|
591
610
|
```
|
|
592
611
|
|
|
@@ -632,7 +651,7 @@ options 参数说明
|
|
|
632
651
|
|
|
633
652
|
## 事件
|
|
634
653
|
|
|
635
|
-
所有事件名 `EZUIKitPlayer.EVENTS`, 事件监听player.eventEmitter.on() 和事件取消 player.eventEmitter.off()
|
|
654
|
+
所有事件名 `EZUIKitPlayer.EVENTS`, 事件监听 player.eventEmitter.on() 和事件取消 player.eventEmitter.off()
|
|
636
655
|
|
|
637
656
|
#### 流信息事件
|
|
638
657
|
|
|
@@ -642,7 +661,7 @@ options 参数说明
|
|
|
642
661
|
// 监听流信息事件
|
|
643
662
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.streamInfoCB, (info) => {
|
|
644
663
|
// 包括 视频信息 音频信息
|
|
645
|
-
console.log(
|
|
664
|
+
console.log("streamInfoCB", info);
|
|
646
665
|
});
|
|
647
666
|
```
|
|
648
667
|
|
|
@@ -661,7 +680,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.streamInfoCB, (info) => {
|
|
|
661
680
|
// 监听音频信息变化
|
|
662
681
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
|
|
663
682
|
// {"audioFormat":8193,"audioFormatName":"AAC","audioChannels":1,"audioBitsPerSample":16,"audioSamplesRate":16000,"audioBitRate":32000}
|
|
664
|
-
console.log(
|
|
683
|
+
console.log("audioInfo", info);
|
|
665
684
|
});
|
|
666
685
|
```
|
|
667
686
|
|
|
@@ -682,7 +701,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
|
|
|
682
701
|
// 监听视频信息变化
|
|
683
702
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
|
|
684
703
|
// {"videoFormat":5,"videoFormatName":"H265","width":3840,"height":2160,"frameRate":15,"intervalOfIFrame":0}
|
|
685
|
-
console.log(
|
|
704
|
+
console.log("videoInfo", info);
|
|
686
705
|
});
|
|
687
706
|
```
|
|
688
707
|
|
|
@@ -701,7 +720,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
|
|
|
701
720
|
// 监听截图事件
|
|
702
721
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
703
722
|
// {data: CapturePictureInfoDate}
|
|
704
|
-
console.log(
|
|
723
|
+
console.log("capturePictureInfo", info);
|
|
705
724
|
});
|
|
706
725
|
```
|
|
707
726
|
|
|
@@ -718,7 +737,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
|
718
737
|
// 监听截图事件
|
|
719
738
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
720
739
|
// {data: CapturePictureInfoData}
|
|
721
|
-
console.log(
|
|
740
|
+
console.log("capturePictureInfo", info);
|
|
722
741
|
});
|
|
723
742
|
```
|
|
724
743
|
|
|
@@ -735,7 +754,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
|
735
754
|
// 监听截图事件
|
|
736
755
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.changeVideoLevel, (info) => {
|
|
737
756
|
// {data: VideoLevelData}
|
|
738
|
-
console.log(
|
|
757
|
+
console.log("changeVideoLevel", info);
|
|
739
758
|
});
|
|
740
759
|
```
|
|
741
760
|
|
|
@@ -785,7 +804,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.destroy, () => {
|
|
|
785
804
|
});
|
|
786
805
|
```
|
|
787
806
|
|
|
788
|
-
|
|
807
|
+
#### 全屏相关事件
|
|
789
808
|
|
|
790
809
|
全屏事件 `EZUIKitPlayer.EVENTS.fullscreen`
|
|
791
810
|
|
|
@@ -815,7 +834,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.exitFullscreen, () => {
|
|
|
815
834
|
// 监听全屏变化事件
|
|
816
835
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.fullscreenChange, (data) => {
|
|
817
836
|
// {data: FullscreenChangeData}
|
|
818
|
-
console.log(
|
|
837
|
+
console.log("fullscreenChange", data);
|
|
819
838
|
});
|
|
820
839
|
```
|
|
821
840
|
|
|
@@ -841,15 +860,15 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.init, () => {
|
|
|
841
860
|
});
|
|
842
861
|
```
|
|
843
862
|
|
|
844
|
-
#### resize事件
|
|
863
|
+
#### resize 事件
|
|
845
864
|
|
|
846
|
-
resize事件事件 `EZUIKitPlayer.EVENTS.resize`
|
|
865
|
+
resize 事件事件 `EZUIKitPlayer.EVENTS.resize`
|
|
847
866
|
|
|
848
867
|
```js
|
|
849
868
|
// 监听resize事件
|
|
850
869
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.resize, () => {
|
|
851
870
|
// {data: {"width": number,"height":number}}
|
|
852
|
-
console.log(
|
|
871
|
+
console.log("resize", data);
|
|
853
872
|
});
|
|
854
873
|
```
|
|
855
874
|
|
|
@@ -886,9 +905,9 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.resume, () => {
|
|
|
886
905
|
});
|
|
887
906
|
```
|
|
888
907
|
|
|
889
|
-
#### seek事件
|
|
908
|
+
#### seek 事件
|
|
890
909
|
|
|
891
|
-
seek事件 `EZUIKitPlayer.EVENTS.seek`, 仅支持回放
|
|
910
|
+
seek 事件 `EZUIKitPlayer.EVENTS.seek`, 仅支持回放
|
|
892
911
|
|
|
893
912
|
```js
|
|
894
913
|
// 监听seek事件
|
|
@@ -960,7 +979,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.recTimeChange, () => {
|
|
|
960
979
|
// 监听获取云存储回片段事件
|
|
961
980
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecTimes, (list) => {
|
|
962
981
|
// {data: {"width": number,"height":number}}
|
|
963
|
-
console.log(
|
|
982
|
+
console.log("list", list);
|
|
964
983
|
});
|
|
965
984
|
```
|
|
966
985
|
|
|
@@ -968,10 +987,13 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecTimes, (list) => {
|
|
|
968
987
|
|
|
969
988
|
```js
|
|
970
989
|
// 监听获取云录制回片段事件
|
|
971
|
-
player.eventEmitter.on(
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
990
|
+
player.eventEmitter.on(
|
|
991
|
+
EZUIKitPlayer.EVENTS.http.getCloudRecordTimes,
|
|
992
|
+
(list) => {
|
|
993
|
+
// {data: {"width": number,"height":number}}
|
|
994
|
+
console.log("list", list);
|
|
995
|
+
}
|
|
996
|
+
);
|
|
975
997
|
```
|
|
976
998
|
|
|
977
999
|
获取本地录制回片段事件 `EZUIKitPlayer.EVENTS.http.getLocalRecTimes`
|
|
@@ -980,7 +1002,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecordTimes, (list) =>
|
|
|
980
1002
|
// 监听获取本地录制回片段事件
|
|
981
1003
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getLocalRecTimes, (list) => {
|
|
982
1004
|
// {data: {"width": number,"height":number}}
|
|
983
|
-
console.log(
|
|
1005
|
+
console.log("list", list);
|
|
984
1006
|
});
|
|
985
1007
|
```
|
|
986
1008
|
|
|
@@ -990,7 +1012,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getLocalRecTimes, (list) => {
|
|
|
990
1012
|
// 监听获取设备信息事件
|
|
991
1013
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceInfo, (info) => {
|
|
992
1014
|
// {"deviceSerial":"BC7799091","deviceName":"前端设备勿动 C6Wi(BC7799091)","localName":"C6Wi(BC7799091)","model":"CS-C6Wi-8D8W2DF","status":1,"defence":0,"isEncrypt":0,"alarmSoundMode":2,"offlineNotify":0,"category":"C6Wi","parentCategory":"IPC","updateTime":1741763026000,"netType":"wireless","signal":"0%","riskLevel":0,"netAddress":"125.121.197.61"}
|
|
993
|
-
console.log(
|
|
1015
|
+
console.log("info", info);
|
|
994
1016
|
});
|
|
995
1017
|
```
|
|
996
1018
|
|
|
@@ -1000,7 +1022,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceInfo, (info) => {
|
|
|
1000
1022
|
// 监听获取设备信息事件
|
|
1001
1023
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceList, (info) => {
|
|
1002
1024
|
// {"deviceSerial":"BC7799091","deviceName":"前端设备勿动 C6Wi(BC7799091)","localName":"C6Wi(BC7799091)","model":"CS-C6Wi-8D8W2DF","status":1,"defence":0,"isEncrypt":0,"alarmSoundMode":2,"offlineNotify":0,"category":"C6Wi","parentCategory":"IPC","updateTime":1741763026000,"netType":"wireless","signal":"0%","riskLevel":0,"netAddress":"125.121.197.61"}
|
|
1003
|
-
console.log(
|
|
1025
|
+
console.log("info", info);
|
|
1004
1026
|
});
|
|
1005
1027
|
```
|
|
1006
1028
|
|
|
@@ -1086,7 +1108,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.talkSuccess, () => {
|
|
|
1086
1108
|
// 监听对讲开启失败事件
|
|
1087
1109
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.talkError, (error) => {
|
|
1088
1110
|
// ...
|
|
1089
|
-
console.error(
|
|
1111
|
+
console.error("talkError", error);
|
|
1090
1112
|
});
|
|
1091
1113
|
```
|
|
1092
1114
|
|
|
@@ -1137,7 +1159,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.zoom.closeZoom, () => {
|
|
|
1137
1159
|
// 监听电子放大变化事件
|
|
1138
1160
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.zoom.onZoomChange, (info) => {
|
|
1139
1161
|
// {"zoom": string,"reset"?:boolean}
|
|
1140
|
-
console.log(
|
|
1162
|
+
console.log("onZoomChange", info);
|
|
1141
1163
|
});
|
|
1142
1164
|
```
|
|
1143
1165
|
|
|
@@ -1194,10 +1216,13 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.ptz.ptzDirection, () => {
|
|
|
1194
1216
|
|
|
1195
1217
|
```js
|
|
1196
1218
|
// 监听点击云台控制控件方向事件
|
|
1197
|
-
player.eventEmitter.on(
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1219
|
+
player.eventEmitter.on(
|
|
1220
|
+
EZUIKitPlayer.EVENTS.timeLine.timeWidthChange,
|
|
1221
|
+
(widthType) => {
|
|
1222
|
+
// ...
|
|
1223
|
+
console.log("timeWidthChange", widthType); // 0 | 1 | 2 | 3
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1201
1226
|
```
|
|
1202
1227
|
|
|
1203
1228
|
#### 日期选择器相关事件
|