@ezuikit/player-theme 2.0.0-beta.1 → 2.0.0-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.
- package/dist/index.js +8 -5
- package/dist/index.mjs +9 -5
- package/dist/index.umd.js +8 -4
- package/dist/style.js +1 -1
- package/dist/types/index.d.ts +3 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.0-beta.
|
|
2
|
+
* @ezuikit/player-theme v2.0.0-beta.2
|
|
3
3
|
* Copyright (c) 2025-11-12 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3735,7 +3735,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3735
3735
|
_inherits$j(Content, EventEmitter);
|
|
3736
3736
|
function Content(options) {
|
|
3737
3737
|
var _this;
|
|
3738
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0;
|
|
3738
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3739
3739
|
_this.options = options;
|
|
3740
3740
|
_this._scaleMode = options.scaleMode || 0;
|
|
3741
3741
|
_this.$wrapper = document.createElement('div');
|
|
@@ -3769,6 +3769,10 @@ function _set_prototype_of$j(o, p) {
|
|
|
3769
3769
|
if (originHeight === void 0) originHeight = 0;
|
|
3770
3770
|
var width = this.$wrapper.clientWidth;
|
|
3771
3771
|
var height = this.$wrapper.clientHeight;
|
|
3772
|
+
// 防止多次渲染
|
|
3773
|
+
if (this._width === width && this._height === height && this._originWidth === originWidth && this._originHeight === originHeight) return;
|
|
3774
|
+
this._width = width;
|
|
3775
|
+
this._height = height;
|
|
3772
3776
|
if (originWidth > 0 && originHeight > 0) {
|
|
3773
3777
|
this._originWidth = originWidth;
|
|
3774
3778
|
this._originHeight = originHeight;
|
|
@@ -4017,7 +4021,7 @@ function debounce(func, wait) {
|
|
|
4017
4021
|
});
|
|
4018
4022
|
theme == null ? void 0 : theme.on(EVENTS.videoInfo, function(info) {
|
|
4019
4023
|
// 排除流信息回调触发的事件
|
|
4020
|
-
if (
|
|
4024
|
+
if (info) {
|
|
4021
4025
|
var // rerender 画面
|
|
4022
4026
|
_theme_contentControl_emit, _theme_contentControl;
|
|
4023
4027
|
(_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.videoInfo, info.width, info.height);
|
|
@@ -11816,7 +11820,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11816
11820
|
zh: zh,
|
|
11817
11821
|
en: en
|
|
11818
11822
|
};
|
|
11819
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11823
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.2';
|
|
11820
11824
|
|
|
11821
11825
|
exports.Control = Control;
|
|
11822
11826
|
exports.Fullscreen = Fullscreen;
|
|
@@ -11825,7 +11829,6 @@ exports.Message = Message;
|
|
|
11825
11829
|
exports.Play = Play;
|
|
11826
11830
|
exports.Poster = Poster;
|
|
11827
11831
|
exports.Rec = Rec;
|
|
11828
|
-
exports.Theme = Theme;
|
|
11829
11832
|
exports.Utils = Utils;
|
|
11830
11833
|
exports.Volume = Volume;
|
|
11831
11834
|
exports.default = Theme;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.0-beta.
|
|
2
|
+
* @ezuikit/player-theme v2.0.0-beta.2
|
|
3
3
|
* Copyright (c) 2025-11-12 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3731,7 +3731,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3731
3731
|
_inherits$j(Content, EventEmitter);
|
|
3732
3732
|
function Content(options) {
|
|
3733
3733
|
var _this;
|
|
3734
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0;
|
|
3734
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3735
3735
|
_this.options = options;
|
|
3736
3736
|
_this._scaleMode = options.scaleMode || 0;
|
|
3737
3737
|
_this.$wrapper = document.createElement('div');
|
|
@@ -3765,6 +3765,10 @@ function _set_prototype_of$j(o, p) {
|
|
|
3765
3765
|
if (originHeight === void 0) originHeight = 0;
|
|
3766
3766
|
var width = this.$wrapper.clientWidth;
|
|
3767
3767
|
var height = this.$wrapper.clientHeight;
|
|
3768
|
+
// 防止多次渲染
|
|
3769
|
+
if (this._width === width && this._height === height && this._originWidth === originWidth && this._originHeight === originHeight) return;
|
|
3770
|
+
this._width = width;
|
|
3771
|
+
this._height = height;
|
|
3768
3772
|
if (originWidth > 0 && originHeight > 0) {
|
|
3769
3773
|
this._originWidth = originWidth;
|
|
3770
3774
|
this._originHeight = originHeight;
|
|
@@ -4013,7 +4017,7 @@ function debounce(func, wait) {
|
|
|
4013
4017
|
});
|
|
4014
4018
|
theme == null ? void 0 : theme.on(EVENTS.videoInfo, function(info) {
|
|
4015
4019
|
// 排除流信息回调触发的事件
|
|
4016
|
-
if (
|
|
4020
|
+
if (info) {
|
|
4017
4021
|
var // rerender 画面
|
|
4018
4022
|
_theme_contentControl_emit, _theme_contentControl;
|
|
4019
4023
|
(_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.videoInfo, info.width, info.height);
|
|
@@ -11812,6 +11816,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11812
11816
|
zh: zh,
|
|
11813
11817
|
en: en
|
|
11814
11818
|
};
|
|
11815
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11819
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.2';
|
|
11816
11820
|
|
|
11817
|
-
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec,
|
|
11821
|
+
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Utils, Volume, Theme as default };
|
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.0-beta.
|
|
2
|
+
* @ezuikit/player-theme v2.0.0-beta.2
|
|
3
3
|
* Copyright (c) 2025-11-12 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -5396,7 +5396,7 @@
|
|
|
5396
5396
|
_inherits$j(Content, EventEmitter);
|
|
5397
5397
|
function Content(options) {
|
|
5398
5398
|
var _this;
|
|
5399
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0;
|
|
5399
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
5400
5400
|
_this.options = options;
|
|
5401
5401
|
_this._scaleMode = options.scaleMode || 0;
|
|
5402
5402
|
_this.$wrapper = document.createElement('div');
|
|
@@ -5430,6 +5430,10 @@
|
|
|
5430
5430
|
if (originHeight === void 0) originHeight = 0;
|
|
5431
5431
|
var width = this.$wrapper.clientWidth;
|
|
5432
5432
|
var height = this.$wrapper.clientHeight;
|
|
5433
|
+
// 防止多次渲染
|
|
5434
|
+
if (this._width === width && this._height === height && this._originWidth === originWidth && this._originHeight === originHeight) return;
|
|
5435
|
+
this._width = width;
|
|
5436
|
+
this._height = height;
|
|
5433
5437
|
if (originWidth > 0 && originHeight > 0) {
|
|
5434
5438
|
this._originWidth = originWidth;
|
|
5435
5439
|
this._originHeight = originHeight;
|
|
@@ -5678,7 +5682,7 @@
|
|
|
5678
5682
|
});
|
|
5679
5683
|
theme == null ? void 0 : theme.on(EVENTS.videoInfo, function(info) {
|
|
5680
5684
|
// 排除流信息回调触发的事件
|
|
5681
|
-
if (
|
|
5685
|
+
if (info) {
|
|
5682
5686
|
var // rerender 画面
|
|
5683
5687
|
_theme_contentControl_emit, _theme_contentControl;
|
|
5684
5688
|
(_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.videoInfo, info.width, info.height);
|
|
@@ -14489,7 +14493,7 @@
|
|
|
14489
14493
|
zh: zh,
|
|
14490
14494
|
en: en
|
|
14491
14495
|
};
|
|
14492
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
14496
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.2';
|
|
14493
14497
|
|
|
14494
14498
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
14495
14499
|
|
package/dist/style.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1022,6 +1022,8 @@ declare class Content extends EventEmitter {
|
|
|
1022
1022
|
private _scaleMode?;
|
|
1023
1023
|
private _originWidth;
|
|
1024
1024
|
private _originHeight;
|
|
1025
|
+
private _width;
|
|
1026
|
+
private _height;
|
|
1025
1027
|
constructor(options: ContentOptions);
|
|
1026
1028
|
/**
|
|
1027
1029
|
* 重新画面区域
|
|
@@ -2543,5 +2545,5 @@ declare class Utils {
|
|
|
2543
2545
|
static resizeObserver(node: Element, callback?: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void): CleanUpResizeObserver;
|
|
2544
2546
|
}
|
|
2545
2547
|
|
|
2546
|
-
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec,
|
|
2548
|
+
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Utils, Volume, Theme as default };
|
|
2547
2549
|
export type { CleanUpResizeObserver, CleanUpScreenOrientationFun, ControlItem, ControlOptions, FooterOptions, FullscreenOptions, HeaderOptions, IThemeData, IThemeDataItem, LoadingOptions, MessageOptions, PlayOptions, PosterOptions, RecOptions, ScreenOrientation, ThemeOptions, VolumeOptions };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/player-theme",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.2",
|
|
4
4
|
"description": "player theme",
|
|
5
5
|
"title": "theme",
|
|
6
|
-
"main": "dist/index.
|
|
6
|
+
"main": "dist/index.mjs",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "cross-env NODE_ENV=development rollup --config rollup.config.mjs --watch",
|