@ezuikit/player-theme 2.0.3-beta.1 → 2.0.3-beta.2

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.
@@ -0,0 +1,237 @@
1
+ /*
2
+ * @ezuikit/player-theme v2.0.3-beta.2
3
+ * Copyright (c) 2025-12-25 Ezviz-OpenBiz
4
+ * Released under the MIT License.
5
+ */
6
+ /**
7
+ * 播放器的类名前缀
8
+ */ var PREFIX_CLASS = 'ezplayer';
9
+ /** */ var DATE_PICKER_ICON_WIDTH = 36;
10
+ /** 填充模式 */ var THEME_SCALE_MODE_TYPE = {
11
+ /** 画面完全填充canvas区域,画面会被拉伸 */ full: 0,
12
+ /** 画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边 */ auto: 1,
13
+ /** 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 */ fullAuto: 2
14
+ };
15
+ // 切换主题时把当前的状态传给控件, 而不是传 theme 对象, 为了解耦
16
+ // 不要添加方法,只添加状态
17
+ var THEME_PROPS = [
18
+ 'width',
19
+ 'height',
20
+ 'playing',
21
+ 'volume',
22
+ 'muted',
23
+ 'loading',
24
+ 'recType',
25
+ 'isCurrentFullscreen',
26
+ 'orientationAngle',
27
+ 'zooming',
28
+ 'zoom',
29
+ 'recording',
30
+ 'recordList',
31
+ 'speed',
32
+ 'urlInfo',
33
+ 'videoLevelList',
34
+ 'videoLevel',
35
+ 'recMonth'
36
+ ];
37
+ /**
38
+ * 当移动端 picker 控件打开时需要关闭动画(定时器)
39
+ */ var CLEAR_TIMER_HEADER_FOOTER_ANIMATION = 'CLEAR_TIMER_HEADER_FOOTER_ANIMATION';
40
+ /**
41
+ * 'rec', 'cloudRec', 'cloudRecord' 是一个组,并且要在头部(移动端特殊处理)
42
+ *
43
+ * | rec | cloudRec | cloudRecord |
44
+ * |:---------------------:|:------------:|:---------------:|
45
+ * | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
46
+ */ var REC_GROUP = [
47
+ 'rec',
48
+ 'cloudRec',
49
+ 'cloudRecord'
50
+ ];
51
+ /**
52
+ * 设备信息
53
+ *
54
+ * | deviceID | deviceName |
55
+ * |:-------------------:|:-------------:|
56
+ * | 设备ID(唯一标识) | 设备名称 |
57
+ */ var DEVICE_INFO_GROUP = [
58
+ 'deviceID',
59
+ 'deviceName'
60
+ ];
61
+ // /**
62
+ // * 直播(预览)支持的控件
63
+ // */
64
+ // export const LIVE_CONTROL_GROUP: string[] = [...DEVICE_INFO_GROUP, 'play', 'capturePicture', 'volume', 'ptz', 'record', 'talk', 'zoom', 'definition', 'fullscreen', 'globalFullscreen'] as const;
65
+ // /**
66
+ // * 录像(录像)支持的控件
67
+ // */
68
+ // export const REC_CONTROL_GROUP_BOTTOM: string[] = [...REC_GROUP, 'play', 'capturePicture', 'volume', 'record', 'zoom', 'speed', 'fullscreen', 'globalFullscreen', 'date', 'timeLine'] as const;
69
+ /**
70
+ * 能在底部并放置到 More 中的控件
71
+ */ var FOOTER_MORE_GROUP = [
72
+ 'play',
73
+ 'capturePicture',
74
+ 'volume',
75
+ 'ptz',
76
+ 'record',
77
+ 'zoom',
78
+ 'talk',
79
+ 'definition',
80
+ 'speed',
81
+ 'fullscreen',
82
+ 'globalFullscreen'
83
+ ];
84
+ /**
85
+ * 暂停时能禁用的控件按钮
86
+ */ var PAUSE_DISABLED_BTN = [
87
+ 'capturePicture',
88
+ 'volume',
89
+ 'ptz',
90
+ 'record',
91
+ 'talk',
92
+ 'definition',
93
+ 'speed',
94
+ 'globalFullscreen'
95
+ ];
96
+ /**
97
+ * 移动端可以扩展的控件
98
+ * ['ptz', 'talk', 'record', 'capturePicture', 'timeLine', 'rec', 'date'];
99
+ */ var MOBILE_EXTENDS = [
100
+ 'ptz',
101
+ 'timeLine',
102
+ 'rec',
103
+ 'date'
104
+ ];
105
+ /**
106
+ * 回放时间轴和日历
107
+ * 放置在最顶部
108
+ */ var REC_BOTTOM_GROUP = [
109
+ 'timeLine',
110
+ 'date'
111
+ ];
112
+ /**
113
+ *
114
+ * 事件名
115
+ *
116
+ * --------------- ------------------
117
+ * - - theme.emit(EVENTS.xxxxx) - -
118
+ * - - -------------------------------------> - -
119
+ * - - - -
120
+ * - Theme - - Controls -
121
+ * - - control.emit(EVENTS.control.xxx) - -
122
+ * - - <-------------------------------------- - -
123
+ * --------------- ------------------
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * theme.on(EVENTS.loading)
128
+ * theme.on(EVENTS.loading)
129
+ * ```
130
+ *
131
+ */ // 事件命名不要超过两层
132
+ var EVENTS = {
133
+ loading: 'loading',
134
+ /** 播放 */ play: 'play',
135
+ /** 截图 */ capturePicture: 'capturePicture',
136
+ /** 音量变化 */ volumechange: 'volumechange',
137
+ /** 缩放变化 */ zoomChange: 'zoomChange',
138
+ /** 缩放状态变化, true: 可缩放状态,false: 禁止缩放状态(不能缩放) */ zoomingChange: 'zoomingChange',
139
+ /** 缩放平移改变 */ zoomTranslateChange: 'zoomTranslateChange',
140
+ /** 音频信息 */ audioInfo: 'audioInfo',
141
+ /** 视频信息 */ videoInfo: 'videoInfo',
142
+ /** 首帧 */ firstFrameDisplay: 'firstFrameDisplay',
143
+ /** 全屏 */ fullscreen: 'fullscreen',
144
+ /** 退出全屏 */ exitFullscreen: 'exitFullscreen',
145
+ /**
146
+ * 全屏变化(移动端也支持触发, 不过移动端是模拟的web全屏 即旋转 180度)
147
+ * 当 isCurrentFullscreen 为 true 时,表示当前容器全局全屏状态
148
+ *
149
+ * 注意:同一个页面中只要有全屏的操作或取消全屏的操作,都会触发该事件 (移动端除外)
150
+ */ fullscreenChange: 'fullscreenChange',
151
+ /** 重置容器尺寸 */ resize: 'resize',
152
+ /** 屏幕旋转方向变化 */ orientationChange: 'orientationChange',
153
+ /** 音频编码不支持 (暂时仅支持标准流 flv) */ audioCodecUnsupported: 'audioCodecUnsupported',
154
+ /** 切换主题 themeDate 变化时 */ changeTheme: 'changeTheme',
155
+ /** 回放类型切换 */ recTypeChange: 'recTypeChange',
156
+ /** 切换清晰度 */ definitionChange: 'definitionChange',
157
+ /** 播放速度切换 */ speedChange: 'speedChange',
158
+ /** 控件开始录制 */ recordingChange: 'recordingChange',
159
+ /** 对讲状态变化 */ talkingChange: 'talkingChange',
160
+ /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
161
+ /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
162
+ records: 'records',
163
+ ptzSpeedChange: 'ptzSpeedChange',
164
+ setVideoLevelList: 'setVideoLevelList',
165
+ currentVideoLevel: 'currentVideoLevel',
166
+ currentVideoLevelAuto: 'currentVideoLevelAuto',
167
+ setAllDayRecTimes: 'setAllDayRecTimes',
168
+ getOSDTime: 'getOSDTime',
169
+ /**
170
+ * 控件相关
171
+ */ control: {
172
+ /** 点击播放播放/暂停按钮 */ play: 'Control.play',
173
+ /** 播放控件销毁 */ playDestroy: 'Control.playDestroy',
174
+ /** 截图 */ capturePicture: 'Control.capturePicture',
175
+ /** 截图结果 */ capturePictureResult: 'Control.capturePictureResult',
176
+ /** 截图控件销毁 */ capturePictureDestroy: 'Control.capturePictureDestroy',
177
+ /** 音量变化 */ volumechange: 'Control.volumechange',
178
+ /** 音量调节面板 展示隐藏变换 */ volumePanelOpenChange: 'Control.volumePanelOpenChange',
179
+ /** 音量控件销毁 */ volumeDestroy: 'Control.volumeDestroy',
180
+ /** 控件组件栏(Header/Footer)展示隐藏 */ controlsBarOpenChange: 'Control.controlsBarOpenChange',
181
+ /** 当顶部控件栏(header)控件放置不下时, 显示的更多按钮的控件列表变化 */ headerMoreShowControlsChange: 'Control.headerMoreShowControlsChange',
182
+ /** 当顶部控件栏(header)控件放置不下时, 更多按钮 展示隐藏变换 */ headerMorePanelOpenChange: 'Control.headerMorePanelOpenChange',
183
+ /** 当底部控件栏(footer)控件放置不下时, 显示的更多按钮的控件列表变化 */ footerMoreShowControlsChange: 'Control.footerMoreShowControlsChange',
184
+ /** 当底部控件栏(footer)控件放置不下时, 更多按钮 展示隐藏变换 */ footerMorePanelOpenChange: 'Control.footerMorePanelOpenChange',
185
+ /** 设备信息控件销毁 */ deviceDestroy: 'Control.deviceDestroy',
186
+ /** 回放类型切换控件 */ recTypeChange: 'Control.recTypeChange',
187
+ /** 回放类型控件销毁 */ recDestroy: 'Control.recDestroy',
188
+ /** 切换清晰度控件 */ definitionChange: 'Control.definitionChange',
189
+ definitionList: 'Control.definitionList',
190
+ /** 切换清晰度面板 展示隐藏变换, (open, definition, item) */ definitionPanelOpenChange: 'Control.definitionPanelOpenChange',
191
+ /** 切换清晰度控件 */ definitionDestroy: 'Control.definitionDestroy',
192
+ /** 播放速度切换 */ speedChange: 'Control.speedChange',
193
+ /** 播放速度面板 显示隐藏变换 */ speedPanelOpenChange: 'Control.speedPanelOpenChange',
194
+ /** 播放速度控件销毁 */ speedDestroy: 'Control.speedDestroy',
195
+ /** 云台面板 显示隐藏变换 */ ptzPanelOpenChange: 'Control.ptzPanelOpenChange',
196
+ /** 云台速度切换 */ ptzSpeedChange: 'Control.ptzSpeedChange',
197
+ ptzError: 'Control.ptzError',
198
+ /** 云台控件销毁 */ ptzDestroy: 'Control.ptzDestroy',
199
+ /** 录制控件是否在录制中 */ recordingChange: 'Control.recordingChange',
200
+ recordDestroy: 'Control.recordDestroy',
201
+ /** 开始对讲 */ talkingChange: 'Control.talkingChange',
202
+ /** 对讲错误, 一般是麦克风权限被拒绝 */ talkError: 'Control.talkError',
203
+ /** 对讲控件销毁 */ talkDestroy: 'Control.talkDestroy',
204
+ /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
205
+ /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
206
+ /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
207
+ /** 全屏控件销毁 */ fullscreenDestroy: 'Control.fullscreenDestroy',
208
+ /** 全局全屏控件销毁 */ globalFullscreenDestroy: 'Control.globalFullscreenDestroy',
209
+ /** 日期面板展示隐藏变换 */ datePanelOpenChange: 'Control.datePanelOpenChange',
210
+ /** 日期改变 */ dateChange: 'Control.dateChange',
211
+ /** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
212
+ /** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
213
+ /** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
214
+ /** 时间轴图片列表面板 */ timeLinePanelOpenChange: 'Control.timeLinePanelOpenChange',
215
+ /** 时间轴控件销毁 */ timeLineDestroy: 'Control.timeLineDestroy',
216
+ /** 主题控件挂载前 切换新的主题也会触发,如果想首次获取需要在 onInitializing 回调中进行监听 */ beforeMountControls: 'Control.beforeMountControls',
217
+ /** 主题控件挂载完成, 切换新的主题也会触发,如果想首次获取需要在 onInitializing 回调中进行监听 */ mountedControls: 'Control.mountedControls',
218
+ /** 主题控件卸载前, 已有控件卸载时才可触发 */ beforeUnmountControls: 'Control.beforeUnmountControls',
219
+ /** 主题控件卸载完成, 已有控件卸载时才可触发 */ unmountedControls: 'Control.unmountedControls',
220
+ /** 封面控件销毁 */ posterDestroy: 'Control.posterDestroy',
221
+ /** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
222
+ /** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
223
+ /** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
224
+ /** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
225
+ },
226
+ /**
227
+ * 主题控件相关
228
+ */ theme: {
229
+ /** 销毁前 */ beforeDestroy: 'Theme.beforeDestroy',
230
+ /** 销毁后 */ destroyed: 'Theme.destroyed',
231
+ /** 移动端扩展销毁 */ mobileExtendDestroy: 'Theme.mobileExtendDestroy',
232
+ /** 回放页底部销毁 */ recFooterDestroy: 'Theme.recFooterDestroy'
233
+ },
234
+ message: 'message'
235
+ };
236
+
237
+ export { CLEAR_TIMER_HEADER_FOOTER_ANIMATION, DATE_PICKER_ICON_WIDTH, DEVICE_INFO_GROUP, EVENTS, FOOTER_MORE_GROUP, MOBILE_EXTENDS, PAUSE_DISABLED_BTN, PREFIX_CLASS, REC_BOTTOM_GROUP, REC_GROUP, THEME_PROPS, THEME_SCALE_MODE_TYPE };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.3-beta.1
2
+ * @ezuikit/player-theme v2.0.3-beta.2
3
3
  * Copyright (c) 2025-12-25 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
@@ -11384,7 +11384,7 @@ var THEME_DEFAULT_OPTIONS = {
11384
11384
  zh: zh,
11385
11385
  en: en
11386
11386
  };
11387
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.3-beta.1';
11387
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.3-beta.2';
11388
11388
 
11389
11389
  exports.Control = Control;
11390
11390
  exports.EVENTS = EVENTS;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.3-beta.1
2
+ * @ezuikit/player-theme v2.0.3-beta.2
3
3
  * Copyright (c) 2025-12-25 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
@@ -11382,6 +11382,6 @@ var THEME_DEFAULT_OPTIONS = {
11382
11382
  zh: zh,
11383
11383
  en: en
11384
11384
  };
11385
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.3-beta.1';
11385
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.3-beta.2';
11386
11386
 
11387
11387
  export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.3-beta.1
2
+ * @ezuikit/player-theme v2.0.3-beta.2
3
3
  * Copyright (c) 2025-12-25 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
@@ -13764,7 +13764,7 @@
13764
13764
  zh: zh,
13765
13765
  en: en
13766
13766
  };
13767
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.3-beta.1';
13767
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.3-beta.2';
13768
13768
 
13769
13769
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
13770
13770
 
package/dist/style.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.0.3-beta.1
2
+ * @ezuikit/player-theme v2.0.3-beta.2
3
3
  * Copyright (c) 2025-12-25 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezuikit/player-theme",
3
- "version": "2.0.3-beta.1",
3
+ "version": "2.0.3-beta.2",
4
4
  "description": "player theme",
5
5
  "title": "theme",
6
6
  "main": "dist/index.js",