@ezuikit/player-theme 2.0.0-beta.2 → 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 +54 -30
- package/dist/index.mjs +54 -28
- package/dist/index.umd.js +593 -1153
- package/dist/style.css +1 -1
- 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-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
|
* 主题控件相关
|
|
@@ -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,
|
|
@@ -9207,7 +9219,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9207
9219
|
* @param change 是否触发 onChange 事件
|
|
9208
9220
|
*/ _proto.setDate = function setDate(date, change) {
|
|
9209
9221
|
if (change === void 0) change = true;
|
|
9210
|
-
|
|
9222
|
+
var _this_dataPickerUtil;
|
|
9223
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
|
|
9211
9224
|
if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
|
|
9212
9225
|
this._value = DateTime.formate(date, 'YYYY-MM-DD');
|
|
9213
9226
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -9216,7 +9229,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9216
9229
|
}
|
|
9217
9230
|
};
|
|
9218
9231
|
_proto.reset = function reset() {
|
|
9219
|
-
|
|
9232
|
+
var _this_dataPickerUtil;
|
|
9233
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
9220
9234
|
Control.prototype.reset.call(this);
|
|
9221
9235
|
};
|
|
9222
9236
|
/**
|
|
@@ -9689,6 +9703,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9689
9703
|
*/ _proto.show = function show(playing, always) {
|
|
9690
9704
|
var _this = this;
|
|
9691
9705
|
var _this_$container_classList, _this_$container;
|
|
9706
|
+
if (!this.$container) return;
|
|
9692
9707
|
if (!this._firstFlag) {
|
|
9693
9708
|
this._firstFlag = true;
|
|
9694
9709
|
} else {
|
|
@@ -11006,7 +11021,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11006
11021
|
}));
|
|
11007
11022
|
_this._isRotated();
|
|
11008
11023
|
if (Utils.isMobile && !_this._isCurrentFullscreen) {
|
|
11009
|
-
|
|
11024
|
+
var _this_controls;
|
|
11025
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.ptzControl) _this.controls.ptzControl.reset();
|
|
11010
11026
|
}
|
|
11011
11027
|
}
|
|
11012
11028
|
});
|
|
@@ -11138,8 +11154,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11138
11154
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
11139
11155
|
var showHeaderMore = leftWidth + rightWidth + 30 > this._width;
|
|
11140
11156
|
if (showHeaderMore) {
|
|
11141
|
-
|
|
11142
|
-
|
|
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;
|
|
11143
11160
|
this._headerMoreControl = new More({
|
|
11144
11161
|
language: this.options.language,
|
|
11145
11162
|
locales: this.i18n.translations,
|
|
@@ -11160,14 +11177,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11160
11177
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
11161
11178
|
}
|
|
11162
11179
|
});
|
|
11163
|
-
(
|
|
11180
|
+
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
11164
11181
|
}
|
|
11165
11182
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
11166
11183
|
} else if (this._width - leftWidth - rightWidth > 100) {
|
|
11184
|
+
var _this_controls2;
|
|
11167
11185
|
//
|
|
11168
|
-
if (this._headerMoreControl && this.controls.recControl) {
|
|
11169
|
-
var _this__header2, _this_controls_recControl1, _this__headerMoreControl;
|
|
11170
|
-
(
|
|
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);
|
|
11171
11189
|
(_this__headerMoreControl = this._headerMoreControl) == null ? void 0 : _this__headerMoreControl.destroy();
|
|
11172
11190
|
this._headerMoreControl = null;
|
|
11173
11191
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, false);
|
|
@@ -11217,7 +11235,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11217
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) {
|
|
11218
11236
|
var _this__footerMoreControl;
|
|
11219
11237
|
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11220
|
-
|
|
11238
|
+
var _this_controls;
|
|
11239
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11221
11240
|
});
|
|
11222
11241
|
return index === -1;
|
|
11223
11242
|
});
|
|
@@ -11233,19 +11252,19 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11233
11252
|
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11234
11253
|
var item = _step.value;
|
|
11235
11254
|
if (item) {
|
|
11236
|
-
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;
|
|
11237
11256
|
var key = "" + item.iconId + "Control";
|
|
11238
|
-
(
|
|
11239
|
-
(_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]);
|
|
11240
11259
|
}
|
|
11241
11260
|
}
|
|
11242
11261
|
} else if (_this._footerMoreControl) {
|
|
11243
11262
|
var item1 = list.pop();
|
|
11244
11263
|
if (item1) {
|
|
11245
|
-
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;
|
|
11246
11265
|
var key1 = "" + item1.iconId + "Control";
|
|
11247
|
-
(
|
|
11248
|
-
(_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]);
|
|
11249
11268
|
} else {
|
|
11250
11269
|
return;
|
|
11251
11270
|
}
|
|
@@ -11347,7 +11366,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11347
11366
|
var _this = this;
|
|
11348
11367
|
if (disabled === void 0) disabled = true;
|
|
11349
11368
|
PAUSE_DISABLED_BTN.forEach(function(btn) {
|
|
11350
|
-
|
|
11369
|
+
var _this_controls;
|
|
11370
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + btn + "Control"]) {
|
|
11351
11371
|
_this.controls["" + btn + "Control"].disabled = disabled;
|
|
11352
11372
|
}
|
|
11353
11373
|
});
|
|
@@ -11390,7 +11410,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11390
11410
|
'record',
|
|
11391
11411
|
'speed'
|
|
11392
11412
|
].forEach(function(key) {
|
|
11393
|
-
|
|
11413
|
+
var _this_controls;
|
|
11414
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11394
11415
|
_this.controls["" + key + "Control"].reset();
|
|
11395
11416
|
}
|
|
11396
11417
|
});
|
|
@@ -11403,12 +11424,14 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11403
11424
|
0,
|
|
11404
11425
|
180
|
|
11405
11426
|
].includes(this._orientationAngle)) {
|
|
11427
|
+
var _this_controls, _this_controls1;
|
|
11406
11428
|
// 全屏后 dom 节点旋转了 90度
|
|
11407
|
-
if (this.controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11408
|
-
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;
|
|
11409
11431
|
} else {
|
|
11410
|
-
|
|
11411
|
-
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;
|
|
11412
11435
|
}
|
|
11413
11436
|
}
|
|
11414
11437
|
};
|
|
@@ -11463,7 +11486,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11463
11486
|
'talk',
|
|
11464
11487
|
'record'
|
|
11465
11488
|
].forEach(function(key) {
|
|
11466
|
-
|
|
11489
|
+
var _this_controls;
|
|
11490
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11467
11491
|
_this.controls["" + key + "Control"].reset();
|
|
11468
11492
|
}
|
|
11469
11493
|
});
|
|
@@ -11820,7 +11844,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11820
11844
|
zh: zh,
|
|
11821
11845
|
en: en
|
|
11822
11846
|
};
|
|
11823
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11847
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.4';
|
|
11824
11848
|
|
|
11825
11849
|
exports.Control = Control;
|
|
11826
11850
|
exports.Fullscreen = Fullscreen;
|
|
@@ -11829,6 +11853,6 @@ exports.Message = Message;
|
|
|
11829
11853
|
exports.Play = Play;
|
|
11830
11854
|
exports.Poster = Poster;
|
|
11831
11855
|
exports.Rec = Rec;
|
|
11856
|
+
exports.Theme = Theme;
|
|
11832
11857
|
exports.Utils = Utils;
|
|
11833
11858
|
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-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
|
* 主题控件相关
|
|
@@ -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,
|
|
@@ -9203,7 +9217,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9203
9217
|
* @param change 是否触发 onChange 事件
|
|
9204
9218
|
*/ _proto.setDate = function setDate(date, change) {
|
|
9205
9219
|
if (change === void 0) change = true;
|
|
9206
|
-
|
|
9220
|
+
var _this_dataPickerUtil;
|
|
9221
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.setDate(date, change);
|
|
9207
9222
|
if (date && !change && this._value !== DateTime.formate(date, 'YYYY-MM-DD')) {
|
|
9208
9223
|
this._value = DateTime.formate(date, 'YYYY-MM-DD');
|
|
9209
9224
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -9212,7 +9227,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
9212
9227
|
}
|
|
9213
9228
|
};
|
|
9214
9229
|
_proto.reset = function reset() {
|
|
9215
|
-
|
|
9230
|
+
var _this_dataPickerUtil;
|
|
9231
|
+
(_this_dataPickerUtil = this.dataPickerUtil) == null ? void 0 : _this_dataPickerUtil.hide();
|
|
9216
9232
|
Control.prototype.reset.call(this);
|
|
9217
9233
|
};
|
|
9218
9234
|
/**
|
|
@@ -9685,6 +9701,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9685
9701
|
*/ _proto.show = function show(playing, always) {
|
|
9686
9702
|
var _this = this;
|
|
9687
9703
|
var _this_$container_classList, _this_$container;
|
|
9704
|
+
if (!this.$container) return;
|
|
9688
9705
|
if (!this._firstFlag) {
|
|
9689
9706
|
this._firstFlag = true;
|
|
9690
9707
|
} else {
|
|
@@ -11002,7 +11019,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11002
11019
|
}));
|
|
11003
11020
|
_this._isRotated();
|
|
11004
11021
|
if (Utils.isMobile && !_this._isCurrentFullscreen) {
|
|
11005
|
-
|
|
11022
|
+
var _this_controls;
|
|
11023
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.ptzControl) _this.controls.ptzControl.reset();
|
|
11006
11024
|
}
|
|
11007
11025
|
}
|
|
11008
11026
|
});
|
|
@@ -11134,8 +11152,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11134
11152
|
// 如果 header more 存在,则偏移量量宽度为 150,否则为 100, 因为隐藏多个控件时 right 会变短
|
|
11135
11153
|
var showHeaderMore = leftWidth + rightWidth + 30 > this._width;
|
|
11136
11154
|
if (showHeaderMore) {
|
|
11137
|
-
|
|
11138
|
-
|
|
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;
|
|
11139
11158
|
this._headerMoreControl = new More({
|
|
11140
11159
|
language: this.options.language,
|
|
11141
11160
|
locales: this.i18n.translations,
|
|
@@ -11156,14 +11175,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11156
11175
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
11157
11176
|
}
|
|
11158
11177
|
});
|
|
11159
|
-
(
|
|
11178
|
+
(_this_controls1 = this.controls) == null ? void 0 : (_this_controls_recControl = _this_controls1.recControl) == null ? void 0 : _this_controls_recControl.resetPopupContainer(this._headerMoreControl.$panel);
|
|
11160
11179
|
}
|
|
11161
11180
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, showHeaderMore);
|
|
11162
11181
|
} else if (this._width - leftWidth - rightWidth > 100) {
|
|
11182
|
+
var _this_controls2;
|
|
11163
11183
|
//
|
|
11164
|
-
if (this._headerMoreControl && this.controls.recControl) {
|
|
11165
|
-
var _this__header2, _this_controls_recControl1, _this__headerMoreControl;
|
|
11166
|
-
(
|
|
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);
|
|
11167
11187
|
(_this__headerMoreControl = this._headerMoreControl) == null ? void 0 : _this__headerMoreControl.destroy();
|
|
11168
11188
|
this._headerMoreControl = null;
|
|
11169
11189
|
this.emit(Theme.EVENTS.control.headerMoreShowControlsChange, false);
|
|
@@ -11213,7 +11233,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11213
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) {
|
|
11214
11234
|
var _this__footerMoreControl;
|
|
11215
11235
|
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11216
|
-
|
|
11236
|
+
var _this_controls;
|
|
11237
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11217
11238
|
});
|
|
11218
11239
|
return index === -1;
|
|
11219
11240
|
});
|
|
@@ -11229,19 +11250,19 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11229
11250
|
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11230
11251
|
var item = _step.value;
|
|
11231
11252
|
if (item) {
|
|
11232
|
-
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;
|
|
11233
11254
|
var key = "" + item.iconId + "Control";
|
|
11234
|
-
(
|
|
11235
|
-
(_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]);
|
|
11236
11257
|
}
|
|
11237
11258
|
}
|
|
11238
11259
|
} else if (_this._footerMoreControl) {
|
|
11239
11260
|
var item1 = list.pop();
|
|
11240
11261
|
if (item1) {
|
|
11241
|
-
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;
|
|
11242
11263
|
var key1 = "" + item1.iconId + "Control";
|
|
11243
|
-
(
|
|
11244
|
-
(_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]);
|
|
11245
11266
|
} else {
|
|
11246
11267
|
return;
|
|
11247
11268
|
}
|
|
@@ -11343,7 +11364,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11343
11364
|
var _this = this;
|
|
11344
11365
|
if (disabled === void 0) disabled = true;
|
|
11345
11366
|
PAUSE_DISABLED_BTN.forEach(function(btn) {
|
|
11346
|
-
|
|
11367
|
+
var _this_controls;
|
|
11368
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + btn + "Control"]) {
|
|
11347
11369
|
_this.controls["" + btn + "Control"].disabled = disabled;
|
|
11348
11370
|
}
|
|
11349
11371
|
});
|
|
@@ -11386,7 +11408,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11386
11408
|
'record',
|
|
11387
11409
|
'speed'
|
|
11388
11410
|
].forEach(function(key) {
|
|
11389
|
-
|
|
11411
|
+
var _this_controls;
|
|
11412
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11390
11413
|
_this.controls["" + key + "Control"].reset();
|
|
11391
11414
|
}
|
|
11392
11415
|
});
|
|
@@ -11399,12 +11422,14 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11399
11422
|
0,
|
|
11400
11423
|
180
|
|
11401
11424
|
].includes(this._orientationAngle)) {
|
|
11425
|
+
var _this_controls, _this_controls1;
|
|
11402
11426
|
// 全屏后 dom 节点旋转了 90度
|
|
11403
|
-
if (this.controls.ptzControl) this.controls.ptzControl.isRotated = true;
|
|
11404
|
-
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;
|
|
11405
11429
|
} else {
|
|
11406
|
-
|
|
11407
|
-
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;
|
|
11408
11433
|
}
|
|
11409
11434
|
}
|
|
11410
11435
|
};
|
|
@@ -11459,7 +11484,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11459
11484
|
'talk',
|
|
11460
11485
|
'record'
|
|
11461
11486
|
].forEach(function(key) {
|
|
11462
|
-
|
|
11487
|
+
var _this_controls;
|
|
11488
|
+
if ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + key + "Control"]) {
|
|
11463
11489
|
_this.controls["" + key + "Control"].reset();
|
|
11464
11490
|
}
|
|
11465
11491
|
});
|
|
@@ -11816,6 +11842,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11816
11842
|
zh: zh,
|
|
11817
11843
|
en: en
|
|
11818
11844
|
};
|
|
11819
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.
|
|
11845
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.0-beta.4';
|
|
11820
11846
|
|
|
11821
|
-
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Utils, Volume
|
|
11847
|
+
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|