ezuikit-js 8.1.9 → 8.1.10
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 +62 -0
- package/README.md +90 -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,65 @@
|
|
|
1
|
+
### v8.1.10 (2025-04-27)
|
|
2
|
+
|
|
3
|
+
#### Feat
|
|
4
|
+
|
|
5
|
+
- 优化取流逻辑,
|
|
6
|
+
|
|
7
|
+
- 启用 `host`, `host` 默认从播放地址中获取
|
|
8
|
+
|
|
9
|
+
#### Fixed
|
|
10
|
+
|
|
11
|
+
- 修复 `autoplay` 为 false 时, 不能播放问题
|
|
12
|
+
|
|
13
|
+
- 修复多窗口下对讲回调只会触发最后初始化的播放器
|
|
14
|
+
|
|
15
|
+
### v8.1.9 (2025-04-16)
|
|
16
|
+
|
|
17
|
+
#### Feat
|
|
18
|
+
|
|
19
|
+
- 新增日志打印配置项 `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)
|
|
20
|
+
|
|
21
|
+
- 新增一些事件, 如 `videoInfo` 、`audioInfo` 和 `firstFrameDisplay`等, 具体请参考[事件](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm?tab=readme-ov-file#%E4%BA%8B%E4%BB%B6)
|
|
22
|
+
|
|
23
|
+
#### Fixed
|
|
24
|
+
|
|
25
|
+
- 修复调用录制api, ui 没有同步问题
|
|
26
|
+
- 修复调用对讲api, ui 没有同步问题
|
|
27
|
+
- 修复了一些小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),
|
|
28
|
+
|
|
29
|
+
## v8.1.8(2025-03-19)
|
|
30
|
+
|
|
31
|
+
#### Feat
|
|
32
|
+
|
|
33
|
+
- 支持巡检模板
|
|
34
|
+
|
|
35
|
+
- 兼容音频采样率异常设备录制
|
|
36
|
+
|
|
37
|
+
#### Fixed
|
|
38
|
+
|
|
39
|
+
- 修复部分AR设备获取标签信息报错
|
|
40
|
+
|
|
41
|
+
## v8.1.7(2025-03-05)
|
|
42
|
+
|
|
43
|
+
#### Feat
|
|
44
|
+
|
|
45
|
+
- 电子放大模块重构,操作更丝滑~
|
|
46
|
+
|
|
47
|
+
- 移动端支持双指操作电子放大功能
|
|
48
|
+
|
|
49
|
+
## v8.1.6(2025-02-10)
|
|
50
|
+
|
|
51
|
+
#### Feat
|
|
52
|
+
|
|
53
|
+
- 初始化支持配置关闭结束录制的默认下载行为【downloadRecord: false】
|
|
54
|
+
|
|
55
|
+
- 支持初始化设置【stopSaveCallBack】回调事件,在结束录制后通过该回调获取下载地址及文件数据
|
|
56
|
+
|
|
57
|
+
#### Fixed
|
|
58
|
+
|
|
59
|
+
- 修复了token为空时本地缓存地址依然可以播放的问题
|
|
60
|
+
|
|
61
|
+
- 修复了一些小bug
|
|
62
|
+
|
|
1
63
|
## v8.1.5(2025-01-15)
|
|
2
64
|
|
|
3
65
|
#### 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>
|
|
@@ -365,6 +384,8 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
|
|
|
365
384
|
<tr><td>quality</td><td>0 | 1 | 2 | 3 | 4 | 5 | 6 | pp | qp</td><td>预览初始化支持指定清晰度进行播放, 默认 undefined (v8.1.5版本及以上支持), 0: 流畅; 1: 标清; 2: 高清; 3: 超清; 4: 极清; 5: 3K; 6: 4K ; "pp": "性能优先 (Performance Priority)"; "qp": "画质优先(Quality Priority)"。</td><td>N</td></tr>
|
|
366
385
|
<tr><td>loggerOptions</td><td> {name: string, level: "INFO" | "LOG" | "WARN" | "ERROR" , showTime: boolean}</td><td>本地日志设置, 默认值 {name: "ezuikit", level: "INFO", showTime: true}, 支持动态设置请参考 <a href="#日志设置">setLoggerOptions(options)</a> (v8.1.9版本及以上支持)</td><td>N</td></tr>
|
|
367
386
|
<tr><td>streamInfoCBType</td><td> 0 | 1 </td><td> 流信息回调类型,监听 streamInfoCB 事件, 0 : 每次都回调(会影响性能), 1 : 只回调一次, 默认值 1 (v8.1.9版本及以上支持)</td><td>N</td></tr>
|
|
387
|
+
|
|
388
|
+
<tr><td>videoLevelList</td><td> <span>Array<{ </br>/** 清晰度 */</br>level: number, </br>/** 名称 */ </br>name: string, </br> /**1: 主码流,2: 子码流*/</br>streamTypeIn: 1 | 2 }> <span>| null </td><td> 自定义清晰度列表,默认null, 如果有值 sdk 内部不在进行获取, 为 null 使用接口获取的清晰度列表, videoLevelList.length === 0 不展示清晰度控件 sdk 内部不在进行获取, videoLevelList.length > 0 展示控件 sdk 内部不在进行获取 (v8.1.10版本及以上支持)</td><td>N</td></tr>
|
|
368
389
|
</table>
|
|
369
390
|
|
|
370
391
|
### 方法调用
|
|
@@ -378,7 +399,7 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
|
|
|
378
399
|
player.play();
|
|
379
400
|
// 方式2
|
|
380
401
|
player.play().then(() => {
|
|
381
|
-
console.log(
|
|
402
|
+
console.log("执行播放成功后其他动作");
|
|
382
403
|
});
|
|
383
404
|
```
|
|
384
405
|
|
|
@@ -389,7 +410,7 @@ player.play().then(() => {
|
|
|
389
410
|
player.stop();
|
|
390
411
|
// 方式2
|
|
391
412
|
player.stop().then(() => {
|
|
392
|
-
console.log(
|
|
413
|
+
console.log("执行停止成功后其他动作");
|
|
393
414
|
});
|
|
394
415
|
```
|
|
395
416
|
|
|
@@ -400,7 +421,7 @@ player.stop().then(() => {
|
|
|
400
421
|
player.openSound();
|
|
401
422
|
// 方式2
|
|
402
423
|
player.openSound().then(() => {
|
|
403
|
-
console.log(
|
|
424
|
+
console.log("执行开启声音成功后其他动作");
|
|
404
425
|
});
|
|
405
426
|
```
|
|
406
427
|
|
|
@@ -417,10 +438,10 @@ player.closeSound();
|
|
|
417
438
|
|
|
418
439
|
```js
|
|
419
440
|
// 方式1
|
|
420
|
-
player.startSave(
|
|
441
|
+
player.startSave("唯一文件名");
|
|
421
442
|
// 方式2
|
|
422
|
-
player.startSave(
|
|
423
|
-
console.log(
|
|
443
|
+
player.startSave("唯一文件名").then(() => {
|
|
444
|
+
console.log("执行开始录制成功后其他动作");
|
|
424
445
|
});
|
|
425
446
|
```
|
|
426
447
|
|
|
@@ -431,7 +452,7 @@ player.startSave('唯一文件名').then(() => {
|
|
|
431
452
|
player.stopSave();
|
|
432
453
|
// 方式2
|
|
433
454
|
player.stopSave().then(() => {
|
|
434
|
-
console.log(
|
|
455
|
+
console.log("执行停止录制成功后其他动作");
|
|
435
456
|
});
|
|
436
457
|
```
|
|
437
458
|
|
|
@@ -439,12 +460,12 @@ player.stopSave().then(() => {
|
|
|
439
460
|
|
|
440
461
|
```js
|
|
441
462
|
// 方式1 - 下载到本地
|
|
442
|
-
player.capturePicture(
|
|
463
|
+
player.capturePicture("文件名");
|
|
443
464
|
// 方式2 - 返回base64格式
|
|
444
465
|
const capCallback = (data) => {
|
|
445
|
-
console.log(
|
|
466
|
+
console.log("data", data);
|
|
446
467
|
};
|
|
447
|
-
player.capturePicture(
|
|
468
|
+
player.capturePicture("default", capCallback);
|
|
448
469
|
```
|
|
449
470
|
|
|
450
471
|
#### 开始对讲
|
|
@@ -497,7 +518,7 @@ player.setProfile({ microphoneId });
|
|
|
497
518
|
#### 监听麦克风音量变化
|
|
498
519
|
|
|
499
520
|
```js
|
|
500
|
-
player.eventEmitter.on(
|
|
521
|
+
player.eventEmitter.on("volumeChange", ({ data }) => {
|
|
501
522
|
// 动态显示音柱,100ms触发一次
|
|
502
523
|
console.log(`${data * 100}%`);
|
|
503
524
|
});
|
|
@@ -519,7 +540,7 @@ player.cancelFullScreen();
|
|
|
519
540
|
|
|
520
541
|
```js
|
|
521
542
|
player.getOSDTime().then((time) => {
|
|
522
|
-
console.log(
|
|
543
|
+
console.log("获取到的当前播放时间", time);
|
|
523
544
|
});
|
|
524
545
|
```
|
|
525
546
|
|
|
@@ -529,7 +550,7 @@ player.getOSDTime().then((time) => {
|
|
|
529
550
|
|
|
530
551
|
```js
|
|
531
552
|
player.changePlayUrl(options).then(() => {
|
|
532
|
-
console.log(
|
|
553
|
+
console.log("切换成功");
|
|
533
554
|
});
|
|
534
555
|
```
|
|
535
556
|
|
|
@@ -554,9 +575,9 @@ options 参数说明
|
|
|
554
575
|
player.Theme.changeTheme(template);
|
|
555
576
|
|
|
556
577
|
// 预览切回放场景示例
|
|
557
|
-
player.changePlayUrl({ type:
|
|
558
|
-
console.log(
|
|
559
|
-
player.Theme.changeTheme(
|
|
578
|
+
player.changePlayUrl({ type: "rec" }).then(() => {
|
|
579
|
+
console.log("地址切换成功,开始切换模板主题");
|
|
580
|
+
player.Theme.changeTheme("pcRec");
|
|
560
581
|
});
|
|
561
582
|
```
|
|
562
583
|
|
|
@@ -575,7 +596,7 @@ template 参数说明
|
|
|
575
596
|
player.enableZoom();
|
|
576
597
|
// 方式2
|
|
577
598
|
player.enableZoom().then(() => {
|
|
578
|
-
console.log(
|
|
599
|
+
console.log("开启电子放大成功");
|
|
579
600
|
});
|
|
580
601
|
```
|
|
581
602
|
|
|
@@ -586,7 +607,7 @@ player.enableZoom().then(() => {
|
|
|
586
607
|
player.closeZoom();
|
|
587
608
|
// 方式2
|
|
588
609
|
player.closeZoom().then(() => {
|
|
589
|
-
console.log(
|
|
610
|
+
console.log("关闭电子放大成功");
|
|
590
611
|
});
|
|
591
612
|
```
|
|
592
613
|
|
|
@@ -632,7 +653,7 @@ options 参数说明
|
|
|
632
653
|
|
|
633
654
|
## 事件
|
|
634
655
|
|
|
635
|
-
所有事件名 `EZUIKitPlayer.EVENTS`, 事件监听player.eventEmitter.on() 和事件取消 player.eventEmitter.off()
|
|
656
|
+
所有事件名 `EZUIKitPlayer.EVENTS`, 事件监听 player.eventEmitter.on() 和事件取消 player.eventEmitter.off()
|
|
636
657
|
|
|
637
658
|
#### 流信息事件
|
|
638
659
|
|
|
@@ -642,7 +663,7 @@ options 参数说明
|
|
|
642
663
|
// 监听流信息事件
|
|
643
664
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.streamInfoCB, (info) => {
|
|
644
665
|
// 包括 视频信息 音频信息
|
|
645
|
-
console.log(
|
|
666
|
+
console.log("streamInfoCB", info);
|
|
646
667
|
});
|
|
647
668
|
```
|
|
648
669
|
|
|
@@ -661,7 +682,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.streamInfoCB, (info) => {
|
|
|
661
682
|
// 监听音频信息变化
|
|
662
683
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
|
|
663
684
|
// {"audioFormat":8193,"audioFormatName":"AAC","audioChannels":1,"audioBitsPerSample":16,"audioSamplesRate":16000,"audioBitRate":32000}
|
|
664
|
-
console.log(
|
|
685
|
+
console.log("audioInfo", info);
|
|
665
686
|
});
|
|
666
687
|
```
|
|
667
688
|
|
|
@@ -682,7 +703,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
|
|
|
682
703
|
// 监听视频信息变化
|
|
683
704
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
|
|
684
705
|
// {"videoFormat":5,"videoFormatName":"H265","width":3840,"height":2160,"frameRate":15,"intervalOfIFrame":0}
|
|
685
|
-
console.log(
|
|
706
|
+
console.log("videoInfo", info);
|
|
686
707
|
});
|
|
687
708
|
```
|
|
688
709
|
|
|
@@ -701,7 +722,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
|
|
|
701
722
|
// 监听截图事件
|
|
702
723
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
703
724
|
// {data: CapturePictureInfoDate}
|
|
704
|
-
console.log(
|
|
725
|
+
console.log("capturePictureInfo", info);
|
|
705
726
|
});
|
|
706
727
|
```
|
|
707
728
|
|
|
@@ -718,7 +739,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
|
718
739
|
// 监听截图事件
|
|
719
740
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
720
741
|
// {data: CapturePictureInfoData}
|
|
721
|
-
console.log(
|
|
742
|
+
console.log("capturePictureInfo", info);
|
|
722
743
|
});
|
|
723
744
|
```
|
|
724
745
|
|
|
@@ -735,7 +756,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
|
735
756
|
// 监听截图事件
|
|
736
757
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.changeVideoLevel, (info) => {
|
|
737
758
|
// {data: VideoLevelData}
|
|
738
|
-
console.log(
|
|
759
|
+
console.log("changeVideoLevel", info);
|
|
739
760
|
});
|
|
740
761
|
```
|
|
741
762
|
|
|
@@ -785,7 +806,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.destroy, () => {
|
|
|
785
806
|
});
|
|
786
807
|
```
|
|
787
808
|
|
|
788
|
-
|
|
809
|
+
#### 全屏相关事件
|
|
789
810
|
|
|
790
811
|
全屏事件 `EZUIKitPlayer.EVENTS.fullscreen`
|
|
791
812
|
|
|
@@ -815,7 +836,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.exitFullscreen, () => {
|
|
|
815
836
|
// 监听全屏变化事件
|
|
816
837
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.fullscreenChange, (data) => {
|
|
817
838
|
// {data: FullscreenChangeData}
|
|
818
|
-
console.log(
|
|
839
|
+
console.log("fullscreenChange", data);
|
|
819
840
|
});
|
|
820
841
|
```
|
|
821
842
|
|
|
@@ -841,15 +862,15 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.init, () => {
|
|
|
841
862
|
});
|
|
842
863
|
```
|
|
843
864
|
|
|
844
|
-
#### resize事件
|
|
865
|
+
#### resize 事件
|
|
845
866
|
|
|
846
|
-
resize事件事件 `EZUIKitPlayer.EVENTS.resize`
|
|
867
|
+
resize 事件事件 `EZUIKitPlayer.EVENTS.resize`
|
|
847
868
|
|
|
848
869
|
```js
|
|
849
870
|
// 监听resize事件
|
|
850
871
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.resize, () => {
|
|
851
872
|
// {data: {"width": number,"height":number}}
|
|
852
|
-
console.log(
|
|
873
|
+
console.log("resize", data);
|
|
853
874
|
});
|
|
854
875
|
```
|
|
855
876
|
|
|
@@ -886,9 +907,9 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.resume, () => {
|
|
|
886
907
|
});
|
|
887
908
|
```
|
|
888
909
|
|
|
889
|
-
#### seek事件
|
|
910
|
+
#### seek 事件
|
|
890
911
|
|
|
891
|
-
seek事件 `EZUIKitPlayer.EVENTS.seek`, 仅支持回放
|
|
912
|
+
seek 事件 `EZUIKitPlayer.EVENTS.seek`, 仅支持回放
|
|
892
913
|
|
|
893
914
|
```js
|
|
894
915
|
// 监听seek事件
|
|
@@ -960,7 +981,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.recTimeChange, () => {
|
|
|
960
981
|
// 监听获取云存储回片段事件
|
|
961
982
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecTimes, (list) => {
|
|
962
983
|
// {data: {"width": number,"height":number}}
|
|
963
|
-
console.log(
|
|
984
|
+
console.log("list", list);
|
|
964
985
|
});
|
|
965
986
|
```
|
|
966
987
|
|
|
@@ -968,10 +989,13 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecTimes, (list) => {
|
|
|
968
989
|
|
|
969
990
|
```js
|
|
970
991
|
// 监听获取云录制回片段事件
|
|
971
|
-
player.eventEmitter.on(
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
992
|
+
player.eventEmitter.on(
|
|
993
|
+
EZUIKitPlayer.EVENTS.http.getCloudRecordTimes,
|
|
994
|
+
(list) => {
|
|
995
|
+
// {data: {"width": number,"height":number}}
|
|
996
|
+
console.log("list", list);
|
|
997
|
+
}
|
|
998
|
+
);
|
|
975
999
|
```
|
|
976
1000
|
|
|
977
1001
|
获取本地录制回片段事件 `EZUIKitPlayer.EVENTS.http.getLocalRecTimes`
|
|
@@ -980,7 +1004,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecordTimes, (list) =>
|
|
|
980
1004
|
// 监听获取本地录制回片段事件
|
|
981
1005
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getLocalRecTimes, (list) => {
|
|
982
1006
|
// {data: {"width": number,"height":number}}
|
|
983
|
-
console.log(
|
|
1007
|
+
console.log("list", list);
|
|
984
1008
|
});
|
|
985
1009
|
```
|
|
986
1010
|
|
|
@@ -990,7 +1014,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getLocalRecTimes, (list) => {
|
|
|
990
1014
|
// 监听获取设备信息事件
|
|
991
1015
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceInfo, (info) => {
|
|
992
1016
|
// {"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(
|
|
1017
|
+
console.log("info", info);
|
|
994
1018
|
});
|
|
995
1019
|
```
|
|
996
1020
|
|
|
@@ -1000,7 +1024,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceInfo, (info) => {
|
|
|
1000
1024
|
// 监听获取设备信息事件
|
|
1001
1025
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceList, (info) => {
|
|
1002
1026
|
// {"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(
|
|
1027
|
+
console.log("info", info);
|
|
1004
1028
|
});
|
|
1005
1029
|
```
|
|
1006
1030
|
|
|
@@ -1086,7 +1110,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.talkSuccess, () => {
|
|
|
1086
1110
|
// 监听对讲开启失败事件
|
|
1087
1111
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.talkError, (error) => {
|
|
1088
1112
|
// ...
|
|
1089
|
-
console.error(
|
|
1113
|
+
console.error("talkError", error);
|
|
1090
1114
|
});
|
|
1091
1115
|
```
|
|
1092
1116
|
|
|
@@ -1137,7 +1161,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.zoom.closeZoom, () => {
|
|
|
1137
1161
|
// 监听电子放大变化事件
|
|
1138
1162
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.zoom.onZoomChange, (info) => {
|
|
1139
1163
|
// {"zoom": string,"reset"?:boolean}
|
|
1140
|
-
console.log(
|
|
1164
|
+
console.log("onZoomChange", info);
|
|
1141
1165
|
});
|
|
1142
1166
|
```
|
|
1143
1167
|
|
|
@@ -1194,10 +1218,13 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.ptz.ptzDirection, () => {
|
|
|
1194
1218
|
|
|
1195
1219
|
```js
|
|
1196
1220
|
// 监听点击云台控制控件方向事件
|
|
1197
|
-
player.eventEmitter.on(
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1221
|
+
player.eventEmitter.on(
|
|
1222
|
+
EZUIKitPlayer.EVENTS.timeLine.timeWidthChange,
|
|
1223
|
+
(widthType) => {
|
|
1224
|
+
// ...
|
|
1225
|
+
console.log("timeWidthChange", widthType); // 0 | 1 | 2 | 3
|
|
1226
|
+
}
|
|
1227
|
+
);
|
|
1201
1228
|
```
|
|
1202
1229
|
|
|
1203
1230
|
#### 日期选择器相关事件
|