@ezuikit/player-theme 0.0.1-alpha.6 → 0.0.1-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/dist/index.js +15 -6
- package/dist/index.mjs +15 -6
- package/dist/index.umd.js +15 -6
- package/dist/style.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v0.0.1-
|
|
3
|
-
* Copyright (c) 2025-10-
|
|
2
|
+
* @ezuikit/player-theme v0.0.1-beta.1
|
|
3
|
+
* Copyright (c) 2025-10-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -6806,7 +6806,7 @@ function __filter(list, locale = {}) {
|
|
|
6806
6806
|
return `<span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(realItem == null ? void 0 : realItem.name) || ''})</span>`;
|
|
6807
6807
|
}
|
|
6808
6808
|
// 如果 label 不存在,则不显示label,直接显示list的第一个label, 一般自定义清晰度列表可能会出现
|
|
6809
|
-
return `<span>${label || ((_list_ = list[0]) == null ? void 0 : _list_.
|
|
6809
|
+
return `<span>${label || ((_list_ = list[0]) == null ? void 0 : _list_.name) || ''}</span>`;
|
|
6810
6810
|
},
|
|
6811
6811
|
onChange: (value, item)=>{
|
|
6812
6812
|
var _options_onChange;
|
|
@@ -10021,7 +10021,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10021
10021
|
// 私有方法
|
|
10022
10022
|
// ==============================================================================================
|
|
10023
10023
|
/** 初始化配置项 */ _initOptions(options = {}) {
|
|
10024
|
-
var _this_options_loggerOptions;
|
|
10024
|
+
var _this_options_loggerOptions, _this_options_definitionOptions_list, _this_options_definitionOptions, _this_options_videoLevelList;
|
|
10025
10025
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
10026
10026
|
clone: false
|
|
10027
10027
|
});
|
|
@@ -10035,7 +10035,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10035
10035
|
}
|
|
10036
10036
|
if (!this.$container) throw new Error('container option is required!');
|
|
10037
10037
|
if ([
|
|
10038
|
-
'
|
|
10038
|
+
'VIDEO',
|
|
10039
10039
|
'CANVAS'
|
|
10040
10040
|
].includes(this.$container.tagName)) {
|
|
10041
10041
|
throw new Error('container node cannot be video or canvas!');
|
|
@@ -10046,6 +10046,10 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10046
10046
|
}));
|
|
10047
10047
|
this.logger.log(navigator.userAgent || 'unknown');
|
|
10048
10048
|
this.logger.log('[Theme Version] ', Theme.THEME_VERSION);
|
|
10049
|
+
if ('container' in this.options) {
|
|
10050
|
+
// JSON 不能序列化dom节点, 不要使用 this.options.container, 请使用 this.container
|
|
10051
|
+
delete this.options.container;
|
|
10052
|
+
}
|
|
10049
10053
|
this.logger.log(JSON.stringify(this.options));
|
|
10050
10054
|
const language = this.options.language || 'zh';
|
|
10051
10055
|
const locales = deepmerge({
|
|
@@ -10058,6 +10062,11 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10058
10062
|
this.i18n = new I18n(locales, {
|
|
10059
10063
|
defaultLocale: language
|
|
10060
10064
|
});
|
|
10065
|
+
// 默认清晰度列表
|
|
10066
|
+
if (((_this_options_definitionOptions = this.options.definitionOptions) == null ? void 0 : (_this_options_definitionOptions_list = _this_options_definitionOptions.list) == null ? void 0 : _this_options_definitionOptions_list.length) > 0 || ((_this_options_videoLevelList = this.options.videoLevelList) == null ? void 0 : _this_options_videoLevelList.length) > 0) {
|
|
10067
|
+
var _this_options_definitionOptions1;
|
|
10068
|
+
this.videoLevelList = ((_this_options_definitionOptions1 = this.options.definitionOptions) == null ? void 0 : _this_options_definitionOptions1.list) || this.options.videoLevelList;
|
|
10069
|
+
}
|
|
10061
10070
|
}
|
|
10062
10071
|
/**
|
|
10063
10072
|
* 初始化设置类名和设置宽高
|
|
@@ -10607,7 +10616,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10607
10616
|
zh,
|
|
10608
10617
|
en
|
|
10609
10618
|
};
|
|
10610
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '0.0.1-
|
|
10619
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '0.0.1-beta.1';
|
|
10611
10620
|
|
|
10612
10621
|
exports.Control = Control;
|
|
10613
10622
|
exports.Fullscreen = Fullscreen;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v0.0.1-
|
|
3
|
-
* Copyright (c) 2025-10-
|
|
2
|
+
* @ezuikit/player-theme v0.0.1-beta.1
|
|
3
|
+
* Copyright (c) 2025-10-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -6802,7 +6802,7 @@ function __filter(list, locale = {}) {
|
|
|
6802
6802
|
return `<span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(realItem == null ? void 0 : realItem.name) || ''})</span>`;
|
|
6803
6803
|
}
|
|
6804
6804
|
// 如果 label 不存在,则不显示label,直接显示list的第一个label, 一般自定义清晰度列表可能会出现
|
|
6805
|
-
return `<span>${label || ((_list_ = list[0]) == null ? void 0 : _list_.
|
|
6805
|
+
return `<span>${label || ((_list_ = list[0]) == null ? void 0 : _list_.name) || ''}</span>`;
|
|
6806
6806
|
},
|
|
6807
6807
|
onChange: (value, item)=>{
|
|
6808
6808
|
var _options_onChange;
|
|
@@ -10017,7 +10017,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10017
10017
|
// 私有方法
|
|
10018
10018
|
// ==============================================================================================
|
|
10019
10019
|
/** 初始化配置项 */ _initOptions(options = {}) {
|
|
10020
|
-
var _this_options_loggerOptions;
|
|
10020
|
+
var _this_options_loggerOptions, _this_options_definitionOptions_list, _this_options_definitionOptions, _this_options_videoLevelList;
|
|
10021
10021
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
10022
10022
|
clone: false
|
|
10023
10023
|
});
|
|
@@ -10031,7 +10031,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10031
10031
|
}
|
|
10032
10032
|
if (!this.$container) throw new Error('container option is required!');
|
|
10033
10033
|
if ([
|
|
10034
|
-
'
|
|
10034
|
+
'VIDEO',
|
|
10035
10035
|
'CANVAS'
|
|
10036
10036
|
].includes(this.$container.tagName)) {
|
|
10037
10037
|
throw new Error('container node cannot be video or canvas!');
|
|
@@ -10042,6 +10042,10 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10042
10042
|
}));
|
|
10043
10043
|
this.logger.log(navigator.userAgent || 'unknown');
|
|
10044
10044
|
this.logger.log('[Theme Version] ', Theme.THEME_VERSION);
|
|
10045
|
+
if ('container' in this.options) {
|
|
10046
|
+
// JSON 不能序列化dom节点, 不要使用 this.options.container, 请使用 this.container
|
|
10047
|
+
delete this.options.container;
|
|
10048
|
+
}
|
|
10045
10049
|
this.logger.log(JSON.stringify(this.options));
|
|
10046
10050
|
const language = this.options.language || 'zh';
|
|
10047
10051
|
const locales = deepmerge({
|
|
@@ -10054,6 +10058,11 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10054
10058
|
this.i18n = new I18n(locales, {
|
|
10055
10059
|
defaultLocale: language
|
|
10056
10060
|
});
|
|
10061
|
+
// 默认清晰度列表
|
|
10062
|
+
if (((_this_options_definitionOptions = this.options.definitionOptions) == null ? void 0 : (_this_options_definitionOptions_list = _this_options_definitionOptions.list) == null ? void 0 : _this_options_definitionOptions_list.length) > 0 || ((_this_options_videoLevelList = this.options.videoLevelList) == null ? void 0 : _this_options_videoLevelList.length) > 0) {
|
|
10063
|
+
var _this_options_definitionOptions1;
|
|
10064
|
+
this.videoLevelList = ((_this_options_definitionOptions1 = this.options.definitionOptions) == null ? void 0 : _this_options_definitionOptions1.list) || this.options.videoLevelList;
|
|
10065
|
+
}
|
|
10057
10066
|
}
|
|
10058
10067
|
/**
|
|
10059
10068
|
* 初始化设置类名和设置宽高
|
|
@@ -10603,6 +10612,6 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
10603
10612
|
zh,
|
|
10604
10613
|
en
|
|
10605
10614
|
};
|
|
10606
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '0.0.1-
|
|
10615
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '0.0.1-beta.1';
|
|
10607
10616
|
|
|
10608
10617
|
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume, Theme as default };
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v0.0.1-
|
|
3
|
-
* Copyright (c) 2025-10-
|
|
2
|
+
* @ezuikit/player-theme v0.0.1-beta.1
|
|
3
|
+
* Copyright (c) 2025-10-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -9425,7 +9425,7 @@
|
|
|
9425
9425
|
return "<span>" + (options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO) + "(" + ((realItem == null ? void 0 : realItem.name) || '') + ")</span>";
|
|
9426
9426
|
}
|
|
9427
9427
|
// 如果 label 不存在,则不显示label,直接显示list的第一个label, 一般自定义清晰度列表可能会出现
|
|
9428
|
-
return "<span>" + (label || ((_list_ = list[0]) == null ? void 0 : _list_.
|
|
9428
|
+
return "<span>" + (label || ((_list_ = list[0]) == null ? void 0 : _list_.name) || '') + "</span>";
|
|
9429
9429
|
},
|
|
9430
9430
|
onChange: function(value, item) {
|
|
9431
9431
|
var _options_onChange;
|
|
@@ -12921,7 +12921,7 @@
|
|
|
12921
12921
|
// ==============================================================================================
|
|
12922
12922
|
/** 初始化配置项 */ _proto._initOptions = function _initOptions(options) {
|
|
12923
12923
|
if (options === void 0) options = {};
|
|
12924
|
-
var _this_options_loggerOptions;
|
|
12924
|
+
var _this_options_loggerOptions, _this_options_definitionOptions_list, _this_options_definitionOptions, _this_options_videoLevelList;
|
|
12925
12925
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
12926
12926
|
clone: false
|
|
12927
12927
|
});
|
|
@@ -12935,7 +12935,7 @@
|
|
|
12935
12935
|
}
|
|
12936
12936
|
if (!this.$container) throw new Error('container option is required!');
|
|
12937
12937
|
if ([
|
|
12938
|
-
'
|
|
12938
|
+
'VIDEO',
|
|
12939
12939
|
'CANVAS'
|
|
12940
12940
|
].includes(this.$container.tagName)) {
|
|
12941
12941
|
throw new Error('container node cannot be video or canvas!');
|
|
@@ -12946,6 +12946,10 @@
|
|
|
12946
12946
|
}));
|
|
12947
12947
|
this.logger.log(navigator.userAgent || 'unknown');
|
|
12948
12948
|
this.logger.log('[Theme Version] ', Theme.THEME_VERSION);
|
|
12949
|
+
if ('container' in this.options) {
|
|
12950
|
+
// JSON 不能序列化dom节点, 不要使用 this.options.container, 请使用 this.container
|
|
12951
|
+
delete this.options.container;
|
|
12952
|
+
}
|
|
12949
12953
|
this.logger.log(JSON.stringify(this.options));
|
|
12950
12954
|
var language = this.options.language || 'zh';
|
|
12951
12955
|
var locales = deepmerge({
|
|
@@ -12958,6 +12962,11 @@
|
|
|
12958
12962
|
this.i18n = new I18n(locales, {
|
|
12959
12963
|
defaultLocale: language
|
|
12960
12964
|
});
|
|
12965
|
+
// 默认清晰度列表
|
|
12966
|
+
if (((_this_options_definitionOptions = this.options.definitionOptions) == null ? void 0 : (_this_options_definitionOptions_list = _this_options_definitionOptions.list) == null ? void 0 : _this_options_definitionOptions_list.length) > 0 || ((_this_options_videoLevelList = this.options.videoLevelList) == null ? void 0 : _this_options_videoLevelList.length) > 0) {
|
|
12967
|
+
var _this_options_definitionOptions1;
|
|
12968
|
+
this.videoLevelList = ((_this_options_definitionOptions1 = this.options.definitionOptions) == null ? void 0 : _this_options_definitionOptions1.list) || this.options.videoLevelList;
|
|
12969
|
+
}
|
|
12961
12970
|
};
|
|
12962
12971
|
/**
|
|
12963
12972
|
* 初始化设置类名和设置宽高
|
|
@@ -13852,7 +13861,7 @@
|
|
|
13852
13861
|
zh: zh,
|
|
13853
13862
|
en: en
|
|
13854
13863
|
};
|
|
13855
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '0.0.1-
|
|
13864
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '0.0.1-beta.1';
|
|
13856
13865
|
|
|
13857
13866
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
13858
13867
|
|
package/dist/style.js
CHANGED