@ezuikit/player-theme 3.1.2-beta.4 → 3.1.3-beta.1
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/README.md +337 -1
- package/dist/constant.js +8 -4
- package/dist/index.cjs +972 -795
- package/dist/index.esm.js +972 -795
- package/dist/index.umd.js +1194 -1362
- package/dist/style.css +5 -3
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +116 -65
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.
|
|
3
|
-
* Copyright (c) 2026-08-16
|
|
2
|
+
* @ezuikit/player-theme v3.1.3-beta.1
|
|
3
|
+
* Copyright (c) 2026-08-19 16:47:24 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -18,6 +18,7 @@ var controlPtz = require('@ezuikit/control-ptz');
|
|
|
18
18
|
var RecListModal = require('@ezuikit/control-rec-list-modal');
|
|
19
19
|
var controlDatePicker = require('@ezuikit/control-date-picker');
|
|
20
20
|
var controlTimeLine = require('@ezuikit/control-time-line');
|
|
21
|
+
var SegmentProgress = require('@ezuikit/control-segment-progress');
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* 播放器的类名前缀
|
|
@@ -48,7 +49,9 @@ var THEME_PROPS = [
|
|
|
48
49
|
'videoLevelList',
|
|
49
50
|
'videoLevel',
|
|
50
51
|
'recMonth',
|
|
51
|
-
'url'
|
|
52
|
+
'url',
|
|
53
|
+
// 播放区间(片段分享)。通过 props 下发而不是靠事件,避免主题异步渲染时错过初始化事件
|
|
54
|
+
'playbackRange'
|
|
52
55
|
];
|
|
53
56
|
/**
|
|
54
57
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
|
@@ -93,7 +96,8 @@ var THEME_PROPS = [
|
|
|
93
96
|
'ptz',
|
|
94
97
|
'timeLine',
|
|
95
98
|
'rec',
|
|
96
|
-
'date'
|
|
99
|
+
'date',
|
|
100
|
+
'segmentProgress'
|
|
97
101
|
];
|
|
98
102
|
/**
|
|
99
103
|
*
|
|
@@ -158,6 +162,7 @@ var EVENTS = {
|
|
|
158
162
|
currentVideoLevelAuto: 'currentVideoLevelAuto',
|
|
159
163
|
setAllDayRecTimes: 'setAllDayRecTimes',
|
|
160
164
|
getOSDTime: 'getOSDTime',
|
|
165
|
+
/** 播放区间播放结束(SDK 层 playbackRange 特性) */ playbackEnd: 'playbackEnd',
|
|
161
166
|
/**
|
|
162
167
|
* 控件相关
|
|
163
168
|
*/ control: {
|
|
@@ -259,7 +264,7 @@ function _create_class$9(Constructor, protoProps, staticProps) {
|
|
|
259
264
|
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
260
265
|
return Constructor;
|
|
261
266
|
}
|
|
262
|
-
function _inherits$
|
|
267
|
+
function _inherits$z(subClass, superClass) {
|
|
263
268
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
264
269
|
throw new TypeError("Super expression must either be null or a function");
|
|
265
270
|
}
|
|
@@ -270,14 +275,14 @@ function _inherits$y(subClass, superClass) {
|
|
|
270
275
|
configurable: true
|
|
271
276
|
}
|
|
272
277
|
});
|
|
273
|
-
if (superClass) _set_prototype_of$
|
|
278
|
+
if (superClass) _set_prototype_of$z(subClass, superClass);
|
|
274
279
|
}
|
|
275
|
-
function _set_prototype_of$
|
|
276
|
-
_set_prototype_of$
|
|
280
|
+
function _set_prototype_of$z(o, p) {
|
|
281
|
+
_set_prototype_of$z = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
277
282
|
o.__proto__ = p;
|
|
278
283
|
return o;
|
|
279
284
|
};
|
|
280
|
-
return _set_prototype_of$
|
|
285
|
+
return _set_prototype_of$z(o, p);
|
|
281
286
|
}
|
|
282
287
|
/**
|
|
283
288
|
* 控件基类
|
|
@@ -291,7 +296,7 @@ function _set_prototype_of$y(o, p) {
|
|
|
291
296
|
* const myControl = new MyControl({})
|
|
292
297
|
* ```
|
|
293
298
|
*/ var Control = /*#__PURE__*/ function(EventEmitter) {
|
|
294
|
-
_inherits$
|
|
299
|
+
_inherits$z(Control, EventEmitter);
|
|
295
300
|
function Control(options) {
|
|
296
301
|
var _this;
|
|
297
302
|
var _this___options;
|
|
@@ -474,21 +479,17 @@ function _set_prototype_of$y(o, p) {
|
|
|
474
479
|
return Control;
|
|
475
480
|
}(EventEmitter);
|
|
476
481
|
|
|
477
|
-
function _extends$
|
|
478
|
-
_extends$
|
|
482
|
+
function _extends$y() {
|
|
483
|
+
_extends$y = Object.assign || function assign(target) {
|
|
479
484
|
for(var i = 1; i < arguments.length; i++){
|
|
480
485
|
var source = arguments[i];
|
|
481
|
-
for(var key in source)
|
|
482
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
483
|
-
target[key] = source[key];
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
486
487
|
}
|
|
487
488
|
return target;
|
|
488
489
|
};
|
|
489
|
-
return _extends$
|
|
490
|
+
return _extends$y.apply(this, arguments);
|
|
490
491
|
}
|
|
491
|
-
function _inherits$
|
|
492
|
+
function _inherits$y(subClass, superClass) {
|
|
492
493
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
493
494
|
throw new TypeError("Super expression must either be null or a function");
|
|
494
495
|
}
|
|
@@ -499,25 +500,25 @@ function _inherits$x(subClass, superClass) {
|
|
|
499
500
|
configurable: true
|
|
500
501
|
}
|
|
501
502
|
});
|
|
502
|
-
if (superClass) _set_prototype_of$
|
|
503
|
+
if (superClass) _set_prototype_of$y(subClass, superClass);
|
|
503
504
|
}
|
|
504
|
-
function _set_prototype_of$
|
|
505
|
-
_set_prototype_of$
|
|
505
|
+
function _set_prototype_of$y(o, p) {
|
|
506
|
+
_set_prototype_of$y = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
506
507
|
o.__proto__ = p;
|
|
507
508
|
return o;
|
|
508
509
|
};
|
|
509
|
-
return _set_prototype_of$
|
|
510
|
+
return _set_prototype_of$y(o, p);
|
|
510
511
|
}
|
|
511
512
|
var LOADING_DEFAULT_OPTIONS = {};
|
|
512
513
|
/**
|
|
513
514
|
* 加载动画控件
|
|
514
515
|
* @category Control
|
|
515
516
|
*/ var Loading = /*#__PURE__*/ function(Control) {
|
|
516
|
-
_inherits$
|
|
517
|
+
_inherits$y(Loading, Control);
|
|
517
518
|
function Loading(options) {
|
|
518
519
|
if (options === void 0) options = {};
|
|
519
520
|
var _this;
|
|
520
|
-
_this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$
|
|
521
|
+
_this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$y({}, options, {
|
|
521
522
|
tagName: 'div',
|
|
522
523
|
controlType: 'block',
|
|
523
524
|
classNameSuffix: 'loading'
|
|
@@ -555,21 +556,17 @@ var LOADING_DEFAULT_OPTIONS = {};
|
|
|
555
556
|
return Loading;
|
|
556
557
|
}(Control);
|
|
557
558
|
|
|
558
|
-
function _extends$
|
|
559
|
-
_extends$
|
|
559
|
+
function _extends$x() {
|
|
560
|
+
_extends$x = Object.assign || function assign(target) {
|
|
560
561
|
for(var i = 1; i < arguments.length; i++){
|
|
561
562
|
var source = arguments[i];
|
|
562
|
-
for(var key in source)
|
|
563
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
564
|
-
target[key] = source[key];
|
|
565
|
-
}
|
|
566
|
-
}
|
|
563
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
567
564
|
}
|
|
568
565
|
return target;
|
|
569
566
|
};
|
|
570
|
-
return _extends$
|
|
567
|
+
return _extends$x.apply(this, arguments);
|
|
571
568
|
}
|
|
572
|
-
function _inherits$
|
|
569
|
+
function _inherits$x(subClass, superClass) {
|
|
573
570
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
574
571
|
throw new TypeError("Super expression must either be null or a function");
|
|
575
572
|
}
|
|
@@ -580,14 +577,14 @@ function _inherits$w(subClass, superClass) {
|
|
|
580
577
|
configurable: true
|
|
581
578
|
}
|
|
582
579
|
});
|
|
583
|
-
if (superClass) _set_prototype_of$
|
|
580
|
+
if (superClass) _set_prototype_of$x(subClass, superClass);
|
|
584
581
|
}
|
|
585
|
-
function _set_prototype_of$
|
|
586
|
-
_set_prototype_of$
|
|
582
|
+
function _set_prototype_of$x(o, p) {
|
|
583
|
+
_set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
587
584
|
o.__proto__ = p;
|
|
588
585
|
return o;
|
|
589
586
|
};
|
|
590
|
-
return _set_prototype_of$
|
|
587
|
+
return _set_prototype_of$x(o, p);
|
|
591
588
|
}
|
|
592
589
|
// 不放在服务器上 是因为有可能http加载失败
|
|
593
590
|
// prettier-ignore
|
|
@@ -599,11 +596,11 @@ var POSTER_OPTIONS = {
|
|
|
599
596
|
* 封面控件
|
|
600
597
|
* @category Control
|
|
601
598
|
*/ var Poster = /*#__PURE__*/ function(Control) {
|
|
602
|
-
_inherits$
|
|
599
|
+
_inherits$x(Poster, Control);
|
|
603
600
|
function Poster(options) {
|
|
604
601
|
if (options === void 0) options = {};
|
|
605
602
|
var _this;
|
|
606
|
-
_this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$
|
|
603
|
+
_this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$x({}, options, {
|
|
607
604
|
tagName: 'div',
|
|
608
605
|
controlType: 'block',
|
|
609
606
|
classNameSuffix: 'poster'
|
|
@@ -669,7 +666,7 @@ var POSTER_OPTIONS = {
|
|
|
669
666
|
var Icons = {
|
|
670
667
|
/** 播放 */ play: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="play">\n <rect x="6.5" y="5.5" rx="1.25" width="2.5" height="13"/>\n <rect x="15" y="5.5" rx="1.25" width="2.5" height="13"/>\n </svg>',
|
|
671
668
|
/** 暂停 */ pause: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="pause"> <path d="M17.5 13.66L9.1 19.26C7.78 20.14 6 19.19 6 17.59L6 6.4C6 4.8 7.78 3.85 9.1 4.73L17.5 10.33C18.69 11.12 18.69 12.87 17.5 13.66Z" /></svg>',
|
|
672
|
-
/** 音量 */ volume: function(prefix) {
|
|
669
|
+
/** 音量 */ volume: function volume(prefix) {
|
|
673
670
|
return '<svg width="1em" height="1em" viewBox="0 0 24 24" stroke="currentColor" fill="none" focusable="false" aria-hidden="true" data-icon="volume">\n <path class="' + prefix + '-icon-volume-muted" d="M20.57 9.69L16.07 14.19" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n <path class="' + prefix + '-icon-volume-muted" d="M20.57 14.19L16.07 9.69" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n <!-- 音低 -->\n <path class="' + prefix + '-icon-volume-low" d="M15.53 15.97C16.69 15.25 17.49 13.75 17.49 12C17.49 10.25 16.69 8.75 15.53 8.02" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n <!-- 音高 -->\n <path class="' + prefix + '-icon-volume-high" d="M18.5 19.06C20.31 17.5 21.49 14.93 21.49 12C21.49 9.07 20.31 6.48 18.49 4.93" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M5.87 8.62L9.85 5.25C10.5 4.7 11.49 5.16 11.49 6.01L11.49 17.98C11.49 18.83 10.5 19.29 9.85 18.74L5.87 15.37" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M5.87 15.37L3.49 15.37C2.94 15.37 2.49 14.92 2.49 14.37L2.49 9.62C2.49 9.07 2.94 8.62 3.49 8.62L5.87 8.62" stroke-width="1.500000" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>';
|
|
674
671
|
},
|
|
675
672
|
/** 全屏 */ mobileFullscreen: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" focusable="false" aria-hidden="true" data-icon="mobile-fullscreen">\n <path d="M4 2.9082L11 2.9082C12.5188 2.9082 13.75 4.1394 13.75 5.6582L13.75 17.6582C13.75 19.177 12.5188 20.4082 11 20.4082L4 20.4082C2.4812 20.4082 1.25 19.177 1.25 17.6582L1.25 5.6582C1.25 4.1394 2.4812 2.9082 4 2.9082ZM4 4.4082L11 4.4082C11.6903 4.4082 12.25 4.9679 12.25 5.6582L12.25 17.6582C12.25 18.3485 11.6903 18.9082 11 18.9082L4 18.9082C3.30969 18.9082 2.75 18.3485 2.75 17.6582L2.75 5.6582C2.75 4.9679 3.30969 4.4082 4 4.4082ZM22.1511 18.3113C22.1511 19.3595 21.2467 20.1652 20.1509 20.2362L19.993 20.2413L15.2939 20.2413C14.8798 20.2413 14.5439 19.9055 14.5439 19.4913C14.5439 19.1116 14.8262 18.7979 15.1921 18.7482L15.2939 18.7413L19.993 18.7413C20.344 18.7413 20.5962 18.5592 20.6432 18.3732L20.6511 18.3113L20.6511 12.4895C20.6511 12.3048 20.4338 12.1042 20.1062 12.066L19.993 12.0594L15.2939 12.0594C14.8798 12.0594 14.5439 11.7238 14.5439 11.3094C14.5439 10.9298 14.8262 10.616 15.1921 10.5663L15.2939 10.5594L19.993 10.5594C21.1055 10.5594 22.0605 11.3175 22.145 12.3416L22.1511 12.4895L22.1511 18.3113ZM10.3225 16.1035C10.3225 15.6893 9.98669 15.3535 9.57251 15.3535L5.84644 15.3535L5.74463 15.3604C5.37854 15.41 5.09644 15.7239 5.09644 16.1035C5.09644 16.5177 5.43225 16.8535 5.84644 16.8535L9.57251 16.8535L9.67432 16.8467C10.0404 16.797 10.3225 16.4832 10.3225 16.1035Z" clip-rule="evenodd" fill-rule="evenodd"/>\n </svg>',
|
|
@@ -695,7 +692,7 @@ var Icons = {
|
|
|
695
692
|
/** 录制/摄像机 */ record: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="record">\n <path d="M4.53 19C3.03 19 1.8 17.74 1.8 16.2L1.8 7.8C1.8 6.25 3.03 5 4.53 5L14.08 5C15.58 5 16.8 6.25 16.8 7.8L16.8 16.2C16.8 17.74 15.58 19 14.08 19L4.53 19Z" stroke-width="1.5" stroke-linejoin="round"/>\n <path d="M17.25 13.64C17.94 14.2 18.97 15.03 20.36 16.15C21.09 16.74 22.19 16.21 22.19 15.27L22.19 8.72C22.19 7.78 21.09 7.25 20.36 7.84C18.99 8.94 17.96 9.77 17.28 10.32" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',
|
|
696
693
|
recordCircle: '<svg width="1em" height="1em" viewBox="0 0 14 14" fill="currentColor" stroke="none" focusable="false" aria-hidden="true" data-icon="record-circle">\n <path d="M7.00044 2.5C9.70278 2.5 11.8935 4.69068 11.8935 7.39302C11.8935 10.0954 9.70278 12.286 7.00044 12.286C4.2981 12.286 2.10742 10.0954 2.10742 7.39302C2.10742 4.69068 4.2981 2.5 7.00044 2.5ZM7.00044 3.5C4.85039 3.5 3.10742 5.24296 3.10742 7.39302C3.10742 9.54307 4.85039 11.286 7.00044 11.286C9.15049 11.286 10.8935 9.54307 10.8935 7.39302C10.8935 5.24296 9.15049 3.5 7.00044 3.5ZM9.50049 7.39252C9.50049 6.01181 8.3812 4.89252 7.00049 4.89252C5.61978 4.89252 4.50049 6.01181 4.50049 7.39252C4.50049 8.77323 5.61978 9.89252 7.00049 9.89252C8.3812 9.89252 9.50049 8.77323 9.50049 7.39252Z" fill-rule="evenodd" />\n </svg>\n ',
|
|
697
694
|
/** 对讲 */ talk: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="talk">\n <path stroke="none" d="M12.22 18.95C12.65 18.95 13.01 19.21 13.07 19.54L13.08 19.64L13.08 21.78C13.08 22.16 12.69 22.47 12.22 22.47C11.78 22.47 11.42 22.21 11.37 21.87L11.36 21.78L11.36 19.64C11.36 19.26 11.74 18.95 12.22 18.95Z" fill-rule="evenodd"/>\n <path d="M19.53 11.37L19.53 11.58C19.53 15.74 16.15 19.11 11.99 19.11C7.83 19.11 4.46 15.74 4.46 11.58L4.46 11.43" fill="none" stroke-width="1.5" stroke-linecap="round"/>\n <path stroke="none" d="M12.05 1.52C9.3 1.52 7.07 3.58 7.07 6.12L7.07 12.07C7.07 14.61 9.3 16.67 12.05 16.67C14.79 16.67 17.02 14.61 17.02 12.07L17.02 6.12C17.02 3.58 14.79 1.52 12.05 1.52ZM8.57 12.07L8.57 6.12C8.57 5.94 8.59 5.75 8.63 5.57C8.67 5.36 8.74 5.16 8.83 4.96C8.86 4.89 8.9 4.82 8.93 4.75C9.09 4.46 9.3 4.21 9.55 3.97C9.64 3.89 9.73 3.81 9.83 3.74C10.08 3.55 10.35 3.4 10.66 3.28C10.79 3.23 10.93 3.19 11.06 3.15C11.38 3.07 11.71 3.02 12.05 3.02C12.38 3.02 12.71 3.07 13.03 3.15C13.17 3.19 13.3 3.23 13.43 3.28C13.74 3.4 14.02 3.55 14.27 3.74C14.36 3.81 14.45 3.89 14.54 3.97C14.79 4.21 15 4.46 15.16 4.75C15.2 4.82 15.23 4.89 15.26 4.96C15.35 5.16 15.42 5.36 15.46 5.57C15.5 5.75 15.52 5.94 15.52 6.12L15.52 12.07C15.52 12.26 15.5 12.44 15.46 12.63C15.42 12.83 15.35 13.04 15.26 13.24C15.23 13.31 15.2 13.38 15.16 13.45C15 13.73 14.79 13.99 14.54 14.22C14.45 14.3 14.36 14.38 14.27 14.45C14.02 14.64 13.74 14.79 13.43 14.91C13.3 14.96 13.17 15.01 13.03 15.05C12.71 15.13 12.38 15.17 12.05 15.17C11.71 15.17 11.38 15.13 11.06 15.05C10.93 15.01 10.79 14.96 10.66 14.91C10.35 14.79 10.08 14.64 9.83 14.45C9.73 14.38 9.64 14.3 9.55 14.22C9.3 13.99 9.09 13.73 8.93 13.45C8.9 13.38 8.86 13.31 8.83 13.24C8.74 13.04 8.67 12.83 8.63 12.63C8.59 12.44 8.57 12.26 8.57 12.07Z" fill-rule="evenodd"/>\n </svg>',
|
|
698
|
-
talkGrowth: function(prefix) {
|
|
695
|
+
talkGrowth: function talkGrowth(prefix) {
|
|
699
696
|
return '<svg width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="talk-growth">\n <g fill="currentColor" stroke="currentColor">\n <path stroke="none" d="M9.22313 18.9543C9.6588 18.9543 10.0189 19.2133 10.0759 19.5494L10.0837 19.6428L10.0837 21.7847C10.0837 22.1649 9.69841 22.4732 9.22313 22.4732C8.78745 22.4732 8.42739 22.2142 8.37041 21.8781L8.36255 21.7847L8.36255 19.6428C8.36255 19.2626 8.74784 18.9543 9.22313 18.9543Z" fill-rule="evenodd" />\n <path d="M16.5323 11.3779L16.5323 11.5872C16.5323 15.7472 13.1599 19.1197 8.99981 19.1197C4.83971 19.1197 1.46729 15.7472 1.46729 11.5872L1.46729 11.4335" fill-rule="evenodd" fill="none" stroke-width="1.5" />\n <path stroke="none" d="M4.07861 6.12978C4.07861 3.589 6.30476 1.5293 9.05085 1.5293C11.7969 1.5293 14.0231 3.589 14.0231 6.12978L14.0231 12.075C14.0231 14.6158 11.7969 16.6755 9.05085 16.6755C6.30476 16.6755 4.07861 14.6158 4.07861 12.075L4.07861 6.12978ZM5.57861 12.075L5.57861 6.12978C5.57861 5.94083 5.597 5.75561 5.63376 5.57412C5.67605 5.36539 5.74265 5.16158 5.83357 4.9627C5.86625 4.8912 5.90164 4.82121 5.93974 4.75272C6.09781 4.4685 6.30245 4.21019 6.55365 3.97777C6.64206 3.89597 6.73424 3.81921 6.83019 3.7475C7.0816 3.55959 7.3589 3.40632 7.66207 3.28767C7.79552 3.23545 7.93107 3.19114 8.06871 3.15475C8.38503 3.07111 8.71241 3.0293 9.05085 3.0293C9.38929 3.0293 9.71668 3.07112 10.033 3.15475C10.1706 3.19114 10.3062 3.23545 10.4396 3.28767C10.7428 3.40632 11.0201 3.55959 11.2715 3.74749C11.3675 3.81921 11.4596 3.89596 11.548 3.97777C11.7993 4.2102 12.0039 4.46853 12.162 4.75276C12.2001 4.82124 12.2354 4.89122 12.2681 4.9627C12.359 5.16157 12.4256 5.36536 12.4679 5.57407C12.5047 5.75558 12.5231 5.94082 12.5231 6.12978L12.5231 12.075C12.5231 12.264 12.5047 12.4492 12.4679 12.6307C12.4256 12.8394 12.359 13.0432 12.2681 13.2421C12.2355 13.3136 12.2001 13.3835 12.162 13.452C12.0039 13.7362 11.7993 13.9946 11.548 14.227C11.4596 14.3088 11.3675 14.3856 11.2715 14.4573C11.0201 14.6452 10.7428 14.7985 10.4396 14.9171C10.3062 14.9693 10.1706 15.0136 10.033 15.05C9.71667 15.1337 9.38929 15.1755 9.05085 15.1755C8.71241 15.1755 8.38503 15.1337 8.06871 15.05C7.93107 15.0136 7.79552 14.9693 7.66207 14.9171C7.3589 14.7985 7.0816 14.6452 6.83019 14.4573C6.73424 14.3856 6.64206 14.3088 6.55365 14.227C6.30244 13.9946 6.09779 13.7363 5.93972 13.452C5.90163 13.3836 5.86625 13.3136 5.83357 13.2421C5.74265 13.0432 5.67605 12.8394 5.63377 12.6307C5.597 12.4492 5.57861 12.264 5.57861 12.075Z" fill-rule="evenodd" />\n </g>\n <g class="' + prefix + '-icon-talk-growth-dot">\n <path class="' + prefix + '-icon-talk-growth-dot1" d="M19.1333 6.40039L22.8667 6.40039" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot2" d="M19.1333 10.1338L21.9331 10.1338" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot3" d="M19.1333 13.8672L20.9995 13.8672" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot4" d="M19.1333 17.6001L20.0669 17.6001" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n </g>\n </svg>';
|
|
700
697
|
},
|
|
701
698
|
/** 语音广播 */ broadcast: '\n <svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="none" focusable="false" aria-hidden="true" data-icon="broadcast">\n <g>\n <path id="矢量 1" d="m8.52109,6.76609l6.17823,-2.91335c0.2485,-0.11718 0.5027,-0.19531 0.7627,-0.2351c0.2034,-0.03077 0.4104,-0.03809 0.6211,-0.02173c0.2092,0.01636 0.4116,0.05493 0.6069,0.11621c0.2278,0.07129 0.4461,0.1731 0.6548,0.30542c0.2087,0.13232 0.394,0.28638 0.5557,0.46216l0.0002,0l0,0c0.1384,0.15064 0.2598,0.31714 0.3638,0.49951c0.1047,0.18335 0.1865,0.37354 0.2451,0.57081c0.0752,0.25219 0.1128,0.51562 0.1128,0.79004l0,10.64651c0,0.2744 -0.0376,0.5379 -0.1128,0.7901l0,0c-0.0586,0.197 -0.1404,0.3874 -0.2451,0.5708c-0.104,0.1823 -0.2254,0.3488 -0.364,0.4995c-0.1617,0.1758 -0.347,0.3298 -0.5557,0.4621c-0.2087,0.1324 -0.427,0.2342 -0.6548,0.3054c-0.1953,0.0611 -0.3977,0.0999 -0.6069,0.1163c-0.2107,0.0163 -0.4175,0.009 -0.6209,-0.0218c-0.2602,-0.0398 -0.5144,-0.1181 -0.7629,-0.2351l-5.45044,-2.5703l0,2.759c0,0.1036 -0.01831,0.1995 -0.05494,0.2879c-0.03662,0.0886 -0.09155,0.1692 -0.16479,0.2424c-0.14624,0.1465 -0.32324,0.2197 -0.53027,0.2197l-2,0c-0.14209,0 -0.27344,-0.0373 -0.39429,-0.112c-0.12085,-0.0745 -0.21289,-0.1756 -0.27661,-0.3025l-1.99268,-3.9856c-0.06225,-0.0234 -0.12402,-0.0481 -0.18555,-0.074c-0.26953,-0.114 -0.52417,-0.2502 -0.7644,-0.4084c-0.26636,-0.1758 -0.51489,-0.3789 -0.74512,-0.6094c-0.23047,-0.2302 -0.43359,-0.4788 -0.60937,-0.7451c-0.1582,-0.2403 -0.29444,-0.4949 -0.40845,-0.7644c-0.11328,-0.2679 -0.20068,-0.5413 -0.26245,-0.8206l0,0c-0.07398,-0.3347 -0.11108,-0.6775 -0.11108,-1.0286c0,-0.351 0.0371,-0.6938 0.11108,-1.0285c0.06177,-0.2793 0.14917,-0.5528 0.26245,-0.8206c0.11401,-0.26953 0.25025,-0.52417 0.40845,-0.7644c0.17578,-0.26636 0.3789,-0.5149 0.60937,-0.74512c0.23023,-0.23047 0.47876,-0.4336 0.74512,-0.60938l0,0c0.24023,-0.1582 0.49487,-0.29444 0.7644,-0.40845c0.26783,-0.11328 0.54126,-0.20068 0.82056,-0.26245l0,0l0,0l0,0c0.33472,-0.07398 0.67749,-0.11109 1.02857,-0.11109l2.93872,0c0.02636,-0.0166 0.05444,-0.03198 0.08349,-0.04589zm0.72876,8.47948l6.08937,2.8716c0.1287,0.0606 0.2598,0.0987 0.3935,0.114c0.0772,0.0088 0.1551,0.0103 0.2337,0.0042c0.0857,-0.0068 0.1687,-0.0217 0.2495,-0.0452c0.1133,-0.0329 0.2219,-0.0822 0.3257,-0.1479c0.104,-0.0659 0.1948,-0.1431 0.2729,-0.2317c0.0554,-0.063 0.1045,-0.1318 0.147,-0.2063c0.0393,-0.0686 0.0713,-0.1397 0.0962,-0.2131c0.043,-0.1277 0.0647,-0.2625 0.0647,-0.4046l0,-10.64651c0,-0.14209 -0.0217,-0.2771 -0.0647,-0.40454c-0.0249,-0.07349 -0.0569,-0.14454 -0.0962,-0.21314c-0.0425,-0.07471 -0.0916,-0.14331 -0.147,-0.2063c-0.0781,-0.08862 -0.1689,-0.16577 -0.2729,-0.23169c-0.1038,-0.06567 -0.2124,-0.11523 -0.3257,-0.14795c-0.0808,-0.02344 -0.1638,-0.03833 -0.2495,-0.04517c-0.0786,-0.0061 -0.1565,-0.00463 -0.2337,0.00415c-0.1337,0.01539 -0.2648,0.05347 -0.3935,0.11402l-6.09034,2.87208l0.00097,7.16405zm13.58447,-7.9121l-2,1c-0.3757,0.18775 -0.8184,0.04029 -1.0063,-0.33545c-0.0552,-0.11035 -0.0813,-0.22656 -0.0813,-0.34033c0,-0.27344 0.1516,-0.53321 0.4167,-0.66602l2,-1c0.3757,-0.18775 0.8186,-0.04004 1.0064,0.33545c0.0551,0.11035 0.0813,0.22656 0.0813,0.34033c0,0.27368 -0.1514,0.53345 -0.4168,0.66602zm-15.08544,8.9785l-2.08667,0l1.30029,2.6006l0.78638,0l0,-2.6006zm0,-7.99998l-2.25,0c-0.24976,0 -0.49317,0.02734 -0.73023,0.08179c-0.18188,0.04174 -0.36011,0.09961 -0.53467,0.17334c-0.17944,0.07593 -0.34961,0.1665 -0.51049,0.27124c-0.18702,0.12231 -0.36133,0.26416 -0.52271,0.42554c-0.16138,0.16137 -0.30322,0.33569 -0.42554,0.52267c-0.10473,0.1609 -0.19531,0.3311 -0.27124,0.5105c-0.07373,0.1746 -0.13159,0.3528 -0.17334,0.5347c-0.05444,0.2371 -0.08178,0.4805 -0.08178,0.7302c0,0.2498 0.02734,0.4932 0.08178,0.7303c0.04175,0.1818 0.09961,0.3601 0.17334,0.5346c0.07593,0.1795 0.16651,0.3496 0.27124,0.5105c0.12232,0.187 0.26416,0.3614 0.42554,0.5227c0.16138,0.1614 0.33569,0.3033 0.52271,0.4256c0.16088,0.1047 0.33105,0.1953 0.51049,0.2712c0.17456,0.0737 0.35279,0.1316 0.53467,0.1734c0.23706,0.0544 0.48047,0.0817 0.73023,0.0817l2.25097,0l-0.00097,-6.49998zm12.75004,2.60058l2,0c0.4199,0 0.75,0.3301 0.75,0.75c0,0.4199 -0.3301,0.75 -0.75,0.75l-2,0c-0.42,0 -0.75,-0.3301 -0.75,-0.75c0,-0.4199 0.33,-0.75 0.75,-0.75zm0.3354,4.0791l2,1c0.2654,0.1326 0.4168,0.3924 0.4168,0.6661c0,0.1137 -0.0262,0.2299 -0.0813,0.3403c-0.1878,0.3755 -0.6307,0.5232 -1.0064,0.3354l-2,-1c-0.2651,-0.1328 -0.4167,-0.3925 -0.4167,-0.666c0,-0.1138 0.0261,-0.23 0.0813,-0.3403c0.1879,-0.3758 0.6306,-0.5232 1.0063,-0.3355z" fill-rule="evenodd"/>\n </g>\n</svg>',
|
|
@@ -737,179 +734,175 @@ var Icons = {
|
|
|
737
734
|
return '<span class="' + PREFIX_CLASS + "-icon " + PREFIX_CLASS + "-icon-" + type + '" ' + attrStr + ">" + svg + "</span>";
|
|
738
735
|
}
|
|
739
736
|
var IconComponents = {
|
|
740
|
-
/** 播放 */ play: function(attr) {
|
|
737
|
+
/** 播放 */ play: function play(attr) {
|
|
741
738
|
if (attr === void 0) attr = {};
|
|
742
739
|
return createIcon(Icons.play, 'play', attr);
|
|
743
740
|
},
|
|
744
|
-
/** 暂停 */ pause: function(attr) {
|
|
741
|
+
/** 暂停 */ pause: function pause(attr) {
|
|
745
742
|
if (attr === void 0) attr = {};
|
|
746
743
|
return createIcon(Icons.pause, 'pause', attr);
|
|
747
744
|
},
|
|
748
|
-
volume: function(attr) {
|
|
745
|
+
volume: function volume(attr) {
|
|
749
746
|
if (attr === void 0) attr = {};
|
|
750
747
|
return createIcon(Icons.volume(PREFIX_CLASS), 'volume', attr);
|
|
751
748
|
},
|
|
752
|
-
mobileFullscreen: function(attr) {
|
|
749
|
+
mobileFullscreen: function mobileFullscreen(attr) {
|
|
753
750
|
if (attr === void 0) attr = {};
|
|
754
751
|
return createIcon(Icons.mobileFullscreen, 'mobile-fullscreen', attr);
|
|
755
752
|
},
|
|
756
|
-
exitFullscreen: function(attr) {
|
|
753
|
+
exitFullscreen: function exitFullscreen(attr) {
|
|
757
754
|
if (attr === void 0) attr = {};
|
|
758
755
|
return createIcon(Icons.exitFullscreen, 'exit-fullscreen', attr);
|
|
759
756
|
},
|
|
760
|
-
fullscreen: function(attr) {
|
|
757
|
+
fullscreen: function fullscreen(attr) {
|
|
761
758
|
if (attr === void 0) attr = {};
|
|
762
759
|
return createIcon(Icons.fullscreen, 'fullscreen', attr);
|
|
763
760
|
},
|
|
764
|
-
exitGlobalFullscreen: function(attr) {
|
|
761
|
+
exitGlobalFullscreen: function exitGlobalFullscreen(attr) {
|
|
765
762
|
if (attr === void 0) attr = {};
|
|
766
763
|
return createIcon(Icons.exitGlobalFullscreen, 'exit-global-fullscreen', attr);
|
|
767
764
|
},
|
|
768
|
-
globalFullscreen: function(attr) {
|
|
765
|
+
globalFullscreen: function globalFullscreen(attr) {
|
|
769
766
|
if (attr === void 0) attr = {};
|
|
770
767
|
return createIcon(Icons.globalFullscreen, 'global-fullscreen', attr);
|
|
771
768
|
},
|
|
772
|
-
capturePicture: function(attr) {
|
|
769
|
+
capturePicture: function capturePicture(attr) {
|
|
773
770
|
if (attr === void 0) attr = {};
|
|
774
771
|
return createIcon(Icons.capturePicture, 'capture-picture', attr);
|
|
775
772
|
},
|
|
776
|
-
ptz: function(attr) {
|
|
773
|
+
ptz: function ptz(attr) {
|
|
777
774
|
if (attr === void 0) attr = {};
|
|
778
775
|
return createIcon(Icons.ptz, 'ptz', attr);
|
|
779
776
|
},
|
|
780
|
-
record: function(attr) {
|
|
777
|
+
record: function record(attr) {
|
|
781
778
|
if (attr === void 0) attr = {};
|
|
782
779
|
return createIcon(Icons.record, 'record', attr);
|
|
783
780
|
},
|
|
784
|
-
recordCircle: function(attr) {
|
|
781
|
+
recordCircle: function recordCircle(attr) {
|
|
785
782
|
if (attr === void 0) attr = {};
|
|
786
783
|
return createIcon(Icons.recordCircle, 'record-circle', attr);
|
|
787
784
|
},
|
|
788
|
-
talk: function(attr) {
|
|
785
|
+
talk: function talk(attr) {
|
|
789
786
|
if (attr === void 0) attr = {};
|
|
790
787
|
return createIcon(Icons.talk, 'talk', attr);
|
|
791
788
|
},
|
|
792
|
-
broadcast: function(attr) {
|
|
789
|
+
broadcast: function broadcast(attr) {
|
|
793
790
|
if (attr === void 0) attr = {};
|
|
794
791
|
return createIcon(Icons.broadcast, 'broadcast', attr);
|
|
795
792
|
},
|
|
796
|
-
aiChat: function(attr) {
|
|
793
|
+
aiChat: function aiChat(attr) {
|
|
797
794
|
if (attr === void 0) attr = {};
|
|
798
795
|
return createIcon(Icons.aiChat, 'aiChat', attr);
|
|
799
796
|
},
|
|
800
|
-
talkGrowth: function(attr) {
|
|
797
|
+
talkGrowth: function talkGrowth(attr) {
|
|
801
798
|
if (attr === void 0) attr = {};
|
|
802
799
|
return createIcon(Icons.talkGrowth(PREFIX_CLASS), 'talk-growth', attr);
|
|
803
800
|
},
|
|
804
|
-
zoom: function(attr) {
|
|
801
|
+
zoom: function zoom(attr) {
|
|
805
802
|
if (attr === void 0) attr = {};
|
|
806
803
|
return createIcon(Icons.zoom, 'zoom', attr);
|
|
807
804
|
},
|
|
808
|
-
more: function(attr) {
|
|
805
|
+
more: function more(attr) {
|
|
809
806
|
if (attr === void 0) attr = {};
|
|
810
807
|
return createIcon(Icons.more, 'more', attr);
|
|
811
808
|
},
|
|
812
|
-
moreDot: function(attr) {
|
|
809
|
+
moreDot: function moreDot(attr) {
|
|
813
810
|
if (attr === void 0) attr = {};
|
|
814
811
|
return createIcon(Icons.moreDot, 'more-dot', attr);
|
|
815
812
|
},
|
|
816
|
-
minusCircle: function(attr) {
|
|
813
|
+
minusCircle: function minusCircle(attr) {
|
|
817
814
|
if (attr === void 0) attr = {};
|
|
818
815
|
return createIcon(Icons.minusCircle, 'minus-circle', attr);
|
|
819
816
|
},
|
|
820
|
-
plusCircle: function(attr) {
|
|
817
|
+
plusCircle: function plusCircle(attr) {
|
|
821
818
|
if (attr === void 0) attr = {};
|
|
822
819
|
return createIcon(Icons.plusCircle, 'plus-circle', attr);
|
|
823
820
|
},
|
|
824
|
-
sdk: function(attr) {
|
|
821
|
+
sdk: function sdk(attr) {
|
|
825
822
|
if (attr === void 0) attr = {};
|
|
826
823
|
return createIcon(Icons.sdk, 'sdk', attr);
|
|
827
824
|
},
|
|
828
|
-
cloudRec: function(attr) {
|
|
825
|
+
cloudRec: function cloudRec(attr) {
|
|
829
826
|
if (attr === void 0) attr = {};
|
|
830
827
|
return createIcon(Icons.cloudRec, 'cloud-rec', attr);
|
|
831
828
|
},
|
|
832
|
-
cloudRecord: function(attr) {
|
|
829
|
+
cloudRecord: function cloudRecord(attr) {
|
|
833
830
|
if (attr === void 0) attr = {};
|
|
834
831
|
return createIcon(Icons.cloudRecord, 'cloud-record', attr);
|
|
835
832
|
},
|
|
836
|
-
error: function(attr) {
|
|
833
|
+
error: function error(attr) {
|
|
837
834
|
if (attr === void 0) attr = {};
|
|
838
835
|
return createIcon(Icons.error, 'error', attr);
|
|
839
836
|
},
|
|
840
|
-
info: function(attr) {
|
|
837
|
+
info: function info(attr) {
|
|
841
838
|
if (attr === void 0) attr = {};
|
|
842
839
|
return createIcon(Icons.info, 'info', attr);
|
|
843
840
|
},
|
|
844
|
-
close: function(attr) {
|
|
841
|
+
close: function close(attr) {
|
|
845
842
|
if (attr === void 0) attr = {};
|
|
846
843
|
return createIcon(Icons.close, 'close', attr);
|
|
847
844
|
},
|
|
848
|
-
closeCircleOutLined: function(attr) {
|
|
845
|
+
closeCircleOutLined: function closeCircleOutLined(attr) {
|
|
849
846
|
if (attr === void 0) attr = {};
|
|
850
847
|
return createIcon(Icons.closeCircleOutLined, 'close-circle', attr);
|
|
851
848
|
},
|
|
852
|
-
warnCircleOutLined: function(attr) {
|
|
849
|
+
warnCircleOutLined: function warnCircleOutLined(attr) {
|
|
853
850
|
if (attr === void 0) attr = {};
|
|
854
851
|
return createIcon(Icons.warnCircleOutLined, 'warn-circle', attr);
|
|
855
852
|
},
|
|
856
|
-
infoCircleOutLined: function(attr) {
|
|
853
|
+
infoCircleOutLined: function infoCircleOutLined(attr) {
|
|
857
854
|
if (attr === void 0) attr = {};
|
|
858
855
|
return createIcon(Icons.infoCircleOutLined, 'info-circle', attr);
|
|
859
856
|
},
|
|
860
|
-
date: function(attr) {
|
|
857
|
+
date: function date(attr) {
|
|
861
858
|
if (attr === void 0) attr = {};
|
|
862
859
|
return createIcon(Icons.date, 'date', attr);
|
|
863
860
|
},
|
|
864
|
-
filter: function(attr) {
|
|
861
|
+
filter: function filter(attr) {
|
|
865
862
|
if (attr === void 0) attr = {};
|
|
866
863
|
return createIcon(Icons.filter, 'filter', attr);
|
|
867
864
|
},
|
|
868
|
-
add: function(attr) {
|
|
865
|
+
add: function add(attr) {
|
|
869
866
|
if (attr === void 0) attr = {};
|
|
870
867
|
return createIcon(Icons.add, 'add', attr);
|
|
871
868
|
},
|
|
872
|
-
reduce: function(attr) {
|
|
869
|
+
reduce: function reduce(attr) {
|
|
873
870
|
if (attr === void 0) attr = {};
|
|
874
871
|
return createIcon(Icons.reduce, 'reduce', attr);
|
|
875
872
|
},
|
|
876
|
-
/** 直播 */ live: function(attr) {
|
|
873
|
+
/** 直播 */ live: function live(attr) {
|
|
877
874
|
if (attr === void 0) attr = {};
|
|
878
875
|
return createIcon(Icons.live, 'live', attr);
|
|
879
876
|
},
|
|
880
|
-
/** 回放 */ recDropdown: function(attr) {
|
|
877
|
+
/** 回放 */ recDropdown: function recDropdown(attr) {
|
|
881
878
|
if (attr === void 0) attr = {};
|
|
882
879
|
return createIcon(Icons.recDropdown, 'rec-dropdown', attr);
|
|
883
880
|
},
|
|
884
|
-
/** 录像列表 */ recList: function(attr) {
|
|
881
|
+
/** 录像列表 */ recList: function recList(attr) {
|
|
885
882
|
if (attr === void 0) attr = {};
|
|
886
883
|
return createIcon(Icons.list, 'rec-list', attr);
|
|
887
884
|
},
|
|
888
|
-
/** 消息 */ alarmMessage: function(attr) {
|
|
885
|
+
/** 消息 */ alarmMessage: function alarmMessage(attr) {
|
|
889
886
|
if (attr === void 0) attr = {};
|
|
890
887
|
return createIcon(Icons.alarmMessage, 'alarm-message', attr);
|
|
891
888
|
},
|
|
892
|
-
time: function(attr) {
|
|
889
|
+
time: function time(attr) {
|
|
893
890
|
if (attr === void 0) attr = {};
|
|
894
891
|
return createIcon(Icons.time, 'time', attr);
|
|
895
892
|
}
|
|
896
893
|
};
|
|
897
894
|
|
|
898
|
-
function _extends$
|
|
899
|
-
_extends$
|
|
895
|
+
function _extends$w() {
|
|
896
|
+
_extends$w = Object.assign || function assign(target) {
|
|
900
897
|
for(var i = 1; i < arguments.length; i++){
|
|
901
898
|
var source = arguments[i];
|
|
902
|
-
for(var key in source)
|
|
903
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
904
|
-
target[key] = source[key];
|
|
905
|
-
}
|
|
906
|
-
}
|
|
899
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
907
900
|
}
|
|
908
901
|
return target;
|
|
909
902
|
};
|
|
910
|
-
return _extends$
|
|
903
|
+
return _extends$w.apply(this, arguments);
|
|
911
904
|
}
|
|
912
|
-
function _inherits$
|
|
905
|
+
function _inherits$w(subClass, superClass) {
|
|
913
906
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
914
907
|
throw new TypeError("Super expression must either be null or a function");
|
|
915
908
|
}
|
|
@@ -920,25 +913,25 @@ function _inherits$v(subClass, superClass) {
|
|
|
920
913
|
configurable: true
|
|
921
914
|
}
|
|
922
915
|
});
|
|
923
|
-
if (superClass) _set_prototype_of$
|
|
916
|
+
if (superClass) _set_prototype_of$w(subClass, superClass);
|
|
924
917
|
}
|
|
925
|
-
function _set_prototype_of$
|
|
926
|
-
_set_prototype_of$
|
|
918
|
+
function _set_prototype_of$w(o, p) {
|
|
919
|
+
_set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
927
920
|
o.__proto__ = p;
|
|
928
921
|
return o;
|
|
929
922
|
};
|
|
930
|
-
return _set_prototype_of$
|
|
923
|
+
return _set_prototype_of$w(o, p);
|
|
931
924
|
}
|
|
932
925
|
var MESSAGE_DEFAULT_OPTIONS = {};
|
|
933
926
|
/**
|
|
934
927
|
* 消息控件
|
|
935
928
|
* @category Control
|
|
936
929
|
*/ var Message = /*#__PURE__*/ function(Control) {
|
|
937
|
-
_inherits$
|
|
930
|
+
_inherits$w(Message, Control);
|
|
938
931
|
function Message(options) {
|
|
939
932
|
if (options === void 0) options = {};
|
|
940
933
|
var _this;
|
|
941
|
-
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$
|
|
934
|
+
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$w({}, options, {
|
|
942
935
|
tagName: 'div',
|
|
943
936
|
controlType: 'block'
|
|
944
937
|
}))) || this, _this._$toast = null;
|
|
@@ -1095,21 +1088,17 @@ function _create_class$8(Constructor, protoProps, staticProps) {
|
|
|
1095
1088
|
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
1096
1089
|
return Constructor;
|
|
1097
1090
|
}
|
|
1098
|
-
function _extends$
|
|
1099
|
-
_extends$
|
|
1091
|
+
function _extends$v() {
|
|
1092
|
+
_extends$v = Object.assign || function assign(target) {
|
|
1100
1093
|
for(var i = 1; i < arguments.length; i++){
|
|
1101
1094
|
var source = arguments[i];
|
|
1102
|
-
for(var key in source)
|
|
1103
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1104
|
-
target[key] = source[key];
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1095
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
1107
1096
|
}
|
|
1108
1097
|
return target;
|
|
1109
1098
|
};
|
|
1110
|
-
return _extends$
|
|
1099
|
+
return _extends$v.apply(this, arguments);
|
|
1111
1100
|
}
|
|
1112
|
-
function _inherits$
|
|
1101
|
+
function _inherits$v(subClass, superClass) {
|
|
1113
1102
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
1114
1103
|
throw new TypeError("Super expression must either be null or a function");
|
|
1115
1104
|
}
|
|
@@ -1120,23 +1109,23 @@ function _inherits$u(subClass, superClass) {
|
|
|
1120
1109
|
configurable: true
|
|
1121
1110
|
}
|
|
1122
1111
|
});
|
|
1123
|
-
if (superClass) _set_prototype_of$
|
|
1112
|
+
if (superClass) _set_prototype_of$v(subClass, superClass);
|
|
1124
1113
|
}
|
|
1125
|
-
function _set_prototype_of$
|
|
1126
|
-
_set_prototype_of$
|
|
1114
|
+
function _set_prototype_of$v(o, p) {
|
|
1115
|
+
_set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
1127
1116
|
o.__proto__ = p;
|
|
1128
1117
|
return o;
|
|
1129
1118
|
};
|
|
1130
|
-
return _set_prototype_of$
|
|
1119
|
+
return _set_prototype_of$v(o, p);
|
|
1131
1120
|
}
|
|
1132
1121
|
/**
|
|
1133
1122
|
* 播放/暂停控件
|
|
1134
1123
|
* @category Control
|
|
1135
1124
|
*/ var Play = /*#__PURE__*/ function(Control) {
|
|
1136
|
-
_inherits$
|
|
1125
|
+
_inherits$v(Play, Control);
|
|
1137
1126
|
function Play(options) {
|
|
1138
1127
|
var _this;
|
|
1139
|
-
_this = Control.call(this, _extends$
|
|
1128
|
+
_this = Control.call(this, _extends$v({}, options, {
|
|
1140
1129
|
tagName: 'span',
|
|
1141
1130
|
controlType: 'button',
|
|
1142
1131
|
classNameSuffix: 'play'
|
|
@@ -1222,14 +1211,6 @@ function _array_like_to_array$2(arr, len) {
|
|
|
1222
1211
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1223
1212
|
return arr2;
|
|
1224
1213
|
}
|
|
1225
|
-
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
1226
|
-
if (!o) return;
|
|
1227
|
-
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
1228
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1229
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1230
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1231
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
1232
|
-
}
|
|
1233
1214
|
function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
|
|
1234
1215
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
1235
1216
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
@@ -1237,18 +1218,24 @@ function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
|
|
|
1237
1218
|
if (it) o = it;
|
|
1238
1219
|
var i = 0;
|
|
1239
1220
|
return function() {
|
|
1240
|
-
if (i >= o.length) {
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1221
|
+
if (i >= o.length) return {
|
|
1222
|
+
done: true
|
|
1223
|
+
};
|
|
1245
1224
|
return {
|
|
1246
1225
|
done: false,
|
|
1247
1226
|
value: o[i++]
|
|
1248
1227
|
};
|
|
1249
1228
|
};
|
|
1250
1229
|
}
|
|
1251
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance
|
|
1230
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1231
|
+
}
|
|
1232
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
1233
|
+
if (!o) return;
|
|
1234
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
1235
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1236
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1237
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1238
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
1252
1239
|
}
|
|
1253
1240
|
/**
|
|
1254
1241
|
* 工具类
|
|
@@ -1275,7 +1262,7 @@ function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
|
|
|
1275
1262
|
*/ // prettier-ignore
|
|
1276
1263
|
Utils.orientationEventListener = function orientationEventListener(change) {
|
|
1277
1264
|
var _orientationTimer = null;
|
|
1278
|
-
var getOrientation = function() {
|
|
1265
|
+
var getOrientation = function getOrientation() {
|
|
1279
1266
|
var _screen, _window;
|
|
1280
1267
|
// 现代浏览器方案
|
|
1281
1268
|
if ((_screen = screen) == null ? void 0 : _screen.orientation) {
|
|
@@ -1312,7 +1299,7 @@ function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
|
|
|
1312
1299
|
};
|
|
1313
1300
|
var orientation = getOrientation();
|
|
1314
1301
|
// 监听变化(兼容写法)
|
|
1315
|
-
var onOrientationChange = function() {
|
|
1302
|
+
var onOrientationChange = function onOrientationChange() {
|
|
1316
1303
|
var newOrientation = getOrientation == null ? void 0 : getOrientation();
|
|
1317
1304
|
// console.log("onOrientationChange", newOrientation, orientation)
|
|
1318
1305
|
// prettier-ignore
|
|
@@ -1321,7 +1308,7 @@ function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
|
|
|
1321
1308
|
orientation = newOrientation;
|
|
1322
1309
|
}
|
|
1323
1310
|
};
|
|
1324
|
-
var onResize = function() {
|
|
1311
|
+
var onResize = function onResize() {
|
|
1325
1312
|
// 防抖处理
|
|
1326
1313
|
if (_orientationTimer) clearTimeout(_orientationTimer);
|
|
1327
1314
|
if (onOrientationChange) _orientationTimer = setTimeout(onOrientationChange, 200);
|
|
@@ -1376,7 +1363,7 @@ function _create_for_of_iterator_helper_loose$2(o, allowArrayLike) {
|
|
|
1376
1363
|
*/ // prettier-ignore
|
|
1377
1364
|
Utils.resizeObserver = function resizeObserver(node, callback) {
|
|
1378
1365
|
// prettier-ignore
|
|
1379
|
-
var observerFn = function(entries, observer) {
|
|
1366
|
+
var observerFn = function observerFn(entries, observer) {
|
|
1380
1367
|
for(var _iterator = _create_for_of_iterator_helper_loose$2(entries), _step; !(_step = _iterator()).done;){
|
|
1381
1368
|
var entry = _step.value;
|
|
1382
1369
|
if (entry.target === node) {
|
|
@@ -1440,9 +1427,9 @@ var PROGRESS_DEFAULT_OPTIONS = {
|
|
|
1440
1427
|
showPlus: false,
|
|
1441
1428
|
showMinus: false,
|
|
1442
1429
|
isRotated: false,
|
|
1443
|
-
onChange: function() {
|
|
1430
|
+
onChange: function onChange() {
|
|
1444
1431
|
/* no-op */ },
|
|
1445
|
-
renderText: function(_, percent) {
|
|
1432
|
+
renderText: function renderText(_, percent) {
|
|
1446
1433
|
return (percent * 100).toFixed(0);
|
|
1447
1434
|
}
|
|
1448
1435
|
};
|
|
@@ -1465,6 +1452,7 @@ var PROGRESS_DEFAULT_OPTIONS = {
|
|
|
1465
1452
|
* })
|
|
1466
1453
|
*/ var Progress = /*#__PURE__*/ function() {
|
|
1467
1454
|
function Progress(options) {
|
|
1455
|
+
var _this_options_defaultValue;
|
|
1468
1456
|
var _this_options_range;
|
|
1469
1457
|
this._percent = 0;
|
|
1470
1458
|
this._value = 0;
|
|
@@ -1486,7 +1474,6 @@ var PROGRESS_DEFAULT_OPTIONS = {
|
|
|
1486
1474
|
this.$container = options.container;
|
|
1487
1475
|
this._render();
|
|
1488
1476
|
this._eventListeners();
|
|
1489
|
-
var _this_options_defaultValue;
|
|
1490
1477
|
var value = (_this_options_defaultValue = this.options.defaultValue) != null ? _this_options_defaultValue : this.options.range[0]; // 设置默认值
|
|
1491
1478
|
this._value = +value.toFixed(2); // 保留两位小数
|
|
1492
1479
|
// prettier-ignore
|
|
@@ -1559,8 +1546,8 @@ var PROGRESS_DEFAULT_OPTIONS = {
|
|
|
1559
1546
|
this._percent = +((value - this.options.range[0]) / (this.options.range[1] - this.options.range[0])).toFixed(2);
|
|
1560
1547
|
};
|
|
1561
1548
|
_proto._render = function _render() {
|
|
1562
|
-
this.$content = document.createElement('div');
|
|
1563
1549
|
var _this_options_className;
|
|
1550
|
+
this.$content = document.createElement('div');
|
|
1564
1551
|
this.$content.className = PREFIX_CLASS + "-progress " + ((_this_options_className = this.options.className) != null ? _this_options_className : '');
|
|
1565
1552
|
this.$content.innerHTML = (this.options.showPercent ? '<div class="' + PREFIX_CLASS + '-progress-text">' + (this.options.renderText == null ? void 0 : this.options.renderText.call(this.options, this._value, this._percent, this.options.range)) + "</div>" : '') + "\n " + (this.options.showPlus ? '<div class="' + PREFIX_CLASS + '-progress-plus">\n ' + IconComponents.plusCircle() + "\n </div>" : '') + '\n <div class="' + PREFIX_CLASS + '-progress-slider">\n <div class="' + PREFIX_CLASS + '-progress-slider-fill"></div>\n <div class="' + PREFIX_CLASS + '-progress-slider-handle" style="top: 100%"></div>\n </div>\n ' + (this.options.showMinus ? '<div class="' + PREFIX_CLASS + '-progress-minus">\n ' + IconComponents.minusCircle() + "\n </div>" : '');
|
|
1566
1553
|
this.$container.appendChild(this.$content);
|
|
@@ -1752,21 +1739,17 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
1752
1739
|
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
1753
1740
|
return Constructor;
|
|
1754
1741
|
}
|
|
1755
|
-
function _extends$
|
|
1756
|
-
_extends$
|
|
1742
|
+
function _extends$u() {
|
|
1743
|
+
_extends$u = Object.assign || function assign(target) {
|
|
1757
1744
|
for(var i = 1; i < arguments.length; i++){
|
|
1758
1745
|
var source = arguments[i];
|
|
1759
|
-
for(var key in source)
|
|
1760
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1761
|
-
target[key] = source[key];
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1746
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
1764
1747
|
}
|
|
1765
1748
|
return target;
|
|
1766
1749
|
};
|
|
1767
|
-
return _extends$
|
|
1750
|
+
return _extends$u.apply(this, arguments);
|
|
1768
1751
|
}
|
|
1769
|
-
function _inherits$
|
|
1752
|
+
function _inherits$u(subClass, superClass) {
|
|
1770
1753
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
1771
1754
|
throw new TypeError("Super expression must either be null or a function");
|
|
1772
1755
|
}
|
|
@@ -1777,33 +1760,33 @@ function _inherits$t(subClass, superClass) {
|
|
|
1777
1760
|
configurable: true
|
|
1778
1761
|
}
|
|
1779
1762
|
});
|
|
1780
|
-
if (superClass) _set_prototype_of$
|
|
1763
|
+
if (superClass) _set_prototype_of$u(subClass, superClass);
|
|
1781
1764
|
}
|
|
1782
|
-
function _set_prototype_of$
|
|
1783
|
-
_set_prototype_of$
|
|
1765
|
+
function _set_prototype_of$u(o, p) {
|
|
1766
|
+
_set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
1784
1767
|
o.__proto__ = p;
|
|
1785
1768
|
return o;
|
|
1786
1769
|
};
|
|
1787
|
-
return _set_prototype_of$
|
|
1770
|
+
return _set_prototype_of$u(o, p);
|
|
1788
1771
|
}
|
|
1789
1772
|
var VOLUME_DEFAULT_OPTIONS = {
|
|
1790
1773
|
volume: 0.8,
|
|
1791
1774
|
muted: false,
|
|
1792
1775
|
open: false,
|
|
1793
1776
|
trigger: 'hover',
|
|
1794
|
-
onOpenChange: function() {},
|
|
1795
|
-
onChange: function() {}
|
|
1777
|
+
onOpenChange: function onOpenChange() {},
|
|
1778
|
+
onChange: function onChange() {}
|
|
1796
1779
|
};
|
|
1797
1780
|
/**
|
|
1798
1781
|
* 音量调节控件
|
|
1799
1782
|
* @category Control
|
|
1800
1783
|
*/ var Volume = /*#__PURE__*/ function(Control) {
|
|
1801
|
-
_inherits$
|
|
1784
|
+
_inherits$u(Volume, Control);
|
|
1802
1785
|
function Volume(options) {
|
|
1803
1786
|
if (options === void 0) options = {};
|
|
1804
1787
|
var _this;
|
|
1805
1788
|
var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
|
|
1806
|
-
_this = Control.call(this, _extends$
|
|
1789
|
+
_this = Control.call(this, _extends$u({}, options, {
|
|
1807
1790
|
tagName: 'span',
|
|
1808
1791
|
classNameSuffix: 'volume',
|
|
1809
1792
|
controlType: 'button'
|
|
@@ -1820,7 +1803,7 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1820
1803
|
if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'ezhls')) {
|
|
1821
1804
|
var _this__options_props4, _this__options_props5;
|
|
1822
1805
|
_this.picker = new Picker(_this.$container, {
|
|
1823
|
-
getPopupContainer: function() {
|
|
1806
|
+
getPopupContainer: function getPopupContainer() {
|
|
1824
1807
|
return _this.$container;
|
|
1825
1808
|
},
|
|
1826
1809
|
trigger: _this._options.trigger,
|
|
@@ -1831,7 +1814,7 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1831
1814
|
-10
|
|
1832
1815
|
],
|
|
1833
1816
|
placement: 'top',
|
|
1834
|
-
onOpenChange: function(open) {
|
|
1817
|
+
onOpenChange: function onOpenChange(open) {
|
|
1835
1818
|
_this._options.onOpenChange == null ? void 0 : _this._options.onOpenChange.call(_this._options, open, _this._muted ? _this._lastVolume : _this.volume, _this._muted);
|
|
1836
1819
|
// prettier-ignore
|
|
1837
1820
|
_this.emit(EVENTS.control.volumePanelOpenChange, open, _this._lastVolume, _this._muted);
|
|
@@ -1848,10 +1831,10 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1848
1831
|
showPercent: true,
|
|
1849
1832
|
className: "" + PREFIX_CLASS + "-volume-progress",
|
|
1850
1833
|
// 为了解决点击进度调取消静音
|
|
1851
|
-
onProgressClick: function() {
|
|
1834
|
+
onProgressClick: function onProgressClick() {
|
|
1852
1835
|
_this.muted = false;
|
|
1853
1836
|
},
|
|
1854
|
-
onChange: function(value) {
|
|
1837
|
+
onChange: function onChange(value) {
|
|
1855
1838
|
if (value !== _this._volume) _this.volume = value;
|
|
1856
1839
|
}
|
|
1857
1840
|
});
|
|
@@ -2028,11 +2011,8 @@ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
2028
2011
|
reject(error);
|
|
2029
2012
|
return;
|
|
2030
2013
|
}
|
|
2031
|
-
if (info.done)
|
|
2032
|
-
|
|
2033
|
-
} else {
|
|
2034
|
-
Promise.resolve(value).then(_next, _throw);
|
|
2035
|
-
}
|
|
2014
|
+
if (info.done) resolve(value);
|
|
2015
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
2036
2016
|
}
|
|
2037
2017
|
function _async_to_generator$7(fn) {
|
|
2038
2018
|
return function() {
|
|
@@ -2058,9 +2038,17 @@ function _ts_generator$7(thisArg, body) {
|
|
|
2058
2038
|
},
|
|
2059
2039
|
trys: [],
|
|
2060
2040
|
ops: []
|
|
2061
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
2062
|
-
return
|
|
2063
|
-
|
|
2041
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
2042
|
+
return d(g, "next", {
|
|
2043
|
+
value: verb(0)
|
|
2044
|
+
}), d(g, "throw", {
|
|
2045
|
+
value: verb(1)
|
|
2046
|
+
}), d(g, "return", {
|
|
2047
|
+
value: verb(2)
|
|
2048
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
2049
|
+
value: function() {
|
|
2050
|
+
return this;
|
|
2051
|
+
}
|
|
2064
2052
|
}), g;
|
|
2065
2053
|
function verb(n) {
|
|
2066
2054
|
return function(v) {
|
|
@@ -2463,21 +2451,17 @@ var __fullscreenProvider__ = Provider.getInstance();
|
|
|
2463
2451
|
return Fullscreen;
|
|
2464
2452
|
}();
|
|
2465
2453
|
|
|
2466
|
-
function _extends$
|
|
2467
|
-
_extends$
|
|
2454
|
+
function _extends$t() {
|
|
2455
|
+
_extends$t = Object.assign || function assign(target) {
|
|
2468
2456
|
for(var i = 1; i < arguments.length; i++){
|
|
2469
2457
|
var source = arguments[i];
|
|
2470
|
-
for(var key in source)
|
|
2471
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2472
|
-
target[key] = source[key];
|
|
2473
|
-
}
|
|
2474
|
-
}
|
|
2458
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
2475
2459
|
}
|
|
2476
2460
|
return target;
|
|
2477
2461
|
};
|
|
2478
|
-
return _extends$
|
|
2462
|
+
return _extends$t.apply(this, arguments);
|
|
2479
2463
|
}
|
|
2480
|
-
function _inherits$
|
|
2464
|
+
function _inherits$t(subClass, superClass) {
|
|
2481
2465
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
2482
2466
|
throw new TypeError("Super expression must either be null or a function");
|
|
2483
2467
|
}
|
|
@@ -2488,24 +2472,24 @@ function _inherits$s(subClass, superClass) {
|
|
|
2488
2472
|
configurable: true
|
|
2489
2473
|
}
|
|
2490
2474
|
});
|
|
2491
|
-
if (superClass) _set_prototype_of$
|
|
2475
|
+
if (superClass) _set_prototype_of$t(subClass, superClass);
|
|
2492
2476
|
}
|
|
2493
|
-
function _set_prototype_of$
|
|
2494
|
-
_set_prototype_of$
|
|
2477
|
+
function _set_prototype_of$t(o, p) {
|
|
2478
|
+
_set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
2495
2479
|
o.__proto__ = p;
|
|
2496
2480
|
return o;
|
|
2497
2481
|
};
|
|
2498
|
-
return _set_prototype_of$
|
|
2482
|
+
return _set_prototype_of$t(o, p);
|
|
2499
2483
|
}
|
|
2500
2484
|
/**
|
|
2501
2485
|
* 全屏控件
|
|
2502
2486
|
* @category Control
|
|
2503
2487
|
*/ var Fullscreen = /*#__PURE__*/ function(Control) {
|
|
2504
|
-
_inherits$
|
|
2488
|
+
_inherits$t(Fullscreen, Control);
|
|
2505
2489
|
function Fullscreen(options) {
|
|
2506
2490
|
var _this;
|
|
2507
2491
|
var _options_props, _this_options;
|
|
2508
|
-
_this = Control.call(this, _extends$
|
|
2492
|
+
_this = Control.call(this, _extends$t({
|
|
2509
2493
|
tagName: 'span',
|
|
2510
2494
|
classNameSuffix: 'fullscreen',
|
|
2511
2495
|
controlType: 'button'
|
|
@@ -2570,21 +2554,17 @@ function _set_prototype_of$s(o, p) {
|
|
|
2570
2554
|
return Fullscreen;
|
|
2571
2555
|
}(Control);
|
|
2572
2556
|
|
|
2573
|
-
function _extends$
|
|
2574
|
-
_extends$
|
|
2557
|
+
function _extends$s() {
|
|
2558
|
+
_extends$s = Object.assign || function assign(target) {
|
|
2575
2559
|
for(var i = 1; i < arguments.length; i++){
|
|
2576
2560
|
var source = arguments[i];
|
|
2577
|
-
for(var key in source)
|
|
2578
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
2579
|
-
target[key] = source[key];
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2561
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
2582
2562
|
}
|
|
2583
2563
|
return target;
|
|
2584
2564
|
};
|
|
2585
|
-
return _extends$
|
|
2565
|
+
return _extends$s.apply(this, arguments);
|
|
2586
2566
|
}
|
|
2587
|
-
function _inherits$
|
|
2567
|
+
function _inherits$s(subClass, superClass) {
|
|
2588
2568
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
2589
2569
|
throw new TypeError("Super expression must either be null or a function");
|
|
2590
2570
|
}
|
|
@@ -2595,24 +2575,24 @@ function _inherits$r(subClass, superClass) {
|
|
|
2595
2575
|
configurable: true
|
|
2596
2576
|
}
|
|
2597
2577
|
});
|
|
2598
|
-
if (superClass) _set_prototype_of$
|
|
2578
|
+
if (superClass) _set_prototype_of$s(subClass, superClass);
|
|
2599
2579
|
}
|
|
2600
|
-
function _set_prototype_of$
|
|
2601
|
-
_set_prototype_of$
|
|
2580
|
+
function _set_prototype_of$s(o, p) {
|
|
2581
|
+
_set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
2602
2582
|
o.__proto__ = p;
|
|
2603
2583
|
return o;
|
|
2604
2584
|
};
|
|
2605
|
-
return _set_prototype_of$
|
|
2585
|
+
return _set_prototype_of$s(o, p);
|
|
2606
2586
|
}
|
|
2607
2587
|
/**
|
|
2608
2588
|
* 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
|
|
2609
2589
|
* @category Control
|
|
2610
2590
|
*/ var Rec = /*#__PURE__*/ function(Control) {
|
|
2611
|
-
_inherits$
|
|
2591
|
+
_inherits$s(Rec, Control);
|
|
2612
2592
|
function Rec(options) {
|
|
2613
2593
|
var _this;
|
|
2614
2594
|
var _options_props;
|
|
2615
|
-
_this = Control.call(this, _extends$
|
|
2595
|
+
_this = Control.call(this, _extends$s({}, options, {
|
|
2616
2596
|
tagName: 'div',
|
|
2617
2597
|
controlType: 'block',
|
|
2618
2598
|
classNameSuffix: 'rec'
|
|
@@ -3952,7 +3932,7 @@ var en = {
|
|
|
3952
3932
|
voice: voice
|
|
3953
3933
|
};
|
|
3954
3934
|
|
|
3955
|
-
function _inherits$
|
|
3935
|
+
function _inherits$r(subClass, superClass) {
|
|
3956
3936
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3957
3937
|
throw new TypeError("Super expression must either be null or a function");
|
|
3958
3938
|
}
|
|
@@ -3963,20 +3943,20 @@ function _inherits$q(subClass, superClass) {
|
|
|
3963
3943
|
configurable: true
|
|
3964
3944
|
}
|
|
3965
3945
|
});
|
|
3966
|
-
if (superClass) _set_prototype_of$
|
|
3946
|
+
if (superClass) _set_prototype_of$r(subClass, superClass);
|
|
3967
3947
|
}
|
|
3968
|
-
function _set_prototype_of$
|
|
3969
|
-
_set_prototype_of$
|
|
3948
|
+
function _set_prototype_of$r(o, p) {
|
|
3949
|
+
_set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
3970
3950
|
o.__proto__ = p;
|
|
3971
3951
|
return o;
|
|
3972
3952
|
};
|
|
3973
|
-
return _set_prototype_of$
|
|
3953
|
+
return _set_prototype_of$r(o, p);
|
|
3974
3954
|
}
|
|
3975
3955
|
/**
|
|
3976
3956
|
* 截图控件
|
|
3977
3957
|
* @category Content
|
|
3978
3958
|
*/ var Content = /*#__PURE__*/ function(EventEmitter) {
|
|
3979
|
-
_inherits$
|
|
3959
|
+
_inherits$r(Content, EventEmitter);
|
|
3980
3960
|
function Content(options) {
|
|
3981
3961
|
var _this;
|
|
3982
3962
|
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
@@ -4091,21 +4071,17 @@ function _set_prototype_of$q(o, p) {
|
|
|
4091
4071
|
return Content;
|
|
4092
4072
|
}(EventEmitter);
|
|
4093
4073
|
|
|
4094
|
-
function _extends$
|
|
4095
|
-
_extends$
|
|
4074
|
+
function _extends$r() {
|
|
4075
|
+
_extends$r = Object.assign || function assign(target) {
|
|
4096
4076
|
for(var i = 1; i < arguments.length; i++){
|
|
4097
4077
|
var source = arguments[i];
|
|
4098
|
-
for(var key in source)
|
|
4099
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4100
|
-
target[key] = source[key];
|
|
4101
|
-
}
|
|
4102
|
-
}
|
|
4078
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
4103
4079
|
}
|
|
4104
4080
|
return target;
|
|
4105
4081
|
};
|
|
4106
|
-
return _extends$
|
|
4082
|
+
return _extends$r.apply(this, arguments);
|
|
4107
4083
|
}
|
|
4108
|
-
function _inherits$
|
|
4084
|
+
function _inherits$q(subClass, superClass) {
|
|
4109
4085
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
4110
4086
|
throw new TypeError("Super expression must either be null or a function");
|
|
4111
4087
|
}
|
|
@@ -4116,23 +4092,23 @@ function _inherits$p(subClass, superClass) {
|
|
|
4116
4092
|
configurable: true
|
|
4117
4093
|
}
|
|
4118
4094
|
});
|
|
4119
|
-
if (superClass) _set_prototype_of$
|
|
4095
|
+
if (superClass) _set_prototype_of$q(subClass, superClass);
|
|
4120
4096
|
}
|
|
4121
|
-
function _set_prototype_of$
|
|
4122
|
-
_set_prototype_of$
|
|
4097
|
+
function _set_prototype_of$q(o, p) {
|
|
4098
|
+
_set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
4123
4099
|
o.__proto__ = p;
|
|
4124
4100
|
return o;
|
|
4125
4101
|
};
|
|
4126
|
-
return _set_prototype_of$
|
|
4102
|
+
return _set_prototype_of$q(o, p);
|
|
4127
4103
|
}
|
|
4128
4104
|
/**
|
|
4129
4105
|
* 更多控件
|
|
4130
4106
|
* @category Control
|
|
4131
4107
|
*/ var More = /*#__PURE__*/ function(Control) {
|
|
4132
|
-
_inherits$
|
|
4108
|
+
_inherits$q(More, Control);
|
|
4133
4109
|
function More(options) {
|
|
4134
4110
|
var _this;
|
|
4135
|
-
_this = Control.call(this, _extends$
|
|
4111
|
+
_this = Control.call(this, _extends$r({}, options, {
|
|
4136
4112
|
tagName: 'span',
|
|
4137
4113
|
controlType: 'button',
|
|
4138
4114
|
classNameSuffix: 'more'
|
|
@@ -4151,7 +4127,7 @@ function _set_prototype_of$p(o, p) {
|
|
|
4151
4127
|
title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_MORE
|
|
4152
4128
|
});
|
|
4153
4129
|
this.picker = new Picker(this.$container, {
|
|
4154
|
-
getPopupContainer: function() {
|
|
4130
|
+
getPopupContainer: function getPopupContainer() {
|
|
4155
4131
|
return _this.$container;
|
|
4156
4132
|
},
|
|
4157
4133
|
trigger: Utils.isMobile ? 'click' : 'hover',
|
|
@@ -4414,14 +4390,22 @@ function debounce(func, wait) {
|
|
|
4414
4390
|
// 回放片段
|
|
4415
4391
|
// =======================================================
|
|
4416
4392
|
theme.on(EVENTS.setAllDayRecTimes, function(list) {
|
|
4417
|
-
var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls, _theme_controls_recListControl_emit, _theme_controls_recListControl, _theme_controls1
|
|
4393
|
+
var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls, _theme_controls_recListControl_emit, _theme_controls_recListControl, _theme_controls1, // 播放区间存在时录像列表已在服务端侧按区间查询,这里无需再过滤
|
|
4394
|
+
_theme_controls_segmentProgressControl_emit, _theme_controls_segmentProgressControl, _theme_controls2;
|
|
4418
4395
|
(_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_timeLineControl = _theme_controls.timeLineControl) == null ? void 0 : (_theme_controls_timeLineControl_emit = _theme_controls_timeLineControl.emit) == null ? void 0 : _theme_controls_timeLineControl_emit.call(_theme_controls_timeLineControl, EVENTS.setAllDayRecTimes, list.list);
|
|
4419
4396
|
(_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recListControl = _theme_controls1.recListControl) == null ? void 0 : (_theme_controls_recListControl_emit = _theme_controls_recListControl.emit) == null ? void 0 : _theme_controls_recListControl_emit.call(_theme_controls_recListControl, EVENTS.setAllDayRecTimes, list.list);
|
|
4397
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_segmentProgressControl = _theme_controls2.segmentProgressControl) == null ? void 0 : (_theme_controls_segmentProgressControl_emit = _theme_controls_segmentProgressControl.emit) == null ? void 0 : _theme_controls_segmentProgressControl_emit.call(_theme_controls_segmentProgressControl, EVENTS.setAllDayRecTimes, list.list);
|
|
4420
4398
|
});
|
|
4421
4399
|
theme.on(EVENTS.getOSDTime, function(time) {
|
|
4422
|
-
var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls, _theme_controls_recListControl_emit, _theme_controls_recListControl, _theme_controls1;
|
|
4400
|
+
var _theme_controls_timeLineControl_emit, _theme_controls_timeLineControl, _theme_controls, _theme_controls_recListControl_emit, _theme_controls_recListControl, _theme_controls1, _theme_controls_segmentProgressControl_emit, _theme_controls_segmentProgressControl, _theme_controls2;
|
|
4423
4401
|
(_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_timeLineControl = _theme_controls.timeLineControl) == null ? void 0 : (_theme_controls_timeLineControl_emit = _theme_controls_timeLineControl.emit) == null ? void 0 : _theme_controls_timeLineControl_emit.call(_theme_controls_timeLineControl, EVENTS.getOSDTime, time.data);
|
|
4424
4402
|
(_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_recListControl = _theme_controls1.recListControl) == null ? void 0 : (_theme_controls_recListControl_emit = _theme_controls_recListControl.emit) == null ? void 0 : _theme_controls_recListControl_emit.call(_theme_controls_recListControl, EVENTS.getOSDTime, time.data);
|
|
4403
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_segmentProgressControl = _theme_controls2.segmentProgressControl) == null ? void 0 : (_theme_controls_segmentProgressControl_emit = _theme_controls_segmentProgressControl.emit) == null ? void 0 : _theme_controls_segmentProgressControl_emit.call(_theme_controls_segmentProgressControl, EVENTS.getOSDTime, time.data);
|
|
4404
|
+
});
|
|
4405
|
+
// 区间播放结束:进度条需要把完成度补到末端(OSD 通常停在末端之前若干秒)
|
|
4406
|
+
theme.on(EVENTS.playbackEnd, function(data) {
|
|
4407
|
+
var _theme_controls_segmentProgressControl_emit, _theme_controls_segmentProgressControl, _theme_controls;
|
|
4408
|
+
(_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_segmentProgressControl = _theme_controls.segmentProgressControl) == null ? void 0 : (_theme_controls_segmentProgressControl_emit = _theme_controls_segmentProgressControl.emit) == null ? void 0 : _theme_controls_segmentProgressControl_emit.call(_theme_controls_segmentProgressControl, EVENTS.playbackEnd, data);
|
|
4425
4409
|
});
|
|
4426
4410
|
// =======================================================
|
|
4427
4411
|
// 全屏
|
|
@@ -4467,7 +4451,7 @@ function debounce(func, wait) {
|
|
|
4467
4451
|
*
|
|
4468
4452
|
* @param theme - Theme
|
|
4469
4453
|
*/ function _controlEventemitter(theme) {
|
|
4470
|
-
var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16, _theme_controls17, _theme_controls18, _theme_controls19, _theme_controls20, _theme_controls21, _theme_controls22, _theme_controls23, _theme_controls24;
|
|
4454
|
+
var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16, _theme_controls17, _theme_controls18, _theme_controls19, _theme_controls20, _theme_controls21, _theme_controls22, _theme_controls23, _theme_controls24, _theme_controls25;
|
|
4471
4455
|
// Controls
|
|
4472
4456
|
if (theme._recFooter) {
|
|
4473
4457
|
theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
|
|
@@ -4732,8 +4716,15 @@ function debounce(func, wait) {
|
|
|
4732
4716
|
theme.emit(EVENTS.control.recDestroy);
|
|
4733
4717
|
});
|
|
4734
4718
|
}
|
|
4719
|
+
// 回放片段进度条控件:拖动/点击后与时间轴共用同一条 seek 通道,
|
|
4720
|
+
// 这里必须把控件实例上的事件中继到 theme,否则 SDK 层收不到(拖动看似生效但不会 seek)
|
|
4721
|
+
if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.segmentProgressControl) {
|
|
4722
|
+
theme.controls.segmentProgressControl.on(EVENTS.control.timeLineChange, function(date) {
|
|
4723
|
+
theme.emit(EVENTS.control.timeLineChange, date);
|
|
4724
|
+
});
|
|
4725
|
+
}
|
|
4735
4726
|
// 时间轴控件
|
|
4736
|
-
if ((
|
|
4727
|
+
if ((_theme_controls22 = theme.controls) == null ? void 0 : _theme_controls22.timeLineControl) {
|
|
4737
4728
|
theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
|
|
4738
4729
|
theme.emit(EVENTS.control.timeLineChange, date);
|
|
4739
4730
|
});
|
|
@@ -4763,7 +4754,7 @@ function debounce(func, wait) {
|
|
|
4763
4754
|
});
|
|
4764
4755
|
}
|
|
4765
4756
|
// 日历控件
|
|
4766
|
-
if ((
|
|
4757
|
+
if ((_theme_controls23 = theme.controls) == null ? void 0 : _theme_controls23.dateControl) {
|
|
4767
4758
|
theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
|
|
4768
4759
|
theme.emit(EVENTS.control.datePanelOpenChange, open, date);
|
|
4769
4760
|
});
|
|
@@ -4775,7 +4766,7 @@ function debounce(func, wait) {
|
|
|
4775
4766
|
});
|
|
4776
4767
|
}
|
|
4777
4768
|
// 时间控件
|
|
4778
|
-
if ((
|
|
4769
|
+
if ((_theme_controls24 = theme.controls) == null ? void 0 : _theme_controls24.timeControl) {
|
|
4779
4770
|
theme.controls.timeControl.on(EVENTS.control.timePanelOpenChange, function(open, time) {
|
|
4780
4771
|
theme.emit(EVENTS.control.timePanelOpenChange, open, time);
|
|
4781
4772
|
});
|
|
@@ -4784,7 +4775,7 @@ function debounce(func, wait) {
|
|
|
4784
4775
|
});
|
|
4785
4776
|
}
|
|
4786
4777
|
// 回放片段列表
|
|
4787
|
-
if ((
|
|
4778
|
+
if ((_theme_controls25 = theme.controls) == null ? void 0 : _theme_controls25.recListControl) {
|
|
4788
4779
|
theme.controls.recListControl.on(EVENTS.control.recListCardClick, function(section, index, sections) {
|
|
4789
4780
|
theme.emit(EVENTS.control.recListCardClick, section, index, sections);
|
|
4790
4781
|
});
|
|
@@ -4874,21 +4865,17 @@ function _create_class$5(Constructor, protoProps, staticProps) {
|
|
|
4874
4865
|
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
4875
4866
|
return Constructor;
|
|
4876
4867
|
}
|
|
4877
|
-
function _extends$
|
|
4878
|
-
_extends$
|
|
4868
|
+
function _extends$q() {
|
|
4869
|
+
_extends$q = Object.assign || function assign(target) {
|
|
4879
4870
|
for(var i = 1; i < arguments.length; i++){
|
|
4880
4871
|
var source = arguments[i];
|
|
4881
|
-
for(var key in source)
|
|
4882
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
4883
|
-
target[key] = source[key];
|
|
4884
|
-
}
|
|
4885
|
-
}
|
|
4872
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
4886
4873
|
}
|
|
4887
4874
|
return target;
|
|
4888
4875
|
};
|
|
4889
|
-
return _extends$
|
|
4876
|
+
return _extends$q.apply(this, arguments);
|
|
4890
4877
|
}
|
|
4891
|
-
function _inherits$
|
|
4878
|
+
function _inherits$p(subClass, superClass) {
|
|
4892
4879
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
4893
4880
|
throw new TypeError("Super expression must either be null or a function");
|
|
4894
4881
|
}
|
|
@@ -4899,14 +4886,14 @@ function _inherits$o(subClass, superClass) {
|
|
|
4899
4886
|
configurable: true
|
|
4900
4887
|
}
|
|
4901
4888
|
});
|
|
4902
|
-
if (superClass) _set_prototype_of$
|
|
4889
|
+
if (superClass) _set_prototype_of$p(subClass, superClass);
|
|
4903
4890
|
}
|
|
4904
|
-
function _set_prototype_of$
|
|
4905
|
-
_set_prototype_of$
|
|
4891
|
+
function _set_prototype_of$p(o, p) {
|
|
4892
|
+
_set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
4906
4893
|
o.__proto__ = p;
|
|
4907
4894
|
return o;
|
|
4908
4895
|
};
|
|
4909
|
-
return _set_prototype_of$
|
|
4896
|
+
return _set_prototype_of$p(o, p);
|
|
4910
4897
|
}
|
|
4911
4898
|
var ZOOM_DEFAULT_OPTIONS = {
|
|
4912
4899
|
open: false,
|
|
@@ -4916,10 +4903,10 @@ var ZOOM_DEFAULT_OPTIONS = {
|
|
|
4916
4903
|
* 电子放大控件
|
|
4917
4904
|
* @category Control
|
|
4918
4905
|
*/ var Zoom = /*#__PURE__*/ function(Control) {
|
|
4919
|
-
_inherits$
|
|
4906
|
+
_inherits$p(Zoom, Control);
|
|
4920
4907
|
function Zoom(options) {
|
|
4921
4908
|
var _this;
|
|
4922
|
-
_this = Control.call(this, _extends$
|
|
4909
|
+
_this = Control.call(this, _extends$q({}, options, {
|
|
4923
4910
|
tagName: 'span',
|
|
4924
4911
|
controlType: 'button',
|
|
4925
4912
|
classNameSuffix: 'zoom'
|
|
@@ -4961,14 +4948,14 @@ var ZOOM_DEFAULT_OPTIONS = {
|
|
|
4961
4948
|
showPlus: true,
|
|
4962
4949
|
showPercent: true,
|
|
4963
4950
|
isRotated: this._isRotated,
|
|
4964
|
-
onChange: function(value, percent, range) {
|
|
4951
|
+
onChange: function onChange(value, percent, range) {
|
|
4965
4952
|
if (value !== _this._value) {
|
|
4966
4953
|
_this._value = value;
|
|
4967
4954
|
_this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, value, percent, range);
|
|
4968
4955
|
_this.emit(EVENTS.control.zoomChange, value, percent, range);
|
|
4969
4956
|
}
|
|
4970
4957
|
},
|
|
4971
|
-
renderText: function(value) {
|
|
4958
|
+
renderText: function renderText(value) {
|
|
4972
4959
|
return "" + value + "X";
|
|
4973
4960
|
}
|
|
4974
4961
|
});
|
|
@@ -5047,31 +5034,27 @@ var ZOOM_DEFAULT_OPTIONS = {
|
|
|
5047
5034
|
return Zoom;
|
|
5048
5035
|
}(Control);
|
|
5049
5036
|
|
|
5050
|
-
function _extends$
|
|
5051
|
-
_extends$
|
|
5037
|
+
function _extends$p() {
|
|
5038
|
+
_extends$p = Object.assign || function assign(target) {
|
|
5052
5039
|
for(var i = 1; i < arguments.length; i++){
|
|
5053
5040
|
var source = arguments[i];
|
|
5054
|
-
for(var key in source)
|
|
5055
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5056
|
-
target[key] = source[key];
|
|
5057
|
-
}
|
|
5058
|
-
}
|
|
5041
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
5059
5042
|
}
|
|
5060
5043
|
return target;
|
|
5061
5044
|
};
|
|
5062
|
-
return _extends$
|
|
5045
|
+
return _extends$p.apply(this, arguments);
|
|
5063
5046
|
}
|
|
5064
5047
|
function __zoom(theme, container, options) {
|
|
5065
|
-
theme.zoomUtil = new Zoom$1(container, _extends$
|
|
5048
|
+
theme.zoomUtil = new Zoom$1(container, _extends$p({}, options || {}, {
|
|
5066
5049
|
min: 1,
|
|
5067
|
-
onChange: function(zoom, reset) {
|
|
5050
|
+
onChange: function onChange(zoom, reset) {
|
|
5068
5051
|
if (zoom !== theme._zoom) {
|
|
5069
5052
|
var _options_onChange;
|
|
5070
5053
|
theme.zoom = zoom;
|
|
5071
5054
|
options == null ? void 0 : (_options_onChange = options.onChange) == null ? void 0 : _options_onChange.call(options, zoom, reset);
|
|
5072
5055
|
}
|
|
5073
5056
|
},
|
|
5074
|
-
onTranslateChange: function(pos) {
|
|
5057
|
+
onTranslateChange: function onTranslateChange(pos) {
|
|
5075
5058
|
var _options_onTranslateChange;
|
|
5076
5059
|
theme.emit(EVENTS.zoomTranslateChange, pos);
|
|
5077
5060
|
options == null ? void 0 : (_options_onTranslateChange = options.onTranslateChange) == null ? void 0 : _options_onTranslateChange.call(options, pos);
|
|
@@ -5088,11 +5071,8 @@ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5088
5071
|
reject(error);
|
|
5089
5072
|
return;
|
|
5090
5073
|
}
|
|
5091
|
-
if (info.done)
|
|
5092
|
-
|
|
5093
|
-
} else {
|
|
5094
|
-
Promise.resolve(value).then(_next, _throw);
|
|
5095
|
-
}
|
|
5074
|
+
if (info.done) resolve(value);
|
|
5075
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
5096
5076
|
}
|
|
5097
5077
|
function _async_to_generator$6(fn) {
|
|
5098
5078
|
return function() {
|
|
@@ -5118,9 +5098,17 @@ function _ts_generator$6(thisArg, body) {
|
|
|
5118
5098
|
},
|
|
5119
5099
|
trys: [],
|
|
5120
5100
|
ops: []
|
|
5121
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
5122
|
-
return
|
|
5123
|
-
|
|
5101
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
5102
|
+
return d(g, "next", {
|
|
5103
|
+
value: verb(0)
|
|
5104
|
+
}), d(g, "throw", {
|
|
5105
|
+
value: verb(1)
|
|
5106
|
+
}), d(g, "return", {
|
|
5107
|
+
value: verb(2)
|
|
5108
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
5109
|
+
value: function() {
|
|
5110
|
+
return this;
|
|
5111
|
+
}
|
|
5124
5112
|
}), g;
|
|
5125
5113
|
function verb(n) {
|
|
5126
5114
|
return function(v) {
|
|
@@ -5276,11 +5264,8 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5276
5264
|
reject(error);
|
|
5277
5265
|
return;
|
|
5278
5266
|
}
|
|
5279
|
-
if (info.done)
|
|
5280
|
-
|
|
5281
|
-
} else {
|
|
5282
|
-
Promise.resolve(value).then(_next, _throw);
|
|
5283
|
-
}
|
|
5267
|
+
if (info.done) resolve(value);
|
|
5268
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
5284
5269
|
}
|
|
5285
5270
|
function _async_to_generator$5(fn) {
|
|
5286
5271
|
return function() {
|
|
@@ -5297,19 +5282,15 @@ function _async_to_generator$5(fn) {
|
|
|
5297
5282
|
});
|
|
5298
5283
|
};
|
|
5299
5284
|
}
|
|
5300
|
-
function _extends$
|
|
5301
|
-
_extends$
|
|
5285
|
+
function _extends$o() {
|
|
5286
|
+
_extends$o = Object.assign || function assign(target) {
|
|
5302
5287
|
for(var i = 1; i < arguments.length; i++){
|
|
5303
5288
|
var source = arguments[i];
|
|
5304
|
-
for(var key in source)
|
|
5305
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5306
|
-
target[key] = source[key];
|
|
5307
|
-
}
|
|
5308
|
-
}
|
|
5289
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
5309
5290
|
}
|
|
5310
5291
|
return target;
|
|
5311
5292
|
};
|
|
5312
|
-
return _extends$
|
|
5293
|
+
return _extends$o.apply(this, arguments);
|
|
5313
5294
|
}
|
|
5314
5295
|
function _ts_generator$5(thisArg, body) {
|
|
5315
5296
|
var f, y, t, _ = {
|
|
@@ -5320,9 +5301,17 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5320
5301
|
},
|
|
5321
5302
|
trys: [],
|
|
5322
5303
|
ops: []
|
|
5323
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
5324
|
-
return
|
|
5325
|
-
|
|
5304
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
5305
|
+
return d(g, "next", {
|
|
5306
|
+
value: verb(0)
|
|
5307
|
+
}), d(g, "throw", {
|
|
5308
|
+
value: verb(1)
|
|
5309
|
+
}), d(g, "return", {
|
|
5310
|
+
value: verb(2)
|
|
5311
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
5312
|
+
value: function() {
|
|
5313
|
+
return this;
|
|
5314
|
+
}
|
|
5326
5315
|
}), g;
|
|
5327
5316
|
function verb(n) {
|
|
5328
5317
|
return function(v) {
|
|
@@ -5415,10 +5404,10 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5415
5404
|
* @param {IThemeData} themeData 主题数据
|
|
5416
5405
|
* @returns
|
|
5417
5406
|
*/ function _filterControls(themeData) {
|
|
5407
|
+
var _ref;
|
|
5418
5408
|
var _themeData_header, _themeData_footer;
|
|
5419
5409
|
var data = {};
|
|
5420
|
-
|
|
5421
|
-
data.autoFocus = (_themeData_autoFocus = themeData == null ? void 0 : themeData.autoFocus) != null ? _themeData_autoFocus : 3; // 3s
|
|
5410
|
+
data.autoFocus = (_ref = themeData == null ? void 0 : themeData.autoFocus) != null ? _ref : 3; // 3s
|
|
5422
5411
|
data.poster = (themeData == null ? void 0 : themeData.poster) || ''; //
|
|
5423
5412
|
var deviceControls = [];
|
|
5424
5413
|
var recControls = [];
|
|
@@ -5437,7 +5426,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5437
5426
|
}
|
|
5438
5427
|
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
5439
5428
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5440
|
-
recControls.push(recControls[0] ? _extends$
|
|
5429
|
+
recControls.push(recControls[0] ? _extends$o({}, item, {
|
|
5441
5430
|
part: recControls[0].part
|
|
5442
5431
|
}) : item);
|
|
5443
5432
|
return false;
|
|
@@ -5460,7 +5449,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5460
5449
|
}
|
|
5461
5450
|
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
5462
5451
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5463
|
-
recControls.push(recControls[0] ? _extends$
|
|
5452
|
+
recControls.push(recControls[0] ? _extends$o({}, item, {
|
|
5464
5453
|
part: recControls[0].part
|
|
5465
5454
|
}) : item);
|
|
5466
5455
|
return false;
|
|
@@ -5722,21 +5711,17 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
|
|
|
5722
5711
|
return Component;
|
|
5723
5712
|
}();
|
|
5724
5713
|
|
|
5725
|
-
function _extends$
|
|
5726
|
-
_extends$
|
|
5714
|
+
function _extends$n() {
|
|
5715
|
+
_extends$n = Object.assign || function assign(target) {
|
|
5727
5716
|
for(var i = 1; i < arguments.length; i++){
|
|
5728
5717
|
var source = arguments[i];
|
|
5729
|
-
for(var key in source)
|
|
5730
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5731
|
-
target[key] = source[key];
|
|
5732
|
-
}
|
|
5733
|
-
}
|
|
5718
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
5734
5719
|
}
|
|
5735
5720
|
return target;
|
|
5736
5721
|
};
|
|
5737
|
-
return _extends$
|
|
5722
|
+
return _extends$n.apply(this, arguments);
|
|
5738
5723
|
}
|
|
5739
|
-
function _inherits$
|
|
5724
|
+
function _inherits$o(subClass, superClass) {
|
|
5740
5725
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
5741
5726
|
throw new TypeError("Super expression must either be null or a function");
|
|
5742
5727
|
}
|
|
@@ -5747,41 +5732,37 @@ function _inherits$n(subClass, superClass) {
|
|
|
5747
5732
|
configurable: true
|
|
5748
5733
|
}
|
|
5749
5734
|
});
|
|
5750
|
-
if (superClass) _set_prototype_of$
|
|
5735
|
+
if (superClass) _set_prototype_of$o(subClass, superClass);
|
|
5751
5736
|
}
|
|
5752
|
-
function _set_prototype_of$
|
|
5753
|
-
_set_prototype_of$
|
|
5737
|
+
function _set_prototype_of$o(o, p) {
|
|
5738
|
+
_set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
5754
5739
|
o.__proto__ = p;
|
|
5755
5740
|
return o;
|
|
5756
5741
|
};
|
|
5757
|
-
return _set_prototype_of$
|
|
5742
|
+
return _set_prototype_of$o(o, p);
|
|
5758
5743
|
}
|
|
5759
5744
|
var Footer = /*#__PURE__*/ function(Component) {
|
|
5760
|
-
_inherits$
|
|
5745
|
+
_inherits$o(Footer, Component);
|
|
5761
5746
|
function Footer(options) {
|
|
5762
5747
|
if (options === void 0) options = {};
|
|
5763
|
-
return Component.call(this, _extends$
|
|
5748
|
+
return Component.call(this, _extends$n({}, options, {
|
|
5764
5749
|
cType: 'footer'
|
|
5765
5750
|
})) || this;
|
|
5766
5751
|
}
|
|
5767
5752
|
return Footer;
|
|
5768
5753
|
}(Component);
|
|
5769
5754
|
|
|
5770
|
-
function _extends$
|
|
5771
|
-
_extends$
|
|
5755
|
+
function _extends$m() {
|
|
5756
|
+
_extends$m = Object.assign || function assign(target) {
|
|
5772
5757
|
for(var i = 1; i < arguments.length; i++){
|
|
5773
5758
|
var source = arguments[i];
|
|
5774
|
-
for(var key in source)
|
|
5775
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5776
|
-
target[key] = source[key];
|
|
5777
|
-
}
|
|
5778
|
-
}
|
|
5759
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
5779
5760
|
}
|
|
5780
5761
|
return target;
|
|
5781
5762
|
};
|
|
5782
|
-
return _extends$
|
|
5763
|
+
return _extends$m.apply(this, arguments);
|
|
5783
5764
|
}
|
|
5784
|
-
function _inherits$
|
|
5765
|
+
function _inherits$n(subClass, superClass) {
|
|
5785
5766
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
5786
5767
|
throw new TypeError("Super expression must either be null or a function");
|
|
5787
5768
|
}
|
|
@@ -5792,20 +5773,20 @@ function _inherits$m(subClass, superClass) {
|
|
|
5792
5773
|
configurable: true
|
|
5793
5774
|
}
|
|
5794
5775
|
});
|
|
5795
|
-
if (superClass) _set_prototype_of$
|
|
5776
|
+
if (superClass) _set_prototype_of$n(subClass, superClass);
|
|
5796
5777
|
}
|
|
5797
|
-
function _set_prototype_of$
|
|
5798
|
-
_set_prototype_of$
|
|
5778
|
+
function _set_prototype_of$n(o, p) {
|
|
5779
|
+
_set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
5799
5780
|
o.__proto__ = p;
|
|
5800
5781
|
return o;
|
|
5801
5782
|
};
|
|
5802
|
-
return _set_prototype_of$
|
|
5783
|
+
return _set_prototype_of$n(o, p);
|
|
5803
5784
|
}
|
|
5804
5785
|
var Header = /*#__PURE__*/ function(Component) {
|
|
5805
|
-
_inherits$
|
|
5786
|
+
_inherits$n(Header, Component);
|
|
5806
5787
|
function Header(options) {
|
|
5807
5788
|
if (options === void 0) options = {};
|
|
5808
|
-
return Component.call(this, _extends$
|
|
5789
|
+
return Component.call(this, _extends$m({}, options, {
|
|
5809
5790
|
cType: 'header'
|
|
5810
5791
|
})) || this;
|
|
5811
5792
|
}
|
|
@@ -5827,13 +5808,13 @@ function interactiveHF($container, second, callback) {
|
|
|
5827
5808
|
var _alwaysDisplay = false;
|
|
5828
5809
|
var _$header = $container.querySelector("." + PREFIX_CLASS + "-header");
|
|
5829
5810
|
var _$footer = $container.querySelector("." + PREFIX_CLASS + "-footer");
|
|
5830
|
-
var _clearTimeout = function() {
|
|
5811
|
+
var _clearTimeout = function _clearTimeout() {
|
|
5831
5812
|
if (_timer) {
|
|
5832
5813
|
clearTimeout(_timer);
|
|
5833
5814
|
_timer = null;
|
|
5834
5815
|
}
|
|
5835
5816
|
};
|
|
5836
|
-
var _show = function() {
|
|
5817
|
+
var _show = function _show() {
|
|
5837
5818
|
_clearTimeout == null ? void 0 : _clearTimeout();
|
|
5838
5819
|
_$header == null ? void 0 : _$header.classList.remove("" + PREFIX_CLASS + "-hide-transition");
|
|
5839
5820
|
_$footer == null ? void 0 : _$footer.classList.remove("" + PREFIX_CLASS + "-hide-transition");
|
|
@@ -5843,7 +5824,7 @@ function interactiveHF($container, second, callback) {
|
|
|
5843
5824
|
}
|
|
5844
5825
|
_open = true;
|
|
5845
5826
|
};
|
|
5846
|
-
var _hide = function() {
|
|
5827
|
+
var _hide = function _hide() {
|
|
5847
5828
|
if (_alwaysDisplay) {
|
|
5848
5829
|
return;
|
|
5849
5830
|
}
|
|
@@ -5858,27 +5839,27 @@ function interactiveHF($container, second, callback) {
|
|
|
5858
5839
|
}
|
|
5859
5840
|
_open = false;
|
|
5860
5841
|
};
|
|
5861
|
-
var _setTimeoutShow = function() {
|
|
5842
|
+
var _setTimeoutShow = function _setTimeoutShow() {
|
|
5862
5843
|
_show == null ? void 0 : _show();
|
|
5863
5844
|
_timer = setTimeout(function() {
|
|
5864
5845
|
_clearTimeout == null ? void 0 : _clearTimeout();
|
|
5865
5846
|
_hide == null ? void 0 : _hide();
|
|
5866
5847
|
}, second);
|
|
5867
5848
|
};
|
|
5868
|
-
var _headerFooterMousemove = function(e) {
|
|
5849
|
+
var _headerFooterMousemove = function _headerFooterMousemove(e) {
|
|
5869
5850
|
var // 鼠标在header footer 移动, 不允许消失及不要冒泡
|
|
5870
5851
|
_e_stopPropagation;
|
|
5871
5852
|
e == null ? void 0 : (_e_stopPropagation = e.stopPropagation) == null ? void 0 : _e_stopPropagation.call(e);
|
|
5872
5853
|
_clearTimeout == null ? void 0 : _clearTimeout();
|
|
5873
5854
|
};
|
|
5874
|
-
var _touchStart = function() {
|
|
5855
|
+
var _touchStart = function _touchStart() {
|
|
5875
5856
|
if (_open) {
|
|
5876
5857
|
_hide == null ? void 0 : _hide();
|
|
5877
5858
|
} else {
|
|
5878
5859
|
_setTimeoutShow == null ? void 0 : _setTimeoutShow();
|
|
5879
5860
|
}
|
|
5880
5861
|
};
|
|
5881
|
-
var _headerFooterTouchStart = function(e) {
|
|
5862
|
+
var _headerFooterTouchStart = function _headerFooterTouchStart(e) {
|
|
5882
5863
|
var // 移动端特殊处理, 点击 header footer不允许消失及不要冒泡
|
|
5883
5864
|
_e_stopPropagation;
|
|
5884
5865
|
e == null ? void 0 : (_e_stopPropagation = e.stopPropagation) == null ? void 0 : _e_stopPropagation.call(e);
|
|
@@ -5915,7 +5896,7 @@ function interactiveHF($container, second, callback) {
|
|
|
5915
5896
|
}
|
|
5916
5897
|
/**
|
|
5917
5898
|
* 销毁
|
|
5918
|
-
*/ var cleanup = function() {
|
|
5899
|
+
*/ var cleanup = function cleanup() {
|
|
5919
5900
|
if ($container) {
|
|
5920
5901
|
if (Utils.isMobile && _touchStart) {
|
|
5921
5902
|
var eventName = "click";
|
|
@@ -5959,11 +5940,11 @@ function interactiveHF($container, second, callback) {
|
|
|
5959
5940
|
};
|
|
5960
5941
|
return {
|
|
5961
5942
|
cleanup: cleanup,
|
|
5962
|
-
clearTimeout: function() {
|
|
5943
|
+
clearTimeout: function clearTimeout1() {
|
|
5963
5944
|
_clearTimeout == null ? void 0 : _clearTimeout();
|
|
5964
5945
|
_alwaysDisplay = true;
|
|
5965
5946
|
},
|
|
5966
|
-
setTimeoutShow: function() {
|
|
5947
|
+
setTimeoutShow: function setTimeoutShow() {
|
|
5967
5948
|
_setTimeoutShow == null ? void 0 : _setTimeoutShow();
|
|
5968
5949
|
_alwaysDisplay = false;
|
|
5969
5950
|
},
|
|
@@ -5971,21 +5952,17 @@ function interactiveHF($container, second, callback) {
|
|
|
5971
5952
|
};
|
|
5972
5953
|
}
|
|
5973
5954
|
|
|
5974
|
-
function _extends$
|
|
5975
|
-
_extends$
|
|
5955
|
+
function _extends$l() {
|
|
5956
|
+
_extends$l = Object.assign || function assign(target) {
|
|
5976
5957
|
for(var i = 1; i < arguments.length; i++){
|
|
5977
5958
|
var source = arguments[i];
|
|
5978
|
-
for(var key in source)
|
|
5979
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5980
|
-
target[key] = source[key];
|
|
5981
|
-
}
|
|
5982
|
-
}
|
|
5959
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
5983
5960
|
}
|
|
5984
5961
|
return target;
|
|
5985
5962
|
};
|
|
5986
|
-
return _extends$
|
|
5963
|
+
return _extends$l.apply(this, arguments);
|
|
5987
5964
|
}
|
|
5988
|
-
function _inherits$
|
|
5965
|
+
function _inherits$m(subClass, superClass) {
|
|
5989
5966
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
5990
5967
|
throw new TypeError("Super expression must either be null or a function");
|
|
5991
5968
|
}
|
|
@@ -5996,23 +5973,23 @@ function _inherits$l(subClass, superClass) {
|
|
|
5996
5973
|
configurable: true
|
|
5997
5974
|
}
|
|
5998
5975
|
});
|
|
5999
|
-
if (superClass) _set_prototype_of$
|
|
5976
|
+
if (superClass) _set_prototype_of$m(subClass, superClass);
|
|
6000
5977
|
}
|
|
6001
|
-
function _set_prototype_of$
|
|
6002
|
-
_set_prototype_of$
|
|
5978
|
+
function _set_prototype_of$m(o, p) {
|
|
5979
|
+
_set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6003
5980
|
o.__proto__ = p;
|
|
6004
5981
|
return o;
|
|
6005
5982
|
};
|
|
6006
|
-
return _set_prototype_of$
|
|
5983
|
+
return _set_prototype_of$m(o, p);
|
|
6007
5984
|
}
|
|
6008
5985
|
/**
|
|
6009
5986
|
* 全局全屏
|
|
6010
5987
|
* 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
|
|
6011
5988
|
* @category Control
|
|
6012
5989
|
*/ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
|
|
6013
|
-
_inherits$
|
|
5990
|
+
_inherits$m(GlobalFullscreen, Fullscreen);
|
|
6014
5991
|
function GlobalFullscreen(options) {
|
|
6015
|
-
return Fullscreen.call(this, _extends$
|
|
5992
|
+
return Fullscreen.call(this, _extends$l({}, options, {
|
|
6016
5993
|
controlType: 'button',
|
|
6017
5994
|
classNameSuffix: 'global-fullscreen'
|
|
6018
5995
|
})) || this;
|
|
@@ -6043,21 +6020,17 @@ function _set_prototype_of$l(o, p) {
|
|
|
6043
6020
|
return GlobalFullscreen;
|
|
6044
6021
|
}(Fullscreen);
|
|
6045
6022
|
|
|
6046
|
-
function _extends$
|
|
6047
|
-
_extends$
|
|
6023
|
+
function _extends$k() {
|
|
6024
|
+
_extends$k = Object.assign || function assign(target) {
|
|
6048
6025
|
for(var i = 1; i < arguments.length; i++){
|
|
6049
6026
|
var source = arguments[i];
|
|
6050
|
-
for(var key in source)
|
|
6051
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6052
|
-
target[key] = source[key];
|
|
6053
|
-
}
|
|
6054
|
-
}
|
|
6027
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6055
6028
|
}
|
|
6056
6029
|
return target;
|
|
6057
6030
|
};
|
|
6058
|
-
return _extends$
|
|
6031
|
+
return _extends$k.apply(this, arguments);
|
|
6059
6032
|
}
|
|
6060
|
-
function _inherits$
|
|
6033
|
+
function _inherits$l(subClass, superClass) {
|
|
6061
6034
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6062
6035
|
throw new TypeError("Super expression must either be null or a function");
|
|
6063
6036
|
}
|
|
@@ -6068,23 +6041,23 @@ function _inherits$k(subClass, superClass) {
|
|
|
6068
6041
|
configurable: true
|
|
6069
6042
|
}
|
|
6070
6043
|
});
|
|
6071
|
-
if (superClass) _set_prototype_of$
|
|
6044
|
+
if (superClass) _set_prototype_of$l(subClass, superClass);
|
|
6072
6045
|
}
|
|
6073
|
-
function _set_prototype_of$
|
|
6074
|
-
_set_prototype_of$
|
|
6046
|
+
function _set_prototype_of$l(o, p) {
|
|
6047
|
+
_set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6075
6048
|
o.__proto__ = p;
|
|
6076
6049
|
return o;
|
|
6077
6050
|
};
|
|
6078
|
-
return _set_prototype_of$
|
|
6051
|
+
return _set_prototype_of$l(o, p);
|
|
6079
6052
|
}
|
|
6080
6053
|
/**
|
|
6081
6054
|
* 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
|
|
6082
6055
|
* @category Control
|
|
6083
6056
|
*/ var CapturePicture = /*#__PURE__*/ function(Control) {
|
|
6084
|
-
_inherits$
|
|
6057
|
+
_inherits$l(CapturePicture, Control);
|
|
6085
6058
|
function CapturePicture(options) {
|
|
6086
6059
|
var _this;
|
|
6087
|
-
_this = Control.call(this, _extends$
|
|
6060
|
+
_this = Control.call(this, _extends$k({}, options, {
|
|
6088
6061
|
tagName: 'span',
|
|
6089
6062
|
classNameSuffix: 'capture-picture'
|
|
6090
6063
|
})) || this, _this._timer = null;
|
|
@@ -6114,8 +6087,8 @@ function _set_prototype_of$k(o, p) {
|
|
|
6114
6087
|
* 点击 Control 会触发
|
|
6115
6088
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
6116
6089
|
var _this = this;
|
|
6117
|
-
this.active = true;
|
|
6118
6090
|
var _this_options_type, _this_options_cloudRecUpload;
|
|
6091
|
+
this.active = true;
|
|
6119
6092
|
this.emit(EVENTS.control.capturePicture, {
|
|
6120
6093
|
type: (_this_options_type = this.options.type) != null ? _this_options_type : 'download',
|
|
6121
6094
|
quality: this.options.quality || 0.9,
|
|
@@ -6150,21 +6123,17 @@ function _create_class$4(Constructor, protoProps, staticProps) {
|
|
|
6150
6123
|
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
6151
6124
|
return Constructor;
|
|
6152
6125
|
}
|
|
6153
|
-
function _extends$
|
|
6154
|
-
_extends$
|
|
6126
|
+
function _extends$j() {
|
|
6127
|
+
_extends$j = Object.assign || function assign(target) {
|
|
6155
6128
|
for(var i = 1; i < arguments.length; i++){
|
|
6156
6129
|
var source = arguments[i];
|
|
6157
|
-
for(var key in source)
|
|
6158
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6159
|
-
target[key] = source[key];
|
|
6160
|
-
}
|
|
6161
|
-
}
|
|
6130
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6162
6131
|
}
|
|
6163
6132
|
return target;
|
|
6164
6133
|
};
|
|
6165
|
-
return _extends$
|
|
6134
|
+
return _extends$j.apply(this, arguments);
|
|
6166
6135
|
}
|
|
6167
|
-
function _inherits$
|
|
6136
|
+
function _inherits$k(subClass, superClass) {
|
|
6168
6137
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6169
6138
|
throw new TypeError("Super expression must either be null or a function");
|
|
6170
6139
|
}
|
|
@@ -6175,23 +6144,23 @@ function _inherits$j(subClass, superClass) {
|
|
|
6175
6144
|
configurable: true
|
|
6176
6145
|
}
|
|
6177
6146
|
});
|
|
6178
|
-
if (superClass) _set_prototype_of$
|
|
6147
|
+
if (superClass) _set_prototype_of$k(subClass, superClass);
|
|
6179
6148
|
}
|
|
6180
|
-
function _set_prototype_of$
|
|
6181
|
-
_set_prototype_of$
|
|
6149
|
+
function _set_prototype_of$k(o, p) {
|
|
6150
|
+
_set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6182
6151
|
o.__proto__ = p;
|
|
6183
6152
|
return o;
|
|
6184
6153
|
};
|
|
6185
|
-
return _set_prototype_of$
|
|
6154
|
+
return _set_prototype_of$k(o, p);
|
|
6186
6155
|
}
|
|
6187
6156
|
/**
|
|
6188
6157
|
* 云台控件
|
|
6189
6158
|
* @category Control
|
|
6190
6159
|
*/ var Ptz = /*#__PURE__*/ function(Control) {
|
|
6191
|
-
_inherits$
|
|
6160
|
+
_inherits$k(Ptz, Control);
|
|
6192
6161
|
function Ptz(options) {
|
|
6193
6162
|
var _this;
|
|
6194
|
-
_this = Control.call(this, _extends$
|
|
6163
|
+
_this = Control.call(this, _extends$j({}, options, {
|
|
6195
6164
|
tagName: 'span',
|
|
6196
6165
|
controlType: 'button',
|
|
6197
6166
|
classNameSuffix: 'ptz'
|
|
@@ -6234,7 +6203,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
6234
6203
|
this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
|
|
6235
6204
|
this.$panel.appendChild(this.$turntable);
|
|
6236
6205
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
6237
|
-
this._ptzControl = new controlPtz.Ptz(this.$turntable, _extends$
|
|
6206
|
+
this._ptzControl = new controlPtz.Ptz(this.$turntable, _extends$j({}, this._options, {
|
|
6238
6207
|
onSpeedChange: this._onSpeedChange.bind(this),
|
|
6239
6208
|
onDirection: this._onDirection.bind(this)
|
|
6240
6209
|
}));
|
|
@@ -6243,7 +6212,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
6243
6212
|
};
|
|
6244
6213
|
_proto.renderMobileExtend = function renderMobileExtend($container) {
|
|
6245
6214
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
6246
|
-
if (!this._ptzControl1) this._ptzControl1 = new controlPtz.MobilePtz($container, _extends$
|
|
6215
|
+
if (!this._ptzControl1) this._ptzControl1 = new controlPtz.MobilePtz($container, _extends$j({}, this._options, {
|
|
6247
6216
|
onSpeedChange: this._onSpeedChange.bind(this),
|
|
6248
6217
|
onDirection: this._onDirection.bind(this)
|
|
6249
6218
|
}));
|
|
@@ -6327,7 +6296,7 @@ function formatTime(seconds, format) {
|
|
|
6327
6296
|
var hours = Math.floor(seconds / 3600);
|
|
6328
6297
|
var minutes = Math.floor(seconds % 3600 / 60);
|
|
6329
6298
|
var secs = seconds % 60;
|
|
6330
|
-
var pad = function(num) {
|
|
6299
|
+
var pad = function pad(num) {
|
|
6331
6300
|
return num.toString().padStart(2, '0');
|
|
6332
6301
|
};
|
|
6333
6302
|
return format.replace('HH', pad(hours)).replace('MM', pad(minutes)).replace('SS', pad(secs));
|
|
@@ -6346,21 +6315,17 @@ function _create_class$3(Constructor, protoProps, staticProps) {
|
|
|
6346
6315
|
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
6347
6316
|
return Constructor;
|
|
6348
6317
|
}
|
|
6349
|
-
function _extends$
|
|
6350
|
-
_extends$
|
|
6318
|
+
function _extends$i() {
|
|
6319
|
+
_extends$i = Object.assign || function assign(target) {
|
|
6351
6320
|
for(var i = 1; i < arguments.length; i++){
|
|
6352
6321
|
var source = arguments[i];
|
|
6353
|
-
for(var key in source)
|
|
6354
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6355
|
-
target[key] = source[key];
|
|
6356
|
-
}
|
|
6357
|
-
}
|
|
6322
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6358
6323
|
}
|
|
6359
6324
|
return target;
|
|
6360
6325
|
};
|
|
6361
|
-
return _extends$
|
|
6326
|
+
return _extends$i.apply(this, arguments);
|
|
6362
6327
|
}
|
|
6363
|
-
function _inherits$
|
|
6328
|
+
function _inherits$j(subClass, superClass) {
|
|
6364
6329
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6365
6330
|
throw new TypeError("Super expression must either be null or a function");
|
|
6366
6331
|
}
|
|
@@ -6371,14 +6336,14 @@ function _inherits$i(subClass, superClass) {
|
|
|
6371
6336
|
configurable: true
|
|
6372
6337
|
}
|
|
6373
6338
|
});
|
|
6374
|
-
if (superClass) _set_prototype_of$
|
|
6339
|
+
if (superClass) _set_prototype_of$j(subClass, superClass);
|
|
6375
6340
|
}
|
|
6376
|
-
function _set_prototype_of$
|
|
6377
|
-
_set_prototype_of$
|
|
6341
|
+
function _set_prototype_of$j(o, p) {
|
|
6342
|
+
_set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6378
6343
|
o.__proto__ = p;
|
|
6379
6344
|
return o;
|
|
6380
6345
|
};
|
|
6381
|
-
return _set_prototype_of$
|
|
6346
|
+
return _set_prototype_of$j(o, p);
|
|
6382
6347
|
}
|
|
6383
6348
|
var RECORD_DEFAULT_OPTIONS = {
|
|
6384
6349
|
maxDuration: 3600
|
|
@@ -6392,10 +6357,10 @@ var RECORD_DEFAULT_OPTIONS = {
|
|
|
6392
6357
|
* 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
|
|
6393
6358
|
* @category Control
|
|
6394
6359
|
*/ var Record = /*#__PURE__*/ function(Control) {
|
|
6395
|
-
_inherits$
|
|
6360
|
+
_inherits$j(Record, Control);
|
|
6396
6361
|
function Record(options) {
|
|
6397
6362
|
var _this;
|
|
6398
|
-
_this = Control.call(this, _extends$
|
|
6363
|
+
_this = Control.call(this, _extends$i({}, options, {
|
|
6399
6364
|
tagName: 'span',
|
|
6400
6365
|
controlType: 'button',
|
|
6401
6366
|
classNameSuffix: 'record'
|
|
@@ -6502,11 +6467,8 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
6502
6467
|
reject(error);
|
|
6503
6468
|
return;
|
|
6504
6469
|
}
|
|
6505
|
-
if (info.done)
|
|
6506
|
-
|
|
6507
|
-
} else {
|
|
6508
|
-
Promise.resolve(value).then(_next, _throw);
|
|
6509
|
-
}
|
|
6470
|
+
if (info.done) resolve(value);
|
|
6471
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
6510
6472
|
}
|
|
6511
6473
|
function _async_to_generator$4(fn) {
|
|
6512
6474
|
return function() {
|
|
@@ -6536,21 +6498,17 @@ function _create_class$2(Constructor, protoProps, staticProps) {
|
|
|
6536
6498
|
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
6537
6499
|
return Constructor;
|
|
6538
6500
|
}
|
|
6539
|
-
function _extends$
|
|
6540
|
-
_extends$
|
|
6501
|
+
function _extends$h() {
|
|
6502
|
+
_extends$h = Object.assign || function assign(target) {
|
|
6541
6503
|
for(var i = 1; i < arguments.length; i++){
|
|
6542
6504
|
var source = arguments[i];
|
|
6543
|
-
for(var key in source)
|
|
6544
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6545
|
-
target[key] = source[key];
|
|
6546
|
-
}
|
|
6547
|
-
}
|
|
6505
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6548
6506
|
}
|
|
6549
6507
|
return target;
|
|
6550
6508
|
};
|
|
6551
|
-
return _extends$
|
|
6509
|
+
return _extends$h.apply(this, arguments);
|
|
6552
6510
|
}
|
|
6553
|
-
function _inherits$
|
|
6511
|
+
function _inherits$i(subClass, superClass) {
|
|
6554
6512
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6555
6513
|
throw new TypeError("Super expression must either be null or a function");
|
|
6556
6514
|
}
|
|
@@ -6561,14 +6519,14 @@ function _inherits$h(subClass, superClass) {
|
|
|
6561
6519
|
configurable: true
|
|
6562
6520
|
}
|
|
6563
6521
|
});
|
|
6564
|
-
if (superClass) _set_prototype_of$
|
|
6522
|
+
if (superClass) _set_prototype_of$i(subClass, superClass);
|
|
6565
6523
|
}
|
|
6566
|
-
function _set_prototype_of$
|
|
6567
|
-
_set_prototype_of$
|
|
6524
|
+
function _set_prototype_of$i(o, p) {
|
|
6525
|
+
_set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6568
6526
|
o.__proto__ = p;
|
|
6569
6527
|
return o;
|
|
6570
6528
|
};
|
|
6571
|
-
return _set_prototype_of$
|
|
6529
|
+
return _set_prototype_of$i(o, p);
|
|
6572
6530
|
}
|
|
6573
6531
|
function _ts_generator$4(thisArg, body) {
|
|
6574
6532
|
var f, y, t, _ = {
|
|
@@ -6579,9 +6537,17 @@ function _ts_generator$4(thisArg, body) {
|
|
|
6579
6537
|
},
|
|
6580
6538
|
trys: [],
|
|
6581
6539
|
ops: []
|
|
6582
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
6583
|
-
return
|
|
6584
|
-
|
|
6540
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
6541
|
+
return d(g, "next", {
|
|
6542
|
+
value: verb(0)
|
|
6543
|
+
}), d(g, "throw", {
|
|
6544
|
+
value: verb(1)
|
|
6545
|
+
}), d(g, "return", {
|
|
6546
|
+
value: verb(2)
|
|
6547
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
6548
|
+
value: function() {
|
|
6549
|
+
return this;
|
|
6550
|
+
}
|
|
6585
6551
|
}), g;
|
|
6586
6552
|
function verb(n) {
|
|
6587
6553
|
return function(v) {
|
|
@@ -6670,10 +6636,10 @@ function _ts_generator$4(thisArg, body) {
|
|
|
6670
6636
|
*
|
|
6671
6637
|
* @category Control
|
|
6672
6638
|
*/ var Talk = /*#__PURE__*/ function(Control) {
|
|
6673
|
-
_inherits$
|
|
6639
|
+
_inherits$i(Talk, Control);
|
|
6674
6640
|
function Talk(options) {
|
|
6675
6641
|
var _this;
|
|
6676
|
-
_this = Control.call(this, _extends$
|
|
6642
|
+
_this = Control.call(this, _extends$h({}, options, {
|
|
6677
6643
|
tagName: 'span',
|
|
6678
6644
|
controlType: 'button',
|
|
6679
6645
|
classNameSuffix: 'talk'
|
|
@@ -6722,7 +6688,7 @@ function _ts_generator$4(thisArg, body) {
|
|
|
6722
6688
|
/**
|
|
6723
6689
|
* 点击 Control 会触发
|
|
6724
6690
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
6725
|
-
var _this = this, _superprop_get__onControlClick = function() {
|
|
6691
|
+
var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
|
|
6726
6692
|
return Control.prototype._onControlClick;
|
|
6727
6693
|
};
|
|
6728
6694
|
return _async_to_generator$4(function() {
|
|
@@ -6785,11 +6751,8 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
6785
6751
|
reject(error);
|
|
6786
6752
|
return;
|
|
6787
6753
|
}
|
|
6788
|
-
if (info.done)
|
|
6789
|
-
|
|
6790
|
-
} else {
|
|
6791
|
-
Promise.resolve(value).then(_next, _throw);
|
|
6792
|
-
}
|
|
6754
|
+
if (info.done) resolve(value);
|
|
6755
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
6793
6756
|
}
|
|
6794
6757
|
function _async_to_generator$3(fn) {
|
|
6795
6758
|
return function() {
|
|
@@ -6806,21 +6769,17 @@ function _async_to_generator$3(fn) {
|
|
|
6806
6769
|
});
|
|
6807
6770
|
};
|
|
6808
6771
|
}
|
|
6809
|
-
function _extends$
|
|
6810
|
-
_extends$
|
|
6772
|
+
function _extends$g() {
|
|
6773
|
+
_extends$g = Object.assign || function assign(target) {
|
|
6811
6774
|
for(var i = 1; i < arguments.length; i++){
|
|
6812
6775
|
var source = arguments[i];
|
|
6813
|
-
for(var key in source)
|
|
6814
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
6815
|
-
target[key] = source[key];
|
|
6816
|
-
}
|
|
6817
|
-
}
|
|
6776
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
6818
6777
|
}
|
|
6819
6778
|
return target;
|
|
6820
6779
|
};
|
|
6821
|
-
return _extends$
|
|
6780
|
+
return _extends$g.apply(this, arguments);
|
|
6822
6781
|
}
|
|
6823
|
-
function _inherits$
|
|
6782
|
+
function _inherits$h(subClass, superClass) {
|
|
6824
6783
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6825
6784
|
throw new TypeError("Super expression must either be null or a function");
|
|
6826
6785
|
}
|
|
@@ -6831,14 +6790,14 @@ function _inherits$g(subClass, superClass) {
|
|
|
6831
6790
|
configurable: true
|
|
6832
6791
|
}
|
|
6833
6792
|
});
|
|
6834
|
-
if (superClass) _set_prototype_of$
|
|
6793
|
+
if (superClass) _set_prototype_of$h(subClass, superClass);
|
|
6835
6794
|
}
|
|
6836
|
-
function _set_prototype_of$
|
|
6837
|
-
_set_prototype_of$
|
|
6795
|
+
function _set_prototype_of$h(o, p) {
|
|
6796
|
+
_set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6838
6797
|
o.__proto__ = p;
|
|
6839
6798
|
return o;
|
|
6840
6799
|
};
|
|
6841
|
-
return _set_prototype_of$
|
|
6800
|
+
return _set_prototype_of$h(o, p);
|
|
6842
6801
|
}
|
|
6843
6802
|
function _ts_generator$3(thisArg, body) {
|
|
6844
6803
|
var f, y, t, _ = {
|
|
@@ -6849,9 +6808,17 @@ function _ts_generator$3(thisArg, body) {
|
|
|
6849
6808
|
},
|
|
6850
6809
|
trys: [],
|
|
6851
6810
|
ops: []
|
|
6852
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
6853
|
-
return
|
|
6854
|
-
|
|
6811
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
6812
|
+
return d(g, "next", {
|
|
6813
|
+
value: verb(0)
|
|
6814
|
+
}), d(g, "throw", {
|
|
6815
|
+
value: verb(1)
|
|
6816
|
+
}), d(g, "return", {
|
|
6817
|
+
value: verb(2)
|
|
6818
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
6819
|
+
value: function() {
|
|
6820
|
+
return this;
|
|
6821
|
+
}
|
|
6855
6822
|
}), g;
|
|
6856
6823
|
function verb(n) {
|
|
6857
6824
|
return function(v) {
|
|
@@ -6938,10 +6905,10 @@ function _ts_generator$3(thisArg, body) {
|
|
|
6938
6905
|
*
|
|
6939
6906
|
* @category Control
|
|
6940
6907
|
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
6941
|
-
_inherits$
|
|
6908
|
+
_inherits$h(Broadcast, Control);
|
|
6942
6909
|
function Broadcast(options) {
|
|
6943
6910
|
var _this;
|
|
6944
|
-
_this = Control.call(this, _extends$
|
|
6911
|
+
_this = Control.call(this, _extends$g({}, options, {
|
|
6945
6912
|
tagName: 'span',
|
|
6946
6913
|
controlType: 'button',
|
|
6947
6914
|
classNameSuffix: 'broadcast'
|
|
@@ -6987,7 +6954,7 @@ function _ts_generator$3(thisArg, body) {
|
|
|
6987
6954
|
/**
|
|
6988
6955
|
* 点击 Control 会触发
|
|
6989
6956
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
6990
|
-
var _this = this, _superprop_get__onControlClick = function() {
|
|
6957
|
+
var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
|
|
6991
6958
|
return Control.prototype._onControlClick;
|
|
6992
6959
|
};
|
|
6993
6960
|
return _async_to_generator$3(function() {
|
|
@@ -7015,11 +6982,8 @@ function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
7015
6982
|
reject(error);
|
|
7016
6983
|
return;
|
|
7017
6984
|
}
|
|
7018
|
-
if (info.done)
|
|
7019
|
-
|
|
7020
|
-
} else {
|
|
7021
|
-
Promise.resolve(value).then(_next, _throw);
|
|
7022
|
-
}
|
|
6985
|
+
if (info.done) resolve(value);
|
|
6986
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
7023
6987
|
}
|
|
7024
6988
|
function _async_to_generator$2(fn) {
|
|
7025
6989
|
return function() {
|
|
@@ -7036,21 +7000,17 @@ function _async_to_generator$2(fn) {
|
|
|
7036
7000
|
});
|
|
7037
7001
|
};
|
|
7038
7002
|
}
|
|
7039
|
-
function _extends$
|
|
7040
|
-
_extends$
|
|
7003
|
+
function _extends$f() {
|
|
7004
|
+
_extends$f = Object.assign || function assign(target) {
|
|
7041
7005
|
for(var i = 1; i < arguments.length; i++){
|
|
7042
7006
|
var source = arguments[i];
|
|
7043
|
-
for(var key in source)
|
|
7044
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7045
|
-
target[key] = source[key];
|
|
7046
|
-
}
|
|
7047
|
-
}
|
|
7007
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7048
7008
|
}
|
|
7049
7009
|
return target;
|
|
7050
7010
|
};
|
|
7051
|
-
return _extends$
|
|
7011
|
+
return _extends$f.apply(this, arguments);
|
|
7052
7012
|
}
|
|
7053
|
-
function _inherits$
|
|
7013
|
+
function _inherits$g(subClass, superClass) {
|
|
7054
7014
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7055
7015
|
throw new TypeError("Super expression must either be null or a function");
|
|
7056
7016
|
}
|
|
@@ -7061,14 +7021,14 @@ function _inherits$f(subClass, superClass) {
|
|
|
7061
7021
|
configurable: true
|
|
7062
7022
|
}
|
|
7063
7023
|
});
|
|
7064
|
-
if (superClass) _set_prototype_of$
|
|
7024
|
+
if (superClass) _set_prototype_of$g(subClass, superClass);
|
|
7065
7025
|
}
|
|
7066
|
-
function _set_prototype_of$
|
|
7067
|
-
_set_prototype_of$
|
|
7026
|
+
function _set_prototype_of$g(o, p) {
|
|
7027
|
+
_set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7068
7028
|
o.__proto__ = p;
|
|
7069
7029
|
return o;
|
|
7070
7030
|
};
|
|
7071
|
-
return _set_prototype_of$
|
|
7031
|
+
return _set_prototype_of$g(o, p);
|
|
7072
7032
|
}
|
|
7073
7033
|
function _ts_generator$2(thisArg, body) {
|
|
7074
7034
|
var f, y, t, _ = {
|
|
@@ -7079,9 +7039,17 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7079
7039
|
},
|
|
7080
7040
|
trys: [],
|
|
7081
7041
|
ops: []
|
|
7082
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
7083
|
-
return
|
|
7084
|
-
|
|
7042
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
7043
|
+
return d(g, "next", {
|
|
7044
|
+
value: verb(0)
|
|
7045
|
+
}), d(g, "throw", {
|
|
7046
|
+
value: verb(1)
|
|
7047
|
+
}), d(g, "return", {
|
|
7048
|
+
value: verb(2)
|
|
7049
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
7050
|
+
value: function() {
|
|
7051
|
+
return this;
|
|
7052
|
+
}
|
|
7085
7053
|
}), g;
|
|
7086
7054
|
function verb(n) {
|
|
7087
7055
|
return function(v) {
|
|
@@ -7168,11 +7136,11 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7168
7136
|
*
|
|
7169
7137
|
* @category Control
|
|
7170
7138
|
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
7171
|
-
_inherits$
|
|
7139
|
+
_inherits$g(AIChat, Control);
|
|
7172
7140
|
function AIChat(options) {
|
|
7173
7141
|
var _this;
|
|
7174
7142
|
var _options_urlInfo_searchParams, _options_urlInfo, _options_urlInfo1;
|
|
7175
|
-
_this = Control.call(this, _extends$
|
|
7143
|
+
_this = Control.call(this, _extends$f({}, options, {
|
|
7176
7144
|
tagName: 'span',
|
|
7177
7145
|
controlType: 'button',
|
|
7178
7146
|
classNameSuffix: 'aichat'
|
|
@@ -7218,7 +7186,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7218
7186
|
/**
|
|
7219
7187
|
* 点击 Control 会触发
|
|
7220
7188
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
7221
|
-
var _this = this, _superprop_get__onControlClick = function() {
|
|
7189
|
+
var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
|
|
7222
7190
|
return Control.prototype._onControlClick;
|
|
7223
7191
|
};
|
|
7224
7192
|
return _async_to_generator$2(function() {
|
|
@@ -7238,21 +7206,17 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7238
7206
|
return AIChat;
|
|
7239
7207
|
}(Control);
|
|
7240
7208
|
|
|
7241
|
-
function _extends$
|
|
7242
|
-
_extends$
|
|
7209
|
+
function _extends$e() {
|
|
7210
|
+
_extends$e = Object.assign || function assign(target) {
|
|
7243
7211
|
for(var i = 1; i < arguments.length; i++){
|
|
7244
7212
|
var source = arguments[i];
|
|
7245
|
-
for(var key in source)
|
|
7246
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7247
|
-
target[key] = source[key];
|
|
7248
|
-
}
|
|
7249
|
-
}
|
|
7213
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7250
7214
|
}
|
|
7251
7215
|
return target;
|
|
7252
7216
|
};
|
|
7253
|
-
return _extends$
|
|
7217
|
+
return _extends$e.apply(this, arguments);
|
|
7254
7218
|
}
|
|
7255
|
-
function _inherits$
|
|
7219
|
+
function _inherits$f(subClass, superClass) {
|
|
7256
7220
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7257
7221
|
throw new TypeError("Super expression must either be null or a function");
|
|
7258
7222
|
}
|
|
@@ -7263,14 +7227,14 @@ function _inherits$e(subClass, superClass) {
|
|
|
7263
7227
|
configurable: true
|
|
7264
7228
|
}
|
|
7265
7229
|
});
|
|
7266
|
-
if (superClass) _set_prototype_of$
|
|
7230
|
+
if (superClass) _set_prototype_of$f(subClass, superClass);
|
|
7267
7231
|
}
|
|
7268
|
-
function _set_prototype_of$
|
|
7269
|
-
_set_prototype_of$
|
|
7232
|
+
function _set_prototype_of$f(o, p) {
|
|
7233
|
+
_set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7270
7234
|
o.__proto__ = p;
|
|
7271
7235
|
return o;
|
|
7272
7236
|
};
|
|
7273
|
-
return _set_prototype_of$
|
|
7237
|
+
return _set_prototype_of$f(o, p);
|
|
7274
7238
|
}
|
|
7275
7239
|
/**
|
|
7276
7240
|
* 直播按钮控件
|
|
@@ -7279,11 +7243,11 @@ function _set_prototype_of$e(o, p) {
|
|
|
7279
7243
|
*
|
|
7280
7244
|
* @category Control
|
|
7281
7245
|
*/ var Live = /*#__PURE__*/ function(Control) {
|
|
7282
|
-
_inherits$
|
|
7246
|
+
_inherits$f(Live, Control);
|
|
7283
7247
|
function Live(options) {
|
|
7284
7248
|
var _this;
|
|
7285
7249
|
var _this___options_props1;
|
|
7286
|
-
_this = Control.call(this, _extends$
|
|
7250
|
+
_this = Control.call(this, _extends$e({}, options, {
|
|
7287
7251
|
tagName: 'span',
|
|
7288
7252
|
controlType: 'button',
|
|
7289
7253
|
classNameSuffix: 'live'
|
|
@@ -7333,21 +7297,17 @@ function _set_prototype_of$e(o, p) {
|
|
|
7333
7297
|
return Live;
|
|
7334
7298
|
}(Control);
|
|
7335
7299
|
|
|
7336
|
-
function _extends$
|
|
7337
|
-
_extends$
|
|
7300
|
+
function _extends$d() {
|
|
7301
|
+
_extends$d = Object.assign || function assign(target) {
|
|
7338
7302
|
for(var i = 1; i < arguments.length; i++){
|
|
7339
7303
|
var source = arguments[i];
|
|
7340
|
-
for(var key in source)
|
|
7341
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7342
|
-
target[key] = source[key];
|
|
7343
|
-
}
|
|
7344
|
-
}
|
|
7304
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7345
7305
|
}
|
|
7346
7306
|
return target;
|
|
7347
7307
|
};
|
|
7348
|
-
return _extends$
|
|
7308
|
+
return _extends$d.apply(this, arguments);
|
|
7349
7309
|
}
|
|
7350
|
-
function _inherits$
|
|
7310
|
+
function _inherits$e(subClass, superClass) {
|
|
7351
7311
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7352
7312
|
throw new TypeError("Super expression must either be null or a function");
|
|
7353
7313
|
}
|
|
@@ -7358,14 +7318,14 @@ function _inherits$d(subClass, superClass) {
|
|
|
7358
7318
|
configurable: true
|
|
7359
7319
|
}
|
|
7360
7320
|
});
|
|
7361
|
-
if (superClass) _set_prototype_of$
|
|
7321
|
+
if (superClass) _set_prototype_of$e(subClass, superClass);
|
|
7362
7322
|
}
|
|
7363
|
-
function _set_prototype_of$
|
|
7364
|
-
_set_prototype_of$
|
|
7323
|
+
function _set_prototype_of$e(o, p) {
|
|
7324
|
+
_set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7365
7325
|
o.__proto__ = p;
|
|
7366
7326
|
return o;
|
|
7367
7327
|
};
|
|
7368
|
-
return _set_prototype_of$
|
|
7328
|
+
return _set_prototype_of$e(o, p);
|
|
7369
7329
|
}
|
|
7370
7330
|
/**
|
|
7371
7331
|
* 回放下拉控件
|
|
@@ -7374,11 +7334,11 @@ function _set_prototype_of$d(o, p) {
|
|
|
7374
7334
|
*
|
|
7375
7335
|
* @category Control
|
|
7376
7336
|
*/ var RecDropdown = /*#__PURE__*/ function(Control) {
|
|
7377
|
-
_inherits$
|
|
7337
|
+
_inherits$e(RecDropdown, Control);
|
|
7378
7338
|
function RecDropdown(options) {
|
|
7379
7339
|
var _this;
|
|
7380
7340
|
var _options_props, _this___options_props1;
|
|
7381
|
-
_this = Control.call(this, _extends$
|
|
7341
|
+
_this = Control.call(this, _extends$d({}, options, {
|
|
7382
7342
|
tagName: 'span',
|
|
7383
7343
|
controlType: 'button',
|
|
7384
7344
|
classNameSuffix: 'rec-dropdown'
|
|
@@ -7424,7 +7384,7 @@ function _set_prototype_of$d(o, p) {
|
|
|
7424
7384
|
_proto._initPicker = function _initPicker() {
|
|
7425
7385
|
var _this = this;
|
|
7426
7386
|
this._picker = new Picker(this.$container, {
|
|
7427
|
-
getPopupContainer: function() {
|
|
7387
|
+
getPopupContainer: function getPopupContainer() {
|
|
7428
7388
|
return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
|
|
7429
7389
|
},
|
|
7430
7390
|
trigger: Utils.isMobile ? 'click' : 'hover',
|
|
@@ -7497,21 +7457,17 @@ function _set_prototype_of$d(o, p) {
|
|
|
7497
7457
|
return RecDropdown;
|
|
7498
7458
|
}(Control);
|
|
7499
7459
|
|
|
7500
|
-
function _extends$
|
|
7501
|
-
_extends$
|
|
7460
|
+
function _extends$c() {
|
|
7461
|
+
_extends$c = Object.assign || function assign(target) {
|
|
7502
7462
|
for(var i = 1; i < arguments.length; i++){
|
|
7503
7463
|
var source = arguments[i];
|
|
7504
|
-
for(var key in source)
|
|
7505
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7506
|
-
target[key] = source[key];
|
|
7507
|
-
}
|
|
7508
|
-
}
|
|
7464
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7509
7465
|
}
|
|
7510
7466
|
return target;
|
|
7511
7467
|
};
|
|
7512
|
-
return _extends$
|
|
7468
|
+
return _extends$c.apply(this, arguments);
|
|
7513
7469
|
}
|
|
7514
|
-
function _inherits$
|
|
7470
|
+
function _inherits$d(subClass, superClass) {
|
|
7515
7471
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7516
7472
|
throw new TypeError("Super expression must either be null or a function");
|
|
7517
7473
|
}
|
|
@@ -7522,14 +7478,14 @@ function _inherits$c(subClass, superClass) {
|
|
|
7522
7478
|
configurable: true
|
|
7523
7479
|
}
|
|
7524
7480
|
});
|
|
7525
|
-
if (superClass) _set_prototype_of$
|
|
7481
|
+
if (superClass) _set_prototype_of$d(subClass, superClass);
|
|
7526
7482
|
}
|
|
7527
|
-
function _set_prototype_of$
|
|
7528
|
-
_set_prototype_of$
|
|
7483
|
+
function _set_prototype_of$d(o, p) {
|
|
7484
|
+
_set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7529
7485
|
o.__proto__ = p;
|
|
7530
7486
|
return o;
|
|
7531
7487
|
};
|
|
7532
|
-
return _set_prototype_of$
|
|
7488
|
+
return _set_prototype_of$d(o, p);
|
|
7533
7489
|
}
|
|
7534
7490
|
/**
|
|
7535
7491
|
* 录像列表按钮控件
|
|
@@ -7538,12 +7494,12 @@ function _set_prototype_of$c(o, p) {
|
|
|
7538
7494
|
*
|
|
7539
7495
|
* @category Control
|
|
7540
7496
|
*/ var RecList = /*#__PURE__*/ function(Control) {
|
|
7541
|
-
_inherits$
|
|
7497
|
+
_inherits$d(RecList, Control);
|
|
7542
7498
|
function RecList(options) {
|
|
7543
7499
|
var _this;
|
|
7544
7500
|
var _this__options_props, _this__options, _this_locale;
|
|
7545
7501
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
7546
|
-
_this = Control.call(this, _extends$
|
|
7502
|
+
_this = Control.call(this, _extends$c({}, options, {
|
|
7547
7503
|
tagName: 'span',
|
|
7548
7504
|
controlType: 'button',
|
|
7549
7505
|
classNameSuffix: 'rec-list'
|
|
@@ -7551,17 +7507,17 @@ function _set_prototype_of$c(o, p) {
|
|
|
7551
7507
|
_this._options = options;
|
|
7552
7508
|
_this.records = ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : _this__options_props.recordList) || [];
|
|
7553
7509
|
_this._render();
|
|
7554
|
-
_this._modal = new RecListModal(_this._options.rootContainer, _extends$
|
|
7510
|
+
_this._modal = new RecListModal(_this._options.rootContainer, _extends$c({
|
|
7555
7511
|
showMask: false,
|
|
7556
7512
|
title: (_this_locale = _this.locale) == null ? void 0 : _this_locale.BTN_REC_LIST_TITLE
|
|
7557
7513
|
}, options, {
|
|
7558
7514
|
showEventFilter: false,
|
|
7559
7515
|
showCardTypeIcon: false,
|
|
7560
7516
|
sections: [],
|
|
7561
|
-
onCardClick: function(section, index, sections) {
|
|
7517
|
+
onCardClick: function onCardClick(section, index, sections) {
|
|
7562
7518
|
_this.emit(EVENTS.control.recListCardClick, section, index, sections);
|
|
7563
7519
|
},
|
|
7564
|
-
onClose: function() {
|
|
7520
|
+
onClose: function onClose() {
|
|
7565
7521
|
var _this__options_onClose, _this__options;
|
|
7566
7522
|
_this._panelOpen = false;
|
|
7567
7523
|
_this.active = false;
|
|
@@ -7649,21 +7605,17 @@ function _set_prototype_of$c(o, p) {
|
|
|
7649
7605
|
return RecList;
|
|
7650
7606
|
}(Control);
|
|
7651
7607
|
|
|
7652
|
-
function _extends$
|
|
7653
|
-
_extends$
|
|
7608
|
+
function _extends$b() {
|
|
7609
|
+
_extends$b = Object.assign || function assign(target) {
|
|
7654
7610
|
for(var i = 1; i < arguments.length; i++){
|
|
7655
7611
|
var source = arguments[i];
|
|
7656
|
-
for(var key in source)
|
|
7657
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7658
|
-
target[key] = source[key];
|
|
7659
|
-
}
|
|
7660
|
-
}
|
|
7612
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7661
7613
|
}
|
|
7662
7614
|
return target;
|
|
7663
7615
|
};
|
|
7664
|
-
return _extends$
|
|
7616
|
+
return _extends$b.apply(this, arguments);
|
|
7665
7617
|
}
|
|
7666
|
-
function _inherits$
|
|
7618
|
+
function _inherits$c(subClass, superClass) {
|
|
7667
7619
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7668
7620
|
throw new TypeError("Super expression must either be null or a function");
|
|
7669
7621
|
}
|
|
@@ -7674,14 +7626,14 @@ function _inherits$b(subClass, superClass) {
|
|
|
7674
7626
|
configurable: true
|
|
7675
7627
|
}
|
|
7676
7628
|
});
|
|
7677
|
-
if (superClass) _set_prototype_of$
|
|
7629
|
+
if (superClass) _set_prototype_of$c(subClass, superClass);
|
|
7678
7630
|
}
|
|
7679
|
-
function _set_prototype_of$
|
|
7680
|
-
_set_prototype_of$
|
|
7631
|
+
function _set_prototype_of$c(o, p) {
|
|
7632
|
+
_set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7681
7633
|
o.__proto__ = p;
|
|
7682
7634
|
return o;
|
|
7683
7635
|
};
|
|
7684
|
-
return _set_prototype_of$
|
|
7636
|
+
return _set_prototype_of$c(o, p);
|
|
7685
7637
|
}
|
|
7686
7638
|
/**
|
|
7687
7639
|
* 告警消息按钮控件
|
|
@@ -7690,10 +7642,10 @@ function _set_prototype_of$b(o, p) {
|
|
|
7690
7642
|
*
|
|
7691
7643
|
* @category Control
|
|
7692
7644
|
*/ var AlarmMessage = /*#__PURE__*/ function(Control) {
|
|
7693
|
-
_inherits$
|
|
7645
|
+
_inherits$c(AlarmMessage, Control);
|
|
7694
7646
|
function AlarmMessage(options) {
|
|
7695
7647
|
var _this;
|
|
7696
|
-
_this = Control.call(this, _extends$
|
|
7648
|
+
_this = Control.call(this, _extends$b({}, options, {
|
|
7697
7649
|
tagName: 'span',
|
|
7698
7650
|
controlType: 'button',
|
|
7699
7651
|
classNameSuffix: 'alarm-message'
|
|
@@ -7745,21 +7697,17 @@ function _create_class$1(Constructor, protoProps, staticProps) {
|
|
|
7745
7697
|
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
7746
7698
|
return Constructor;
|
|
7747
7699
|
}
|
|
7748
|
-
function _extends$
|
|
7749
|
-
_extends$
|
|
7700
|
+
function _extends$a() {
|
|
7701
|
+
_extends$a = Object.assign || function assign(target) {
|
|
7750
7702
|
for(var i = 1; i < arguments.length; i++){
|
|
7751
7703
|
var source = arguments[i];
|
|
7752
|
-
for(var key in source)
|
|
7753
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7754
|
-
target[key] = source[key];
|
|
7755
|
-
}
|
|
7756
|
-
}
|
|
7704
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
7757
7705
|
}
|
|
7758
7706
|
return target;
|
|
7759
7707
|
};
|
|
7760
|
-
return _extends$
|
|
7708
|
+
return _extends$a.apply(this, arguments);
|
|
7761
7709
|
}
|
|
7762
|
-
function _inherits$
|
|
7710
|
+
function _inherits$b(subClass, superClass) {
|
|
7763
7711
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7764
7712
|
throw new TypeError("Super expression must either be null or a function");
|
|
7765
7713
|
}
|
|
@@ -7770,25 +7718,25 @@ function _inherits$a(subClass, superClass) {
|
|
|
7770
7718
|
configurable: true
|
|
7771
7719
|
}
|
|
7772
7720
|
});
|
|
7773
|
-
if (superClass) _set_prototype_of$
|
|
7721
|
+
if (superClass) _set_prototype_of$b(subClass, superClass);
|
|
7774
7722
|
}
|
|
7775
|
-
function _set_prototype_of$
|
|
7776
|
-
_set_prototype_of$
|
|
7723
|
+
function _set_prototype_of$b(o, p) {
|
|
7724
|
+
_set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7777
7725
|
o.__proto__ = p;
|
|
7778
7726
|
return o;
|
|
7779
7727
|
};
|
|
7780
|
-
return _set_prototype_of$
|
|
7728
|
+
return _set_prototype_of$b(o, p);
|
|
7781
7729
|
}
|
|
7782
7730
|
var SELECT_DEFAULT_OPTIONS = {
|
|
7783
7731
|
fieldNames: {
|
|
7784
7732
|
label: 'label',
|
|
7785
7733
|
value: 'value'
|
|
7786
7734
|
},
|
|
7787
|
-
renderLabel: function(label) {
|
|
7735
|
+
renderLabel: function renderLabel(label) {
|
|
7788
7736
|
return "<span>" + (label || '') + "</span>";
|
|
7789
7737
|
},
|
|
7790
|
-
onChange: function() {},
|
|
7791
|
-
onOpenChange: function() {}
|
|
7738
|
+
onChange: function onChange() {},
|
|
7739
|
+
onOpenChange: function onOpenChange() {}
|
|
7792
7740
|
};
|
|
7793
7741
|
/**
|
|
7794
7742
|
* 选择器切换 (支持PC/Mobile)
|
|
@@ -7839,11 +7787,12 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7839
7787
|
* }
|
|
7840
7788
|
* ```
|
|
7841
7789
|
*/ var Select = /*#__PURE__*/ function(Control) {
|
|
7842
|
-
_inherits$
|
|
7790
|
+
_inherits$b(Select, Control);
|
|
7843
7791
|
function Select(options) {
|
|
7844
7792
|
var _this;
|
|
7793
|
+
var _ref;
|
|
7845
7794
|
var _this__options_fieldNames, _this__picker_$body;
|
|
7846
|
-
_this = Control.call(this, _extends$
|
|
7795
|
+
_this = Control.call(this, _extends$a({
|
|
7847
7796
|
tagName: 'span',
|
|
7848
7797
|
type: 'button',
|
|
7849
7798
|
controlType: 'button'
|
|
@@ -7855,11 +7804,10 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7855
7804
|
if (options.value !== undefined || options.value !== null) {
|
|
7856
7805
|
_this._value = options.value + '';
|
|
7857
7806
|
}
|
|
7858
|
-
var
|
|
7859
|
-
var valueKey = (_this__options_fieldNames_value = (_this__options_fieldNames = _this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.value) != null ? _this__options_fieldNames_value : 'value';
|
|
7807
|
+
var valueKey = (_ref = (_this__options_fieldNames = _this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.value) != null ? _ref : 'value';
|
|
7860
7808
|
_this._picker = new Picker(_this.$container, {
|
|
7861
7809
|
// 由于某些原因, 移动端强制渲染在 body 上
|
|
7862
|
-
getPopupContainer: function() {
|
|
7810
|
+
getPopupContainer: function getPopupContainer() {
|
|
7863
7811
|
return Utils.isMobile ? options.rootContainer : _this.$container;
|
|
7864
7812
|
},
|
|
7865
7813
|
trigger: Utils.isMobile ? 'click' : 'hover',
|
|
@@ -7872,7 +7820,7 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7872
7820
|
],
|
|
7873
7821
|
placement: 'top',
|
|
7874
7822
|
// zIndex: 10000,
|
|
7875
|
-
onOpenChange: function(open) {
|
|
7823
|
+
onOpenChange: function onOpenChange(open) {
|
|
7876
7824
|
var item = _this.list.find(function(item) {
|
|
7877
7825
|
return item[valueKey] + '' === _this.value;
|
|
7878
7826
|
});
|
|
@@ -7896,11 +7844,10 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7896
7844
|
var _this = this;
|
|
7897
7845
|
if (list === void 0) list = [];
|
|
7898
7846
|
if ((list == null ? void 0 : list.length) > 0 && this._picker) {
|
|
7847
|
+
var _ref, _ref1;
|
|
7899
7848
|
var _this__options_fieldNames, _this__options_fieldNames1, _this_locale, _this__picker;
|
|
7900
|
-
var
|
|
7901
|
-
var
|
|
7902
|
-
var _this__options_fieldNames_value;
|
|
7903
|
-
var valueKey = (_this__options_fieldNames_value = (_this__options_fieldNames1 = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames1.value) != null ? _this__options_fieldNames_value : 'value';
|
|
7849
|
+
var labelKey = (_ref = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.label) != null ? _ref : 'label';
|
|
7850
|
+
var valueKey = (_ref1 = (_this__options_fieldNames1 = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames1.value) != null ? _ref1 : 'value';
|
|
7904
7851
|
(_this__picker = this._picker) == null ? void 0 : _this__picker.innerHTML('<div class="' + PREFIX_CLASS + '-select-panel">\n <ul class="' + PREFIX_CLASS + '-select-list">\n ' + list.map(function(item) {
|
|
7905
7852
|
return '\n <li class="' + PREFIX_CLASS + "-select-option " + (+item[valueKey] === _this.value ? "" + PREFIX_CLASS + "-active" : '') + '" data-value="' + item[valueKey] + '">\n <span>' + item[labelKey] + "</span>\n </li>\n ";
|
|
7906
7853
|
}).join('') + "\n </ul>\n " + (Utils.isMobile ? '<div class="' + PREFIX_CLASS + '-select-cancel">\n <span>' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.cancel) || '取消') + "</span>\n </div>" : '') + "\n " + (Utils.isMobile ? '<span class="' + PREFIX_CLASS + '-select-close">' + IconComponents.close() + "</span>" : '') + "\n <div>");
|
|
@@ -7912,12 +7859,12 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7912
7859
|
}
|
|
7913
7860
|
};
|
|
7914
7861
|
_proto._render = function _render(item) {
|
|
7862
|
+
var _ref;
|
|
7915
7863
|
var _this__options_fieldNames;
|
|
7916
7864
|
if (this.list.length === 0) {
|
|
7917
7865
|
return;
|
|
7918
7866
|
}
|
|
7919
|
-
var
|
|
7920
|
-
var labelKey = (_this__options_fieldNames_label = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.label) != null ? _this__options_fieldNames_label : 'label';
|
|
7867
|
+
var labelKey = (_ref = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.label) != null ? _ref : 'label';
|
|
7921
7868
|
if (this.$container.querySelector("." + PREFIX_CLASS + "-select-btn")) {
|
|
7922
7869
|
this.$container.querySelector("." + PREFIX_CLASS + "-select-btn").innerHTML = this._options.renderLabel == null ? void 0 : this._options.renderLabel.call(this._options, item == null ? void 0 : item[labelKey], item, this.list);
|
|
7923
7870
|
} else {
|
|
@@ -7933,9 +7880,9 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7933
7880
|
_proto._activeOption = function _activeOption() {
|
|
7934
7881
|
var _this = this;
|
|
7935
7882
|
if (this._picker) {
|
|
7883
|
+
var _ref;
|
|
7936
7884
|
var _this__options_fieldNames, _this__picker_$body, _this__picker_$body1;
|
|
7937
|
-
var
|
|
7938
|
-
var valueKey = (_this__options_fieldNames_value = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.value) != null ? _this__options_fieldNames_value : 'value';
|
|
7885
|
+
var valueKey = (_ref = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.value) != null ? _ref : 'value';
|
|
7939
7886
|
var $active = (_this__picker_$body = this._picker.$body) == null ? void 0 : _this__picker_$body.querySelector("." + PREFIX_CLASS + "-active");
|
|
7940
7887
|
$active == null ? void 0 : $active.classList.remove(PREFIX_CLASS + '-active');
|
|
7941
7888
|
var $target = (_this__picker_$body1 = this._picker.$body) == null ? void 0 : _this__picker_$body1.querySelector("." + PREFIX_CLASS + '-select-option[data-value="' + this.value + '"]');
|
|
@@ -7949,9 +7896,9 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
7949
7896
|
_proto._onSelectChange = function _onSelectChange() {
|
|
7950
7897
|
var _this = this;
|
|
7951
7898
|
if (this._picker) {
|
|
7899
|
+
var _ref;
|
|
7952
7900
|
var _this__options_fieldNames;
|
|
7953
|
-
var
|
|
7954
|
-
var valueKey = (_this__options_fieldNames_value = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.value) != null ? _this__options_fieldNames_value : 'value';
|
|
7901
|
+
var valueKey = (_ref = (_this__options_fieldNames = this._options.fieldNames) == null ? void 0 : _this__options_fieldNames.value) != null ? _ref : 'value';
|
|
7955
7902
|
this._delegationOption = delegate(this._picker.$body, "." + PREFIX_CLASS + "-select-option", 'click', function(e) {
|
|
7956
7903
|
var target = e.delegateTarget;
|
|
7957
7904
|
e.stopPropagation();
|
|
@@ -8036,26 +7983,20 @@ var SELECT_DEFAULT_OPTIONS = {
|
|
|
8036
7983
|
}(Control);
|
|
8037
7984
|
|
|
8038
7985
|
function _assert_this_initialized$1(self) {
|
|
8039
|
-
if (self === void 0)
|
|
8040
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8041
|
-
}
|
|
7986
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8042
7987
|
return self;
|
|
8043
7988
|
}
|
|
8044
|
-
function _extends$
|
|
8045
|
-
_extends$
|
|
7989
|
+
function _extends$9() {
|
|
7990
|
+
_extends$9 = Object.assign || function assign(target) {
|
|
8046
7991
|
for(var i = 1; i < arguments.length; i++){
|
|
8047
7992
|
var source = arguments[i];
|
|
8048
|
-
for(var key in source)
|
|
8049
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8050
|
-
target[key] = source[key];
|
|
8051
|
-
}
|
|
8052
|
-
}
|
|
7993
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8053
7994
|
}
|
|
8054
7995
|
return target;
|
|
8055
7996
|
};
|
|
8056
|
-
return _extends$
|
|
7997
|
+
return _extends$9.apply(this, arguments);
|
|
8057
7998
|
}
|
|
8058
|
-
function _inherits$
|
|
7999
|
+
function _inherits$a(subClass, superClass) {
|
|
8059
8000
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8060
8001
|
throw new TypeError("Super expression must either be null or a function");
|
|
8061
8002
|
}
|
|
@@ -8066,14 +8007,14 @@ function _inherits$9(subClass, superClass) {
|
|
|
8066
8007
|
configurable: true
|
|
8067
8008
|
}
|
|
8068
8009
|
});
|
|
8069
|
-
if (superClass) _set_prototype_of$
|
|
8010
|
+
if (superClass) _set_prototype_of$a(subClass, superClass);
|
|
8070
8011
|
}
|
|
8071
|
-
function _set_prototype_of$
|
|
8072
|
-
_set_prototype_of$
|
|
8012
|
+
function _set_prototype_of$a(o, p) {
|
|
8013
|
+
_set_prototype_of$a = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8073
8014
|
o.__proto__ = p;
|
|
8074
8015
|
return o;
|
|
8075
8016
|
};
|
|
8076
|
-
return _set_prototype_of$
|
|
8017
|
+
return _set_prototype_of$a(o, p);
|
|
8077
8018
|
}
|
|
8078
8019
|
function _type_of(obj) {
|
|
8079
8020
|
"@swc/helpers - typeof";
|
|
@@ -8123,12 +8064,12 @@ function __filter(list, locale) {
|
|
|
8123
8064
|
*
|
|
8124
8065
|
* @category Control
|
|
8125
8066
|
*/ var Definition = /*#__PURE__*/ function(Select) {
|
|
8126
|
-
_inherits$
|
|
8067
|
+
_inherits$a(Definition, Select);
|
|
8127
8068
|
function Definition(options) {
|
|
8128
8069
|
if (options === void 0) options = {};
|
|
8129
8070
|
var _this;
|
|
8130
8071
|
var _options_props, _options_props1, _options_locales_options_language;
|
|
8131
|
-
_this = Select.call(this, _extends$
|
|
8072
|
+
_this = Select.call(this, _extends$9({}, DEFINITION_DEFAULT_OPTIONS, {
|
|
8132
8073
|
value: (_options_props = options.props) == null ? void 0 : _options_props.videoLevel
|
|
8133
8074
|
}, options, {
|
|
8134
8075
|
fieldNames: {
|
|
@@ -8139,7 +8080,7 @@ function __filter(list, locale) {
|
|
|
8139
8080
|
title: options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.BTN_HD,
|
|
8140
8081
|
controlType: 'button',
|
|
8141
8082
|
classNameSuffix: 'definition',
|
|
8142
|
-
renderLabel: function(label, item, list) {
|
|
8083
|
+
renderLabel: function renderLabel(label, item, list) {
|
|
8143
8084
|
var _list_;
|
|
8144
8085
|
if ((item == null ? void 0 : item.level) === 'auto') {
|
|
8145
8086
|
var _options_locales_options_language;
|
|
@@ -8151,7 +8092,7 @@ function __filter(list, locale) {
|
|
|
8151
8092
|
// 如果 label 不存在,则不显示label,直接显示list的第一个label, 一般自定义清晰度列表可能会出现
|
|
8152
8093
|
return "<span>" + (label || ((_list_ = list[0]) == null ? void 0 : _list_.name) || '') + "</span>";
|
|
8153
8094
|
},
|
|
8154
|
-
onChange: function(value, item) {
|
|
8095
|
+
onChange: function onChange(value, item) {
|
|
8155
8096
|
var _options_onChange;
|
|
8156
8097
|
options == null ? void 0 : (_options_onChange = options.onChange) == null ? void 0 : _options_onChange.call(options, value, item);
|
|
8157
8098
|
if (value === 'auto') {
|
|
@@ -8161,7 +8102,7 @@ function __filter(list, locale) {
|
|
|
8161
8102
|
_assert_this_initialized$1(_this).emit(EVENTS.control.definitionChange, value, item);
|
|
8162
8103
|
}
|
|
8163
8104
|
},
|
|
8164
|
-
onOpenChange: function(open, value, item) {
|
|
8105
|
+
onOpenChange: function onOpenChange(open, value, item) {
|
|
8165
8106
|
var _options_onOpenChange;
|
|
8166
8107
|
options == null ? void 0 : (_options_onOpenChange = options.onOpenChange) == null ? void 0 : _options_onOpenChange.call(options, open, value, item);
|
|
8167
8108
|
_assert_this_initialized$1(_this).emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
|
|
@@ -8197,26 +8138,20 @@ function __filter(list, locale) {
|
|
|
8197
8138
|
}(Select);
|
|
8198
8139
|
|
|
8199
8140
|
function _assert_this_initialized(self) {
|
|
8200
|
-
if (self === void 0)
|
|
8201
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8202
|
-
}
|
|
8141
|
+
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8203
8142
|
return self;
|
|
8204
8143
|
}
|
|
8205
|
-
function _extends$
|
|
8206
|
-
_extends$
|
|
8144
|
+
function _extends$8() {
|
|
8145
|
+
_extends$8 = Object.assign || function assign(target) {
|
|
8207
8146
|
for(var i = 1; i < arguments.length; i++){
|
|
8208
8147
|
var source = arguments[i];
|
|
8209
|
-
for(var key in source)
|
|
8210
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8211
|
-
target[key] = source[key];
|
|
8212
|
-
}
|
|
8213
|
-
}
|
|
8148
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8214
8149
|
}
|
|
8215
8150
|
return target;
|
|
8216
8151
|
};
|
|
8217
|
-
return _extends$
|
|
8152
|
+
return _extends$8.apply(this, arguments);
|
|
8218
8153
|
}
|
|
8219
|
-
function _inherits$
|
|
8154
|
+
function _inherits$9(subClass, superClass) {
|
|
8220
8155
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8221
8156
|
throw new TypeError("Super expression must either be null or a function");
|
|
8222
8157
|
}
|
|
@@ -8227,14 +8162,14 @@ function _inherits$8(subClass, superClass) {
|
|
|
8227
8162
|
configurable: true
|
|
8228
8163
|
}
|
|
8229
8164
|
});
|
|
8230
|
-
if (superClass) _set_prototype_of$
|
|
8165
|
+
if (superClass) _set_prototype_of$9(subClass, superClass);
|
|
8231
8166
|
}
|
|
8232
|
-
function _set_prototype_of$
|
|
8233
|
-
_set_prototype_of$
|
|
8167
|
+
function _set_prototype_of$9(o, p) {
|
|
8168
|
+
_set_prototype_of$9 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8234
8169
|
o.__proto__ = p;
|
|
8235
8170
|
return o;
|
|
8236
8171
|
};
|
|
8237
|
-
return _set_prototype_of$
|
|
8172
|
+
return _set_prototype_of$9(o, p);
|
|
8238
8173
|
}
|
|
8239
8174
|
// 支持的倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
|
|
8240
8175
|
var SUPPORT_SPEED = [
|
|
@@ -8268,22 +8203,22 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8268
8203
|
* 2. 标准流不支持;
|
|
8269
8204
|
* @category Control
|
|
8270
8205
|
*/ var Speed = /*#__PURE__*/ function(Select) {
|
|
8271
|
-
_inherits$
|
|
8206
|
+
_inherits$9(Speed, Select);
|
|
8272
8207
|
function Speed(options) {
|
|
8273
8208
|
var _this;
|
|
8274
8209
|
var _options_locales_options_language, _options_locales;
|
|
8275
|
-
_this = Select.call(this, _extends$
|
|
8210
|
+
_this = Select.call(this, _extends$8({}, SPEED_DEFAULT_OPTIONS, options, {
|
|
8276
8211
|
value: (options.props.speed || 1) + '',
|
|
8277
8212
|
classNameSuffix: 'speed',
|
|
8278
8213
|
controlType: 'button',
|
|
8279
8214
|
title: options == null ? void 0 : (_options_locales = options.locales) == null ? void 0 : (_options_locales_options_language = _options_locales[options.language]) == null ? void 0 : _options_locales_options_language.BTN_SPEED,
|
|
8280
|
-
onChange: function(value, item) {
|
|
8215
|
+
onChange: function onChange(value, item) {
|
|
8281
8216
|
var _options_onChange;
|
|
8282
8217
|
value = +value;
|
|
8283
8218
|
options == null ? void 0 : (_options_onChange = options.onChange) == null ? void 0 : _options_onChange.call(options, value, item);
|
|
8284
8219
|
_assert_this_initialized(_this).emit(EVENTS.control.speedChange, value, item);
|
|
8285
8220
|
},
|
|
8286
|
-
onOpenChange: function(open, value, item) {
|
|
8221
|
+
onOpenChange: function onOpenChange(open, value, item) {
|
|
8287
8222
|
var _options_onOpenChange;
|
|
8288
8223
|
value = +value;
|
|
8289
8224
|
options == null ? void 0 : (_options_onOpenChange = options.onOpenChange) == null ? void 0 : _options_onOpenChange.call(options, open, value, item);
|
|
@@ -8332,21 +8267,17 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8332
8267
|
return Speed;
|
|
8333
8268
|
}(Select);
|
|
8334
8269
|
|
|
8335
|
-
function _extends$
|
|
8336
|
-
_extends$
|
|
8270
|
+
function _extends$7() {
|
|
8271
|
+
_extends$7 = Object.assign || function assign(target) {
|
|
8337
8272
|
for(var i = 1; i < arguments.length; i++){
|
|
8338
8273
|
var source = arguments[i];
|
|
8339
|
-
for(var key in source)
|
|
8340
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8341
|
-
target[key] = source[key];
|
|
8342
|
-
}
|
|
8343
|
-
}
|
|
8274
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8344
8275
|
}
|
|
8345
8276
|
return target;
|
|
8346
8277
|
};
|
|
8347
|
-
return _extends$
|
|
8278
|
+
return _extends$7.apply(this, arguments);
|
|
8348
8279
|
}
|
|
8349
|
-
function _inherits$
|
|
8280
|
+
function _inherits$8(subClass, superClass) {
|
|
8350
8281
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8351
8282
|
throw new TypeError("Super expression must either be null or a function");
|
|
8352
8283
|
}
|
|
@@ -8357,24 +8288,24 @@ function _inherits$7(subClass, superClass) {
|
|
|
8357
8288
|
configurable: true
|
|
8358
8289
|
}
|
|
8359
8290
|
});
|
|
8360
|
-
if (superClass) _set_prototype_of$
|
|
8291
|
+
if (superClass) _set_prototype_of$8(subClass, superClass);
|
|
8361
8292
|
}
|
|
8362
|
-
function _set_prototype_of$
|
|
8363
|
-
_set_prototype_of$
|
|
8293
|
+
function _set_prototype_of$8(o, p) {
|
|
8294
|
+
_set_prototype_of$8 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8364
8295
|
o.__proto__ = p;
|
|
8365
8296
|
return o;
|
|
8366
8297
|
};
|
|
8367
|
-
return _set_prototype_of$
|
|
8298
|
+
return _set_prototype_of$8(o, p);
|
|
8368
8299
|
}
|
|
8369
8300
|
/**
|
|
8370
8301
|
* 日历选择器控件
|
|
8371
8302
|
* @category Control
|
|
8372
8303
|
*/ var DatePickerControl = /*#__PURE__*/ function(Control) {
|
|
8373
|
-
_inherits$
|
|
8304
|
+
_inherits$8(DatePickerControl, Control);
|
|
8374
8305
|
function DatePickerControl(options) {
|
|
8375
8306
|
var _this;
|
|
8376
8307
|
var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
|
|
8377
|
-
_this = Control.call(this, _extends$
|
|
8308
|
+
_this = Control.call(this, _extends$7({
|
|
8378
8309
|
maxDate: new Date()
|
|
8379
8310
|
}, options, {
|
|
8380
8311
|
tagName: 'span',
|
|
@@ -8405,7 +8336,7 @@ function _set_prototype_of$7(o, p) {
|
|
|
8405
8336
|
title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
|
|
8406
8337
|
});
|
|
8407
8338
|
}
|
|
8408
|
-
this.datePicker = new controlDatePicker.DatePicker(this.$container, _extends$
|
|
8339
|
+
this.datePicker = new controlDatePicker.DatePicker(this.$container, _extends$7({
|
|
8409
8340
|
isMobile: isMobile1,
|
|
8410
8341
|
mode: 'date',
|
|
8411
8342
|
offset: [
|
|
@@ -8417,16 +8348,16 @@ function _set_prototype_of$7(o, p) {
|
|
|
8417
8348
|
current: utilsTools.DateTime.toDate(this._value),
|
|
8418
8349
|
placement: 'tr',
|
|
8419
8350
|
triggerClose: true,
|
|
8420
|
-
disabledDate: function(date) {
|
|
8351
|
+
disabledDate: function disabledDate(date) {
|
|
8421
8352
|
return date.getTime() > (_this.options.maxDate || new Date()).getTime();
|
|
8422
8353
|
}
|
|
8423
8354
|
}, this.options || {}, {
|
|
8424
8355
|
// 不支持自定义
|
|
8425
|
-
getPopupContainer: function() {
|
|
8356
|
+
getPopupContainer: function getPopupContainer() {
|
|
8426
8357
|
return _this.$container;
|
|
8427
8358
|
},
|
|
8428
8359
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8429
|
-
onOk: function(date, _mode) {
|
|
8360
|
+
onOk: function onOk(date, _mode) {
|
|
8430
8361
|
if (date && _this._value !== utilsTools.DateTime.format(date, 'YYYY-MM-DD') && isMobile1) {
|
|
8431
8362
|
_this._value = utilsTools.DateTime.format(date, 'YYYY-MM-DD');
|
|
8432
8363
|
_this.options.onOk == null ? void 0 : _this.options.onOk.call(_this.options, date);
|
|
@@ -8436,14 +8367,14 @@ function _set_prototype_of$7(o, p) {
|
|
|
8436
8367
|
}
|
|
8437
8368
|
}
|
|
8438
8369
|
},
|
|
8439
|
-
onChange: function(date, mode) {
|
|
8370
|
+
onChange: function onChange(date, mode) {
|
|
8440
8371
|
if (date && _this._value !== utilsTools.DateTime.format(date, 'YYYY-MM-DD') && !isMobile1 && mode === 'date') {
|
|
8441
8372
|
_this._value = utilsTools.DateTime.format(date, 'YYYY-MM-DD');
|
|
8442
8373
|
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, date);
|
|
8443
8374
|
_this.emit(EVENTS.control.dateChange, date);
|
|
8444
8375
|
}
|
|
8445
8376
|
},
|
|
8446
|
-
onOpenChange: function(open) {
|
|
8377
|
+
onOpenChange: function onOpenChange(open) {
|
|
8447
8378
|
_this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
|
|
8448
8379
|
_this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
|
|
8449
8380
|
}
|
|
@@ -8492,21 +8423,17 @@ function _set_prototype_of$7(o, p) {
|
|
|
8492
8423
|
return DatePickerControl;
|
|
8493
8424
|
}(Control);
|
|
8494
8425
|
|
|
8495
|
-
function _extends$
|
|
8496
|
-
_extends$
|
|
8426
|
+
function _extends$6() {
|
|
8427
|
+
_extends$6 = Object.assign || function assign(target) {
|
|
8497
8428
|
for(var i = 1; i < arguments.length; i++){
|
|
8498
8429
|
var source = arguments[i];
|
|
8499
|
-
for(var key in source)
|
|
8500
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8501
|
-
target[key] = source[key];
|
|
8502
|
-
}
|
|
8503
|
-
}
|
|
8430
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8504
8431
|
}
|
|
8505
8432
|
return target;
|
|
8506
8433
|
};
|
|
8507
|
-
return _extends$
|
|
8434
|
+
return _extends$6.apply(this, arguments);
|
|
8508
8435
|
}
|
|
8509
|
-
function _inherits$
|
|
8436
|
+
function _inherits$7(subClass, superClass) {
|
|
8510
8437
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8511
8438
|
throw new TypeError("Super expression must either be null or a function");
|
|
8512
8439
|
}
|
|
@@ -8517,25 +8444,25 @@ function _inherits$6(subClass, superClass) {
|
|
|
8517
8444
|
configurable: true
|
|
8518
8445
|
}
|
|
8519
8446
|
});
|
|
8520
|
-
if (superClass) _set_prototype_of$
|
|
8447
|
+
if (superClass) _set_prototype_of$7(subClass, superClass);
|
|
8521
8448
|
}
|
|
8522
|
-
function _set_prototype_of$
|
|
8523
|
-
_set_prototype_of$
|
|
8449
|
+
function _set_prototype_of$7(o, p) {
|
|
8450
|
+
_set_prototype_of$7 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8524
8451
|
o.__proto__ = p;
|
|
8525
8452
|
return o;
|
|
8526
8453
|
};
|
|
8527
|
-
return _set_prototype_of$
|
|
8454
|
+
return _set_prototype_of$7(o, p);
|
|
8528
8455
|
}
|
|
8529
8456
|
/** 时间格式 HH:mm:ss */ var TIME_FORMAT = 'HH:mm:ss';
|
|
8530
8457
|
/**
|
|
8531
8458
|
* 时间选择器控件
|
|
8532
8459
|
* @category Control
|
|
8533
8460
|
*/ var TimePickerControl = /*#__PURE__*/ function(Control) {
|
|
8534
|
-
_inherits$
|
|
8461
|
+
_inherits$7(TimePickerControl, Control);
|
|
8535
8462
|
function TimePickerControl(options) {
|
|
8536
8463
|
var _this;
|
|
8537
8464
|
var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
|
|
8538
|
-
_this = Control.call(this, _extends$
|
|
8465
|
+
_this = Control.call(this, _extends$6({}, options, {
|
|
8539
8466
|
tagName: 'span',
|
|
8540
8467
|
controlType: 'button',
|
|
8541
8468
|
classNameSuffix: 'time'
|
|
@@ -8561,7 +8488,7 @@ function _set_prototype_of$6(o, p) {
|
|
|
8561
8488
|
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TIME
|
|
8562
8489
|
});
|
|
8563
8490
|
// }
|
|
8564
|
-
this.timePicker = new controlDatePicker.TimePicker(this.$container, _extends$
|
|
8491
|
+
this.timePicker = new controlDatePicker.TimePicker(this.$container, _extends$6({
|
|
8565
8492
|
showHeader: false,
|
|
8566
8493
|
isMobile: false,
|
|
8567
8494
|
offset: [
|
|
@@ -8574,17 +8501,17 @@ function _set_prototype_of$6(o, p) {
|
|
|
8574
8501
|
triggerClose: true
|
|
8575
8502
|
}, this.options || {}, {
|
|
8576
8503
|
// 不支持自定义
|
|
8577
|
-
getPopupContainer: function() {
|
|
8504
|
+
getPopupContainer: function getPopupContainer() {
|
|
8578
8505
|
return _this.$container;
|
|
8579
8506
|
},
|
|
8580
|
-
onChange: function(time, _times) {
|
|
8507
|
+
onChange: function onChange(time, _times) {
|
|
8581
8508
|
if (time && _this._value !== time) {
|
|
8582
8509
|
_this._value = time;
|
|
8583
8510
|
_this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, time, _times);
|
|
8584
8511
|
_this.emit(EVENTS.control.timeChange, time);
|
|
8585
8512
|
}
|
|
8586
8513
|
},
|
|
8587
|
-
onOpenChange: function(open) {
|
|
8514
|
+
onOpenChange: function onOpenChange(open) {
|
|
8588
8515
|
_this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.timePicker.current);
|
|
8589
8516
|
_this.emit(EVENTS.control.timePanelOpenChange, open, _this.timePicker.current);
|
|
8590
8517
|
}
|
|
@@ -8631,21 +8558,17 @@ function _set_prototype_of$6(o, p) {
|
|
|
8631
8558
|
return TimePickerControl;
|
|
8632
8559
|
}(Control);
|
|
8633
8560
|
|
|
8634
|
-
function _extends$
|
|
8635
|
-
_extends$
|
|
8561
|
+
function _extends$5() {
|
|
8562
|
+
_extends$5 = Object.assign || function assign(target) {
|
|
8636
8563
|
for(var i = 1; i < arguments.length; i++){
|
|
8637
8564
|
var source = arguments[i];
|
|
8638
|
-
for(var key in source)
|
|
8639
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8640
|
-
target[key] = source[key];
|
|
8641
|
-
}
|
|
8642
|
-
}
|
|
8565
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8643
8566
|
}
|
|
8644
8567
|
return target;
|
|
8645
8568
|
};
|
|
8646
|
-
return _extends$
|
|
8569
|
+
return _extends$5.apply(this, arguments);
|
|
8647
8570
|
}
|
|
8648
|
-
function _inherits$
|
|
8571
|
+
function _inherits$6(subClass, superClass) {
|
|
8649
8572
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8650
8573
|
throw new TypeError("Super expression must either be null or a function");
|
|
8651
8574
|
}
|
|
@@ -8656,23 +8579,23 @@ function _inherits$5(subClass, superClass) {
|
|
|
8656
8579
|
configurable: true
|
|
8657
8580
|
}
|
|
8658
8581
|
});
|
|
8659
|
-
if (superClass) _set_prototype_of$
|
|
8582
|
+
if (superClass) _set_prototype_of$6(subClass, superClass);
|
|
8660
8583
|
}
|
|
8661
|
-
function _set_prototype_of$
|
|
8662
|
-
_set_prototype_of$
|
|
8584
|
+
function _set_prototype_of$6(o, p) {
|
|
8585
|
+
_set_prototype_of$6 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8663
8586
|
o.__proto__ = p;
|
|
8664
8587
|
return o;
|
|
8665
8588
|
};
|
|
8666
|
-
return _set_prototype_of$
|
|
8589
|
+
return _set_prototype_of$6(o, p);
|
|
8667
8590
|
}
|
|
8668
8591
|
/**
|
|
8669
8592
|
* 回放时间轴控件
|
|
8670
8593
|
*/ var TimeLineControl = /*#__PURE__*/ function(Control) {
|
|
8671
|
-
_inherits$
|
|
8594
|
+
_inherits$6(TimeLineControl, Control);
|
|
8672
8595
|
function TimeLineControl(options) {
|
|
8673
8596
|
var _this;
|
|
8674
8597
|
var _this__options_props, _this__options;
|
|
8675
|
-
_this = Control.call(this, _extends$
|
|
8598
|
+
_this = Control.call(this, _extends$5({}, options, {
|
|
8676
8599
|
tagName: 'div',
|
|
8677
8600
|
controlType: 'block',
|
|
8678
8601
|
classNameSuffix: 'time-line'
|
|
@@ -8708,9 +8631,9 @@ function _set_prototype_of$5(o, p) {
|
|
|
8708
8631
|
var _proto = TimeLineControl.prototype;
|
|
8709
8632
|
_proto._render = function _render() {
|
|
8710
8633
|
var _this = this;
|
|
8711
|
-
var _this_timeLineUtil_updateTimeSections, _this_timeLineUtil;
|
|
8712
8634
|
var _this__options_showTimeWidthBtn, _this__options_showCoverFold;
|
|
8713
|
-
var
|
|
8635
|
+
var _this_timeLineUtil_updateTimeSections, _this_timeLineUtil;
|
|
8636
|
+
var _timeLineOptions = _extends$5({
|
|
8714
8637
|
language: this._options.language || 'zh',
|
|
8715
8638
|
coverQuery: this._options.coverQuery || '',
|
|
8716
8639
|
showTimeWidthBtn: (_this__options_showTimeWidthBtn = this._options.showTimeWidthBtn) != null ? _this__options_showTimeWidthBtn : true,
|
|
@@ -8718,23 +8641,42 @@ function _set_prototype_of$5(o, p) {
|
|
|
8718
8641
|
hoverTipPlacement: 'top'
|
|
8719
8642
|
}, this._options || {}, {
|
|
8720
8643
|
showSectionIcon: false,
|
|
8721
|
-
onClickSeek: function(date) {
|
|
8644
|
+
onClickSeek: function onClickSeek(date) {
|
|
8722
8645
|
if (date == null ? void 0 : date.getTime()) {
|
|
8723
8646
|
_this._options.onClickSeek == null ? void 0 : _this._options.onClickSeek.call(_this._options, date);
|
|
8724
8647
|
_this.emit(EVENTS.control.timeLineChange, date);
|
|
8725
8648
|
}
|
|
8726
8649
|
},
|
|
8727
|
-
onChange: function(date) {
|
|
8650
|
+
onChange: function onChange(date) {
|
|
8728
8651
|
if (_this._currentTime !== (date == null ? void 0 : date.getTime())) {
|
|
8729
8652
|
_this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, date);
|
|
8730
8653
|
_this.emit(EVENTS.control.timeLineChange, date);
|
|
8731
8654
|
}
|
|
8732
8655
|
},
|
|
8733
|
-
|
|
8656
|
+
onDragEnd: function onDragEnd(date, isOver) {
|
|
8657
|
+
var _this__options_props_playbackRange, _this__options_props, _this__options;
|
|
8658
|
+
_this._options.onDragEnd == null ? void 0 : _this._options.onDragEnd.call(_this._options, date, isOver);
|
|
8659
|
+
// 松手时鼠标已移出时间轴容器(isOver 为 false):控件把这种拖动视为取消,
|
|
8660
|
+
// onChange 不会触发(见 @ezuikit/control-time-line 的 pc/index.ts _moveEndOrTouchEndFun,
|
|
8661
|
+
// onChange 受 _isOver 约束),于是 SDK 层的播放区间夹取拿不到事件,光标停在
|
|
8662
|
+
// 区间外不再被纠正 —— 播放已结束时 OSD 轮询也已停止,靠后续同步也拉不回来。
|
|
8663
|
+
// 这里补发一次 timeLineChange 交给 SDK 层夹取回弹。
|
|
8664
|
+
//
|
|
8665
|
+
// 必须用 isOver === false 而不是 !isOver:移动端(mobile/index.ts)调 onDragEnd
|
|
8666
|
+
// 时不传第二个参数,值为 undefined,用 !isOver 会让移动端每次拖动都补发,
|
|
8667
|
+
// 而它的 _setState 已经触发过一次 onChange,会造成重复 seek。
|
|
8668
|
+
// 移动端也不需要这个补丁:DragScroll 是容器内滚动,没有"拖出容器外松手"的情况。
|
|
8669
|
+
//
|
|
8670
|
+
// 无播放区间时不补发,保持控件"拖出容器不 seek"的既有语义,避免破坏存量集成
|
|
8671
|
+
if (isOver === false && ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : (_this__options_props_playbackRange = _this__options_props.playbackRange) == null ? void 0 : _this__options_props_playbackRange.begin)) {
|
|
8672
|
+
_this.emit(EVENTS.control.timeLineChange, date);
|
|
8673
|
+
}
|
|
8674
|
+
},
|
|
8675
|
+
onPickerOpenChange: function onPickerOpenChange(open) {
|
|
8734
8676
|
_this.emit(EVENTS.control.timeLinePanelOpenChange, open);
|
|
8735
8677
|
},
|
|
8736
8678
|
// 2025-10-27 仅移动端支持
|
|
8737
|
-
onPickerSelect: function(item) {
|
|
8679
|
+
onPickerSelect: function onPickerSelect(item) {
|
|
8738
8680
|
var date = null;
|
|
8739
8681
|
try {
|
|
8740
8682
|
if ((item.startTime + '').length === 10) date = new Date(item.startTime * 1000);
|
|
@@ -8745,7 +8687,7 @@ function _set_prototype_of$5(o, p) {
|
|
|
8745
8687
|
} catch (error) {
|
|
8746
8688
|
}
|
|
8747
8689
|
},
|
|
8748
|
-
onSectionIconClick: function(result) {
|
|
8690
|
+
onSectionIconClick: function onSectionIconClick(result) {
|
|
8749
8691
|
_this.emit('TimeLine.onSectionIconClick', result);
|
|
8750
8692
|
}
|
|
8751
8693
|
});
|
|
@@ -8815,15 +8757,224 @@ function _set_prototype_of$5(o, p) {
|
|
|
8815
8757
|
return TimeLineControl;
|
|
8816
8758
|
}(Control);
|
|
8817
8759
|
|
|
8818
|
-
function _extends$
|
|
8819
|
-
_extends$
|
|
8760
|
+
function _extends$4() {
|
|
8761
|
+
_extends$4 = Object.assign || function assign(target) {
|
|
8820
8762
|
for(var i = 1; i < arguments.length; i++){
|
|
8821
8763
|
var source = arguments[i];
|
|
8822
|
-
for(var key in source)
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8764
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8765
|
+
}
|
|
8766
|
+
return target;
|
|
8767
|
+
};
|
|
8768
|
+
return _extends$4.apply(this, arguments);
|
|
8769
|
+
}
|
|
8770
|
+
function _inherits$5(subClass, superClass) {
|
|
8771
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
8772
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
8773
|
+
}
|
|
8774
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
8775
|
+
constructor: {
|
|
8776
|
+
value: subClass,
|
|
8777
|
+
writable: true,
|
|
8778
|
+
configurable: true
|
|
8779
|
+
}
|
|
8780
|
+
});
|
|
8781
|
+
if (superClass) _set_prototype_of$5(subClass, superClass);
|
|
8782
|
+
}
|
|
8783
|
+
function _set_prototype_of$5(o, p) {
|
|
8784
|
+
_set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8785
|
+
o.__proto__ = p;
|
|
8786
|
+
return o;
|
|
8787
|
+
};
|
|
8788
|
+
return _set_prototype_of$5(o, p);
|
|
8789
|
+
}
|
|
8790
|
+
/**
|
|
8791
|
+
* 播放结束后忽略 OSD 回写的静默期(毫秒)
|
|
8792
|
+
*
|
|
8793
|
+
* 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
|
|
8794
|
+
* api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
|
|
8795
|
+
* 会把刚补满的进度拉回去。取值需覆盖该窗口。
|
|
8796
|
+
*
|
|
8797
|
+
* 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
|
|
8798
|
+
* 进度条的 onChange,永久忽略会让进度条卡死不再更新。
|
|
8799
|
+
*/ var PLAYBACK_END_SILENCE_MS = 3000;
|
|
8800
|
+
/**
|
|
8801
|
+
* 读取录像片段的起止时间(毫秒)
|
|
8802
|
+
*
|
|
8803
|
+
* 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
|
|
8804
|
+
* 两套字段名在不同回放类型下都出现过,这里统一兼容。
|
|
8805
|
+
*
|
|
8806
|
+
* @param seg 录像片段
|
|
8807
|
+
* @param which 取起点还是终点
|
|
8808
|
+
*/ function segMs(seg, which) {
|
|
8809
|
+
var _ref, _ref1;
|
|
8810
|
+
var value = which === 'start' ? (_ref = seg == null ? void 0 : seg.startTime) != null ? _ref : seg == null ? void 0 : seg.begin : (_ref1 = seg == null ? void 0 : seg.endTime) != null ? _ref1 : seg == null ? void 0 : seg.end;
|
|
8811
|
+
if (value === undefined || value === null || value === '') return NaN;
|
|
8812
|
+
if (typeof value === 'number') return value < 1e12 ? value * 1000 : value;
|
|
8813
|
+
return utilsTools.DateTime.toDate(value).getTime();
|
|
8814
|
+
}
|
|
8815
|
+
/**
|
|
8816
|
+
* 回放片段进度条控件(移动端)
|
|
8817
|
+
*
|
|
8818
|
+
* 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
|
|
8819
|
+
* 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
|
|
8820
|
+
* @category Control
|
|
8821
|
+
*/ var SegmentProgressControl = /*#__PURE__*/ function(Control) {
|
|
8822
|
+
_inherits$5(SegmentProgressControl, Control);
|
|
8823
|
+
function SegmentProgressControl(options) {
|
|
8824
|
+
var _this;
|
|
8825
|
+
var _this__options_props, _this__options_props1;
|
|
8826
|
+
_this = Control.call(this, _extends$4({}, options, {
|
|
8827
|
+
tagName: 'div',
|
|
8828
|
+
controlType: 'block',
|
|
8829
|
+
classNameSuffix: 'segment-progress'
|
|
8830
|
+
})) || this, /** 播放区间(毫秒) */ _this._rangeBeginMs = 0, _this._rangeEndMs = 0, /** 区间内的录像片段,按起点升序 */ _this._segments = [], /** 当前片段下标,-1 表示不在任何片段内 */ _this._currentIndex = -1, _this._isDragging = false, /** 播放结束静默期的截止时刻(时间戳),此前忽略 OSD 回写 */ _this._silenceUntil = 0;
|
|
8831
|
+
_this._options = options;
|
|
8832
|
+
_this._render();
|
|
8833
|
+
// 区间通过 props 下发,避免主题异步渲染时错过初始化事件。
|
|
8834
|
+
// 区间只在初始化时设置,没有运行时变更入口
|
|
8835
|
+
_this._setRange((_this__options_props = _this._options.props) == null ? void 0 : _this__options_props.playbackRange);
|
|
8836
|
+
_this._setSegments(((_this__options_props1 = _this._options.props) == null ? void 0 : _this__options_props1.recordList) || []);
|
|
8837
|
+
_this.on(EVENTS.setAllDayRecTimes, function(records) {
|
|
8838
|
+
_this._setSegments(records || []);
|
|
8839
|
+
_this._syncSegment(true);
|
|
8840
|
+
});
|
|
8841
|
+
_this.on(EVENTS.getOSDTime, function(time) {
|
|
8842
|
+
if (!time || _this._isDragging) return;
|
|
8843
|
+
// 结束静默期内忽略回写,避免把补满的进度拉回(详见 PLAYBACK_END_SILENCE_MS)
|
|
8844
|
+
if (_this._silenceUntil > Date.now()) return;
|
|
8845
|
+
// OSD 如实跟随,不做 seek 过渡期的拦截或下限抑制:
|
|
8846
|
+
// 定位后 OSD 还会推几拍 seek 之前的位置,进度会先回到原处再跳到目标(跳两次),
|
|
8847
|
+
// 关键帧定位还可能让落点比目标早一秒(退一格)。这些与时间轴光标的表现一致,
|
|
8848
|
+
// 由 SDK 侧的定位行为决定,控件层不再单独补偿
|
|
8849
|
+
_this._syncCurrent(time * 1000);
|
|
8850
|
+
});
|
|
8851
|
+
// 区间播完时把完成度补到轨道末端。
|
|
8852
|
+
// 进度值来自 OSD 轮询,受轮询精度(1s)与服务端提前断流影响,通常停在末端之前
|
|
8853
|
+
// 若干秒(实测 1~5s)。时间轴光标停在真实最后一帧是对的,但进度条表达的是"完成度",
|
|
8854
|
+
// 停在 87% 却提示"回放结束"会让人以为卡住,所以这里补满。
|
|
8855
|
+
// noMoreSegment 不补:那时播放停在无录像间隔,补满会谎报已看完整段
|
|
8856
|
+
_this.on(EVENTS.playbackEnd, function(data) {
|
|
8857
|
+
var _this__segments_this__currentIndex;
|
|
8858
|
+
if ((data == null ? void 0 : data.reason) !== 'reachRangeEnd' || _this._isDragging) return;
|
|
8859
|
+
var endMs = _this._currentIndex >= 0 ? (_this__segments_this__currentIndex = _this._segments[_this._currentIndex]) == null ? void 0 : _this__segments_this__currentIndex.endTime : _this._rangeEndMs;
|
|
8860
|
+
if (!Number.isFinite(endMs)) return;
|
|
8861
|
+
// 先开静默期再补满,否则紧随其后的收尾 OSD 会把进度拉回
|
|
8862
|
+
_this._silenceUntil = Date.now() + PLAYBACK_END_SILENCE_MS;
|
|
8863
|
+
_this._progress.setCurrent(endMs);
|
|
8864
|
+
});
|
|
8865
|
+
return _this;
|
|
8866
|
+
}
|
|
8867
|
+
var _proto = SegmentProgressControl.prototype;
|
|
8868
|
+
_proto._render = function _render() {
|
|
8869
|
+
var _this = this;
|
|
8870
|
+
this._progress = new SegmentProgress(this.$container, {
|
|
8871
|
+
onChange: function onChange(date) {
|
|
8872
|
+
// 用户主动定位即视为重新开始播放,立即解除结束静默,否则静默期内的回写被丢弃、
|
|
8873
|
+
// 进度条会停住不动
|
|
8874
|
+
_this._silenceUntil = 0;
|
|
8875
|
+
_this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, date);
|
|
8876
|
+
_this.emit(EVENTS.control.timeLineChange, date);
|
|
8877
|
+
},
|
|
8878
|
+
onDragStart: function onDragStart() {
|
|
8879
|
+
_this._isDragging = true;
|
|
8880
|
+
},
|
|
8881
|
+
onDragEnd: function onDragEnd() {
|
|
8882
|
+
_this._isDragging = false;
|
|
8826
8883
|
}
|
|
8884
|
+
});
|
|
8885
|
+
this._updateVisible();
|
|
8886
|
+
};
|
|
8887
|
+
/**
|
|
8888
|
+
* 设置播放区间
|
|
8889
|
+
* @param range 区间;null 表示解除约束
|
|
8890
|
+
*/ _proto._setRange = function _setRange(range) {
|
|
8891
|
+
if ((range == null ? void 0 : range.begin) && (range == null ? void 0 : range.end)) {
|
|
8892
|
+
this._rangeBeginMs = utilsTools.DateTime.toDate(range.begin).getTime();
|
|
8893
|
+
this._rangeEndMs = utilsTools.DateTime.toDate(range.end).getTime();
|
|
8894
|
+
} else {
|
|
8895
|
+
this._rangeBeginMs = 0;
|
|
8896
|
+
this._rangeEndMs = 0;
|
|
8897
|
+
}
|
|
8898
|
+
this._updateVisible();
|
|
8899
|
+
};
|
|
8900
|
+
/**
|
|
8901
|
+
* 用区间裁剪录像片段
|
|
8902
|
+
* @param records 全天录像片段
|
|
8903
|
+
*/ _proto._setSegments = function _setSegments(records) {
|
|
8904
|
+
var _this = this;
|
|
8905
|
+
if (!this._hasRange() || !Array.isArray(records)) {
|
|
8906
|
+
this._segments = [];
|
|
8907
|
+
return;
|
|
8908
|
+
}
|
|
8909
|
+
this._segments = records.map(function(seg) {
|
|
8910
|
+
return {
|
|
8911
|
+
startTime: segMs(seg, 'start'),
|
|
8912
|
+
endTime: segMs(seg, 'end')
|
|
8913
|
+
};
|
|
8914
|
+
}).filter(function(seg) {
|
|
8915
|
+
return !Number.isNaN(seg.startTime) && !Number.isNaN(seg.endTime) && seg.endTime > _this._rangeBeginMs && seg.startTime < _this._rangeEndMs;
|
|
8916
|
+
}).map(function(seg) {
|
|
8917
|
+
return {
|
|
8918
|
+
startTime: Math.max(seg.startTime, _this._rangeBeginMs),
|
|
8919
|
+
endTime: Math.min(seg.endTime, _this._rangeEndMs)
|
|
8920
|
+
};
|
|
8921
|
+
}).sort(function(a, b) {
|
|
8922
|
+
return a.startTime - b.startTime;
|
|
8923
|
+
});
|
|
8924
|
+
};
|
|
8925
|
+
/** 用当前进度重新定位所属片段 */ _proto._syncSegment = function _syncSegment(force) {
|
|
8926
|
+
if (force === void 0) force = false;
|
|
8927
|
+
if (force) this._currentIndex = -1;
|
|
8928
|
+
this._updateVisible();
|
|
8929
|
+
};
|
|
8930
|
+
/**
|
|
8931
|
+
* 按播放进度更新片段与进度
|
|
8932
|
+
* @param currentMs 当前播放时间(毫秒)
|
|
8933
|
+
*/ _proto._syncCurrent = function _syncCurrent(currentMs) {
|
|
8934
|
+
if (!this._hasRange()) return;
|
|
8935
|
+
var index = this._segments.findIndex(function(seg) {
|
|
8936
|
+
return currentMs >= seg.startTime && currentMs < seg.endTime;
|
|
8937
|
+
});
|
|
8938
|
+
// 落在片段间隔时保持上一个片段的展示,等 SDK 层完成自动续播后再切换
|
|
8939
|
+
if (index === -1) {
|
|
8940
|
+
if (this._currentIndex === -1) this._fallbackToRange();
|
|
8941
|
+
this._progress.setCurrent(currentMs);
|
|
8942
|
+
return;
|
|
8943
|
+
}
|
|
8944
|
+
if (index !== this._currentIndex) {
|
|
8945
|
+
this._currentIndex = index;
|
|
8946
|
+
var seg = this._segments[index];
|
|
8947
|
+
this._progress.setSegment(seg.startTime, seg.endTime);
|
|
8948
|
+
}
|
|
8949
|
+
this._progress.setCurrent(currentMs);
|
|
8950
|
+
};
|
|
8951
|
+
/** 没有可用片段信息时退化为整个区间,避免进度条空转 */ _proto._fallbackToRange = function _fallbackToRange() {
|
|
8952
|
+
if (!this._hasRange()) return;
|
|
8953
|
+
this._progress.setSegment(this._rangeBeginMs, this._rangeEndMs);
|
|
8954
|
+
};
|
|
8955
|
+
_proto._hasRange = function _hasRange() {
|
|
8956
|
+
return this._rangeEndMs > this._rangeBeginMs;
|
|
8957
|
+
};
|
|
8958
|
+
_proto._updateVisible = function _updateVisible() {
|
|
8959
|
+
var visible = this._hasRange();
|
|
8960
|
+
this.$container.style.display = visible ? '' : 'none';
|
|
8961
|
+
if (visible && this._currentIndex === -1 && !this._segments.length) {
|
|
8962
|
+
this._fallbackToRange();
|
|
8963
|
+
}
|
|
8964
|
+
};
|
|
8965
|
+
_proto.destroy = function destroy() {
|
|
8966
|
+
var _this__progress;
|
|
8967
|
+
(_this__progress = this._progress) == null ? void 0 : _this__progress.destroy();
|
|
8968
|
+
Control.prototype.destroy.call(this);
|
|
8969
|
+
};
|
|
8970
|
+
return SegmentProgressControl;
|
|
8971
|
+
}(Control);
|
|
8972
|
+
|
|
8973
|
+
function _extends$3() {
|
|
8974
|
+
_extends$3 = Object.assign || function assign(target) {
|
|
8975
|
+
for(var i = 1; i < arguments.length; i++){
|
|
8976
|
+
var source = arguments[i];
|
|
8977
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
8827
8978
|
}
|
|
8828
8979
|
return target;
|
|
8829
8980
|
};
|
|
@@ -8909,10 +9060,11 @@ var Controls = {
|
|
|
8909
9060
|
speed: Speed,
|
|
8910
9061
|
date: DatePickerControl,
|
|
8911
9062
|
time: TimePickerControl,
|
|
8912
|
-
timeLine: TimeLineControl
|
|
9063
|
+
timeLine: TimeLineControl,
|
|
9064
|
+
segmentProgress: SegmentProgressControl
|
|
8913
9065
|
};
|
|
8914
9066
|
|
|
8915
|
-
|
|
9067
|
+
function _inherits$3(subClass, superClass) {
|
|
8916
9068
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
8917
9069
|
throw new TypeError("Super expression must either be null or a function");
|
|
8918
9070
|
}
|
|
@@ -9053,6 +9205,10 @@ function _set_prototype_of$2(o, p) {
|
|
|
9053
9205
|
this.$content = document.createElement('div');
|
|
9054
9206
|
this.$content.classList.add("" + PREFIX_CLASS + "-mobile-extend-control-content");
|
|
9055
9207
|
this.$controlPanel.appendChild(this.$content);
|
|
9208
|
+
// 片段进度条紧贴播放控件下方,位于日期/回放类型那一行之前
|
|
9209
|
+
this.$segmentProgress = document.createElement('div');
|
|
9210
|
+
this.$segmentProgress.classList.add("" + PREFIX_CLASS + "-mobile-extend-segment-progress");
|
|
9211
|
+
this.$content.appendChild(this.$segmentProgress);
|
|
9056
9212
|
this.$top = document.createElement('div');
|
|
9057
9213
|
this.$top.classList.add("" + PREFIX_CLASS + "-mobile-extend-control-top");
|
|
9058
9214
|
this.$content.appendChild(this.$top);
|
|
@@ -9073,14 +9229,10 @@ function _set_prototype_of$2(o, p) {
|
|
|
9073
9229
|
}(EventEmitter);
|
|
9074
9230
|
|
|
9075
9231
|
function _extends$2() {
|
|
9076
|
-
_extends$2 = Object.assign || function(target) {
|
|
9232
|
+
_extends$2 = Object.assign || function assign(target) {
|
|
9077
9233
|
for(var i = 1; i < arguments.length; i++){
|
|
9078
9234
|
var source = arguments[i];
|
|
9079
|
-
for(var key in source)
|
|
9080
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9081
|
-
target[key] = source[key];
|
|
9082
|
-
}
|
|
9083
|
-
}
|
|
9235
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
9084
9236
|
}
|
|
9085
9237
|
return target;
|
|
9086
9238
|
};
|
|
@@ -9212,7 +9364,7 @@ var PAUSE_DEFAULT_OPTIONS = {};
|
|
|
9212
9364
|
return Pause;
|
|
9213
9365
|
}(Control);
|
|
9214
9366
|
|
|
9215
|
-
var _unmountedControls = function(theme) {
|
|
9367
|
+
var _unmountedControls = function _unmountedControls(theme) {
|
|
9216
9368
|
if (!theme.controls) {
|
|
9217
9369
|
return;
|
|
9218
9370
|
}
|
|
@@ -9299,11 +9451,8 @@ function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
9299
9451
|
reject(error);
|
|
9300
9452
|
return;
|
|
9301
9453
|
}
|
|
9302
|
-
if (info.done)
|
|
9303
|
-
|
|
9304
|
-
} else {
|
|
9305
|
-
Promise.resolve(value).then(_next, _throw);
|
|
9306
|
-
}
|
|
9454
|
+
if (info.done) resolve(value);
|
|
9455
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
9307
9456
|
}
|
|
9308
9457
|
function _async_to_generator$1(fn) {
|
|
9309
9458
|
return function() {
|
|
@@ -9320,28 +9469,6 @@ function _async_to_generator$1(fn) {
|
|
|
9320
9469
|
});
|
|
9321
9470
|
};
|
|
9322
9471
|
}
|
|
9323
|
-
function _extends$1() {
|
|
9324
|
-
_extends$1 = Object.assign || function(target) {
|
|
9325
|
-
for(var i = 1; i < arguments.length; i++){
|
|
9326
|
-
var source = arguments[i];
|
|
9327
|
-
for(var key in source){
|
|
9328
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9329
|
-
target[key] = source[key];
|
|
9330
|
-
}
|
|
9331
|
-
}
|
|
9332
|
-
}
|
|
9333
|
-
return target;
|
|
9334
|
-
};
|
|
9335
|
-
return _extends$1.apply(this, arguments);
|
|
9336
|
-
}
|
|
9337
|
-
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
9338
|
-
if (!o) return;
|
|
9339
|
-
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
9340
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9341
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9342
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9343
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
9344
|
-
}
|
|
9345
9472
|
function _create_for_of_iterator_helper_loose$1(o, allowArrayLike) {
|
|
9346
9473
|
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
9347
9474
|
if (it) return (it = it.call(o)).next.bind(it);
|
|
@@ -9349,18 +9476,26 @@ function _create_for_of_iterator_helper_loose$1(o, allowArrayLike) {
|
|
|
9349
9476
|
if (it) o = it;
|
|
9350
9477
|
var i = 0;
|
|
9351
9478
|
return function() {
|
|
9352
|
-
if (i >= o.length) {
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
};
|
|
9356
|
-
}
|
|
9479
|
+
if (i >= o.length) return {
|
|
9480
|
+
done: true
|
|
9481
|
+
};
|
|
9357
9482
|
return {
|
|
9358
9483
|
done: false,
|
|
9359
9484
|
value: o[i++]
|
|
9360
9485
|
};
|
|
9361
9486
|
};
|
|
9362
9487
|
}
|
|
9363
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance
|
|
9488
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9489
|
+
}
|
|
9490
|
+
function _extends$1() {
|
|
9491
|
+
_extends$1 = Object.assign || function assign(target) {
|
|
9492
|
+
for(var i = 1; i < arguments.length; i++){
|
|
9493
|
+
var source = arguments[i];
|
|
9494
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
9495
|
+
}
|
|
9496
|
+
return target;
|
|
9497
|
+
};
|
|
9498
|
+
return _extends$1.apply(this, arguments);
|
|
9364
9499
|
}
|
|
9365
9500
|
function _ts_generator$1(thisArg, body) {
|
|
9366
9501
|
var f, y, t, _ = {
|
|
@@ -9371,9 +9506,17 @@ function _ts_generator$1(thisArg, body) {
|
|
|
9371
9506
|
},
|
|
9372
9507
|
trys: [],
|
|
9373
9508
|
ops: []
|
|
9374
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
9375
|
-
return
|
|
9376
|
-
|
|
9509
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
9510
|
+
return d(g, "next", {
|
|
9511
|
+
value: verb(0)
|
|
9512
|
+
}), d(g, "throw", {
|
|
9513
|
+
value: verb(1)
|
|
9514
|
+
}), d(g, "return", {
|
|
9515
|
+
value: verb(2)
|
|
9516
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
9517
|
+
value: function() {
|
|
9518
|
+
return this;
|
|
9519
|
+
}
|
|
9377
9520
|
}), g;
|
|
9378
9521
|
function verb(n) {
|
|
9379
9522
|
return function(v) {
|
|
@@ -9453,6 +9596,14 @@ function _ts_generator$1(thisArg, body) {
|
|
|
9453
9596
|
};
|
|
9454
9597
|
}
|
|
9455
9598
|
}
|
|
9599
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
9600
|
+
if (!o) return;
|
|
9601
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
9602
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9603
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9604
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9605
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
9606
|
+
}
|
|
9456
9607
|
// 需要权限的控件
|
|
9457
9608
|
var AUTH_KEY = [
|
|
9458
9609
|
'ptz',
|
|
@@ -9491,7 +9642,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9491
9642
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
9492
9643
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
9493
9644
|
rootContainer: theme.$container,
|
|
9494
|
-
getPopupContainer: function() {
|
|
9645
|
+
getPopupContainer: function getPopupContainer() {
|
|
9495
9646
|
return $container;
|
|
9496
9647
|
},
|
|
9497
9648
|
recType: theme.recType,
|
|
@@ -9514,7 +9665,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9514
9665
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9515
9666
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
9516
9667
|
rootContainer: theme.$container,
|
|
9517
|
-
getPopupContainer: function() {
|
|
9668
|
+
getPopupContainer: function getPopupContainer() {
|
|
9518
9669
|
return $container;
|
|
9519
9670
|
},
|
|
9520
9671
|
language: theme.options.language || "zh",
|
|
@@ -9541,7 +9692,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9541
9692
|
}
|
|
9542
9693
|
function _renderTheme(theme, data) {
|
|
9543
9694
|
return _async_to_generator$1(function() {
|
|
9544
|
-
var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_urlInfo, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1,
|
|
9695
|
+
var _ref, _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_urlInfo, _theme_playbackRange, _theme_playbackRange1, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, list, _needTimeLine, _hasPlaybackRange, _needDatePicker, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions4, _theme_controls2, _theme_options_mobileExtendOptions5, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions6, _ref1, _filterThemeData_header1, _filterThemeData_footer1, _theme_options;
|
|
9545
9696
|
return _ts_generator$1(this, function(_state) {
|
|
9546
9697
|
switch(_state.label){
|
|
9547
9698
|
case 0:
|
|
@@ -9567,7 +9718,7 @@ function _renderTheme(theme, data) {
|
|
|
9567
9718
|
language: theme.options.language,
|
|
9568
9719
|
locales: theme.i18n.translations
|
|
9569
9720
|
}, theme.options.loadingOptions || {}, {
|
|
9570
|
-
getPopupContainer: function() {
|
|
9721
|
+
getPopupContainer: function getPopupContainer() {
|
|
9571
9722
|
return theme.$container;
|
|
9572
9723
|
}
|
|
9573
9724
|
}));
|
|
@@ -9577,7 +9728,7 @@ function _renderTheme(theme, data) {
|
|
|
9577
9728
|
language: theme.options.language,
|
|
9578
9729
|
locales: theme.i18n.translations
|
|
9579
9730
|
}, theme.options.pauseOptions || {}, {
|
|
9580
|
-
getPopupContainer: function() {
|
|
9731
|
+
getPopupContainer: function getPopupContainer() {
|
|
9581
9732
|
return theme.contentControl.$wrapper;
|
|
9582
9733
|
}
|
|
9583
9734
|
}));
|
|
@@ -9589,14 +9740,14 @@ function _renderTheme(theme, data) {
|
|
|
9589
9740
|
theme.messageControl = new Message(_extends$1({
|
|
9590
9741
|
rootContainer: theme.$container
|
|
9591
9742
|
}, theme.options.messageOptions || {}, {
|
|
9592
|
-
getPopupContainer: function() {
|
|
9743
|
+
getPopupContainer: function getPopupContainer() {
|
|
9593
9744
|
return theme.contentControl.$wrapper;
|
|
9594
9745
|
}
|
|
9595
9746
|
}));
|
|
9596
9747
|
}
|
|
9597
9748
|
if (theme.options.posterOptions !== null) {
|
|
9598
9749
|
theme.posterControl = new Poster(_extends$1({}, theme.options.posterOptions || {}, {
|
|
9599
|
-
getPopupContainer: function() {
|
|
9750
|
+
getPopupContainer: function getPopupContainer() {
|
|
9600
9751
|
return theme.contentControl.$video;
|
|
9601
9752
|
}
|
|
9602
9753
|
}));
|
|
@@ -9626,7 +9777,7 @@ function _renderTheme(theme, data) {
|
|
|
9626
9777
|
}
|
|
9627
9778
|
if (filterThemeData.header) {
|
|
9628
9779
|
theme._header = new Header({
|
|
9629
|
-
getPopupContainer: function() {
|
|
9780
|
+
getPopupContainer: function getPopupContainer() {
|
|
9630
9781
|
return theme.$container;
|
|
9631
9782
|
},
|
|
9632
9783
|
color: filterThemeData.header.color,
|
|
@@ -9641,7 +9792,7 @@ function _renderTheme(theme, data) {
|
|
|
9641
9792
|
if (filterThemeData.footer) {
|
|
9642
9793
|
// prettier-ignore
|
|
9643
9794
|
theme._footer = new Footer({
|
|
9644
|
-
getPopupContainer: function() {
|
|
9795
|
+
getPopupContainer: function getPopupContainer() {
|
|
9645
9796
|
return theme.$container;
|
|
9646
9797
|
},
|
|
9647
9798
|
color: filterThemeData.footer.color,
|
|
@@ -9687,20 +9838,23 @@ function _renderTheme(theme, data) {
|
|
|
9687
9838
|
_renderControls(theme, theme._footer.$left, leftBtns1, props);
|
|
9688
9839
|
_renderControls(theme, theme._footer.$right, rightBtns1, props);
|
|
9689
9840
|
}
|
|
9690
|
-
list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (
|
|
9841
|
+
list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_ref = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _ref : []);
|
|
9691
9842
|
// FIXME: 这个逻辑实际上是有问题的
|
|
9692
9843
|
_needTimeLine = list.some(function(item) {
|
|
9693
9844
|
return REC_GROUP.includes(item.iconId) || item.iconId === 'recDropdown';
|
|
9694
9845
|
}) && ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.type) === 'rec';
|
|
9846
|
+
// 处于播放区间约束中时不渲染日历:区间必然在同一天内,切到任何其它日期都会越界
|
|
9847
|
+
_hasPlaybackRange = !!((_theme_playbackRange = theme.playbackRange) == null ? void 0 : _theme_playbackRange.begin) && !!((_theme_playbackRange1 = theme.playbackRange) == null ? void 0 : _theme_playbackRange1.end);
|
|
9848
|
+
_needDatePicker = theme.options.dateOptions !== null && !_hasPlaybackRange;
|
|
9695
9849
|
theme.$container.classList.remove("" + PREFIX_CLASS + "-has-time-line");
|
|
9696
9850
|
// PC 单独渲染timeLine
|
|
9697
9851
|
if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
|
|
9698
9852
|
theme._recFooter = new RecFooter(theme.$container, {
|
|
9699
|
-
hasDatePicker:
|
|
9853
|
+
hasDatePicker: _needDatePicker,
|
|
9700
9854
|
hasTimePicker: theme.options.timeOptions !== null
|
|
9701
9855
|
});
|
|
9702
9856
|
// 放置在 timeline 前面是为了防止 时间轴宽度设置后导致 图标按钮被挤出 footer
|
|
9703
|
-
if (
|
|
9857
|
+
if (_needDatePicker) {
|
|
9704
9858
|
_renderDatePicker(theme, theme._recFooter.$datePickerContainer, props);
|
|
9705
9859
|
}
|
|
9706
9860
|
if (theme.options.timeOptions !== null) {
|
|
@@ -9720,14 +9874,19 @@ function _renderTheme(theme, data) {
|
|
|
9720
9874
|
});
|
|
9721
9875
|
if (hasPtz || _needTimeLine) {
|
|
9722
9876
|
theme._mobileExtend = new MobileExtend(theme.$container);
|
|
9723
|
-
|
|
9877
|
+
// 播放区间约束下渲染片段进度条(紧贴播放控件下方)
|
|
9878
|
+
if (_hasPlaybackRange && theme.options.segmentProgressOptions !== null && ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions1.controls.includes('segmentProgress')) && _needTimeLine) {
|
|
9879
|
+
_renderSegmentProgress(theme, theme._mobileExtend.$segmentProgress, props);
|
|
9880
|
+
}
|
|
9881
|
+
if (_needDatePicker && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('date')) && _needTimeLine) {
|
|
9724
9882
|
_renderDatePicker(theme, theme._mobileExtend.$topLeft, props);
|
|
9725
9883
|
}
|
|
9726
|
-
if (theme.options.timeOptions !== null && ((
|
|
9884
|
+
if (theme.options.timeOptions !== null && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('time')) && _needTimeLine) {
|
|
9727
9885
|
_renderTimePicker(theme, theme._mobileExtend.$topLeft, props);
|
|
9728
9886
|
}
|
|
9729
|
-
|
|
9730
|
-
|
|
9887
|
+
// 回放类型切换正常渲染,用户点击后由 SDK 层在 recDropdownChange 事件中自行处理
|
|
9888
|
+
if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions4 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions4.controls.includes('rec')) && _needTimeLine) {
|
|
9889
|
+
[].concat(((_filterThemeData_header1 = filterThemeData.header) == null ? void 0 : _filterThemeData_header1.btnList) || [], (_ref1 = (_filterThemeData_footer1 = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer1.btnList) != null ? _ref1 : []).forEach(function(item) {
|
|
9731
9890
|
var _theme__mobileExtend;
|
|
9732
9891
|
if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
9733
9892
|
});
|
|
@@ -9737,7 +9896,7 @@ function _renderTheme(theme, data) {
|
|
|
9737
9896
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9738
9897
|
theme.controls['alarmMessageControl'] = new Controls['alarmMessage'](_extends$1({
|
|
9739
9898
|
rootContainer: theme.$container,
|
|
9740
|
-
getPopupContainer: function() {
|
|
9899
|
+
getPopupContainer: function getPopupContainer() {
|
|
9741
9900
|
var _theme__mobileExtend;
|
|
9742
9901
|
return (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight;
|
|
9743
9902
|
},
|
|
@@ -9749,10 +9908,10 @@ function _renderTheme(theme, data) {
|
|
|
9749
9908
|
props: props
|
|
9750
9909
|
}));
|
|
9751
9910
|
}
|
|
9752
|
-
if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((
|
|
9911
|
+
if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions5 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions5.controls.includes('timeLine')) && _needTimeLine) {
|
|
9753
9912
|
_renderTimeLine(theme, theme._mobileExtend.$content, props);
|
|
9754
9913
|
}
|
|
9755
|
-
if (Utils.isMobile && ((
|
|
9914
|
+
if (Utils.isMobile && ((_theme_options_mobileExtendOptions6 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls1 = _theme_options_mobileExtendOptions6.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls1.includes('ptz')) && hasPtz && theme.controls.ptzControl) {
|
|
9756
9915
|
theme.controls.ptzControl.renderMobileExtend(theme._mobileExtend.$content);
|
|
9757
9916
|
}
|
|
9758
9917
|
}
|
|
@@ -9771,32 +9930,49 @@ function _renderTheme(theme, data) {
|
|
|
9771
9930
|
});
|
|
9772
9931
|
})();
|
|
9773
9932
|
}
|
|
9774
|
-
var _renderTimeLine = function(theme, container, props) {
|
|
9933
|
+
var _renderTimeLine = function _renderTimeLine(theme, container, props) {
|
|
9775
9934
|
if (props === void 0) props = {};
|
|
9776
9935
|
if (!theme.controls.timeLineControl && theme.options.timeLineOptions !== null) {
|
|
9936
|
+
var _ref;
|
|
9777
9937
|
var _theme_urlInfo, _theme_urlInfo1, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9778
|
-
var _showSectionIcon;
|
|
9779
9938
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9780
9939
|
theme.controls.timeLineControl = new Controls['timeLine'](_extends$1({
|
|
9781
|
-
getPopupContainer: function() {
|
|
9940
|
+
getPopupContainer: function getPopupContainer() {
|
|
9782
9941
|
return container;
|
|
9783
9942
|
},
|
|
9784
9943
|
language: theme.options.language,
|
|
9785
9944
|
locales: theme.i18n.translations,
|
|
9786
9945
|
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + ((_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.validateCode) : ''
|
|
9787
9946
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["timeLineOptions"]) || {}, {
|
|
9788
|
-
showSectionIcon: ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["recListOptions"]) !== null ? (
|
|
9947
|
+
showSectionIcon: ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["recListOptions"]) !== null ? (_ref = (_this = ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["timeLineOptions"]) || {}) == null ? void 0 : _this.showSectionIcon) != null ? _ref : true : true,
|
|
9948
|
+
props: props
|
|
9949
|
+
}));
|
|
9950
|
+
}
|
|
9951
|
+
};
|
|
9952
|
+
var _renderSegmentProgress = function _renderSegmentProgress(theme, container, props) {
|
|
9953
|
+
if (props === void 0) props = {};
|
|
9954
|
+
if (!theme.controls.segmentProgressControl && theme.options.segmentProgressOptions !== null) {
|
|
9955
|
+
var _theme_options;
|
|
9956
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9957
|
+
theme.controls.segmentProgressControl = new Controls['segmentProgress'](_extends$1({
|
|
9958
|
+
rootContainer: theme.$container,
|
|
9959
|
+
getPopupContainer: function getPopupContainer() {
|
|
9960
|
+
return container;
|
|
9961
|
+
},
|
|
9962
|
+
language: theme.options.language,
|
|
9963
|
+
locales: theme.i18n.translations
|
|
9964
|
+
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["segmentProgressOptions"]) || {}, {
|
|
9789
9965
|
props: props
|
|
9790
9966
|
}));
|
|
9791
9967
|
}
|
|
9792
9968
|
};
|
|
9793
|
-
var _renderDatePicker = function(theme, container, props) {
|
|
9969
|
+
var _renderDatePicker = function _renderDatePicker(theme, container, props) {
|
|
9794
9970
|
if (props === void 0) props = {};
|
|
9795
9971
|
if (!theme.controls.dateControl && theme.options.dateOptions !== null) {
|
|
9796
9972
|
var _theme_options;
|
|
9797
9973
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9798
9974
|
theme.controls.dateControl = new Controls['date'](_extends$1({
|
|
9799
|
-
getPopupContainer: function() {
|
|
9975
|
+
getPopupContainer: function getPopupContainer() {
|
|
9800
9976
|
return container;
|
|
9801
9977
|
},
|
|
9802
9978
|
language: theme.options.language,
|
|
@@ -9806,13 +9982,13 @@ var _renderDatePicker = function(theme, container, props) {
|
|
|
9806
9982
|
}));
|
|
9807
9983
|
}
|
|
9808
9984
|
};
|
|
9809
|
-
var _renderTimePicker = function(theme, container, props) {
|
|
9985
|
+
var _renderTimePicker = function _renderTimePicker(theme, container, props) {
|
|
9810
9986
|
if (props === void 0) props = {};
|
|
9811
9987
|
if (!theme.controls.timeControl && theme.options.timeOptions !== null) {
|
|
9812
9988
|
var _theme_options;
|
|
9813
9989
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9814
9990
|
theme.controls.timeControl = new Controls['time'](_extends$1({
|
|
9815
|
-
getPopupContainer: function() {
|
|
9991
|
+
getPopupContainer: function getPopupContainer() {
|
|
9816
9992
|
return container;
|
|
9817
9993
|
},
|
|
9818
9994
|
language: theme.options.language,
|
|
@@ -9822,14 +9998,14 @@ var _renderTimePicker = function(theme, container, props) {
|
|
|
9822
9998
|
}));
|
|
9823
9999
|
}
|
|
9824
10000
|
};
|
|
9825
|
-
var _renderRecType = function(theme, container, recType, props) {
|
|
10001
|
+
var _renderRecType = function _renderRecType(theme, container, recType, props) {
|
|
9826
10002
|
if (props === void 0) props = {};
|
|
9827
10003
|
var _theme_controls, _theme_controls1, _theme_controls2;
|
|
9828
10004
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls['recControl']) && theme.options.recOptions !== null && container) {
|
|
9829
10005
|
var _theme_options;
|
|
9830
10006
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
9831
10007
|
theme.controls['recControl'] = new Controls['rec'](_extends$1({
|
|
9832
|
-
getPopupContainer: function() {
|
|
10008
|
+
getPopupContainer: function getPopupContainer() {
|
|
9833
10009
|
return container;
|
|
9834
10010
|
},
|
|
9835
10011
|
recType: theme.recType,
|
|
@@ -9933,7 +10109,7 @@ var _renderRecType = function(theme, container, recType, props) {
|
|
|
9933
10109
|
return width - leftWidth - rightWidth > offset;
|
|
9934
10110
|
}
|
|
9935
10111
|
|
|
9936
|
-
|
|
10112
|
+
function _array_like_to_array(arr, len) {
|
|
9937
10113
|
if (len == null || len > arr.length) len = arr.length;
|
|
9938
10114
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9939
10115
|
return arr2;
|
|
@@ -9946,11 +10122,8 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
9946
10122
|
reject(error);
|
|
9947
10123
|
return;
|
|
9948
10124
|
}
|
|
9949
|
-
if (info.done)
|
|
9950
|
-
|
|
9951
|
-
} else {
|
|
9952
|
-
Promise.resolve(value).then(_next, _throw);
|
|
9953
|
-
}
|
|
10125
|
+
if (info.done) resolve(value);
|
|
10126
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
9954
10127
|
}
|
|
9955
10128
|
function _async_to_generator(fn) {
|
|
9956
10129
|
return function() {
|
|
@@ -9980,15 +10153,29 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
9980
10153
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
9981
10154
|
return Constructor;
|
|
9982
10155
|
}
|
|
10156
|
+
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
10157
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
10158
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
|
10159
|
+
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike) {
|
|
10160
|
+
if (it) o = it;
|
|
10161
|
+
var i = 0;
|
|
10162
|
+
return function() {
|
|
10163
|
+
if (i >= o.length) return {
|
|
10164
|
+
done: true
|
|
10165
|
+
};
|
|
10166
|
+
return {
|
|
10167
|
+
done: false,
|
|
10168
|
+
value: o[i++]
|
|
10169
|
+
};
|
|
10170
|
+
};
|
|
10171
|
+
}
|
|
10172
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
10173
|
+
}
|
|
9983
10174
|
function _extends() {
|
|
9984
|
-
_extends = Object.assign || function(target) {
|
|
10175
|
+
_extends = Object.assign || function assign(target) {
|
|
9985
10176
|
for(var i = 1; i < arguments.length; i++){
|
|
9986
10177
|
var source = arguments[i];
|
|
9987
|
-
for(var key in source)
|
|
9988
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9989
|
-
target[key] = source[key];
|
|
9990
|
-
}
|
|
9991
|
-
}
|
|
10178
|
+
for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
|
|
9992
10179
|
}
|
|
9993
10180
|
return target;
|
|
9994
10181
|
};
|
|
@@ -10014,34 +10201,6 @@ function _set_prototype_of(o, p) {
|
|
|
10014
10201
|
};
|
|
10015
10202
|
return _set_prototype_of(o, p);
|
|
10016
10203
|
}
|
|
10017
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
10018
|
-
if (!o) return;
|
|
10019
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
10020
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
10021
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
10022
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
10023
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
10024
|
-
}
|
|
10025
|
-
function _create_for_of_iterator_helper_loose(o, allowArrayLike) {
|
|
10026
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
10027
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
|
10028
|
-
if (Array.isArray(o) || (it = _unsupported_iterable_to_array(o)) || allowArrayLike) {
|
|
10029
|
-
if (it) o = it;
|
|
10030
|
-
var i = 0;
|
|
10031
|
-
return function() {
|
|
10032
|
-
if (i >= o.length) {
|
|
10033
|
-
return {
|
|
10034
|
-
done: true
|
|
10035
|
-
};
|
|
10036
|
-
}
|
|
10037
|
-
return {
|
|
10038
|
-
done: false,
|
|
10039
|
-
value: o[i++]
|
|
10040
|
-
};
|
|
10041
|
-
};
|
|
10042
|
-
}
|
|
10043
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
10044
|
-
}
|
|
10045
10204
|
function _ts_generator(thisArg, body) {
|
|
10046
10205
|
var f, y, t, _ = {
|
|
10047
10206
|
label: 0,
|
|
@@ -10051,9 +10210,17 @@ function _ts_generator(thisArg, body) {
|
|
|
10051
10210
|
},
|
|
10052
10211
|
trys: [],
|
|
10053
10212
|
ops: []
|
|
10054
|
-
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
10055
|
-
return
|
|
10056
|
-
|
|
10213
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
|
|
10214
|
+
return d(g, "next", {
|
|
10215
|
+
value: verb(0)
|
|
10216
|
+
}), d(g, "throw", {
|
|
10217
|
+
value: verb(1)
|
|
10218
|
+
}), d(g, "return", {
|
|
10219
|
+
value: verb(2)
|
|
10220
|
+
}), typeof Symbol === "function" && d(g, Symbol.iterator, {
|
|
10221
|
+
value: function() {
|
|
10222
|
+
return this;
|
|
10223
|
+
}
|
|
10057
10224
|
}), g;
|
|
10058
10225
|
function verb(n) {
|
|
10059
10226
|
return function(v) {
|
|
@@ -10133,6 +10300,14 @@ function _ts_generator(thisArg, body) {
|
|
|
10133
10300
|
};
|
|
10134
10301
|
}
|
|
10135
10302
|
}
|
|
10303
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
10304
|
+
if (!o) return;
|
|
10305
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
10306
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
10307
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
10308
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
10309
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
10310
|
+
}
|
|
10136
10311
|
var THEME_DEFAULT_OPTIONS = {
|
|
10137
10312
|
dblClickFullscreen: true,
|
|
10138
10313
|
language: 'zh',
|
|
@@ -10186,6 +10361,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10186
10361
|
_inherits(Theme, EventEmitter);
|
|
10187
10362
|
function Theme(options) {
|
|
10188
10363
|
var _this;
|
|
10364
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
|
|
10189
10365
|
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_urlInfo_searchParams, _this_urlInfo, _this_options, _this_options1;
|
|
10190
10366
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
10191
10367
|
* @since 0.0.1
|
|
@@ -10206,7 +10382,11 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10206
10382
|
*/ _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, /**
|
|
10207
10383
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
10208
10384
|
* @private
|
|
10209
|
-
*/ _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, _this._url = '', /** 是否播放中 @private */ _this._playing = false, /** @private 加载中 */ _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 = [], /**
|
|
10385
|
+
*/ _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, _this._url = '', /** 是否播放中 @private */ _this._playing = false, /** @private 加载中 */ _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 = [], /**
|
|
10386
|
+
* 播放区间(片段分享),null 表示不约束。
|
|
10387
|
+
* 由 SDK 层在初始化时通过 props 下发,主题层据此决定日历/回放类型按钮
|
|
10388
|
+
* 是否渲染、片段进度条是否渲染。区间没有运行时变更入口。
|
|
10389
|
+
*/ _this.playbackRange = null, /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ _this._resizeOverflowTimer = null, // /**
|
|
10210
10390
|
// * 记录回放的月份
|
|
10211
10391
|
// *
|
|
10212
10392
|
// * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
|
|
@@ -10247,7 +10427,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10247
10427
|
_this._initClassName();
|
|
10248
10428
|
// 画布需要渲染在 this.contentControl.$content 内
|
|
10249
10429
|
_this.contentControl = new Content({
|
|
10250
|
-
getContainer: function() {
|
|
10430
|
+
getContainer: function getContainer() {
|
|
10251
10431
|
return _this.$container;
|
|
10252
10432
|
},
|
|
10253
10433
|
scaleMode: _this.scaleMode
|
|
@@ -10257,18 +10437,15 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10257
10437
|
});
|
|
10258
10438
|
// zoom utils
|
|
10259
10439
|
__zoom(_this, _this.contentControl.$content, _extends({}, _this.options.zoomOptions || {}, {
|
|
10260
|
-
onTap: function() {
|
|
10440
|
+
onTap: function onTap() {
|
|
10261
10441
|
var _this__interactiveResult_setTimeoutShow, _this__interactiveResult;
|
|
10262
10442
|
(_this__interactiveResult = _this._interactiveResult) == null ? void 0 : (_this__interactiveResult_setTimeoutShow = _this__interactiveResult.setTimeoutShow) == null ? void 0 : _this__interactiveResult_setTimeoutShow.call(_this__interactiveResult);
|
|
10263
10443
|
}
|
|
10264
10444
|
}));
|
|
10265
|
-
|
|
10266
|
-
_this.
|
|
10267
|
-
var _this_options_volumeOptions_muted, _ref1;
|
|
10268
|
-
_this._muted = (_ref1 = (_this_options_volumeOptions_muted = (_this_options_volumeOptions1 = _this.options.volumeOptions) == null ? void 0 : _this_options_volumeOptions1.muted) != null ? _this_options_volumeOptions_muted : _this.options.muted) != null ? _ref1 : false;
|
|
10269
|
-
var _this_options_speedOptions_value, _ref2;
|
|
10445
|
+
_this._volume = (_ref = (_ref1 = (_this_options_volumeOptions = _this.options.volumeOptions) == null ? void 0 : _this_options_volumeOptions.volume) != null ? _ref1 : _this.options.volume) != null ? _ref : 0.8;
|
|
10446
|
+
_this._muted = (_ref2 = (_ref3 = (_this_options_volumeOptions1 = _this.options.volumeOptions) == null ? void 0 : _this_options_volumeOptions1.muted) != null ? _ref3 : _this.options.muted) != null ? _ref2 : false;
|
|
10270
10447
|
// playbackSpeed 是 萤石标准流倍速字段
|
|
10271
|
-
_this._speed = +((
|
|
10448
|
+
_this._speed = +((_ref4 = (_ref5 = (_this_options_speedOptions = _this.options.speedOptions) == null ? void 0 : _this_options_speedOptions.value) != null ? _ref5 : (_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.playbackSpeed) != null ? _ref4 : 1);
|
|
10272
10449
|
_this._mobileInnerWidthHeight = _this._mobileInnerWidthHeight.bind(_this);
|
|
10273
10450
|
_this._throttleMobileInnerWidthHeight = throttle(_this._mobileInnerWidthHeight, 20).bind(_this);
|
|
10274
10451
|
_this._onDblClickFullscreen = debounce(_this._onDblClickFullscreen, 20).bind(_this);
|
|
@@ -10296,9 +10473,9 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10296
10473
|
// flv / mp4:支持自定义 themeData,未传时回退到标准直播模板 LiveTemplate(2026-01-19 起支持自定义)
|
|
10297
10474
|
initialThemeData = themeData !== undefined ? themeData : LiveTemplate;
|
|
10298
10475
|
} else {
|
|
10299
|
-
var
|
|
10476
|
+
var _ref6;
|
|
10300
10477
|
// 其余类型(如 ezopen 私有流):template 优先级高于 themeData,二者都未设置时为 null
|
|
10301
|
-
initialThemeData = (
|
|
10478
|
+
initialThemeData = (_ref6 = template != null ? template : themeData) != null ? _ref6 : null;
|
|
10302
10479
|
}
|
|
10303
10480
|
_this._renderTheme(initialThemeData);
|
|
10304
10481
|
_this._addEventListener();
|
|
@@ -10649,7 +10826,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10649
10826
|
this._fullscreen = new Fullscreen$1(this.$container, {
|
|
10650
10827
|
prefix: PREFIX_CLASS,
|
|
10651
10828
|
// 全屏变化
|
|
10652
|
-
onChange: function(info) {
|
|
10829
|
+
onChange: function onChange(info) {
|
|
10653
10830
|
if (info.isCurrentFullscreen) {
|
|
10654
10831
|
_this.emit(EVENTS.fullscreen);
|
|
10655
10832
|
} else if (_this._isCurrentFullscreen) {
|
|
@@ -10667,7 +10844,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10667
10844
|
}
|
|
10668
10845
|
});
|
|
10669
10846
|
// ------------------------------ 旋转方向 -----------------------------
|
|
10670
|
-
var rotateOrientation = function(orientation) {
|
|
10847
|
+
var rotateOrientation = function rotateOrientation(orientation) {
|
|
10671
10848
|
if (_this.$container) {
|
|
10672
10849
|
var // 重置移除旋转角度
|
|
10673
10850
|
_this_$container_classList;
|
|
@@ -10790,7 +10967,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10790
10967
|
language: this.options.language,
|
|
10791
10968
|
locales: this.i18n.translations,
|
|
10792
10969
|
rootContainer: this.$container,
|
|
10793
|
-
getPopupContainer: function() {
|
|
10970
|
+
getPopupContainer: function getPopupContainer() {
|
|
10794
10971
|
var _this__header;
|
|
10795
10972
|
return (_this__header = _this._header) == null ? void 0 : _this__header.$right;
|
|
10796
10973
|
},
|
|
@@ -10802,7 +10979,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10802
10979
|
8
|
|
10803
10980
|
],
|
|
10804
10981
|
wrapClassName: "" + PREFIX_CLASS + "-header-more",
|
|
10805
|
-
onOpenChange: function(open) {
|
|
10982
|
+
onOpenChange: function onOpenChange(open) {
|
|
10806
10983
|
_this.emit(EVENTS.control.headerMorePanelOpenChange, open);
|
|
10807
10984
|
}
|
|
10808
10985
|
});
|
|
@@ -10845,7 +11022,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10845
11022
|
language: this.options.language,
|
|
10846
11023
|
locales: this.i18n.translations,
|
|
10847
11024
|
rootContainer: this.$container,
|
|
10848
|
-
getPopupContainer: function() {
|
|
11025
|
+
getPopupContainer: function getPopupContainer() {
|
|
10849
11026
|
var _this__footer;
|
|
10850
11027
|
return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
|
|
10851
11028
|
},
|
|
@@ -10857,7 +11034,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10857
11034
|
-8
|
|
10858
11035
|
],
|
|
10859
11036
|
wrapClassName: "" + PREFIX_CLASS + "-footer-more",
|
|
10860
|
-
onOpenChange: function(open) {
|
|
11037
|
+
onOpenChange: function onOpenChange(open) {
|
|
10861
11038
|
_this.emit(EVENTS.control.footerMorePanelOpenChange, open);
|
|
10862
11039
|
}
|
|
10863
11040
|
});
|
|
@@ -11373,6 +11550,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11373
11550
|
* theme.on(Theme.EVENTS.zoomChange, (zoom: number) => {})
|
|
11374
11551
|
* ```
|
|
11375
11552
|
*/ function set(zoom) {
|
|
11553
|
+
var _ref;
|
|
11376
11554
|
var _this_options_zoomOptions;
|
|
11377
11555
|
if (!this._zooming) {
|
|
11378
11556
|
var _this_messageControl_info, _this_messageControl, _this_logger;
|
|
@@ -11381,8 +11559,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11381
11559
|
return;
|
|
11382
11560
|
}
|
|
11383
11561
|
zoom = +zoom.toFixed(1);
|
|
11384
|
-
var
|
|
11385
|
-
var ZOOM_MAX = (_this_options_zoomOptions_max = (_this_options_zoomOptions = this.options.zoomOptions) == null ? void 0 : _this_options_zoomOptions.max) != null ? _this_options_zoomOptions_max : ZOOM_DEFAULT_OPTIONS.max;
|
|
11562
|
+
var ZOOM_MAX = (_ref = (_this_options_zoomOptions = this.options.zoomOptions) == null ? void 0 : _this_options_zoomOptions.max) != null ? _ref : ZOOM_DEFAULT_OPTIONS.max;
|
|
11386
11563
|
if (zoom > ZOOM_MAX) {
|
|
11387
11564
|
var _this_messageControl_info1, _this_messageControl1, _this_logger1;
|
|
11388
11565
|
(_this_messageControl1 = this.messageControl) == null ? void 0 : (_this_messageControl_info1 = _this_messageControl1.info) == null ? void 0 : _this_messageControl_info1.call(_this_messageControl1, this.i18n.t('ZOOM_LIMIT_MAX', {
|
|
@@ -11586,7 +11763,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11586
11763
|
zh: zh,
|
|
11587
11764
|
en: en
|
|
11588
11765
|
};
|
|
11589
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.
|
|
11766
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.3-beta.1';
|
|
11590
11767
|
|
|
11591
11768
|
exports.Control = Control;
|
|
11592
11769
|
exports.EVENTS = EVENTS;
|