@ezuikit/player-theme 2.0.1 → 2.0.2-beta.10
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 +78 -51
- package/dist/index.mjs +78 -51
- package/dist/index.umd.js +119 -73
- package/dist/style.css +3 -3
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +2 -1
- package/package.json +8 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.2-beta.10
|
|
3
|
+
* Copyright (c) 2025-12-13 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -271,9 +271,14 @@ function _set_prototype_of$r(o, p) {
|
|
|
271
271
|
function Control(options) {
|
|
272
272
|
var _this;
|
|
273
273
|
var _this___options;
|
|
274
|
-
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false;
|
|
274
|
+
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false, _this._camelCaseName = '';
|
|
275
275
|
_this.__options = options;
|
|
276
276
|
_this.locale = getLocale(_this.__options.locales, _this.__options.language);
|
|
277
|
+
_this._camelCaseName = _this.__options.classNameSuffix ? _this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
278
|
+
return c ? c.toUpperCase() : '';
|
|
279
|
+
}).replace(/^(.)/, function(first) {
|
|
280
|
+
return first.toLowerCase();
|
|
281
|
+
}) : '';
|
|
277
282
|
_this.$container = document.createElement(options.tagName || 'span');
|
|
278
283
|
_this.$container.classList.add("" + PREFIX_CLASS + "-control"); // 默认隐藏
|
|
279
284
|
if ((options == null ? void 0 : options.controlType) === 'text') {
|
|
@@ -432,19 +437,6 @@ function _set_prototype_of$r(o, p) {
|
|
|
432
437
|
this._disabled = disabled;
|
|
433
438
|
this._updateDisabledState(disabled);
|
|
434
439
|
}
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
key: "_camelCaseName",
|
|
438
|
-
get: function get() {
|
|
439
|
-
if (this.__options.classNameSuffix) {
|
|
440
|
-
return this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
441
|
-
return c ? c.toUpperCase() : '';
|
|
442
|
-
}).replace(/^(.)/, function(first) {
|
|
443
|
-
return first.toLowerCase();
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
448
440
|
}
|
|
449
441
|
]);
|
|
450
442
|
return Control;
|
|
@@ -4065,11 +4057,11 @@ function debounce(func, wait) {
|
|
|
4065
4057
|
// 对讲
|
|
4066
4058
|
// =======================================================
|
|
4067
4059
|
theme.on(EVENTS.talkingChange, function(talking) {
|
|
4068
|
-
var _theme_controls_talkControl,
|
|
4060
|
+
var _theme_controls, _theme_controls_talkControl, _theme_controls1;
|
|
4069
4061
|
theme._talking = talking;
|
|
4070
|
-
if (talking !== ((
|
|
4071
|
-
var _theme_controls_talkControl1,
|
|
4072
|
-
(
|
|
4062
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.talkControl) && talking !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
|
|
4063
|
+
var _theme_controls_talkControl1, _theme_controls2;
|
|
4064
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
|
|
4073
4065
|
}
|
|
4074
4066
|
});
|
|
4075
4067
|
theme.on(EVENTS.talkVolumeChange, function(value) {
|
|
@@ -4080,9 +4072,9 @@ function debounce(func, wait) {
|
|
|
4080
4072
|
// 录制
|
|
4081
4073
|
// =======================================================
|
|
4082
4074
|
theme.on(EVENTS.recordingChange, function(recording) {
|
|
4083
|
-
var _theme_controls_recordControl,
|
|
4075
|
+
var _theme_controls, _theme_controls_recordControl, _theme_controls1;
|
|
4084
4076
|
theme._recording = recording;
|
|
4085
|
-
if (recording !== ((
|
|
4077
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recordControl) && recording !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recordControl = _theme_controls1.recordControl) == null ? void 0 : _theme_controls_recordControl.active)) theme.controls.recordControl.active = recording;
|
|
4086
4078
|
});
|
|
4087
4079
|
// =======================================================
|
|
4088
4080
|
// 清晰度
|
|
@@ -4099,14 +4091,14 @@ function debounce(func, wait) {
|
|
|
4099
4091
|
// 放大
|
|
4100
4092
|
// =======================================================
|
|
4101
4093
|
theme.on(EVENTS.zoomingChange, function(zooming) {
|
|
4102
|
-
var _theme_controls_zoomControl1,
|
|
4103
|
-
if (((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 =
|
|
4094
|
+
var _theme_controls1, _theme_controls_zoomControl1, _theme_controls2;
|
|
4095
|
+
if (((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.zoomControl) && ((_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls2.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
|
|
4104
4096
|
theme.controls.zoomControl.active = zooming;
|
|
4105
4097
|
}
|
|
4106
4098
|
});
|
|
4107
4099
|
theme.on(EVENTS.zoomChange, function(zoom) {
|
|
4108
|
-
var _theme_controls_zoomControl,
|
|
4109
|
-
if (((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_zoomControl =
|
|
4100
|
+
var _theme_controls, _theme_controls_zoomControl, _theme_controls1;
|
|
4101
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.zoomControl) && ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
|
|
4110
4102
|
theme.controls.zoomControl.value = zoom;
|
|
4111
4103
|
}
|
|
4112
4104
|
});
|
|
@@ -4132,29 +4124,33 @@ function debounce(func, wait) {
|
|
|
4132
4124
|
// 全屏
|
|
4133
4125
|
// =======================================================
|
|
4134
4126
|
theme == null ? void 0 : theme.on(EVENTS.fullscreenChange, function(info) {
|
|
4135
|
-
if (
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4127
|
+
if (theme.zoomUtil) {
|
|
4128
|
+
if ([
|
|
4129
|
+
0,
|
|
4130
|
+
180
|
|
4131
|
+
].includes(theme.orientationAngle) && info.isMobile && info.isCurrentFullscreen) {
|
|
4132
|
+
var // 代表移动端播放内容节点被旋转了 90度
|
|
4133
|
+
_theme_zoomUtil_setTransform, _theme_zoomUtil;
|
|
4134
|
+
(_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
|
|
4135
|
+
} else {
|
|
4136
|
+
var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
|
|
4137
|
+
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
4138
|
+
}
|
|
4145
4139
|
}
|
|
4146
4140
|
});
|
|
4147
4141
|
theme == null ? void 0 : theme.on(EVENTS.orientationChange, function(angle) {
|
|
4148
|
-
if (
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4142
|
+
if (theme.zoomUtil) {
|
|
4143
|
+
if ([
|
|
4144
|
+
0,
|
|
4145
|
+
180
|
|
4146
|
+
].includes(angle) && Utils.isMobile && theme.isCurrentFullscreen) {
|
|
4147
|
+
var // 代表移动端播放内容节点被旋转了 90度
|
|
4148
|
+
_theme_zoomUtil_setTransform, _theme_zoomUtil;
|
|
4149
|
+
(_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
|
|
4150
|
+
} else {
|
|
4151
|
+
var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
|
|
4152
|
+
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
4153
|
+
}
|
|
4158
4154
|
}
|
|
4159
4155
|
});
|
|
4160
4156
|
// 日期选择器
|
|
@@ -4341,13 +4337,16 @@ function debounce(func, wait) {
|
|
|
4341
4337
|
// prettier-ignore
|
|
4342
4338
|
theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
|
|
4343
4339
|
if (theme.recType !== type) {
|
|
4344
|
-
var _theme__headerMoreControl;
|
|
4340
|
+
var _theme__headerMoreControl, _theme_controls;
|
|
4345
4341
|
theme.recType = type;
|
|
4346
4342
|
theme.emit(EVENTS.control.recTypeChange, type);
|
|
4347
4343
|
// theme.emit(EVENTS.recTypeChange, type);
|
|
4348
4344
|
if ((_theme__headerMoreControl = theme._headerMoreControl) == null ? void 0 : _theme__headerMoreControl.picker) {
|
|
4349
4345
|
theme._headerMoreControl.picker.open = false;
|
|
4350
4346
|
}
|
|
4347
|
+
if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.speedControl) {
|
|
4348
|
+
theme.controls.speedControl.emit(EVENTS.control.recTypeChange, type);
|
|
4349
|
+
}
|
|
4351
4350
|
}
|
|
4352
4351
|
});
|
|
4353
4352
|
theme.controls.recControl.on(EVENTS.control.recDestroy, function() {
|
|
@@ -8540,7 +8539,9 @@ var SUPPORT_SPEED = [
|
|
|
8540
8539
|
0.5,
|
|
8541
8540
|
1,
|
|
8542
8541
|
2,
|
|
8543
|
-
4
|
|
8542
|
+
4,
|
|
8543
|
+
8,
|
|
8544
|
+
16
|
|
8544
8545
|
]; // 8, 16
|
|
8545
8546
|
var SPEED_DEFAULT_OPTIONS = {
|
|
8546
8547
|
/**
|
|
@@ -8587,12 +8588,35 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8587
8588
|
_assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
|
|
8588
8589
|
}
|
|
8589
8590
|
})) || this;
|
|
8591
|
+
_this._filterSpeedList(options.list, options.props.recType);
|
|
8590
8592
|
_this.on(EVENTS.speedChange, function(speed) {
|
|
8591
8593
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
8592
8594
|
});
|
|
8595
|
+
_this.on(EVENTS.control.recTypeChange, function(type) {
|
|
8596
|
+
_this._filterSpeedList(options.list, type);
|
|
8597
|
+
});
|
|
8593
8598
|
return _this;
|
|
8594
8599
|
}
|
|
8595
8600
|
var _proto = Speed.prototype;
|
|
8601
|
+
/**
|
|
8602
|
+
* 滤掉本地回放不支持的倍速
|
|
8603
|
+
* @param optionsList 初始化配置倍速列表
|
|
8604
|
+
* @param type 回放类型
|
|
8605
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
8606
|
+
if (!optionsList) {
|
|
8607
|
+
// 非用户自定义
|
|
8608
|
+
if (type === 'rec') {
|
|
8609
|
+
// 本地回放 不支持 8 16 32 倍速
|
|
8610
|
+
var list = this.list.filter(function(item) {
|
|
8611
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8612
|
+
});
|
|
8613
|
+
this.updateOptions(list);
|
|
8614
|
+
} else {
|
|
8615
|
+
// 云端回放 支持 8 16 32 倍速
|
|
8616
|
+
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
8617
|
+
}
|
|
8618
|
+
}
|
|
8619
|
+
};
|
|
8596
8620
|
_proto.reset = function reset(hide) {
|
|
8597
8621
|
this.value = 1 + '';
|
|
8598
8622
|
Select.prototype.reset.call(this, hide);
|
|
@@ -8686,11 +8710,13 @@ function _set_prototype_of$6(o, p) {
|
|
|
8686
8710
|
badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
|
|
8687
8711
|
language: this.options.language === 'zh' ? 'zh' : 'en',
|
|
8688
8712
|
current: new Date(this._value + ' 00:00:00'),
|
|
8713
|
+
placement: 'tr',
|
|
8714
|
+
triggerClose: true,
|
|
8689
8715
|
disabledDate: function(date) {
|
|
8690
8716
|
return date.getTime() > (_this.options.maxDate || new Date()).getTime();
|
|
8691
8717
|
},
|
|
8692
|
-
|
|
8693
|
-
onOk: function(date,
|
|
8718
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8719
|
+
onOk: function(date, _mode) {
|
|
8694
8720
|
if (date && _this._value !== require$$1.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
|
|
8695
8721
|
_this._value = require$$1.DateTime.format(date, 'YYYY-MM-DD');
|
|
8696
8722
|
_this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
|
|
@@ -10389,6 +10415,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10389
10415
|
this._themeData = null;
|
|
10390
10416
|
if (this.i18n) this.i18n = null;
|
|
10391
10417
|
this.recType = '';
|
|
10418
|
+
this.recMonth = []; // 清空数据
|
|
10392
10419
|
this.emit(EVENTS.theme.destroyed);
|
|
10393
10420
|
this.removeAllListeners();
|
|
10394
10421
|
if (this.logger) this.logger = null;
|
|
@@ -11354,7 +11381,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11354
11381
|
zh: zh,
|
|
11355
11382
|
en: en
|
|
11356
11383
|
};
|
|
11357
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.
|
|
11384
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.10';
|
|
11358
11385
|
|
|
11359
11386
|
exports.Control = Control;
|
|
11360
11387
|
exports.Fullscreen = Fullscreen;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.2-beta.10
|
|
3
|
+
* Copyright (c) 2025-12-13 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -269,9 +269,14 @@ function _set_prototype_of$r(o, p) {
|
|
|
269
269
|
function Control(options) {
|
|
270
270
|
var _this;
|
|
271
271
|
var _this___options;
|
|
272
|
-
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false;
|
|
272
|
+
_this = EventEmitter.call(this) || this, /** 具体语言对应的值 */ _this.locale = null, _this.__options = {}, _this._disabled = false, _this._active = false, _this._camelCaseName = '';
|
|
273
273
|
_this.__options = options;
|
|
274
274
|
_this.locale = getLocale(_this.__options.locales, _this.__options.language);
|
|
275
|
+
_this._camelCaseName = _this.__options.classNameSuffix ? _this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
276
|
+
return c ? c.toUpperCase() : '';
|
|
277
|
+
}).replace(/^(.)/, function(first) {
|
|
278
|
+
return first.toLowerCase();
|
|
279
|
+
}) : '';
|
|
275
280
|
_this.$container = document.createElement(options.tagName || 'span');
|
|
276
281
|
_this.$container.classList.add("" + PREFIX_CLASS + "-control"); // 默认隐藏
|
|
277
282
|
if ((options == null ? void 0 : options.controlType) === 'text') {
|
|
@@ -430,19 +435,6 @@ function _set_prototype_of$r(o, p) {
|
|
|
430
435
|
this._disabled = disabled;
|
|
431
436
|
this._updateDisabledState(disabled);
|
|
432
437
|
}
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
key: "_camelCaseName",
|
|
436
|
-
get: function get() {
|
|
437
|
-
if (this.__options.classNameSuffix) {
|
|
438
|
-
return this.__options.classNameSuffix.replace(/[-_\s]+(.)?/g, function(_, c) {
|
|
439
|
-
return c ? c.toUpperCase() : '';
|
|
440
|
-
}).replace(/^(.)/, function(first) {
|
|
441
|
-
return first.toLowerCase();
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
return null;
|
|
445
|
-
}
|
|
446
438
|
}
|
|
447
439
|
]);
|
|
448
440
|
return Control;
|
|
@@ -4063,11 +4055,11 @@ function debounce(func, wait) {
|
|
|
4063
4055
|
// 对讲
|
|
4064
4056
|
// =======================================================
|
|
4065
4057
|
theme.on(EVENTS.talkingChange, function(talking) {
|
|
4066
|
-
var _theme_controls_talkControl,
|
|
4058
|
+
var _theme_controls, _theme_controls_talkControl, _theme_controls1;
|
|
4067
4059
|
theme._talking = talking;
|
|
4068
|
-
if (talking !== ((
|
|
4069
|
-
var _theme_controls_talkControl1,
|
|
4070
|
-
(
|
|
4060
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.talkControl) && talking !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls1.talkControl) == null ? void 0 : _theme_controls_talkControl.active)) {
|
|
4061
|
+
var _theme_controls_talkControl1, _theme_controls2;
|
|
4062
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_talkControl1 = _theme_controls2.talkControl) == null ? void 0 : _theme_controls_talkControl1.emit(EVENTS.talkingChange, talking);
|
|
4071
4063
|
}
|
|
4072
4064
|
});
|
|
4073
4065
|
theme.on(EVENTS.talkVolumeChange, function(value) {
|
|
@@ -4078,9 +4070,9 @@ function debounce(func, wait) {
|
|
|
4078
4070
|
// 录制
|
|
4079
4071
|
// =======================================================
|
|
4080
4072
|
theme.on(EVENTS.recordingChange, function(recording) {
|
|
4081
|
-
var _theme_controls_recordControl,
|
|
4073
|
+
var _theme_controls, _theme_controls_recordControl, _theme_controls1;
|
|
4082
4074
|
theme._recording = recording;
|
|
4083
|
-
if (recording !== ((
|
|
4075
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recordControl) && recording !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recordControl = _theme_controls1.recordControl) == null ? void 0 : _theme_controls_recordControl.active)) theme.controls.recordControl.active = recording;
|
|
4084
4076
|
});
|
|
4085
4077
|
// =======================================================
|
|
4086
4078
|
// 清晰度
|
|
@@ -4097,14 +4089,14 @@ function debounce(func, wait) {
|
|
|
4097
4089
|
// 放大
|
|
4098
4090
|
// =======================================================
|
|
4099
4091
|
theme.on(EVENTS.zoomingChange, function(zooming) {
|
|
4100
|
-
var _theme_controls_zoomControl1,
|
|
4101
|
-
if (((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 =
|
|
4092
|
+
var _theme_controls1, _theme_controls_zoomControl1, _theme_controls2;
|
|
4093
|
+
if (((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.zoomControl) && ((_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl1 = _theme_controls2.zoomControl) == null ? void 0 : _theme_controls_zoomControl1.active) !== zooming) {
|
|
4102
4094
|
theme.controls.zoomControl.active = zooming;
|
|
4103
4095
|
}
|
|
4104
4096
|
});
|
|
4105
4097
|
theme.on(EVENTS.zoomChange, function(zoom) {
|
|
4106
|
-
var _theme_controls_zoomControl,
|
|
4107
|
-
if (((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_zoomControl =
|
|
4098
|
+
var _theme_controls, _theme_controls_zoomControl, _theme_controls1;
|
|
4099
|
+
if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.zoomControl) && ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_zoomControl = _theme_controls1.zoomControl) == null ? void 0 : _theme_controls_zoomControl.value) !== zoom) {
|
|
4108
4100
|
theme.controls.zoomControl.value = zoom;
|
|
4109
4101
|
}
|
|
4110
4102
|
});
|
|
@@ -4130,29 +4122,33 @@ function debounce(func, wait) {
|
|
|
4130
4122
|
// 全屏
|
|
4131
4123
|
// =======================================================
|
|
4132
4124
|
theme == null ? void 0 : theme.on(EVENTS.fullscreenChange, function(info) {
|
|
4133
|
-
if (
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4125
|
+
if (theme.zoomUtil) {
|
|
4126
|
+
if ([
|
|
4127
|
+
0,
|
|
4128
|
+
180
|
|
4129
|
+
].includes(theme.orientationAngle) && info.isMobile && info.isCurrentFullscreen) {
|
|
4130
|
+
var // 代表移动端播放内容节点被旋转了 90度
|
|
4131
|
+
_theme_zoomUtil_setTransform, _theme_zoomUtil;
|
|
4132
|
+
(_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
|
|
4133
|
+
} else {
|
|
4134
|
+
var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
|
|
4135
|
+
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
4136
|
+
}
|
|
4143
4137
|
}
|
|
4144
4138
|
});
|
|
4145
4139
|
theme == null ? void 0 : theme.on(EVENTS.orientationChange, function(angle) {
|
|
4146
|
-
if (
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4140
|
+
if (theme.zoomUtil) {
|
|
4141
|
+
if ([
|
|
4142
|
+
0,
|
|
4143
|
+
180
|
|
4144
|
+
].includes(angle) && Utils.isMobile && theme.isCurrentFullscreen) {
|
|
4145
|
+
var // 代表移动端播放内容节点被旋转了 90度
|
|
4146
|
+
_theme_zoomUtil_setTransform, _theme_zoomUtil;
|
|
4147
|
+
(_theme_zoomUtil = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform = _theme_zoomUtil.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform.call(_theme_zoomUtil, true);
|
|
4148
|
+
} else {
|
|
4149
|
+
var _theme_zoomUtil_setTransform1, _theme_zoomUtil1;
|
|
4150
|
+
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
4151
|
+
}
|
|
4156
4152
|
}
|
|
4157
4153
|
});
|
|
4158
4154
|
// 日期选择器
|
|
@@ -4339,13 +4335,16 @@ function debounce(func, wait) {
|
|
|
4339
4335
|
// prettier-ignore
|
|
4340
4336
|
theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
|
|
4341
4337
|
if (theme.recType !== type) {
|
|
4342
|
-
var _theme__headerMoreControl;
|
|
4338
|
+
var _theme__headerMoreControl, _theme_controls;
|
|
4343
4339
|
theme.recType = type;
|
|
4344
4340
|
theme.emit(EVENTS.control.recTypeChange, type);
|
|
4345
4341
|
// theme.emit(EVENTS.recTypeChange, type);
|
|
4346
4342
|
if ((_theme__headerMoreControl = theme._headerMoreControl) == null ? void 0 : _theme__headerMoreControl.picker) {
|
|
4347
4343
|
theme._headerMoreControl.picker.open = false;
|
|
4348
4344
|
}
|
|
4345
|
+
if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.speedControl) {
|
|
4346
|
+
theme.controls.speedControl.emit(EVENTS.control.recTypeChange, type);
|
|
4347
|
+
}
|
|
4349
4348
|
}
|
|
4350
4349
|
});
|
|
4351
4350
|
theme.controls.recControl.on(EVENTS.control.recDestroy, function() {
|
|
@@ -8538,7 +8537,9 @@ var SUPPORT_SPEED = [
|
|
|
8538
8537
|
0.5,
|
|
8539
8538
|
1,
|
|
8540
8539
|
2,
|
|
8541
|
-
4
|
|
8540
|
+
4,
|
|
8541
|
+
8,
|
|
8542
|
+
16
|
|
8542
8543
|
]; // 8, 16
|
|
8543
8544
|
var SPEED_DEFAULT_OPTIONS = {
|
|
8544
8545
|
/**
|
|
@@ -8585,12 +8586,35 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8585
8586
|
_assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
|
|
8586
8587
|
}
|
|
8587
8588
|
})) || this;
|
|
8589
|
+
_this._filterSpeedList(options.list, options.props.recType);
|
|
8588
8590
|
_this.on(EVENTS.speedChange, function(speed) {
|
|
8589
8591
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
8590
8592
|
});
|
|
8593
|
+
_this.on(EVENTS.control.recTypeChange, function(type) {
|
|
8594
|
+
_this._filterSpeedList(options.list, type);
|
|
8595
|
+
});
|
|
8591
8596
|
return _this;
|
|
8592
8597
|
}
|
|
8593
8598
|
var _proto = Speed.prototype;
|
|
8599
|
+
/**
|
|
8600
|
+
* 滤掉本地回放不支持的倍速
|
|
8601
|
+
* @param optionsList 初始化配置倍速列表
|
|
8602
|
+
* @param type 回放类型
|
|
8603
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
8604
|
+
if (!optionsList) {
|
|
8605
|
+
// 非用户自定义
|
|
8606
|
+
if (type === 'rec') {
|
|
8607
|
+
// 本地回放 不支持 8 16 32 倍速
|
|
8608
|
+
var list = this.list.filter(function(item) {
|
|
8609
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8610
|
+
});
|
|
8611
|
+
this.updateOptions(list);
|
|
8612
|
+
} else {
|
|
8613
|
+
// 云端回放 支持 8 16 32 倍速
|
|
8614
|
+
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
8615
|
+
}
|
|
8616
|
+
}
|
|
8617
|
+
};
|
|
8594
8618
|
_proto.reset = function reset(hide) {
|
|
8595
8619
|
this.value = 1 + '';
|
|
8596
8620
|
Select.prototype.reset.call(this, hide);
|
|
@@ -8684,11 +8708,13 @@ function _set_prototype_of$6(o, p) {
|
|
|
8684
8708
|
badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
|
|
8685
8709
|
language: this.options.language === 'zh' ? 'zh' : 'en',
|
|
8686
8710
|
current: new Date(this._value + ' 00:00:00'),
|
|
8711
|
+
placement: 'tr',
|
|
8712
|
+
triggerClose: true,
|
|
8687
8713
|
disabledDate: function(date) {
|
|
8688
8714
|
return date.getTime() > (_this.options.maxDate || new Date()).getTime();
|
|
8689
8715
|
},
|
|
8690
|
-
|
|
8691
|
-
onOk: function(date,
|
|
8716
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8717
|
+
onOk: function(date, _mode) {
|
|
8692
8718
|
if (date && _this._value !== DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
|
|
8693
8719
|
_this._value = DateTime.format(date, 'YYYY-MM-DD');
|
|
8694
8720
|
_this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
|
|
@@ -10387,6 +10413,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10387
10413
|
this._themeData = null;
|
|
10388
10414
|
if (this.i18n) this.i18n = null;
|
|
10389
10415
|
this.recType = '';
|
|
10416
|
+
this.recMonth = []; // 清空数据
|
|
10390
10417
|
this.emit(EVENTS.theme.destroyed);
|
|
10391
10418
|
this.removeAllListeners();
|
|
10392
10419
|
if (this.logger) this.logger = null;
|
|
@@ -11352,6 +11379,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11352
11379
|
zh: zh,
|
|
11353
11380
|
en: en
|
|
11354
11381
|
};
|
|
11355
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.
|
|
11382
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.2-beta.10';
|
|
11356
11383
|
|
|
11357
11384
|
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|