@ezuikit/player-theme 3.0.0-beta.3 → 3.0.0-beta.5
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/dist/constant.js +2 -2
- package/dist/index.cjs +11 -10
- package/dist/index.esm.js +11 -10
- package/dist/index.umd.js +11 -10
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +29 -20
- package/package.json +3 -3
package/dist/constant.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.0.0-beta.
|
|
3
|
-
* Copyright (c) 2026-05-
|
|
2
|
+
* @ezuikit/player-theme v3.0.0-beta.5
|
|
3
|
+
* Copyright (c) 2026-05-06 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -892,7 +892,7 @@ var MESSAGE_DEFAULT_OPTIONS = {};
|
|
|
892
892
|
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
|
|
893
893
|
tagName: 'div',
|
|
894
894
|
controlType: 'block'
|
|
895
|
-
}))) || this;
|
|
895
|
+
}))) || this, _this._$toast = null;
|
|
896
896
|
_this.options = Object.assign({}, MESSAGE_DEFAULT_OPTIONS, options);
|
|
897
897
|
_this.$container.classList.add("" + PREFIX_CLASS + "-message", "" + PREFIX_CLASS + "-hide"); // 默认隐藏 `${PREFIX_CLASS}-hide`
|
|
898
898
|
return _this;
|
|
@@ -1764,7 +1764,7 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1764
1764
|
_this._lastVolume = _this._volume;
|
|
1765
1765
|
_this._muted = !!((_this__options_props3 = _this._options.props) == null ? void 0 : _this__options_props3.muted) || false;
|
|
1766
1766
|
// 轻应用私有暂时不支持调节音量
|
|
1767
|
-
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === '
|
|
1767
|
+
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'ezhls')) {
|
|
1768
1768
|
var _this__options_props4, _this__options_props5;
|
|
1769
1769
|
_this.picker = new Picker(_this.$container, {
|
|
1770
1770
|
getPopupContainer: function() {
|
|
@@ -1805,8 +1805,9 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
_this._updateUI();
|
|
1807
1807
|
_this._addEventListener();
|
|
1808
|
-
_this.on(EVENTS.audioCodecUnsupported, function() {
|
|
1809
|
-
|
|
1808
|
+
_this.on(EVENTS.audioCodecUnsupported, function(flag) {
|
|
1809
|
+
flag = flag != null ? flag : true;
|
|
1810
|
+
_this.disabled = flag;
|
|
1810
1811
|
});
|
|
1811
1812
|
_this.on(EVENTS.volumechange, function(volume, muted) {
|
|
1812
1813
|
// 接收
|
|
@@ -4088,10 +4089,10 @@ function debounce(func, wait) {
|
|
|
4088
4089
|
* @param theme - Theme
|
|
4089
4090
|
*/ function _themeEventemitter(theme) {
|
|
4090
4091
|
// prettier-ignore
|
|
4091
|
-
theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function() {
|
|
4092
|
+
theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function(flag) {
|
|
4092
4093
|
var _theme_controls;
|
|
4093
4094
|
if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.volumeControl) {
|
|
4094
|
-
theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported);
|
|
4095
|
+
theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported, flag);
|
|
4095
4096
|
}
|
|
4096
4097
|
});
|
|
4097
4098
|
// 处理信息提示 duration 单位秒
|
|
@@ -9137,7 +9138,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
9137
9138
|
// 标准流暂时仅支持 TEMPLATES 中的配置, 多余的的展示不生效(如电子放大是不支持的等等), 待版本更新才能支持
|
|
9138
9139
|
// prettier-ignore
|
|
9139
9140
|
_this._renderTheme(// hls 不支持自定义
|
|
9140
|
-
options.type === 'hls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
|
|
9141
|
+
options.type === 'hls' || options.type === 'ezhls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
|
|
9141
9142
|
[
|
|
9142
9143
|
'flv',
|
|
9143
9144
|
'mp4'
|
|
@@ -10334,7 +10335,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10334
10335
|
zh: zh,
|
|
10335
10336
|
en: en
|
|
10336
10337
|
};
|
|
10337
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.
|
|
10338
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.5';
|
|
10338
10339
|
|
|
10339
10340
|
exports.Control = Control;
|
|
10340
10341
|
exports.EVENTS = EVENTS;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.0.0-beta.
|
|
3
|
-
* Copyright (c) 2026-05-
|
|
2
|
+
* @ezuikit/player-theme v3.0.0-beta.5
|
|
3
|
+
* Copyright (c) 2026-05-06 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -890,7 +890,7 @@ var MESSAGE_DEFAULT_OPTIONS = {};
|
|
|
890
890
|
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
|
|
891
891
|
tagName: 'div',
|
|
892
892
|
controlType: 'block'
|
|
893
|
-
}))) || this;
|
|
893
|
+
}))) || this, _this._$toast = null;
|
|
894
894
|
_this.options = Object.assign({}, MESSAGE_DEFAULT_OPTIONS, options);
|
|
895
895
|
_this.$container.classList.add("" + PREFIX_CLASS + "-message", "" + PREFIX_CLASS + "-hide"); // 默认隐藏 `${PREFIX_CLASS}-hide`
|
|
896
896
|
return _this;
|
|
@@ -1762,7 +1762,7 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1762
1762
|
_this._lastVolume = _this._volume;
|
|
1763
1763
|
_this._muted = !!((_this__options_props3 = _this._options.props) == null ? void 0 : _this__options_props3.muted) || false;
|
|
1764
1764
|
// 轻应用私有暂时不支持调节音量
|
|
1765
|
-
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === '
|
|
1765
|
+
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'ezhls')) {
|
|
1766
1766
|
var _this__options_props4, _this__options_props5;
|
|
1767
1767
|
_this.picker = new Picker(_this.$container, {
|
|
1768
1768
|
getPopupContainer: function() {
|
|
@@ -1803,8 +1803,9 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1803
1803
|
}
|
|
1804
1804
|
_this._updateUI();
|
|
1805
1805
|
_this._addEventListener();
|
|
1806
|
-
_this.on(EVENTS.audioCodecUnsupported, function() {
|
|
1807
|
-
|
|
1806
|
+
_this.on(EVENTS.audioCodecUnsupported, function(flag) {
|
|
1807
|
+
flag = flag != null ? flag : true;
|
|
1808
|
+
_this.disabled = flag;
|
|
1808
1809
|
});
|
|
1809
1810
|
_this.on(EVENTS.volumechange, function(volume, muted) {
|
|
1810
1811
|
// 接收
|
|
@@ -4086,10 +4087,10 @@ function debounce(func, wait) {
|
|
|
4086
4087
|
* @param theme - Theme
|
|
4087
4088
|
*/ function _themeEventemitter(theme) {
|
|
4088
4089
|
// prettier-ignore
|
|
4089
|
-
theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function() {
|
|
4090
|
+
theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function(flag) {
|
|
4090
4091
|
var _theme_controls;
|
|
4091
4092
|
if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.volumeControl) {
|
|
4092
|
-
theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported);
|
|
4093
|
+
theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported, flag);
|
|
4093
4094
|
}
|
|
4094
4095
|
});
|
|
4095
4096
|
// 处理信息提示 duration 单位秒
|
|
@@ -9135,7 +9136,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
9135
9136
|
// 标准流暂时仅支持 TEMPLATES 中的配置, 多余的的展示不生效(如电子放大是不支持的等等), 待版本更新才能支持
|
|
9136
9137
|
// prettier-ignore
|
|
9137
9138
|
_this._renderTheme(// hls 不支持自定义
|
|
9138
|
-
options.type === 'hls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
|
|
9139
|
+
options.type === 'hls' || options.type === 'ezhls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
|
|
9139
9140
|
[
|
|
9140
9141
|
'flv',
|
|
9141
9142
|
'mp4'
|
|
@@ -10332,6 +10333,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10332
10333
|
zh: zh,
|
|
10333
10334
|
en: en
|
|
10334
10335
|
};
|
|
10335
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.
|
|
10336
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.5';
|
|
10336
10337
|
|
|
10337
10338
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.0.0-beta.
|
|
3
|
-
* Copyright (c) 2026-05-
|
|
2
|
+
* @ezuikit/player-theme v3.0.0-beta.5
|
|
3
|
+
* Copyright (c) 2026-05-06 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$s({}, options, {
|
|
1240
1240
|
tagName: 'div',
|
|
1241
1241
|
controlType: 'block'
|
|
1242
|
-
}))) || this;
|
|
1242
|
+
}))) || this, _this._$toast = null;
|
|
1243
1243
|
_this.options = Object.assign({}, MESSAGE_DEFAULT_OPTIONS, options);
|
|
1244
1244
|
_this.$container.classList.add("" + PREFIX_CLASS + "-message", "" + PREFIX_CLASS + "-hide"); // 默认隐藏 `${PREFIX_CLASS}-hide`
|
|
1245
1245
|
return _this;
|
|
@@ -3013,7 +3013,7 @@
|
|
|
3013
3013
|
_this._lastVolume = _this._volume;
|
|
3014
3014
|
_this._muted = !!((_this__options_props3 = _this._options.props) == null ? void 0 : _this__options_props3.muted) || false;
|
|
3015
3015
|
// 轻应用私有暂时不支持调节音量
|
|
3016
|
-
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === '
|
|
3016
|
+
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'ezhls')) {
|
|
3017
3017
|
var _this__options_props4, _this__options_props5;
|
|
3018
3018
|
_this.picker = new Picker(_this.$container, {
|
|
3019
3019
|
getPopupContainer: function() {
|
|
@@ -3054,8 +3054,9 @@
|
|
|
3054
3054
|
}
|
|
3055
3055
|
_this._updateUI();
|
|
3056
3056
|
_this._addEventListener();
|
|
3057
|
-
_this.on(EVENTS.audioCodecUnsupported, function() {
|
|
3058
|
-
|
|
3057
|
+
_this.on(EVENTS.audioCodecUnsupported, function(flag) {
|
|
3058
|
+
flag = flag != null ? flag : true;
|
|
3059
|
+
_this.disabled = flag;
|
|
3059
3060
|
});
|
|
3060
3061
|
_this.on(EVENTS.volumechange, function(volume, muted) {
|
|
3061
3062
|
// 接收
|
|
@@ -5577,10 +5578,10 @@
|
|
|
5577
5578
|
* @param theme - Theme
|
|
5578
5579
|
*/ function _themeEventemitter(theme) {
|
|
5579
5580
|
// prettier-ignore
|
|
5580
|
-
theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function() {
|
|
5581
|
+
theme == null ? void 0 : theme.on(EVENTS.audioCodecUnsupported, function(flag) {
|
|
5581
5582
|
var _theme_controls;
|
|
5582
5583
|
if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.volumeControl) {
|
|
5583
|
-
theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported);
|
|
5584
|
+
theme.controls.volumeControl.emit(EVENTS.audioCodecUnsupported, flag);
|
|
5584
5585
|
}
|
|
5585
5586
|
});
|
|
5586
5587
|
// 处理信息提示 duration 单位秒
|
|
@@ -11196,7 +11197,7 @@
|
|
|
11196
11197
|
// 标准流暂时仅支持 TEMPLATES 中的配置, 多余的的展示不生效(如电子放大是不支持的等等), 待版本更新才能支持
|
|
11197
11198
|
// prettier-ignore
|
|
11198
11199
|
_this._renderTheme(// hls 不支持自定义
|
|
11199
|
-
options.type === 'hls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
|
|
11200
|
+
options.type === 'hls' || options.type === 'ezhls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
|
|
11200
11201
|
[
|
|
11201
11202
|
'flv',
|
|
11202
11203
|
'mp4'
|
|
@@ -12393,7 +12394,7 @@
|
|
|
12393
12394
|
zh: zh,
|
|
12394
12395
|
en: en
|
|
12395
12396
|
};
|
|
12396
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.
|
|
12397
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.0-beta.5';
|
|
12397
12398
|
|
|
12398
12399
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
12399
12400
|
|
package/dist/style.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1927,16 +1927,23 @@ declare class Theme extends EventEmitter {
|
|
|
1927
1927
|
LOADING: string;
|
|
1928
1928
|
TIMEFORMAT_ERROR: string;
|
|
1929
1929
|
USE_MULTITHREADING_WARING: string;
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
* 当前播放状态
|
|
1930
|
+
/**
|
|
1931
|
+
* 容器的高(单位 px)
|
|
1933
1932
|
* ```ts
|
|
1934
|
-
* theme.
|
|
1933
|
+
* theme.height // number
|
|
1935
1934
|
* ```
|
|
1936
1935
|
*/
|
|
1936
|
+
OPEN_INSTRUCTIONS: string;
|
|
1937
|
+
INIT_FINSHED: string;
|
|
1937
1938
|
INIT_SUCCESS: string;
|
|
1938
1939
|
GET_PLAYURL_FAILED: string;
|
|
1939
|
-
VIDEO_LOADING: string;
|
|
1940
|
+
VIDEO_LOADING: string; /**
|
|
1941
|
+
* 播放状态
|
|
1942
|
+
* ```ts
|
|
1943
|
+
* // 事件监听
|
|
1944
|
+
* theme.on(Theme.EVENTS.play, (playing: boolean) => {})
|
|
1945
|
+
* ```
|
|
1946
|
+
*/
|
|
1940
1947
|
DISCONNECT: string;
|
|
1941
1948
|
DEVICE_ENCRYPTED: string;
|
|
1942
1949
|
NO_RECORD: string;
|
|
@@ -1962,13 +1969,6 @@ declare class Theme extends EventEmitter {
|
|
|
1962
1969
|
RESUME: string;
|
|
1963
1970
|
RESUME_FAILED: string;
|
|
1964
1971
|
CALL_END: string;
|
|
1965
|
-
/**
|
|
1966
|
-
* 加载状态
|
|
1967
|
-
* ```ts
|
|
1968
|
-
* // 事件监听
|
|
1969
|
-
* theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
|
|
1970
|
-
* ```
|
|
1971
|
-
*/
|
|
1972
1972
|
USER_DO_NOT_OWN_DEVICE: string;
|
|
1973
1973
|
NO_CLOUD_RECORD: string;
|
|
1974
1974
|
CHANGE_VIDEO_LEVEL: string;
|
|
@@ -2015,11 +2015,11 @@ declare class Theme extends EventEmitter {
|
|
|
2015
2015
|
CAPTURE_SUCCESS: string;
|
|
2016
2016
|
CAPTURE_FAILED: string;
|
|
2017
2017
|
START_RECORD_SUCCESS: string;
|
|
2018
|
-
START_RECORD_FAILED: string;
|
|
2018
|
+
START_RECORD_FAILED: string;
|
|
2019
|
+
STOP_RECORD_SUCCESS: string;
|
|
2020
|
+
STOP_RECORD_FAILED: string; /**
|
|
2019
2021
|
* 是否在缩放中
|
|
2020
2022
|
*/
|
|
2021
|
-
STOP_RECORD_SUCCESS: string;
|
|
2022
|
-
STOP_RECORD_FAILED: string;
|
|
2023
2023
|
RECORD_TIPS: string;
|
|
2024
2024
|
RECORDS: string;
|
|
2025
2025
|
OPEN_SOUND: string;
|
|
@@ -2031,7 +2031,16 @@ declare class Theme extends EventEmitter {
|
|
|
2031
2031
|
ZOOM_ADD: string;
|
|
2032
2032
|
ZOOM_SUB: string;
|
|
2033
2033
|
ZOOM_ADD_MAX: string;
|
|
2034
|
-
ZOOM_SUB_MIN: string;
|
|
2034
|
+
ZOOM_SUB_MIN: string; /**
|
|
2035
|
+
* 电子放大倍数, 仅 ezopen 支持
|
|
2036
|
+
* @since 0.0.1
|
|
2037
|
+
* @example
|
|
2038
|
+
* ```ts
|
|
2039
|
+
* theme.zoom // 放大倍数
|
|
2040
|
+
* // 事件监听
|
|
2041
|
+
* theme.on(Theme.EVENTS.zoom, (zoom: number) => {})
|
|
2042
|
+
* ```
|
|
2043
|
+
*/
|
|
2035
2044
|
ZOOM_LIMIT_MAX: string;
|
|
2036
2045
|
ZOOM_LIMIT_MIN: string;
|
|
2037
2046
|
ZOOM_NOT_ENABLED: string;
|
|
@@ -2592,12 +2601,12 @@ interface ThemeOptions {
|
|
|
2592
2601
|
/**
|
|
2593
2602
|
* 播放器类型
|
|
2594
2603
|
*
|
|
2595
|
-
* | ezopen | flv | hls | mp4 |
|
|
2596
|
-
*
|
|
2597
|
-
* | 私有流 | flv 标准流 | hls标准流 | mp4 |
|
|
2604
|
+
* | ezopen | flv | hls | mp4 | ezhls |
|
|
2605
|
+
* |:------:|:----------:|:--------:|:-------:|:-------:|
|
|
2606
|
+
* | 私有流 | flv 标准流 | hls标准流 | mp4 | ezopen hls 标准流 |
|
|
2598
2607
|
* @since 0.0.1
|
|
2599
2608
|
*/
|
|
2600
|
-
type: 'ezopen' | 'flv' | 'hls' | 'mp4';
|
|
2609
|
+
type: 'ezopen' | 'flv' | 'hls' | 'mp4' | 'ezhls';
|
|
2601
2610
|
/** 播放器容器宽度,默认容器宽度,不要设置为 0 @since 0.0.1 */
|
|
2602
2611
|
width?: number | string;
|
|
2603
2612
|
/** 播放器容器高度,默认容器宽度, 不要设置为 0 @since 0.0.1 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/player-theme",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.5",
|
|
4
4
|
"description": "player theme",
|
|
5
5
|
"title": "theme",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"require": "./dist/index.cjs",
|
|
14
14
|
"default": "./dist/index.cjs"
|
|
15
15
|
},
|
|
16
|
-
"./dist/style.js": "./dist/style
|
|
17
|
-
"./dist/style": "./dist/style
|
|
16
|
+
"./dist/style.js": "./dist/style.js",
|
|
17
|
+
"./dist/style": "./dist/style.js",
|
|
18
18
|
"./dist/style.css": "./dist/style.css",
|
|
19
19
|
"./dist/constant.js": "./dist/constant.js",
|
|
20
20
|
"./dist/constant": "./dist/constant.js"
|