@ezuikit/player-theme 2.0.2-beta.7 → 2.0.2-beta.8
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/README.md +1 -40
- package/dist/index.js +9 -17
- package/dist/index.mjs +9 -17
- package/dist/index.umd.js +9 -17
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -6
package/README.md
CHANGED
|
@@ -1,40 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
萤石播放器主题
|
|
4
|
-
|
|
5
|
-
## 快速入门
|
|
6
|
-
|
|
7
|
-
```ts
|
|
8
|
-
import Theme from '@ezuikit/player-theme';
|
|
9
|
-
// 引入样式
|
|
10
|
-
import '@ezuikit/player-theme/dist/style.css';
|
|
11
|
-
|
|
12
|
-
// 使用
|
|
13
|
-
const theme = new Theme({
|
|
14
|
-
// ...
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// 播放器接入主题
|
|
18
|
-
class Player extends Theme {
|
|
19
|
-
constructor(options) {
|
|
20
|
-
super(options);
|
|
21
|
-
// ...
|
|
22
|
-
}
|
|
23
|
-
// ...
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## 样式变量
|
|
28
|
-
|
|
29
|
-
```scss
|
|
30
|
-
--ezplayer-default-color: #fff;
|
|
31
|
-
--ezplayer-primary-color: #407aff;
|
|
32
|
-
--ezplayer-active-color: var(--ezplayer-primary-color, #407aff);
|
|
33
|
-
--ezplayer-disabled-color: #aaa;
|
|
34
|
-
--ezplayer-font-size: 14px;
|
|
35
|
-
--ezplayer-icon-font-size: 24px;
|
|
36
|
-
--ezplayer-btn-height: var(--ezplayer-icon-font-size, 24px);
|
|
37
|
-
--ezplayer-border-radius: 8px;
|
|
38
|
-
// 移动端暂时不生效
|
|
39
|
-
--ezplayer-picker-panel-bg-color: rgba(0, 0, 0, 0.7);
|
|
40
|
-
```
|
|
1
|
+
# EZUIKit-player-theme
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.2-beta.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.2-beta.8
|
|
3
|
+
* Copyright (c) 2025-12-12 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -271,9 +271,14 @@ function _set_prototype_of$r(o, p) {
|
|
|
271
271
|
function Control(options) {
|
|
272
272
|
var _this;
|
|
273
273
|
var _this___options;
|
|
274
|
-
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false;
|
|
274
|
+
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false, _this._camelCaseName = '';
|
|
275
275
|
_this.__options = options;
|
|
276
276
|
_this.locale = getLocale(_this.__options.locales, _this.__options.language);
|
|
277
|
+
_this._camelCaseName = _this.__options.classNameSuffix ? _this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
278
|
+
return c ? c.toUpperCase() : '';
|
|
279
|
+
}).replace(/^(.)/, function(first) {
|
|
280
|
+
return first.toLowerCase();
|
|
281
|
+
}) : '';
|
|
277
282
|
_this.$container = document.createElement(options.tagName || 'span');
|
|
278
283
|
_this.$container.classList.add("" + PREFIX_CLASS + "-control"); // 默认隐藏
|
|
279
284
|
if ((options == null ? void 0 : options.controlType) === 'text') {
|
|
@@ -432,19 +437,6 @@ function _set_prototype_of$r(o, p) {
|
|
|
432
437
|
this._disabled = disabled;
|
|
433
438
|
this._updateDisabledState(disabled);
|
|
434
439
|
}
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
key: "_camelCaseName",
|
|
438
|
-
get: function get() {
|
|
439
|
-
if (this.__options.classNameSuffix) {
|
|
440
|
-
return this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
441
|
-
return c ? c.toUpperCase() : '';
|
|
442
|
-
}).replace(/^(.)/, function(first) {
|
|
443
|
-
return first.toLowerCase();
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
448
440
|
}
|
|
449
441
|
]);
|
|
450
442
|
return Control;
|
|
@@ -11389,7 +11381,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11389
11381
|
zh: zh,
|
|
11390
11382
|
en: en
|
|
11391
11383
|
};
|
|
11392
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.
|
|
11384
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.8';
|
|
11393
11385
|
|
|
11394
11386
|
exports.Control = Control;
|
|
11395
11387
|
exports.Fullscreen = Fullscreen;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.2-beta.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.2-beta.8
|
|
3
|
+
* Copyright (c) 2025-12-12 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -269,9 +269,14 @@ function _set_prototype_of$r(o, p) {
|
|
|
269
269
|
function Control(options) {
|
|
270
270
|
var _this;
|
|
271
271
|
var _this___options;
|
|
272
|
-
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false;
|
|
272
|
+
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false, _this._camelCaseName = '';
|
|
273
273
|
_this.__options = options;
|
|
274
274
|
_this.locale = getLocale(_this.__options.locales, _this.__options.language);
|
|
275
|
+
_this._camelCaseName = _this.__options.classNameSuffix ? _this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
276
|
+
return c ? c.toUpperCase() : '';
|
|
277
|
+
}).replace(/^(.)/, function(first) {
|
|
278
|
+
return first.toLowerCase();
|
|
279
|
+
}) : '';
|
|
275
280
|
_this.$container = document.createElement(options.tagName || 'span');
|
|
276
281
|
_this.$container.classList.add("" + PREFIX_CLASS + "-control"); // 默认隐藏
|
|
277
282
|
if ((options == null ? void 0 : options.controlType) === 'text') {
|
|
@@ -430,19 +435,6 @@ function _set_prototype_of$r(o, p) {
|
|
|
430
435
|
this._disabled = disabled;
|
|
431
436
|
this._updateDisabledState(disabled);
|
|
432
437
|
}
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
key: "_camelCaseName",
|
|
436
|
-
get: function get() {
|
|
437
|
-
if (this.__options.classNameSuffix) {
|
|
438
|
-
return this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
439
|
-
return c ? c.toUpperCase() : '';
|
|
440
|
-
}).replace(/^(.)/, function(first) {
|
|
441
|
-
return first.toLowerCase();
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
return null;
|
|
445
|
-
}
|
|
446
438
|
}
|
|
447
439
|
]);
|
|
448
440
|
return Control;
|
|
@@ -11387,6 +11379,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11387
11379
|
zh: zh,
|
|
11388
11380
|
en: en
|
|
11389
11381
|
};
|
|
11390
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.
|
|
11382
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.8';
|
|
11391
11383
|
|
|
11392
11384
|
export { Control, 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 v2.0.2-beta.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.2-beta.8
|
|
3
|
+
* Copyright (c) 2025-12-12 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -618,9 +618,14 @@
|
|
|
618
618
|
function Control(options) {
|
|
619
619
|
var _this;
|
|
620
620
|
var _this___options;
|
|
621
|
-
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false;
|
|
621
|
+
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false, _this._camelCaseName = '';
|
|
622
622
|
_this.__options = options;
|
|
623
623
|
_this.locale = getLocale(_this.__options.locales, _this.__options.language);
|
|
624
|
+
_this._camelCaseName = _this.__options.classNameSuffix ? _this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
625
|
+
return c ? c.toUpperCase() : '';
|
|
626
|
+
}).replace(/^(.)/, function(first) {
|
|
627
|
+
return first.toLowerCase();
|
|
628
|
+
}) : '';
|
|
624
629
|
_this.$container = document.createElement(options.tagName || 'span');
|
|
625
630
|
_this.$container.classList.add("" + PREFIX_CLASS + "-control"); // 默认隐藏
|
|
626
631
|
if ((options == null ? void 0 : options.controlType) === 'text') {
|
|
@@ -779,19 +784,6 @@
|
|
|
779
784
|
this._disabled = disabled;
|
|
780
785
|
this._updateDisabledState(disabled);
|
|
781
786
|
}
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
key: "_camelCaseName",
|
|
785
|
-
get: function get() {
|
|
786
|
-
if (this.__options.classNameSuffix) {
|
|
787
|
-
return this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
788
|
-
return c ? c.toUpperCase() : '';
|
|
789
|
-
}).replace(/^(.)/, function(first) {
|
|
790
|
-
return first.toLowerCase();
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
787
|
}
|
|
796
788
|
]);
|
|
797
789
|
return Control;
|
|
@@ -13651,7 +13643,7 @@
|
|
|
13651
13643
|
zh: zh,
|
|
13652
13644
|
en: en
|
|
13653
13645
|
};
|
|
13654
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.
|
|
13646
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.8';
|
|
13655
13647
|
|
|
13656
13648
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
13657
13649
|
|
package/dist/style.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ declare class Control extends EventEmitter {
|
|
|
94
94
|
protected __options: ControlOptions;
|
|
95
95
|
protected _disabled: boolean;
|
|
96
96
|
protected _active: boolean;
|
|
97
|
+
private readonly _camelCaseName;
|
|
97
98
|
constructor(options: Partial<ControlOptions>);
|
|
98
99
|
/**
|
|
99
100
|
* 是否激活
|
|
@@ -128,7 +129,6 @@ declare class Control extends EventEmitter {
|
|
|
128
129
|
* 销毁控件
|
|
129
130
|
*/
|
|
130
131
|
destroy(): void;
|
|
131
|
-
private get _camelCaseName();
|
|
132
132
|
protected _updateDisabledState(disabled: boolean): void;
|
|
133
133
|
protected _updateActiveState(active: boolean): void;
|
|
134
134
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/player-theme",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
3
|
+
"version": "2.0.2-beta.8",
|
|
4
4
|
"description": "player theme",
|
|
5
5
|
"title": "theme",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,10 +36,5 @@
|
|
|
36
36
|
"deepmerge": "^4.3.1",
|
|
37
37
|
"eventemitter3": "^5.0.1",
|
|
38
38
|
"screenfull": "5.2.0"
|
|
39
|
-
},
|
|
40
|
-
"devDependencies": {
|
|
41
|
-
"@common/rollup": "workspace:*",
|
|
42
|
-
"@ezuikit/control-ptz": "workspace:*",
|
|
43
|
-
"@ezuikit/control-zoom": "workspace:*"
|
|
44
39
|
}
|
|
45
40
|
}
|