@ezuikit/player-theme 2.0.1-beta.1 → 2.0.1-beta.3
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 +57 -182
- package/dist/index.mjs +58 -183
- package/dist/index.umd.js +290 -2753
- package/dist/style.css +1 -1
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +66 -42
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.0.1-beta.
|
|
3
|
-
* Copyright (c) 2025-12-
|
|
2
|
+
* @ezuikit/player-theme v2.0.1-beta.3
|
|
3
|
+
* Copyright (c) 2025-12-04 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import Picker from '@skax/picker';
|
|
8
8
|
import delegate from '@skax/delegate';
|
|
9
9
|
import deepmerge from 'deepmerge';
|
|
10
|
-
import require$$1, { isMobile, parseEzopenUrl } from '@ezuikit/utils-tools';
|
|
10
|
+
import require$$1, { isMobile, DateTime, parseEzopenUrl } from '@ezuikit/utils-tools';
|
|
11
11
|
import screenfull from 'screenfull';
|
|
12
12
|
import I18n from '@ezuikit/utils-i18n';
|
|
13
13
|
import Logger from '@ezuikit/utils-logger';
|
|
@@ -42,7 +42,8 @@ var THEME_PROPS = [
|
|
|
42
42
|
'speed',
|
|
43
43
|
'urlInfo',
|
|
44
44
|
'videoLevelList',
|
|
45
|
-
'videoLevel'
|
|
45
|
+
'videoLevel',
|
|
46
|
+
'recMonth'
|
|
46
47
|
];
|
|
47
48
|
/**
|
|
48
49
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
|
@@ -188,8 +189,9 @@ var EVENTS = {
|
|
|
188
189
|
/** 全局全屏控件销毁 */ globalFullscreenDestroy: 'Control.globalFullscreenDestroy',
|
|
189
190
|
/** 日期面板展示隐藏变换 */ datePanelOpenChange: 'Control.datePanelOpenChange',
|
|
190
191
|
/** 日期改变 */ dateChange: 'Control.dateChange',
|
|
192
|
+
/** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
|
|
191
193
|
/** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
|
|
192
|
-
/**
|
|
194
|
+
/** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
|
|
193
195
|
/** 时间轴图片列表面板 */ timeLinePanelOpenChange: 'Control.timeLinePanelOpenChange',
|
|
194
196
|
/** 时间轴控件销毁 */ timeLineDestroy: 'Control.timeLineDestroy',
|
|
195
197
|
/** 主题控件挂载前 切换新的主题也会触发,如果想首次获取需要在 onInitializing 回调中进行监听 */ beforeMountControls: 'Control.beforeMountControls',
|
|
@@ -200,7 +202,7 @@ var EVENTS = {
|
|
|
200
202
|
/** 加载控件销毁 */ loadingDestroy: 'Control.loadingDestroy',
|
|
201
203
|
/** 消息控件销毁 */ messageDestroy: 'Control.messageDestroy',
|
|
202
204
|
/** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
|
|
203
|
-
contentRerender: 'Control.contentRerender'
|
|
205
|
+
/** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
|
|
204
206
|
},
|
|
205
207
|
/**
|
|
206
208
|
* 主题控件相关
|
|
@@ -4153,6 +4155,11 @@ function debounce(func, wait) {
|
|
|
4153
4155
|
(_theme_zoomUtil1 = theme.zoomUtil) == null ? void 0 : (_theme_zoomUtil_setTransform1 = _theme_zoomUtil1.setTransform) == null ? void 0 : _theme_zoomUtil_setTransform1.call(_theme_zoomUtil1, false);
|
|
4154
4156
|
}
|
|
4155
4157
|
});
|
|
4158
|
+
// 日期选择器
|
|
4159
|
+
theme == null ? void 0 : theme.on(EVENTS.control.dateMonthChange, function(dates) {
|
|
4160
|
+
var _theme_controls_dateControl_emit, _theme_controls_dateControl, _theme_controls;
|
|
4161
|
+
(_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : (_theme_controls_dateControl_emit = _theme_controls_dateControl.emit) == null ? void 0 : _theme_controls_dateControl_emit.call(_theme_controls_dateControl, EVENTS.control.dateMonthChange, dates);
|
|
4162
|
+
});
|
|
4156
4163
|
}
|
|
4157
4164
|
/**
|
|
4158
4165
|
* 控件向主题发现通信消息 control.on -> theme.emit ,仅用来转发控件的事件
|
|
@@ -4351,10 +4358,10 @@ function debounce(func, wait) {
|
|
|
4351
4358
|
theme.emit(EVENTS.control.timeLineChange, date);
|
|
4352
4359
|
});
|
|
4353
4360
|
theme.controls.timeLineControl.on(EVENTS.control.timeLinePanelOpenChange, function(open) {
|
|
4354
|
-
var _theme_controls_dateControl;
|
|
4355
|
-
if ((
|
|
4356
|
-
var
|
|
4357
|
-
(
|
|
4361
|
+
var _theme_controls_dateControl, _theme_controls;
|
|
4362
|
+
if ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : _theme_controls_dateControl.datePicker) {
|
|
4363
|
+
var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls1;
|
|
4364
|
+
(_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_dateControl1 = _theme_controls1.dateControl) == null ? void 0 : (_theme_controls_dateControl_datePicker = _theme_controls_dateControl1.datePicker) == null ? void 0 : _theme_controls_dateControl_datePicker.hide();
|
|
4358
4365
|
}
|
|
4359
4366
|
theme.emit(EVENTS.control.timeLinePanelOpenChange, open);
|
|
4360
4367
|
});
|
|
@@ -8591,153 +8598,6 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8591
8598
|
return Speed;
|
|
8592
8599
|
}(Select);
|
|
8593
8600
|
|
|
8594
|
-
/**
|
|
8595
|
-
* @description 时间操作
|
|
8596
|
-
*/ var DateTime = /*#__PURE__*/ function() {
|
|
8597
|
-
function DateTime() {}
|
|
8598
|
-
/**
|
|
8599
|
-
* @description 时间格式化
|
|
8600
|
-
* @param {Date | number | string} date
|
|
8601
|
-
* @param {string} formatType 格式 'YYYY-MM-DD hh:mm:ss' 或 'YYYYMMDDhhmmss' 或 'YYYY/MM/DD hh:mm:ss' 或 'hh:mm:ss' 或 'YYYYMMDDThhmmssZ'
|
|
8602
|
-
* @param {number} timeZone 时区偏移量 默认 0
|
|
8603
|
-
*/ DateTime.formate = function formate(date, formatType, timeZone) {
|
|
8604
|
-
if (timeZone === void 0) timeZone = 0;
|
|
8605
|
-
var dateTime = date;
|
|
8606
|
-
if (typeof date === 'string') {
|
|
8607
|
-
dateTime = DateTime.strToDate(date);
|
|
8608
|
-
} else if (typeof date === 'number') {
|
|
8609
|
-
dateTime = new Date(date);
|
|
8610
|
-
}
|
|
8611
|
-
dateTime = new Date(dateTime.getTime() - timeZone * 3600 * 1000);
|
|
8612
|
-
var year = dateTime.getFullYear();
|
|
8613
|
-
var month = String(dateTime.getMonth() + 1).padStart(2, '0');
|
|
8614
|
-
var day = String(dateTime.getDate()).padStart(2, '0');
|
|
8615
|
-
var hours = String(dateTime.getHours()).padStart(2, '0');
|
|
8616
|
-
var minutes = String(dateTime.getMinutes()).padStart(2, '0');
|
|
8617
|
-
var seconds = String(dateTime.getSeconds()).padStart(2, '0');
|
|
8618
|
-
switch(formatType){
|
|
8619
|
-
case 'YYYY-MM-DD hh:mm:ss':
|
|
8620
|
-
return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
|
8621
|
-
case 'YYYYMMDDhhmmss':
|
|
8622
|
-
return "" + year + month + day + hours + minutes + seconds;
|
|
8623
|
-
case 'YYYY/MM/DD hh:mm:ss':
|
|
8624
|
-
return year + "/" + month + "/" + day + " " + hours + ":" + minutes + ":" + seconds;
|
|
8625
|
-
case 'YYYYMMDDThhmmssZ':
|
|
8626
|
-
return "" + year + month + day + "T" + hours + minutes + seconds + "Z";
|
|
8627
|
-
case 'YYYY/MM/DD':
|
|
8628
|
-
return year + "/" + month + "/" + day;
|
|
8629
|
-
case 'YYYYMMDD':
|
|
8630
|
-
return "" + year + month + day;
|
|
8631
|
-
case 'YYYY-MM-DD':
|
|
8632
|
-
return year + "-" + month + "-" + day;
|
|
8633
|
-
case 'YYYY':
|
|
8634
|
-
return "" + year;
|
|
8635
|
-
case 'MM':
|
|
8636
|
-
return "" + month;
|
|
8637
|
-
case 'DD':
|
|
8638
|
-
return "" + day;
|
|
8639
|
-
case 'hh:mm:ss':
|
|
8640
|
-
return hours + ":" + minutes + ":" + seconds;
|
|
8641
|
-
case 'hh':
|
|
8642
|
-
return "" + hours;
|
|
8643
|
-
case 'mm':
|
|
8644
|
-
return "" + minutes;
|
|
8645
|
-
case 'ss':
|
|
8646
|
-
return "" + seconds;
|
|
8647
|
-
default:
|
|
8648
|
-
throw new Error('Unsupported format type');
|
|
8649
|
-
}
|
|
8650
|
-
};
|
|
8651
|
-
/**
|
|
8652
|
-
* @description 对比两个时间的差值
|
|
8653
|
-
* @param {Date | string | number} date1
|
|
8654
|
-
* @param {Date | string | number} date2
|
|
8655
|
-
* @param {"year" | "month" | "day" | "hour" | "minute" | "second"} diffType
|
|
8656
|
-
*/ DateTime.diff = function diff(date1, date2, diffType) {
|
|
8657
|
-
/** @type {Date} */ var dateTime1 = date1;
|
|
8658
|
-
if (typeof date1 === 'string') {
|
|
8659
|
-
dateTime1 = DateTime.strToDate(date1);
|
|
8660
|
-
} else if (typeof date1 === 'number') {
|
|
8661
|
-
dateTime1 = new Date(date1);
|
|
8662
|
-
}
|
|
8663
|
-
/** @type {Date} */ var dateTime2 = date2;
|
|
8664
|
-
if (typeof date2 === 'string') {
|
|
8665
|
-
dateTime1 = DateTime.strToDate(date2);
|
|
8666
|
-
} else if (typeof date2 === 'number') {
|
|
8667
|
-
dateTime1 = new Date(date2);
|
|
8668
|
-
}
|
|
8669
|
-
var diffSecond = dateTime1.getTime() - dateTime2.getTime();
|
|
8670
|
-
// diff
|
|
8671
|
-
switch(diffType){
|
|
8672
|
-
case 'year':
|
|
8673
|
-
return dateTime1.getFullYear() - dateTime2.getFullYear();
|
|
8674
|
-
case 'month':
|
|
8675
|
-
// 计算总月份差
|
|
8676
|
-
// eslint-disable-next-line no-case-declarations
|
|
8677
|
-
var months = (dateTime1.getFullYear() - dateTime2.getFullYear()) * 12 + (dateTime1.getMonth() - dateTime2.getMonth());
|
|
8678
|
-
// 如果结束日的日期小于开始日的日期,则减去一个月
|
|
8679
|
-
if (dateTime1.getDate() < dateTime2.getDate()) {
|
|
8680
|
-
months--;
|
|
8681
|
-
}
|
|
8682
|
-
return months;
|
|
8683
|
-
case 'day':
|
|
8684
|
-
return diffSecond / 60 / 60 / 24;
|
|
8685
|
-
case 'hour':
|
|
8686
|
-
return diffSecond / 60 / 60;
|
|
8687
|
-
case 'minute':
|
|
8688
|
-
return diffSecond / 60;
|
|
8689
|
-
case 'second':
|
|
8690
|
-
return diffSecond;
|
|
8691
|
-
default:
|
|
8692
|
-
throw new Error('Unsupported diff type');
|
|
8693
|
-
}
|
|
8694
|
-
};
|
|
8695
|
-
DateTime.now = function now() {
|
|
8696
|
-
return Date.now();
|
|
8697
|
-
};
|
|
8698
|
-
/**
|
|
8699
|
-
*
|
|
8700
|
-
* @param {string} str 日期, 2025-04-10 10:10:10 或 2025/04/10 10:10:10 或 20250410101010 或 20250410T101010Z 或 秒 或 毫秒
|
|
8701
|
-
* @example
|
|
8702
|
-
* DateTime.strToDate("2025/04/10 10:10:10") // Date
|
|
8703
|
-
* DateTime.strToDate("2025-04-10 10:10:10") // Date
|
|
8704
|
-
* DateTime.strToDate("20250410101010") // Date
|
|
8705
|
-
* DateTime.strToDate("20250410T101010Z") // Date
|
|
8706
|
-
*/ DateTime.strToDate = function strToDate(str) {
|
|
8707
|
-
var time = (str + '').replace(/-/gi, '').replace(/:/gi, '').replace(/\//gi, '').replace(/ /gi, '').replace(/T|Z/gi, '');
|
|
8708
|
-
// 兼容
|
|
8709
|
-
if ((str + '').length === 10) {
|
|
8710
|
-
// 时间戳 秒
|
|
8711
|
-
return new Date(+str);
|
|
8712
|
-
} else if ((str + '').length === 13) {
|
|
8713
|
-
// 时间戳 毫秒
|
|
8714
|
-
return new Date(+str);
|
|
8715
|
-
}
|
|
8716
|
-
var year = time.slice(0, 4);
|
|
8717
|
-
var month = time.slice(4, 6);
|
|
8718
|
-
var day = time.slice(6, 8);
|
|
8719
|
-
var hour = time.slice(8, 10);
|
|
8720
|
-
var minute = time.slice(10, 12);
|
|
8721
|
-
var second = time.slice(12, 14);
|
|
8722
|
-
return new Date(year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second);
|
|
8723
|
-
};
|
|
8724
|
-
/**
|
|
8725
|
-
* @description 补充十位
|
|
8726
|
-
* @param {number} num
|
|
8727
|
-
* @returns {string}
|
|
8728
|
-
* @example
|
|
8729
|
-
* DateTime.padStart(1) // "01"
|
|
8730
|
-
* DateTime.padStart(33) // "33"
|
|
8731
|
-
*/ DateTime.padStart = function padStart(num) {
|
|
8732
|
-
if (num < 10) {
|
|
8733
|
-
return '0' + num;
|
|
8734
|
-
} else {
|
|
8735
|
-
return num + '';
|
|
8736
|
-
}
|
|
8737
|
-
};
|
|
8738
|
-
return DateTime;
|
|
8739
|
-
}();
|
|
8740
|
-
|
|
8741
8601
|
function _extends$5() {
|
|
8742
8602
|
_extends$5 = Object.assign || function(target) {
|
|
8743
8603
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -8788,13 +8648,19 @@ function _set_prototype_of$6(o, p) {
|
|
|
8788
8648
|
classNameSuffix: 'date'
|
|
8789
8649
|
})) || this;
|
|
8790
8650
|
_this.options = options;
|
|
8791
|
-
_this._value = DateTime.
|
|
8651
|
+
_this._value = DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
|
|
8792
8652
|
_this._render();
|
|
8653
|
+
// 日期上的点
|
|
8654
|
+
_this.on(EVENTS.control.dateMonthChange, function(dates) {
|
|
8655
|
+
var _this_datePicker_updateBadges, _this_datePicker;
|
|
8656
|
+
(_this_datePicker = _this.datePicker) == null ? void 0 : (_this_datePicker_updateBadges = _this_datePicker.updateBadges) == null ? void 0 : _this_datePicker_updateBadges.call(_this_datePicker, dates);
|
|
8657
|
+
});
|
|
8793
8658
|
return _this;
|
|
8794
8659
|
}
|
|
8795
8660
|
var _proto = DatePickerControl.prototype;
|
|
8796
8661
|
_proto._render = function _render() {
|
|
8797
8662
|
var _this = this;
|
|
8663
|
+
var _this_options_props;
|
|
8798
8664
|
var isMobile1 = isMobile();
|
|
8799
8665
|
if (isMobile1) {
|
|
8800
8666
|
var _this_locale;
|
|
@@ -8805,7 +8671,7 @@ function _set_prototype_of$6(o, p) {
|
|
|
8805
8671
|
title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
|
|
8806
8672
|
});
|
|
8807
8673
|
}
|
|
8808
|
-
this.
|
|
8674
|
+
this.datePicker = new DatePicker(this.$container, {
|
|
8809
8675
|
isMobile: isMobile1,
|
|
8810
8676
|
getPopupContainer: function() {
|
|
8811
8677
|
return _this.$container;
|
|
@@ -8815,7 +8681,7 @@ function _set_prototype_of$6(o, p) {
|
|
|
8815
8681
|
0,
|
|
8816
8682
|
-10
|
|
8817
8683
|
],
|
|
8818
|
-
badges: this.options.
|
|
8684
|
+
badges: ((_this_options_props = this.options.props) == null ? void 0 : _this_options_props.recMonth) || [],
|
|
8819
8685
|
language: this.options.language === 'zh' ? 'zh' : 'en',
|
|
8820
8686
|
current: new Date(this._value + ' 00:00:00'),
|
|
8821
8687
|
disabledDate: function(date) {
|
|
@@ -8823,8 +8689,8 @@ function _set_prototype_of$6(o, p) {
|
|
|
8823
8689
|
},
|
|
8824
8690
|
placement: 'tr',
|
|
8825
8691
|
onOk: function(date, mode) {
|
|
8826
|
-
if (date && _this._value !== DateTime.
|
|
8827
|
-
_this._value = DateTime.
|
|
8692
|
+
if (date && _this._value !== DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
|
|
8693
|
+
_this._value = DateTime.format(date, 'YYYY-MM-DD');
|
|
8828
8694
|
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
|
|
8829
8695
|
_this.emit(EVENTS.control.dateChange, date);
|
|
8830
8696
|
if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
@@ -8832,19 +8698,16 @@ function _set_prototype_of$6(o, p) {
|
|
|
8832
8698
|
}
|
|
8833
8699
|
}
|
|
8834
8700
|
},
|
|
8835
|
-
onChange: function(date) {
|
|
8836
|
-
if (date && _this._value !== DateTime.
|
|
8837
|
-
_this._value = DateTime.
|
|
8701
|
+
onChange: function(date, mode) {
|
|
8702
|
+
if (date && _this._value !== DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
|
|
8703
|
+
_this._value = DateTime.format(date, 'YYYY-MM-DD');
|
|
8838
8704
|
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
|
|
8839
8705
|
_this.emit(EVENTS.control.dateChange, date);
|
|
8840
|
-
if (date && _this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
8841
|
-
_this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = _this._getDateStr();
|
|
8842
|
-
}
|
|
8843
8706
|
}
|
|
8844
8707
|
},
|
|
8845
8708
|
onOpenChange: function(open) {
|
|
8846
|
-
_this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.
|
|
8847
|
-
_this.emit(EVENTS.control.datePanelOpenChange, open, _this.
|
|
8709
|
+
_this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
|
|
8710
|
+
_this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
|
|
8848
8711
|
}
|
|
8849
8712
|
});
|
|
8850
8713
|
};
|
|
@@ -8854,27 +8717,27 @@ function _set_prototype_of$6(o, p) {
|
|
|
8854
8717
|
* @param change 是否触发 onChange 事件
|
|
8855
8718
|
*/ _proto.setDate = function setDate(date, change) {
|
|
8856
8719
|
if (change === void 0) change = true;
|
|
8857
|
-
var
|
|
8858
|
-
(
|
|
8859
|
-
if (date && !change && this._value !== DateTime.
|
|
8860
|
-
this._value = DateTime.
|
|
8720
|
+
var _this_datePicker;
|
|
8721
|
+
(_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
|
|
8722
|
+
if (date && !change && this._value !== DateTime.format(date, 'YYYY-MM-DD')) {
|
|
8723
|
+
this._value = DateTime.format(date, 'YYYY-MM-DD');
|
|
8861
8724
|
if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
|
|
8862
8725
|
this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value").innerHTML = this._getDateStr();
|
|
8863
8726
|
}
|
|
8864
8727
|
}
|
|
8865
8728
|
};
|
|
8866
8729
|
_proto.reset = function reset() {
|
|
8867
|
-
if (this.
|
|
8730
|
+
if (this.datePicker) this.datePicker.open = false;
|
|
8868
8731
|
Control.prototype.reset.call(this);
|
|
8869
8732
|
};
|
|
8870
8733
|
/**
|
|
8871
8734
|
* 销毁控件
|
|
8872
8735
|
* @override
|
|
8873
8736
|
*/ _proto.destroy = function destroy() {
|
|
8874
|
-
if (this.
|
|
8875
|
-
this.
|
|
8737
|
+
if (this.datePicker) {
|
|
8738
|
+
this.datePicker.destroy();
|
|
8876
8739
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
8877
|
-
this.
|
|
8740
|
+
this.datePicker = null;
|
|
8878
8741
|
}
|
|
8879
8742
|
Control.prototype.destroy.call(this);
|
|
8880
8743
|
};
|
|
@@ -9957,8 +9820,7 @@ var _renderDatePicker = function(theme, container, props) {
|
|
|
9957
9820
|
return container;
|
|
9958
9821
|
},
|
|
9959
9822
|
language: theme.options.language,
|
|
9960
|
-
locales: theme.i18n.translations
|
|
9961
|
-
staticPath: theme.options.staticPath
|
|
9823
|
+
locales: theme.i18n.translations
|
|
9962
9824
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["dateOptions"]) || {}, {
|
|
9963
9825
|
props: props
|
|
9964
9826
|
}));
|
|
@@ -10257,7 +10119,20 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10257
10119
|
*/ _this._footerMoreControl = null, /** 头部控件 @since 0.0.1 @private */ _this._header = null, /** 低部控件 @since 0.0.1 @private */ _this._footer = null, /** 回放底部时间轴 @since 0.0.1 @private */ _this._recFooter = null, /**
|
|
10258
10120
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
10259
10121
|
* @private
|
|
10260
|
-
*/ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null,
|
|
10122
|
+
*/ _this._mobileExtend = null, /** @since 0.0.1 @private */ _this._interactiveResult = null, /** @since 0.0.1 @private */ _this._themeData = null, _this._fullscreen = null, _this.zoomUtil = null, /** 清除屏幕旋转 */ _this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ _this._cleanUpResizeObserver = null, /** 容器的宽 */ _this._width = 0, /** 容器的高 */ _this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ _this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ _this._orientationAngle = 0, /** 是否播放中 @private */ _this._playing = false, /** 加载中 */ _this._loading = false, /** 音量 */ _this._volume = 0, /** 静音 */ _this._muted = false, /** 电子放大倍数 @private */ _this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ _this._zooming = false, /** 录制中 @private */ _this._recording = false, /** 对讲中 @private */ _this._talking = false, /** 倍速 @private */ _this._speed = 1, /** 自定清晰度 @private */ _this._videoLevelAuto = false, /** 清晰度列表 */ _this.videoLevelList = [], /** 回放片段列表 */ _this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, // /**
|
|
10123
|
+
// * 记录回放的月份
|
|
10124
|
+
// *
|
|
10125
|
+
// * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
|
|
10126
|
+
// *
|
|
10127
|
+
// * value: 月份列表 比如 ["2025-12-01", "2025-12-02"]
|
|
10128
|
+
// * @private
|
|
10129
|
+
// */
|
|
10130
|
+
// _recMonthObj: Record<string, string[]> = {};
|
|
10131
|
+
/**
|
|
10132
|
+
* 录像回放的月份列表 @private
|
|
10133
|
+
*/ _this.recMonth = [
|
|
10134
|
+
'2025-12-01'
|
|
10135
|
+
], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, /** 播放地址信息 */ _this.urlInfo = null, _this.scaleMode = 0;
|
|
10261
10136
|
_this._initOptions(options);
|
|
10262
10137
|
if (_this.options.type === 'ezopen') {
|
|
10263
10138
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
@@ -10267,7 +10142,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10267
10142
|
}
|
|
10268
10143
|
if (_this.urlInfo.type === 'rec') {
|
|
10269
10144
|
var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo_searchParams2, _this_urlInfo2;
|
|
10270
|
-
_this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? DateTime.
|
|
10145
|
+
_this._seekDate = ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.begin) ? DateTime.toDate((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.begin) : DateTime.toDate(DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
|
|
10271
10146
|
}
|
|
10272
10147
|
}
|
|
10273
10148
|
_this._getRecType(_this.options.url);
|
|
@@ -11479,6 +11354,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11479
11354
|
zh: zh,
|
|
11480
11355
|
en: en
|
|
11481
11356
|
};
|
|
11482
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.1-beta.
|
|
11357
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.0.1-beta.3';
|
|
11483
11358
|
|
|
11484
11359
|
export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|