@ezuikit/player-theme 2.0.0-beta.2 → 2.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/index.js +55 -35
- package/dist/index.mjs +55 -33
- package/dist/index.umd.js +594 -1158
- package/dist/style.css +3 -3
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +17 -14
- package/package.json +6 -6
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-18 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
|
* 主题控件相关
|
|
@@ -3805,6 +3804,13 @@ function _set_prototype_of$j(o, p) {
|
|
|
3805
3804
|
scale = wScale > hScale ? wScale : hScale;
|
|
3806
3805
|
}
|
|
3807
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
|
+
});
|
|
3808
3814
|
}
|
|
3809
3815
|
};
|
|
3810
3816
|
_proto.setScaleMode = function setScaleMode(scaleMode) {
|
|
@@ -4369,6 +4375,12 @@ function debounce(func, wait) {
|
|
|
4369
4375
|
theme.emit(EVENTS.control.recDestroy);
|
|
4370
4376
|
});
|
|
4371
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
|
+
}
|
|
4372
4384
|
}
|
|
4373
4385
|
var ignoreList = [
|
|
4374
4386
|
EVENTS.getOSDTime,
|
|
@@ -8354,10 +8366,6 @@ function _set_prototype_of$8(o, p) {
|
|
|
8354
8366
|
};
|
|
8355
8367
|
return _set_prototype_of$8(o, p);
|
|
8356
8368
|
}
|
|
8357
|
-
function _type_of(obj) {
|
|
8358
|
-
"@swc/helpers - typeof";
|
|
8359
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
8360
|
-
}
|
|
8361
8369
|
var DEFINITION_LEVELS_LOCALE = [
|
|
8362
8370
|
'VIDEO_LEVEL_FLUENT',
|
|
8363
8371
|
'VIDEO_LEVEL_STANDARD',
|
|
@@ -8451,7 +8459,7 @@ function __filter(list, locale) {
|
|
|
8451
8459
|
Select.prototype.updateOptions.call(_assert_this_initialized$1(_this), __filter(list, _this.locale));
|
|
8452
8460
|
});
|
|
8453
8461
|
_this.on(EVENTS.currentVideoLevel, function(item, realLevel) {
|
|
8454
|
-
var l =
|
|
8462
|
+
var l = typeof item === 'object' ? item.level : item;
|
|
8455
8463
|
_this._level = realLevel + '';
|
|
8456
8464
|
if (l === 'auto') {
|
|
8457
8465
|
var _options_locales_options_language;
|
|
@@ -9207,7 +9215,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9207
9215
|
* @param change 是否触发 onChange 事件
|
|
9208
9216
|
*/ _proto.setDate = function setDate(date, change) {
|
|
9209
9217
|
if (change === void 0) change = true;
|
|
9210
|
-
|
|
9218
|
+
var _this_dataPickerUtil;
|
|
9219
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
|
|
9211
9220
|
if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
|
|
9212
9221
|
this._value = DateTime.formate(date, 'YYYY-MM-DD');
|
|
9213
9222
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -9216,7 +9225,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9216
9225
|
}
|
|
9217
9226
|
};
|
|
9218
9227
|
_proto.reset = function reset() {
|
|
9219
|
-
|
|
9228
|
+
var _this_dataPickerUtil;
|
|
9229
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
9220
9230
|
Control.prototype.reset.call(this);
|
|
9221
9231
|
};
|
|
9222
9232
|
/**
|
|
@@ -9689,6 +9699,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9689
9699
|
*/ _proto.show = function show(playing, always) {
|
|
9690
9700
|
var _this = this;
|
|
9691
9701
|
var _this_$container_classList, _this_$container;
|
|
9702
|
+
if (!this.$container) return;
|
|
9692
9703
|
if (!this._firstFlag) {
|
|
9693
9704
|
this._firstFlag = true;
|
|
9694
9705
|
} else {
|
|
@@ -11006,7 +11017,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11006
11017
|
}));
|
|
11007
11018
|
_this._isRotated();
|
|
11008
11019
|
if (Utils.isMobile && !_this._isCurrentFullscreen) {
|
|
11009
|
-
|
|
11020
|
+
var _this_controls;
|
|
11021
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.ptzControl) _this.controls.ptzControl.reset();
|
|
11010
11022
|
}
|
|
11011
11023
|
}
|
|
11012
11024
|
});
|
|
@@ -11138,8 +11150,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11138
11150
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
11139
11151
|
var showHeaderMore = leftWidth + rightWidth + 30 > this._width;
|
|
11140
11152
|
if (showHeaderMore) {
|
|
11141
|
-
|
|
11142
|
-
|
|
11153
|
+
var _this_controls;
|
|
11154
|
+
if (!this._headerMoreControl && ((_this_controls = this.controls) == null ? void 0 : _this_controls.recControl)) {
|
|
11155
|
+
var _this_controls_recControl, _this_controls1;
|
|
11143
11156
|
this._headerMoreControl = new More({
|
|
11144
11157
|
language: this.options.language,
|
|
11145
11158
|
locales: this.i18n.translations,
|
|
@@ -11160,14 +11173,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11160
11173
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
11161
11174
|
}
|
|
11162
11175
|
});
|
|
11163
|
-
(
|
|
11176
|
+
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
11164
11177
|
}
|
|
11165
11178
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
11166
11179
|
} else if (this._width - leftWidth - rightWidth > 100) {
|
|
11180
|
+
var _this_controls2;
|
|
11167
11181
|
//
|
|
11168
|
-
if (this._headerMoreControl && this.controls.recControl) {
|
|
11169
|
-
var _this__header2, _this_controls_recControl1, _this__headerMoreControl;
|
|
11170
|
-
(
|
|
11182
|
+
if (this._headerMoreControl && ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.recControl)) {
|
|
11183
|
+
var _this__header2, _this_controls_recControl1, _this_controls3, _this__headerMoreControl;
|
|
11184
|
+
(_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);
|
|
11171
11185
|
(_this__headerMoreControl = this._headerMoreControl) == null ? void 0 : _this__headerMoreControl.destroy();
|
|
11172
11186
|
this._headerMoreControl = null;
|
|
11173
11187
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, false);
|
|
@@ -11217,7 +11231,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11217
11231
|
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) {
|
|
11218
11232
|
var _this__footerMoreControl;
|
|
11219
11233
|
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11220
|
-
|
|
11234
|
+
var _this_controls;
|
|
11235
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11221
11236
|
});
|
|
11222
11237
|
return index === -1;
|
|
11223
11238
|
});
|
|
@@ -11233,19 +11248,19 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11233
11248
|
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11234
11249
|
var item = _step.value;
|
|
11235
11250
|
if (item) {
|
|
11236
|
-
var _this_controls_key_resetPopupContainer, _this_controls_key, _this__footerMoreControl2;
|
|
11251
|
+
var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
|
|
11237
11252
|
var key = "" + item.iconId + "Control";
|
|
11238
|
-
(
|
|
11239
|
-
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, _this.controls[key]);
|
|
11253
|
+
(_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');
|
|
11254
|
+
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
|
|
11240
11255
|
}
|
|
11241
11256
|
}
|
|
11242
11257
|
} else if (_this._footerMoreControl) {
|
|
11243
11258
|
var item1 = list.pop();
|
|
11244
11259
|
if (item1) {
|
|
11245
|
-
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this__footerMoreControl3;
|
|
11260
|
+
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this_controls2, _this_controls3, _this__footerMoreControl3;
|
|
11246
11261
|
var key1 = "" + item1.iconId + "Control";
|
|
11247
|
-
(
|
|
11248
|
-
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, _this.controls[key1]);
|
|
11262
|
+
(_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');
|
|
11263
|
+
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls3 = _this.controls) == null ? void 0 : _this_controls3[key1]);
|
|
11249
11264
|
} else {
|
|
11250
11265
|
return;
|
|
11251
11266
|
}
|
|
@@ -11347,7 +11362,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11347
11362
|
var _this = this;
|
|
11348
11363
|
if (disabled === void 0) disabled = true;
|
|
11349
11364
|
PAUSE_DISABLED_BTN.forEach(function(btn) {
|
|
11350
|
-
|
|
11365
|
+
var _this_controls;
|
|
11366
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + btn + "Control"]) {
|
|
11351
11367
|
_this.controls["" + btn + "Control"].disabled = disabled;
|
|
11352
11368
|
}
|
|
11353
11369
|
});
|
|
@@ -11390,7 +11406,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11390
11406
|
'record',
|
|
11391
11407
|
'speed'
|
|
11392
11408
|
].forEach(function(key) {
|
|
11393
|
-
|
|
11409
|
+
var _this_controls;
|
|
11410
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11394
11411
|
_this.controls["" + key + "Control"].reset();
|
|
11395
11412
|
}
|
|
11396
11413
|
});
|
|
@@ -11403,12 +11420,14 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11403
11420
|
0,
|
|
11404
11421
|
180
|
|
11405
11422
|
].includes(this._orientationAngle)) {
|
|
11423
|
+
var _this_controls, _this_controls1;
|
|
11406
11424
|
// 全屏后 dom 节点旋转了 90度
|
|
11407
|
-
if (this.controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11408
|
-
if (this.controls.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11425
|
+
if ((_this_controls = this.controls) == null ? void 0 : _this_controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11426
|
+
if ((_this_controls1 = this.controls) == null ? void 0 : _this_controls1.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11409
11427
|
} else {
|
|
11410
|
-
|
|
11411
|
-
if (this.controls.
|
|
11428
|
+
var _this_controls2, _this_controls3;
|
|
11429
|
+
if ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.ptzControl) this.controls.ptzControl.isRotated = false;
|
|
11430
|
+
if ((_this_controls3 = this.controls) == null ? void 0 : _this_controls3.zoomControl) this.controls.zoomControl.isRotated = false;
|
|
11412
11431
|
}
|
|
11413
11432
|
}
|
|
11414
11433
|
};
|
|
@@ -11463,7 +11482,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11463
11482
|
'talk',
|
|
11464
11483
|
'record'
|
|
11465
11484
|
].forEach(function(key) {
|
|
11466
|
-
|
|
11485
|
+
var _this_controls;
|
|
11486
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11467
11487
|
_this.controls["" + key + "Control"].reset();
|
|
11468
11488
|
}
|
|
11469
11489
|
});
|
|
@@ -11820,7 +11840,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11820
11840
|
zh: zh,
|
|
11821
11841
|
en: en
|
|
11822
11842
|
};
|
|
11823
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11843
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.4';
|
|
11824
11844
|
|
|
11825
11845
|
exports.Control = Control;
|
|
11826
11846
|
exports.Fullscreen = Fullscreen;
|
|
@@ -11829,6 +11849,6 @@ exports.Message = Message;
|
|
|
11829
11849
|
exports.Play = Play;
|
|
11830
11850
|
exports.Poster = Poster;
|
|
11831
11851
|
exports.Rec = Rec;
|
|
11852
|
+
exports.Theme = Theme;
|
|
11832
11853
|
exports.Utils = Utils;
|
|
11833
11854
|
exports.Volume = Volume;
|
|
11834
|
-
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-18 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
|
* 主题控件相关
|
|
@@ -3801,6 +3802,13 @@ function _set_prototype_of$j(o, p) {
|
|
|
3801
3802
|
scale = wScale > hScale ? wScale : hScale;
|
|
3802
3803
|
}
|
|
3803
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
|
+
});
|
|
3804
3812
|
}
|
|
3805
3813
|
};
|
|
3806
3814
|
_proto.setScaleMode = function setScaleMode(scaleMode) {
|
|
@@ -4365,6 +4373,12 @@ function debounce(func, wait) {
|
|
|
4365
4373
|
theme.emit(EVENTS.control.recDestroy);
|
|
4366
4374
|
});
|
|
4367
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
|
+
}
|
|
4368
4382
|
}
|
|
4369
4383
|
var ignoreList = [
|
|
4370
4384
|
EVENTS.getOSDTime,
|
|
@@ -8350,10 +8364,6 @@ function _set_prototype_of$8(o, p) {
|
|
|
8350
8364
|
};
|
|
8351
8365
|
return _set_prototype_of$8(o, p);
|
|
8352
8366
|
}
|
|
8353
|
-
function _type_of(obj) {
|
|
8354
|
-
"@swc/helpers - typeof";
|
|
8355
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
8356
|
-
}
|
|
8357
8367
|
var DEFINITION_LEVELS_LOCALE = [
|
|
8358
8368
|
'VIDEO_LEVEL_FLUENT',
|
|
8359
8369
|
'VIDEO_LEVEL_STANDARD',
|
|
@@ -8447,7 +8457,7 @@ function __filter(list, locale) {
|
|
|
8447
8457
|
Select.prototype.updateOptions.call(_assert_this_initialized$1(_this), __filter(list, _this.locale));
|
|
8448
8458
|
});
|
|
8449
8459
|
_this.on(EVENTS.currentVideoLevel, function(item, realLevel) {
|
|
8450
|
-
var l =
|
|
8460
|
+
var l = typeof item === 'object' ? item.level : item;
|
|
8451
8461
|
_this._level = realLevel + '';
|
|
8452
8462
|
if (l === 'auto') {
|
|
8453
8463
|
var _options_locales_options_language;
|
|
@@ -9203,7 +9213,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9203
9213
|
* @param change 是否触发 onChange 事件
|
|
9204
9214
|
*/ _proto.setDate = function setDate(date, change) {
|
|
9205
9215
|
if (change === void 0) change = true;
|
|
9206
|
-
|
|
9216
|
+
var _this_dataPickerUtil;
|
|
9217
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
|
|
9207
9218
|
if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
|
|
9208
9219
|
this._value = DateTime.formate(date, 'YYYY-MM-DD');
|
|
9209
9220
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -9212,7 +9223,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9212
9223
|
}
|
|
9213
9224
|
};
|
|
9214
9225
|
_proto.reset = function reset() {
|
|
9215
|
-
|
|
9226
|
+
var _this_dataPickerUtil;
|
|
9227
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
9216
9228
|
Control.prototype.reset.call(this);
|
|
9217
9229
|
};
|
|
9218
9230
|
/**
|
|
@@ -9685,6 +9697,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9685
9697
|
*/ _proto.show = function show(playing, always) {
|
|
9686
9698
|
var _this = this;
|
|
9687
9699
|
var _this_$container_classList, _this_$container;
|
|
9700
|
+
if (!this.$container) return;
|
|
9688
9701
|
if (!this._firstFlag) {
|
|
9689
9702
|
this._firstFlag = true;
|
|
9690
9703
|
} else {
|
|
@@ -11002,7 +11015,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11002
11015
|
}));
|
|
11003
11016
|
_this._isRotated();
|
|
11004
11017
|
if (Utils.isMobile && !_this._isCurrentFullscreen) {
|
|
11005
|
-
|
|
11018
|
+
var _this_controls;
|
|
11019
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.ptzControl) _this.controls.ptzControl.reset();
|
|
11006
11020
|
}
|
|
11007
11021
|
}
|
|
11008
11022
|
});
|
|
@@ -11134,8 +11148,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11134
11148
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
11135
11149
|
var showHeaderMore = leftWidth + rightWidth + 30 > this._width;
|
|
11136
11150
|
if (showHeaderMore) {
|
|
11137
|
-
|
|
11138
|
-
|
|
11151
|
+
var _this_controls;
|
|
11152
|
+
if (!this._headerMoreControl && ((_this_controls = this.controls) == null ? void 0 : _this_controls.recControl)) {
|
|
11153
|
+
var _this_controls_recControl, _this_controls1;
|
|
11139
11154
|
this._headerMoreControl = new More({
|
|
11140
11155
|
language: this.options.language,
|
|
11141
11156
|
locales: this.i18n.translations,
|
|
@@ -11156,14 +11171,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11156
11171
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
11157
11172
|
}
|
|
11158
11173
|
});
|
|
11159
|
-
(
|
|
11174
|
+
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
11160
11175
|
}
|
|
11161
11176
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
11162
11177
|
} else if (this._width - leftWidth - rightWidth > 100) {
|
|
11178
|
+
var _this_controls2;
|
|
11163
11179
|
//
|
|
11164
|
-
if (this._headerMoreControl && this.controls.recControl) {
|
|
11165
|
-
var _this__header2, _this_controls_recControl1, _this__headerMoreControl;
|
|
11166
|
-
(
|
|
11180
|
+
if (this._headerMoreControl && ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.recControl)) {
|
|
11181
|
+
var _this__header2, _this_controls_recControl1, _this_controls3, _this__headerMoreControl;
|
|
11182
|
+
(_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
11183
|
(_this__headerMoreControl = this._headerMoreControl) == null ? void 0 : _this__headerMoreControl.destroy();
|
|
11168
11184
|
this._headerMoreControl = null;
|
|
11169
11185
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, false);
|
|
@@ -11213,7 +11229,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11213
11229
|
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
11230
|
var _this__footerMoreControl;
|
|
11215
11231
|
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11216
|
-
|
|
11232
|
+
var _this_controls;
|
|
11233
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11217
11234
|
});
|
|
11218
11235
|
return index === -1;
|
|
11219
11236
|
});
|
|
@@ -11229,19 +11246,19 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11229
11246
|
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11230
11247
|
var item = _step.value;
|
|
11231
11248
|
if (item) {
|
|
11232
|
-
var _this_controls_key_resetPopupContainer, _this_controls_key, _this__footerMoreControl2;
|
|
11249
|
+
var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
|
|
11233
11250
|
var key = "" + item.iconId + "Control";
|
|
11234
|
-
(
|
|
11235
|
-
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, _this.controls[key]);
|
|
11251
|
+
(_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');
|
|
11252
|
+
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
|
|
11236
11253
|
}
|
|
11237
11254
|
}
|
|
11238
11255
|
} else if (_this._footerMoreControl) {
|
|
11239
11256
|
var item1 = list.pop();
|
|
11240
11257
|
if (item1) {
|
|
11241
|
-
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this__footerMoreControl3;
|
|
11258
|
+
var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this_controls2, _this_controls3, _this__footerMoreControl3;
|
|
11242
11259
|
var key1 = "" + item1.iconId + "Control";
|
|
11243
|
-
(
|
|
11244
|
-
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, _this.controls[key1]);
|
|
11260
|
+
(_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');
|
|
11261
|
+
(_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls3 = _this.controls) == null ? void 0 : _this_controls3[key1]);
|
|
11245
11262
|
} else {
|
|
11246
11263
|
return;
|
|
11247
11264
|
}
|
|
@@ -11343,7 +11360,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11343
11360
|
var _this = this;
|
|
11344
11361
|
if (disabled === void 0) disabled = true;
|
|
11345
11362
|
PAUSE_DISABLED_BTN.forEach(function(btn) {
|
|
11346
|
-
|
|
11363
|
+
var _this_controls;
|
|
11364
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + btn + "Control"]) {
|
|
11347
11365
|
_this.controls["" + btn + "Control"].disabled = disabled;
|
|
11348
11366
|
}
|
|
11349
11367
|
});
|
|
@@ -11386,7 +11404,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11386
11404
|
'record',
|
|
11387
11405
|
'speed'
|
|
11388
11406
|
].forEach(function(key) {
|
|
11389
|
-
|
|
11407
|
+
var _this_controls;
|
|
11408
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11390
11409
|
_this.controls["" + key + "Control"].reset();
|
|
11391
11410
|
}
|
|
11392
11411
|
});
|
|
@@ -11399,12 +11418,14 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11399
11418
|
0,
|
|
11400
11419
|
180
|
|
11401
11420
|
].includes(this._orientationAngle)) {
|
|
11421
|
+
var _this_controls, _this_controls1;
|
|
11402
11422
|
// 全屏后 dom 节点旋转了 90度
|
|
11403
|
-
if (this.controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11404
|
-
if (this.controls.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11423
|
+
if ((_this_controls = this.controls) == null ? void 0 : _this_controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11424
|
+
if ((_this_controls1 = this.controls) == null ? void 0 : _this_controls1.zoomControl) this.controls.zoomControl.isRotated = true;
|
|
11405
11425
|
} else {
|
|
11406
|
-
|
|
11407
|
-
if (this.controls.
|
|
11426
|
+
var _this_controls2, _this_controls3;
|
|
11427
|
+
if ((_this_controls2 = this.controls) == null ? void 0 : _this_controls2.ptzControl) this.controls.ptzControl.isRotated = false;
|
|
11428
|
+
if ((_this_controls3 = this.controls) == null ? void 0 : _this_controls3.zoomControl) this.controls.zoomControl.isRotated = false;
|
|
11408
11429
|
}
|
|
11409
11430
|
}
|
|
11410
11431
|
};
|
|
@@ -11459,7 +11480,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11459
11480
|
'talk',
|
|
11460
11481
|
'record'
|
|
11461
11482
|
].forEach(function(key) {
|
|
11462
|
-
|
|
11483
|
+
var _this_controls;
|
|
11484
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11463
11485
|
_this.controls["" + key + "Control"].reset();
|
|
11464
11486
|
}
|
|
11465
11487
|
});
|
|
@@ -11816,6 +11838,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11816
11838
|
zh: zh,
|
|
11817
11839
|
en: en
|
|
11818
11840
|
};
|
|
11819
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11841
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.4';
|
|
11820
11842
|
|
|
11821
|
-
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Utils, Volume
|
|
11843
|
+
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|