@ezuikit/player-theme 2.0.0-beta.1 → 2.0.0-beta.4
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 +59 -32
- package/dist/index.mjs +60 -30
- package/dist/index.umd.js +599 -1155
- package/dist/style.css +1 -1
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +19 -14
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.0-beta.
|
|
3
|
-
* Copyright (c) 2025-11-
|
|
2
|
+
* @ezuikit/player-theme v2.0.0-beta.4
|
|
3
|
+
* Copyright (c) 2025-11-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
-
|
|
10
8
|
var EventEmitter = require('eventemitter3');
|
|
11
9
|
var Picker = require('@skax/picker');
|
|
12
10
|
var delegate = require('@skax/delegate');
|
|
@@ -202,7 +200,8 @@ var EVENTS = {
|
|
|
202
200
|
/** 封面控件销毁 */ posterDestroy: 'Control.posterDestroy',
|
|
203
201
|
/** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
|
|
204
202
|
/** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
|
|
205
|
-
/** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy'
|
|
203
|
+
/** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
|
|
204
|
+
contentRerender: 'Control.contentRerender'
|
|
206
205
|
},
|
|
207
206
|
/**
|
|
208
207
|
* 主题控件相关
|
|
@@ -3735,7 +3734,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3735
3734
|
_inherits$j(Content, EventEmitter);
|
|
3736
3735
|
function Content(options) {
|
|
3737
3736
|
var _this;
|
|
3738
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0;
|
|
3737
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3739
3738
|
_this.options = options;
|
|
3740
3739
|
_this._scaleMode = options.scaleMode || 0;
|
|
3741
3740
|
_this.$wrapper = document.createElement('div');
|
|
@@ -3769,6 +3768,10 @@ function _set_prototype_of$j(o, p) {
|
|
|
3769
3768
|
if (originHeight === void 0) originHeight = 0;
|
|
3770
3769
|
var width = this.$wrapper.clientWidth;
|
|
3771
3770
|
var height = this.$wrapper.clientHeight;
|
|
3771
|
+
// 防止多次渲染
|
|
3772
|
+
if (this._width === width && this._height === height && this._originWidth === originWidth && this._originHeight === originHeight) return;
|
|
3773
|
+
this._width = width;
|
|
3774
|
+
this._height = height;
|
|
3772
3775
|
if (originWidth > 0 && originHeight > 0) {
|
|
3773
3776
|
this._originWidth = originWidth;
|
|
3774
3777
|
this._originHeight = originHeight;
|
|
@@ -3801,6 +3804,13 @@ function _set_prototype_of$j(o, p) {
|
|
|
3801
3804
|
scale = wScale > hScale ? wScale : hScale;
|
|
3802
3805
|
}
|
|
3803
3806
|
this.$video.style.cssText += "\n width: " + this._originWidth + "px;\n height: " + this._originHeight + "px;\n position: absolute;\n object-fit:" + objectFill + ";\n left: " + left + "px;\n top: " + top + "px;\n transform-origin: 50% 50%;\n transform: scale(" + scale + ");\n ";
|
|
3807
|
+
this.emit(EVENTS.control.contentRerender, {
|
|
3808
|
+
scaleMode: this._scaleMode,
|
|
3809
|
+
objectFill: objectFill,
|
|
3810
|
+
scale: scale,
|
|
3811
|
+
width: this._originWidth,
|
|
3812
|
+
height: this._originHeight
|
|
3813
|
+
});
|
|
3804
3814
|
}
|
|
3805
3815
|
};
|
|
3806
3816
|
_proto.setScaleMode = function setScaleMode(scaleMode) {
|
|
@@ -4017,7 +4027,7 @@ function debounce(func, wait) {
|
|
|
4017
4027
|
});
|
|
4018
4028
|
theme == null ? void 0 : theme.on(EVENTS.videoInfo, function(info) {
|
|
4019
4029
|
// 排除流信息回调触发的事件
|
|
4020
|
-
if (
|
|
4030
|
+
if (info) {
|
|
4021
4031
|
var // rerender 画面
|
|
4022
4032
|
_theme_contentControl_emit, _theme_contentControl;
|
|
4023
4033
|
(_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);
|
|
@@ -4365,6 +4375,12 @@ function debounce(func, wait) {
|
|
|
4365
4375
|
theme.emit(EVENTS.control.recDestroy);
|
|
4366
4376
|
});
|
|
4367
4377
|
}
|
|
4378
|
+
// content
|
|
4379
|
+
if (theme.contentControl) {
|
|
4380
|
+
theme.contentControl.on(EVENTS.control.contentRerender, function(info) {
|
|
4381
|
+
theme.emit(EVENTS.control.contentRerender, info);
|
|
4382
|
+
});
|
|
4383
|
+
}
|
|
4368
4384
|
}
|
|
4369
4385
|
var ignoreList = [
|
|
4370
4386
|
EVENTS.getOSDTime,
|
|
@@ -9203,7 +9219,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9203
9219
|
* @param change 是否触发 onChange 事件
|
|
9204
9220
|
*/ _proto.setDate = function setDate(date, change) {
|
|
9205
9221
|
if (change === void 0) change = true;
|
|
9206
|
-
|
|
9222
|
+
var _this_dataPickerUtil;
|
|
9223
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
|
|
9207
9224
|
if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
|
|
9208
9225
|
this._value = DateTime.formate(date, 'YYYY-MM-DD');
|
|
9209
9226
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -9212,7 +9229,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9212
9229
|
}
|
|
9213
9230
|
};
|
|
9214
9231
|
_proto.reset = function reset() {
|
|
9215
|
-
|
|
9232
|
+
var _this_dataPickerUtil;
|
|
9233
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
9216
9234
|
Control.prototype.reset.call(this);
|
|
9217
9235
|
};
|
|
9218
9236
|
/**
|
|
@@ -9685,6 +9703,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9685
9703
|
*/ _proto.show = function show(playing, always) {
|
|
9686
9704
|
var _this = this;
|
|
9687
9705
|
var _this_$container_classList, _this_$container;
|
|
9706
|
+
if (!this.$container) return;
|
|
9688
9707
|
if (!this._firstFlag) {
|
|
9689
9708
|
this._firstFlag = true;
|
|
9690
9709
|
} else {
|
|
@@ -11002,7 +11021,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11002
11021
|
}));
|
|
11003
11022
|
_this._isRotated();
|
|
11004
11023
|
if (Utils.isMobile && !_this._isCurrentFullscreen) {
|
|
11005
|
-
|
|
11024
|
+
var _this_controls;
|
|
11025
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.ptzControl) _this.controls.ptzControl.reset();
|
|
11006
11026
|
}
|
|
11007
11027
|
}
|
|
11008
11028
|
});
|
|
@@ -11134,8 +11154,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11134
11154
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
11135
11155
|
var showHeaderMore = leftWidth + rightWidth + 30 > this._width;
|
|
11136
11156
|
if (showHeaderMore) {
|
|
11137
|
-
|
|
11138
|
-
|
|
11157
|
+
var _this_controls;
|
|
11158
|
+
if (!this._headerMoreControl && ((_this_controls = this.controls) == null ? void 0 : _this_controls.recControl)) {
|
|
11159
|
+
var _this_controls_recControl, _this_controls1;
|
|
11139
11160
|
this._headerMoreControl = new More({
|
|
11140
11161
|
language: this.options.language,
|
|
11141
11162
|
locales: this.i18n.translations,
|
|
@@ -11156,14 +11177,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11156
11177
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
11157
11178
|
}
|
|
11158
11179
|
});
|
|
11159
|
-
(
|
|
11180
|
+
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
11160
11181
|
}
|
|
11161
11182
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
11162
11183
|
} else if (this._width - leftWidth - rightWidth > 100) {
|
|
11184
|
+
var _this_controls2;
|
|
11163
11185
|
//
|
|
11164
|
-
if (this._headerMoreControl && this.controls.recControl) {
|
|
11165
|
-
var _this__header2, _this_controls_recControl1, _this__headerMoreControl;
|
|
11166
|
-
(
|
|
11186
|
+
if (this._headerMoreControl && ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.recControl)) {
|
|
11187
|
+
var _this__header2, _this_controls_recControl1, _this_controls3, _this__headerMoreControl;
|
|
11188
|
+
(_this_controls3 = this.controls) == null ? void 0 : (_this_controls_recControl1 = _this_controls3.recControl) == null ? void 0 : _this_controls_recControl1.resetPopupContainer((_this__header2 = this._header) == null ? void 0 : _this__header2.$right);
|
|
11167
11189
|
(_this__headerMoreControl = this._headerMoreControl) == null ? void 0 : _this__headerMoreControl.destroy();
|
|
11168
11190
|
this._headerMoreControl = null;
|
|
11169
11191
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, false);
|
|
@@ -11213,7 +11235,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11213
11235
|
var list = (((_this__themeData = _this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
|
|
11214
11236
|
var _this__footerMoreControl;
|
|
11215
11237
|
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11216
|
-
|
|
11238
|
+
var _this_controls;
|
|
11239
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11217
11240
|
});
|
|
11218
11241
|
return index === -1;
|
|
11219
11242
|
});
|
|
@@ -11229,19 +11252,19 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11229
11252
|
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11230
11253
|
var item = _step.value;
|
|
11231
11254
|
if (item) {
|
|
11232
|
-
var _this_controls_key_resetPopupContainer, _this_controls_key, _this__footerMoreControl2;
|
|
11255
|
+
var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
|
|
11233
11256
|
var key = "" + item.iconId + "Control";
|
|
11234
|
-
(
|
|
11235
|
-
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, _this.controls[key]);
|
|
11257
|
+
(_this_controls = _this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key, _this._footerMoreControl.$panel, 'prepend');
|
|
11258
|
+
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
|
|
11236
11259
|
}
|
|
11237
11260
|
}
|
|
11238
11261
|
} else if (_this._footerMoreControl) {
|
|
11239
11262
|
var item1 = list.pop();
|
|
11240
11263
|
if (item1) {
|
|
11241
|
-
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this__footerMoreControl3;
|
|
11264
|
+
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this_controls2, _this_controls3, _this__footerMoreControl3;
|
|
11242
11265
|
var key1 = "" + item1.iconId + "Control";
|
|
11243
|
-
(
|
|
11244
|
-
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, _this.controls[key1]);
|
|
11266
|
+
(_this_controls2 = _this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls2[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key1.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key1, _this._footerMoreControl.$panel, 'prepend');
|
|
11267
|
+
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls3 = _this.controls) == null ? void 0 : _this_controls3[key1]);
|
|
11245
11268
|
} else {
|
|
11246
11269
|
return;
|
|
11247
11270
|
}
|
|
@@ -11343,7 +11366,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11343
11366
|
var _this = this;
|
|
11344
11367
|
if (disabled === void 0) disabled = true;
|
|
11345
11368
|
PAUSE_DISABLED_BTN.forEach(function(btn) {
|
|
11346
|
-
|
|
11369
|
+
var _this_controls;
|
|
11370
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + btn + "Control"]) {
|
|
11347
11371
|
_this.controls["" + btn + "Control"].disabled = disabled;
|
|
11348
11372
|
}
|
|
11349
11373
|
});
|
|
@@ -11386,7 +11410,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11386
11410
|
'record',
|
|
11387
11411
|
'speed'
|
|
11388
11412
|
].forEach(function(key) {
|
|
11389
|
-
|
|
11413
|
+
var _this_controls;
|
|
11414
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11390
11415
|
_this.controls["" + key + "Control"].reset();
|
|
11391
11416
|
}
|
|
11392
11417
|
});
|
|
@@ -11399,12 +11424,14 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11399
11424
|
0,
|
|
11400
11425
|
180
|
|
11401
11426
|
].includes(this._orientationAngle)) {
|
|
11427
|
+
var _this_controls, _this_controls1;
|
|
11402
11428
|
// 全屏后 dom 节点旋转了 90度
|
|
11403
|
-
if (this.controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11404
|
-
if (this.controls.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11429
|
+
if ((_this_controls = this.controls) == null ? void 0 : _this_controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11430
|
+
if ((_this_controls1 = this.controls) == null ? void 0 : _this_controls1.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11405
11431
|
} else {
|
|
11406
|
-
|
|
11407
|
-
if (this.controls.
|
|
11432
|
+
var _this_controls2, _this_controls3;
|
|
11433
|
+
if ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.ptzControl) this.controls.ptzControl.isRotated = false;
|
|
11434
|
+
if ((_this_controls3 = this.controls) == null ? void 0 : _this_controls3.zoomControl) this.controls.zoomControl.isRotated = false;
|
|
11408
11435
|
}
|
|
11409
11436
|
}
|
|
11410
11437
|
};
|
|
@@ -11459,7 +11486,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11459
11486
|
'talk',
|
|
11460
11487
|
'record'
|
|
11461
11488
|
].forEach(function(key) {
|
|
11462
|
-
|
|
11489
|
+
var _this_controls;
|
|
11490
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11463
11491
|
_this.controls["" + key + "Control"].reset();
|
|
11464
11492
|
}
|
|
11465
11493
|
});
|
|
@@ -11816,7 +11844,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11816
11844
|
zh: zh,
|
|
11817
11845
|
en: en
|
|
11818
11846
|
};
|
|
11819
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11847
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.4';
|
|
11820
11848
|
|
|
11821
11849
|
exports.Control = Control;
|
|
11822
11850
|
exports.Fullscreen = Fullscreen;
|
|
@@ -11828,4 +11856,3 @@ exports.Rec = Rec;
|
|
|
11828
11856
|
exports.Theme = Theme;
|
|
11829
11857
|
exports.Utils = Utils;
|
|
11830
11858
|
exports.Volume = Volume;
|
|
11831
|
-
exports.default = Theme;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.0-beta.
|
|
3
|
-
* Copyright (c) 2025-11-
|
|
2
|
+
* @ezuikit/player-theme v2.0.0-beta.4
|
|
3
|
+
* Copyright (c) 2025-11-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -198,7 +198,8 @@ var EVENTS = {
|
|
|
198
198
|
/** 封面控件销毁 */ posterDestroy: 'Control.posterDestroy',
|
|
199
199
|
/** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
|
|
200
200
|
/** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
|
|
201
|
-
/** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy'
|
|
201
|
+
/** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
|
|
202
|
+
contentRerender: 'Control.contentRerender'
|
|
202
203
|
},
|
|
203
204
|
/**
|
|
204
205
|
* 主题控件相关
|
|
@@ -3731,7 +3732,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3731
3732
|
_inherits$j(Content, EventEmitter);
|
|
3732
3733
|
function Content(options) {
|
|
3733
3734
|
var _this;
|
|
3734
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0;
|
|
3735
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3735
3736
|
_this.options = options;
|
|
3736
3737
|
_this._scaleMode = options.scaleMode || 0;
|
|
3737
3738
|
_this.$wrapper = document.createElement('div');
|
|
@@ -3765,6 +3766,10 @@ function _set_prototype_of$j(o, p) {
|
|
|
3765
3766
|
if (originHeight === void 0) originHeight = 0;
|
|
3766
3767
|
var width = this.$wrapper.clientWidth;
|
|
3767
3768
|
var height = this.$wrapper.clientHeight;
|
|
3769
|
+
// 防止多次渲染
|
|
3770
|
+
if (this._width === width && this._height === height && this._originWidth === originWidth && this._originHeight === originHeight) return;
|
|
3771
|
+
this._width = width;
|
|
3772
|
+
this._height = height;
|
|
3768
3773
|
if (originWidth > 0 && originHeight > 0) {
|
|
3769
3774
|
this._originWidth = originWidth;
|
|
3770
3775
|
this._originHeight = originHeight;
|
|
@@ -3797,6 +3802,13 @@ function _set_prototype_of$j(o, p) {
|
|
|
3797
3802
|
scale = wScale > hScale ? wScale : hScale;
|
|
3798
3803
|
}
|
|
3799
3804
|
this.$video.style.cssText += "\n width: " + this._originWidth + "px;\n height: " + this._originHeight + "px;\n position: absolute;\n object-fit:" + objectFill + ";\n left: " + left + "px;\n top: " + top + "px;\n transform-origin: 50% 50%;\n transform: scale(" + scale + ");\n ";
|
|
3805
|
+
this.emit(EVENTS.control.contentRerender, {
|
|
3806
|
+
scaleMode: this._scaleMode,
|
|
3807
|
+
objectFill: objectFill,
|
|
3808
|
+
scale: scale,
|
|
3809
|
+
width: this._originWidth,
|
|
3810
|
+
height: this._originHeight
|
|
3811
|
+
});
|
|
3800
3812
|
}
|
|
3801
3813
|
};
|
|
3802
3814
|
_proto.setScaleMode = function setScaleMode(scaleMode) {
|
|
@@ -4013,7 +4025,7 @@ function debounce(func, wait) {
|
|
|
4013
4025
|
});
|
|
4014
4026
|
theme == null ? void 0 : theme.on(EVENTS.videoInfo, function(info) {
|
|
4015
4027
|
// 排除流信息回调触发的事件
|
|
4016
|
-
if (
|
|
4028
|
+
if (info) {
|
|
4017
4029
|
var // rerender 画面
|
|
4018
4030
|
_theme_contentControl_emit, _theme_contentControl;
|
|
4019
4031
|
(_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);
|
|
@@ -4361,6 +4373,12 @@ function debounce(func, wait) {
|
|
|
4361
4373
|
theme.emit(EVENTS.control.recDestroy);
|
|
4362
4374
|
});
|
|
4363
4375
|
}
|
|
4376
|
+
// content
|
|
4377
|
+
if (theme.contentControl) {
|
|
4378
|
+
theme.contentControl.on(EVENTS.control.contentRerender, function(info) {
|
|
4379
|
+
theme.emit(EVENTS.control.contentRerender, info);
|
|
4380
|
+
});
|
|
4381
|
+
}
|
|
4364
4382
|
}
|
|
4365
4383
|
var ignoreList = [
|
|
4366
4384
|
EVENTS.getOSDTime,
|
|
@@ -9199,7 +9217,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9199
9217
|
* @param change 是否触发 onChange 事件
|
|
9200
9218
|
*/ _proto.setDate = function setDate(date, change) {
|
|
9201
9219
|
if (change === void 0) change = true;
|
|
9202
|
-
|
|
9220
|
+
var _this_dataPickerUtil;
|
|
9221
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
|
|
9203
9222
|
if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
|
|
9204
9223
|
this._value = DateTime.formate(date, 'YYYY-MM-DD');
|
|
9205
9224
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -9208,7 +9227,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9208
9227
|
}
|
|
9209
9228
|
};
|
|
9210
9229
|
_proto.reset = function reset() {
|
|
9211
|
-
|
|
9230
|
+
var _this_dataPickerUtil;
|
|
9231
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
9212
9232
|
Control.prototype.reset.call(this);
|
|
9213
9233
|
};
|
|
9214
9234
|
/**
|
|
@@ -9681,6 +9701,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9681
9701
|
*/ _proto.show = function show(playing, always) {
|
|
9682
9702
|
var _this = this;
|
|
9683
9703
|
var _this_$container_classList, _this_$container;
|
|
9704
|
+
if (!this.$container) return;
|
|
9684
9705
|
if (!this._firstFlag) {
|
|
9685
9706
|
this._firstFlag = true;
|
|
9686
9707
|
} else {
|
|
@@ -10998,7 +11019,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10998
11019
|
}));
|
|
10999
11020
|
_this._isRotated();
|
|
11000
11021
|
if (Utils.isMobile && !_this._isCurrentFullscreen) {
|
|
11001
|
-
|
|
11022
|
+
var _this_controls;
|
|
11023
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.ptzControl) _this.controls.ptzControl.reset();
|
|
11002
11024
|
}
|
|
11003
11025
|
}
|
|
11004
11026
|
});
|
|
@@ -11130,8 +11152,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11130
11152
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
11131
11153
|
var showHeaderMore = leftWidth + rightWidth + 30 > this._width;
|
|
11132
11154
|
if (showHeaderMore) {
|
|
11133
|
-
|
|
11134
|
-
|
|
11155
|
+
var _this_controls;
|
|
11156
|
+
if (!this._headerMoreControl && ((_this_controls = this.controls) == null ? void 0 : _this_controls.recControl)) {
|
|
11157
|
+
var _this_controls_recControl, _this_controls1;
|
|
11135
11158
|
this._headerMoreControl = new More({
|
|
11136
11159
|
language: this.options.language,
|
|
11137
11160
|
locales: this.i18n.translations,
|
|
@@ -11152,14 +11175,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11152
11175
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
11153
11176
|
}
|
|
11154
11177
|
});
|
|
11155
|
-
(
|
|
11178
|
+
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
11156
11179
|
}
|
|
11157
11180
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
11158
11181
|
} else if (this._width - leftWidth - rightWidth > 100) {
|
|
11182
|
+
var _this_controls2;
|
|
11159
11183
|
//
|
|
11160
|
-
if (this._headerMoreControl && this.controls.recControl) {
|
|
11161
|
-
var _this__header2, _this_controls_recControl1, _this__headerMoreControl;
|
|
11162
|
-
(
|
|
11184
|
+
if (this._headerMoreControl && ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.recControl)) {
|
|
11185
|
+
var _this__header2, _this_controls_recControl1, _this_controls3, _this__headerMoreControl;
|
|
11186
|
+
(_this_controls3 = this.controls) == null ? void 0 : (_this_controls_recControl1 = _this_controls3.recControl) == null ? void 0 : _this_controls_recControl1.resetPopupContainer((_this__header2 = this._header) == null ? void 0 : _this__header2.$right);
|
|
11163
11187
|
(_this__headerMoreControl = this._headerMoreControl) == null ? void 0 : _this__headerMoreControl.destroy();
|
|
11164
11188
|
this._headerMoreControl = null;
|
|
11165
11189
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, false);
|
|
@@ -11209,7 +11233,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11209
11233
|
var list = (((_this__themeData = _this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
|
|
11210
11234
|
var _this__footerMoreControl;
|
|
11211
11235
|
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11212
|
-
|
|
11236
|
+
var _this_controls;
|
|
11237
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11213
11238
|
});
|
|
11214
11239
|
return index === -1;
|
|
11215
11240
|
});
|
|
@@ -11225,19 +11250,19 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11225
11250
|
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11226
11251
|
var item = _step.value;
|
|
11227
11252
|
if (item) {
|
|
11228
|
-
var _this_controls_key_resetPopupContainer, _this_controls_key, _this__footerMoreControl2;
|
|
11253
|
+
var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
|
|
11229
11254
|
var key = "" + item.iconId + "Control";
|
|
11230
|
-
(
|
|
11231
|
-
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, _this.controls[key]);
|
|
11255
|
+
(_this_controls = _this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key, _this._footerMoreControl.$panel, 'prepend');
|
|
11256
|
+
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
|
|
11232
11257
|
}
|
|
11233
11258
|
}
|
|
11234
11259
|
} else if (_this._footerMoreControl) {
|
|
11235
11260
|
var item1 = list.pop();
|
|
11236
11261
|
if (item1) {
|
|
11237
|
-
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this__footerMoreControl3;
|
|
11262
|
+
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this_controls2, _this_controls3, _this__footerMoreControl3;
|
|
11238
11263
|
var key1 = "" + item1.iconId + "Control";
|
|
11239
|
-
(
|
|
11240
|
-
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, _this.controls[key1]);
|
|
11264
|
+
(_this_controls2 = _this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls2[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key1.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key1, _this._footerMoreControl.$panel, 'prepend');
|
|
11265
|
+
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls3 = _this.controls) == null ? void 0 : _this_controls3[key1]);
|
|
11241
11266
|
} else {
|
|
11242
11267
|
return;
|
|
11243
11268
|
}
|
|
@@ -11339,7 +11364,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11339
11364
|
var _this = this;
|
|
11340
11365
|
if (disabled === void 0) disabled = true;
|
|
11341
11366
|
PAUSE_DISABLED_BTN.forEach(function(btn) {
|
|
11342
|
-
|
|
11367
|
+
var _this_controls;
|
|
11368
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + btn + "Control"]) {
|
|
11343
11369
|
_this.controls["" + btn + "Control"].disabled = disabled;
|
|
11344
11370
|
}
|
|
11345
11371
|
});
|
|
@@ -11382,7 +11408,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11382
11408
|
'record',
|
|
11383
11409
|
'speed'
|
|
11384
11410
|
].forEach(function(key) {
|
|
11385
|
-
|
|
11411
|
+
var _this_controls;
|
|
11412
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11386
11413
|
_this.controls["" + key + "Control"].reset();
|
|
11387
11414
|
}
|
|
11388
11415
|
});
|
|
@@ -11395,12 +11422,14 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11395
11422
|
0,
|
|
11396
11423
|
180
|
|
11397
11424
|
].includes(this._orientationAngle)) {
|
|
11425
|
+
var _this_controls, _this_controls1;
|
|
11398
11426
|
// 全屏后 dom 节点旋转了 90度
|
|
11399
|
-
if (this.controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11400
|
-
if (this.controls.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11427
|
+
if ((_this_controls = this.controls) == null ? void 0 : _this_controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11428
|
+
if ((_this_controls1 = this.controls) == null ? void 0 : _this_controls1.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11401
11429
|
} else {
|
|
11402
|
-
|
|
11403
|
-
if (this.controls.
|
|
11430
|
+
var _this_controls2, _this_controls3;
|
|
11431
|
+
if ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.ptzControl) this.controls.ptzControl.isRotated = false;
|
|
11432
|
+
if ((_this_controls3 = this.controls) == null ? void 0 : _this_controls3.zoomControl) this.controls.zoomControl.isRotated = false;
|
|
11404
11433
|
}
|
|
11405
11434
|
}
|
|
11406
11435
|
};
|
|
@@ -11455,7 +11484,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11455
11484
|
'talk',
|
|
11456
11485
|
'record'
|
|
11457
11486
|
].forEach(function(key) {
|
|
11458
|
-
|
|
11487
|
+
var _this_controls;
|
|
11488
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11459
11489
|
_this.controls["" + key + "Control"].reset();
|
|
11460
11490
|
}
|
|
11461
11491
|
});
|
|
@@ -11812,6 +11842,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11812
11842
|
zh: zh,
|
|
11813
11843
|
en: en
|
|
11814
11844
|
};
|
|
11815
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11845
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.4';
|
|
11816
11846
|
|
|
11817
|
-
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume
|
|
11847
|
+
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|