ezuikit-js 8.1.9 → 8.1.10-beta.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 +64 -0
- package/README.md +97 -64
- package/ezuikit.js +9 -23
- package/ezuikit_static/speed/speed.css +10 -0
- package/ezuikit_static/talk/tts-v4.js +7 -7
- package/index.js +6 -13
- package/index.mjs +61 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
+
### v8.1.10 (2025-04-27)
|
|
2
|
+
|
|
3
|
+
#### Feat
|
|
4
|
+
|
|
5
|
+
- 优化取流逻辑,
|
|
6
|
+
|
|
7
|
+
- 弃用 `host`, `host` 默认从播放地址中获取
|
|
8
|
+
|
|
9
|
+
- 新增初始化 `videoLevelList` 参数进行自定义清晰度列表
|
|
10
|
+
|
|
11
|
+
#### Fixed
|
|
12
|
+
|
|
13
|
+
- 修复 `autoplay` 为 false 时, 不能播放问题
|
|
14
|
+
|
|
15
|
+
- 修复多窗口下对讲回调只会触发最后初始化的播放器
|
|
16
|
+
|
|
17
|
+
### v8.1.9 (2025-04-16)
|
|
18
|
+
|
|
19
|
+
#### Feat
|
|
20
|
+
|
|
21
|
+
- 新增日志打印配置项 `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)
|
|
22
|
+
|
|
23
|
+
- 新增一些事件, 如 `videoInfo` 、`audioInfo` 和 `firstFrameDisplay`等, 具体请参考[事件](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm?tab=readme-ov-file#%E4%BA%8B%E4%BB%B6)
|
|
24
|
+
|
|
25
|
+
#### Fixed
|
|
26
|
+
|
|
27
|
+
- 修复调用录制api, ui 没有同步问题
|
|
28
|
+
- 修复调用对讲api, ui 没有同步问题
|
|
29
|
+
- 修复了一些小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),
|
|
30
|
+
|
|
31
|
+
## v8.1.8(2025-03-19)
|
|
32
|
+
|
|
33
|
+
#### Feat
|
|
34
|
+
|
|
35
|
+
- 支持巡检模板
|
|
36
|
+
|
|
37
|
+
- 兼容音频采样率异常设备录制
|
|
38
|
+
|
|
39
|
+
#### Fixed
|
|
40
|
+
|
|
41
|
+
- 修复部分AR设备获取标签信息报错
|
|
42
|
+
|
|
43
|
+
## v8.1.7(2025-03-05)
|
|
44
|
+
|
|
45
|
+
#### Feat
|
|
46
|
+
|
|
47
|
+
- 电子放大模块重构,操作更丝滑~
|
|
48
|
+
|
|
49
|
+
- 移动端支持双指操作电子放大功能
|
|
50
|
+
|
|
51
|
+
## v8.1.6(2025-02-10)
|
|
52
|
+
|
|
53
|
+
#### Feat
|
|
54
|
+
|
|
55
|
+
- 初始化支持配置关闭结束录制的默认下载行为【downloadRecord: false】
|
|
56
|
+
|
|
57
|
+
- 支持初始化设置【stopSaveCallBack】回调事件,在结束录制后通过该回调获取下载地址及文件数据
|
|
58
|
+
|
|
59
|
+
#### Fixed
|
|
60
|
+
|
|
61
|
+
- 修复了token为空时本地缓存地址依然可以播放的问题
|
|
62
|
+
|
|
63
|
+
- 修复了一些小bug
|
|
64
|
+
|
|
1
65
|
## v8.1.5(2025-01-15)
|
|
2
66
|
|
|
3
67
|
#### 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
|
|
|
@@ -95,10 +113,16 @@ alpha(功能测试)、beta(集成测试)为我们的非正式版本,
|
|
|
95
113
|
|
|
96
114
|
> 如果使用 react + vite,可参考 demos => [with-react-vite](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-react-vite)
|
|
97
115
|
|
|
98
|
-
> 如果使用
|
|
116
|
+
> 如果使用 next.js,可参考 demos => [with-next](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-next)
|
|
117
|
+
|
|
118
|
+
> 如果使用 electron,可参考 demos => [with-electron](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-electron)
|
|
99
119
|
|
|
100
120
|
> 如果使用 vue3,可参考 demos => [vue3-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue3-demo)
|
|
101
121
|
|
|
122
|
+
> 如果使用 vue2.7,可参考 demos => [vue-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue-demo)
|
|
123
|
+
|
|
124
|
+
> 如果使用 vue2.6,可参考 demos => [with-vue2.6](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-vue2.6)
|
|
125
|
+
|
|
102
126
|
#### tips
|
|
103
127
|
|
|
104
128
|
为方便开发者快速接入
|
|
@@ -114,15 +138,16 @@ alpha(功能测试)、beta(集成测试)为我们的非正式版本,
|
|
|
114
138
|
> 轻应用支持向接入萤石云海外环境的设备发起取流播放,需要在初始化时配置海外服务域名,示例:
|
|
115
139
|
|
|
116
140
|
```js
|
|
117
|
-
|
|
118
|
-
|
|
141
|
+
import { EZUIKitPlayer } from "ezuikit-js";
|
|
142
|
+
const player = new EZUIKitPlayer({
|
|
143
|
+
id: "playWind",
|
|
119
144
|
width: 600,
|
|
120
145
|
height: 400,
|
|
121
|
-
template:
|
|
122
|
-
url:
|
|
123
|
-
accessToken:
|
|
146
|
+
template: "pcLive",
|
|
147
|
+
url: "",
|
|
148
|
+
accessToken: "",
|
|
124
149
|
env: {
|
|
125
|
-
domain:
|
|
150
|
+
domain: "https://iusopen.ezvizlife.com", // 北美地区
|
|
126
151
|
},
|
|
127
152
|
});
|
|
128
153
|
```
|
|
@@ -203,7 +228,7 @@ ezopen://open.ys7.com/${设备序列号}/{通道号}.hd.live<br/>
|
|
|
203
228
|
|
|
204
229
|
##### 云存储回放
|
|
205
230
|
|
|
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>
|
|
231
|
+
初始化参数 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
232
|
|
|
208
233
|
<tr><td>audio</td><td>boolean</td><td>是否默认开启声音 true:打开(默认) false:关闭 </td><td>N</td></tr>
|
|
209
234
|
<tr><td>width</td><td>int</td><td>视频宽度,默认值为容器容器DOM宽度 </td><td>Y</td></tr>
|
|
@@ -365,6 +390,8 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
|
|
|
365
390
|
<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
391
|
<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
392
|
<tr><td>streamInfoCBType</td><td> 0 | 1 </td><td> 流信息回调类型,监听 streamInfoCB 事件, 0 : 每次都回调(会影响性能), 1 : 只回调一次, 默认值 1 (v8.1.9版本及以上支持)</td><td>N</td></tr>
|
|
393
|
+
|
|
394
|
+
<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
395
|
</table>
|
|
369
396
|
|
|
370
397
|
### 方法调用
|
|
@@ -378,7 +405,7 @@ themeData将主题数据本地化,设置本地数据,需要删除template参
|
|
|
378
405
|
player.play();
|
|
379
406
|
// 方式2
|
|
380
407
|
player.play().then(() => {
|
|
381
|
-
console.log(
|
|
408
|
+
console.log("执行播放成功后其他动作");
|
|
382
409
|
});
|
|
383
410
|
```
|
|
384
411
|
|
|
@@ -389,7 +416,7 @@ player.play().then(() => {
|
|
|
389
416
|
player.stop();
|
|
390
417
|
// 方式2
|
|
391
418
|
player.stop().then(() => {
|
|
392
|
-
console.log(
|
|
419
|
+
console.log("执行停止成功后其他动作");
|
|
393
420
|
});
|
|
394
421
|
```
|
|
395
422
|
|
|
@@ -400,7 +427,7 @@ player.stop().then(() => {
|
|
|
400
427
|
player.openSound();
|
|
401
428
|
// 方式2
|
|
402
429
|
player.openSound().then(() => {
|
|
403
|
-
console.log(
|
|
430
|
+
console.log("执行开启声音成功后其他动作");
|
|
404
431
|
});
|
|
405
432
|
```
|
|
406
433
|
|
|
@@ -417,10 +444,10 @@ player.closeSound();
|
|
|
417
444
|
|
|
418
445
|
```js
|
|
419
446
|
// 方式1
|
|
420
|
-
player.startSave(
|
|
447
|
+
player.startSave("唯一文件名");
|
|
421
448
|
// 方式2
|
|
422
|
-
player.startSave(
|
|
423
|
-
console.log(
|
|
449
|
+
player.startSave("唯一文件名").then(() => {
|
|
450
|
+
console.log("执行开始录制成功后其他动作");
|
|
424
451
|
});
|
|
425
452
|
```
|
|
426
453
|
|
|
@@ -431,7 +458,7 @@ player.startSave('唯一文件名').then(() => {
|
|
|
431
458
|
player.stopSave();
|
|
432
459
|
// 方式2
|
|
433
460
|
player.stopSave().then(() => {
|
|
434
|
-
console.log(
|
|
461
|
+
console.log("执行停止录制成功后其他动作");
|
|
435
462
|
});
|
|
436
463
|
```
|
|
437
464
|
|
|
@@ -439,12 +466,12 @@ player.stopSave().then(() => {
|
|
|
439
466
|
|
|
440
467
|
```js
|
|
441
468
|
// 方式1 - 下载到本地
|
|
442
|
-
player.capturePicture(
|
|
469
|
+
player.capturePicture("文件名");
|
|
443
470
|
// 方式2 - 返回base64格式
|
|
444
471
|
const capCallback = (data) => {
|
|
445
|
-
console.log(
|
|
472
|
+
console.log("data", data);
|
|
446
473
|
};
|
|
447
|
-
player.capturePicture(
|
|
474
|
+
player.capturePicture("default", capCallback);
|
|
448
475
|
```
|
|
449
476
|
|
|
450
477
|
#### 开始对讲
|
|
@@ -497,7 +524,7 @@ player.setProfile({ microphoneId });
|
|
|
497
524
|
#### 监听麦克风音量变化
|
|
498
525
|
|
|
499
526
|
```js
|
|
500
|
-
player.eventEmitter.on(
|
|
527
|
+
player.eventEmitter.on("volumeChange", ({ data }) => {
|
|
501
528
|
// 动态显示音柱,100ms触发一次
|
|
502
529
|
console.log(`${data * 100}%`);
|
|
503
530
|
});
|
|
@@ -519,7 +546,7 @@ player.cancelFullScreen();
|
|
|
519
546
|
|
|
520
547
|
```js
|
|
521
548
|
player.getOSDTime().then((time) => {
|
|
522
|
-
console.log(
|
|
549
|
+
console.log("获取到的当前播放时间", time);
|
|
523
550
|
});
|
|
524
551
|
```
|
|
525
552
|
|
|
@@ -529,7 +556,7 @@ player.getOSDTime().then((time) => {
|
|
|
529
556
|
|
|
530
557
|
```js
|
|
531
558
|
player.changePlayUrl(options).then(() => {
|
|
532
|
-
console.log(
|
|
559
|
+
console.log("切换成功");
|
|
533
560
|
});
|
|
534
561
|
```
|
|
535
562
|
|
|
@@ -554,9 +581,9 @@ options 参数说明
|
|
|
554
581
|
player.Theme.changeTheme(template);
|
|
555
582
|
|
|
556
583
|
// 预览切回放场景示例
|
|
557
|
-
player.changePlayUrl({ type:
|
|
558
|
-
console.log(
|
|
559
|
-
player.Theme.changeTheme(
|
|
584
|
+
player.changePlayUrl({ type: "rec" }).then(() => {
|
|
585
|
+
console.log("地址切换成功,开始切换模板主题");
|
|
586
|
+
player.Theme.changeTheme("pcRec");
|
|
560
587
|
});
|
|
561
588
|
```
|
|
562
589
|
|
|
@@ -575,7 +602,7 @@ template 参数说明
|
|
|
575
602
|
player.enableZoom();
|
|
576
603
|
// 方式2
|
|
577
604
|
player.enableZoom().then(() => {
|
|
578
|
-
console.log(
|
|
605
|
+
console.log("开启电子放大成功");
|
|
579
606
|
});
|
|
580
607
|
```
|
|
581
608
|
|
|
@@ -586,7 +613,7 @@ player.enableZoom().then(() => {
|
|
|
586
613
|
player.closeZoom();
|
|
587
614
|
// 方式2
|
|
588
615
|
player.closeZoom().then(() => {
|
|
589
|
-
console.log(
|
|
616
|
+
console.log("关闭电子放大成功");
|
|
590
617
|
});
|
|
591
618
|
```
|
|
592
619
|
|
|
@@ -632,7 +659,7 @@ options 参数说明
|
|
|
632
659
|
|
|
633
660
|
## 事件
|
|
634
661
|
|
|
635
|
-
所有事件名 `EZUIKitPlayer.EVENTS`, 事件监听player.eventEmitter.on() 和事件取消 player.eventEmitter.off()
|
|
662
|
+
所有事件名 `EZUIKitPlayer.EVENTS`, 事件监听 player.eventEmitter.on() 和事件取消 player.eventEmitter.off()
|
|
636
663
|
|
|
637
664
|
#### 流信息事件
|
|
638
665
|
|
|
@@ -642,7 +669,7 @@ options 参数说明
|
|
|
642
669
|
// 监听流信息事件
|
|
643
670
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.streamInfoCB, (info) => {
|
|
644
671
|
// 包括 视频信息 音频信息
|
|
645
|
-
console.log(
|
|
672
|
+
console.log("streamInfoCB", info);
|
|
646
673
|
});
|
|
647
674
|
```
|
|
648
675
|
|
|
@@ -661,7 +688,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.streamInfoCB, (info) => {
|
|
|
661
688
|
// 监听音频信息变化
|
|
662
689
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
|
|
663
690
|
// {"audioFormat":8193,"audioFormatName":"AAC","audioChannels":1,"audioBitsPerSample":16,"audioSamplesRate":16000,"audioBitRate":32000}
|
|
664
|
-
console.log(
|
|
691
|
+
console.log("audioInfo", info);
|
|
665
692
|
});
|
|
666
693
|
```
|
|
667
694
|
|
|
@@ -682,7 +709,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.audioInfo, (info) => {
|
|
|
682
709
|
// 监听视频信息变化
|
|
683
710
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
|
|
684
711
|
// {"videoFormat":5,"videoFormatName":"H265","width":3840,"height":2160,"frameRate":15,"intervalOfIFrame":0}
|
|
685
|
-
console.log(
|
|
712
|
+
console.log("videoInfo", info);
|
|
686
713
|
});
|
|
687
714
|
```
|
|
688
715
|
|
|
@@ -701,7 +728,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.videoInfo, (info) => {
|
|
|
701
728
|
// 监听截图事件
|
|
702
729
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
703
730
|
// {data: CapturePictureInfoDate}
|
|
704
|
-
console.log(
|
|
731
|
+
console.log("capturePictureInfo", info);
|
|
705
732
|
});
|
|
706
733
|
```
|
|
707
734
|
|
|
@@ -718,7 +745,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
|
718
745
|
// 监听截图事件
|
|
719
746
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
720
747
|
// {data: CapturePictureInfoData}
|
|
721
|
-
console.log(
|
|
748
|
+
console.log("capturePictureInfo", info);
|
|
722
749
|
});
|
|
723
750
|
```
|
|
724
751
|
|
|
@@ -735,7 +762,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.capturePicture, (info) => {
|
|
|
735
762
|
// 监听截图事件
|
|
736
763
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.changeVideoLevel, (info) => {
|
|
737
764
|
// {data: VideoLevelData}
|
|
738
|
-
console.log(
|
|
765
|
+
console.log("changeVideoLevel", info);
|
|
739
766
|
});
|
|
740
767
|
```
|
|
741
768
|
|
|
@@ -785,7 +812,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.destroy, () => {
|
|
|
785
812
|
});
|
|
786
813
|
```
|
|
787
814
|
|
|
788
|
-
|
|
815
|
+
#### 全屏相关事件
|
|
789
816
|
|
|
790
817
|
全屏事件 `EZUIKitPlayer.EVENTS.fullscreen`
|
|
791
818
|
|
|
@@ -815,7 +842,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.exitFullscreen, () => {
|
|
|
815
842
|
// 监听全屏变化事件
|
|
816
843
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.fullscreenChange, (data) => {
|
|
817
844
|
// {data: FullscreenChangeData}
|
|
818
|
-
console.log(
|
|
845
|
+
console.log("fullscreenChange", data);
|
|
819
846
|
});
|
|
820
847
|
```
|
|
821
848
|
|
|
@@ -841,15 +868,15 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.init, () => {
|
|
|
841
868
|
});
|
|
842
869
|
```
|
|
843
870
|
|
|
844
|
-
#### resize事件
|
|
871
|
+
#### resize 事件
|
|
845
872
|
|
|
846
|
-
resize事件事件 `EZUIKitPlayer.EVENTS.resize`
|
|
873
|
+
resize 事件事件 `EZUIKitPlayer.EVENTS.resize`
|
|
847
874
|
|
|
848
875
|
```js
|
|
849
876
|
// 监听resize事件
|
|
850
877
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.resize, () => {
|
|
851
878
|
// {data: {"width": number,"height":number}}
|
|
852
|
-
console.log(
|
|
879
|
+
console.log("resize", data);
|
|
853
880
|
});
|
|
854
881
|
```
|
|
855
882
|
|
|
@@ -886,9 +913,9 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.resume, () => {
|
|
|
886
913
|
});
|
|
887
914
|
```
|
|
888
915
|
|
|
889
|
-
#### seek事件
|
|
916
|
+
#### seek 事件
|
|
890
917
|
|
|
891
|
-
seek事件 `EZUIKitPlayer.EVENTS.seek`, 仅支持回放
|
|
918
|
+
seek 事件 `EZUIKitPlayer.EVENTS.seek`, 仅支持回放
|
|
892
919
|
|
|
893
920
|
```js
|
|
894
921
|
// 监听seek事件
|
|
@@ -960,7 +987,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.recTimeChange, () => {
|
|
|
960
987
|
// 监听获取云存储回片段事件
|
|
961
988
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecTimes, (list) => {
|
|
962
989
|
// {data: {"width": number,"height":number}}
|
|
963
|
-
console.log(
|
|
990
|
+
console.log("list", list);
|
|
964
991
|
});
|
|
965
992
|
```
|
|
966
993
|
|
|
@@ -968,10 +995,13 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecTimes, (list) => {
|
|
|
968
995
|
|
|
969
996
|
```js
|
|
970
997
|
// 监听获取云录制回片段事件
|
|
971
|
-
player.eventEmitter.on(
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
998
|
+
player.eventEmitter.on(
|
|
999
|
+
EZUIKitPlayer.EVENTS.http.getCloudRecordTimes,
|
|
1000
|
+
(list) => {
|
|
1001
|
+
// {data: {"width": number,"height":number}}
|
|
1002
|
+
console.log("list", list);
|
|
1003
|
+
}
|
|
1004
|
+
);
|
|
975
1005
|
```
|
|
976
1006
|
|
|
977
1007
|
获取本地录制回片段事件 `EZUIKitPlayer.EVENTS.http.getLocalRecTimes`
|
|
@@ -980,7 +1010,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getCloudRecordTimes, (list) =>
|
|
|
980
1010
|
// 监听获取本地录制回片段事件
|
|
981
1011
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getLocalRecTimes, (list) => {
|
|
982
1012
|
// {data: {"width": number,"height":number}}
|
|
983
|
-
console.log(
|
|
1013
|
+
console.log("list", list);
|
|
984
1014
|
});
|
|
985
1015
|
```
|
|
986
1016
|
|
|
@@ -990,7 +1020,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getLocalRecTimes, (list) => {
|
|
|
990
1020
|
// 监听获取设备信息事件
|
|
991
1021
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceInfo, (info) => {
|
|
992
1022
|
// {"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(
|
|
1023
|
+
console.log("info", info);
|
|
994
1024
|
});
|
|
995
1025
|
```
|
|
996
1026
|
|
|
@@ -1000,7 +1030,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceInfo, (info) => {
|
|
|
1000
1030
|
// 监听获取设备信息事件
|
|
1001
1031
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.http.getDeviceList, (info) => {
|
|
1002
1032
|
// {"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(
|
|
1033
|
+
console.log("info", info);
|
|
1004
1034
|
});
|
|
1005
1035
|
```
|
|
1006
1036
|
|
|
@@ -1086,7 +1116,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.talkSuccess, () => {
|
|
|
1086
1116
|
// 监听对讲开启失败事件
|
|
1087
1117
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.talkError, (error) => {
|
|
1088
1118
|
// ...
|
|
1089
|
-
console.error(
|
|
1119
|
+
console.error("talkError", error);
|
|
1090
1120
|
});
|
|
1091
1121
|
```
|
|
1092
1122
|
|
|
@@ -1137,7 +1167,7 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.zoom.closeZoom, () => {
|
|
|
1137
1167
|
// 监听电子放大变化事件
|
|
1138
1168
|
player.eventEmitter.on(EZUIKitPlayer.EVENTS.zoom.onZoomChange, (info) => {
|
|
1139
1169
|
// {"zoom": string,"reset"?:boolean}
|
|
1140
|
-
console.log(
|
|
1170
|
+
console.log("onZoomChange", info);
|
|
1141
1171
|
});
|
|
1142
1172
|
```
|
|
1143
1173
|
|
|
@@ -1194,10 +1224,13 @@ player.eventEmitter.on(EZUIKitPlayer.EVENTS.ptz.ptzDirection, () => {
|
|
|
1194
1224
|
|
|
1195
1225
|
```js
|
|
1196
1226
|
// 监听点击云台控制控件方向事件
|
|
1197
|
-
player.eventEmitter.on(
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1227
|
+
player.eventEmitter.on(
|
|
1228
|
+
EZUIKitPlayer.EVENTS.timeLine.timeWidthChange,
|
|
1229
|
+
(widthType) => {
|
|
1230
|
+
// ...
|
|
1231
|
+
console.log("timeWidthChange", widthType); // 0 | 1 | 2 | 3
|
|
1232
|
+
}
|
|
1233
|
+
);
|
|
1201
1234
|
```
|
|
1202
1235
|
|
|
1203
1236
|
#### 日期选择器相关事件
|