@ezuikit/player-theme 3.0.2-beta.1 → 3.1.0-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/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v3.0.2-beta.1
3
- * Copyright (c) 2026-05-15 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.1.0-beta.1
3
+ * Copyright (c) 2026-06-24 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
@@ -21,7 +21,6 @@ var controlTimeLine = require('@ezuikit/control-time-line');
21
21
  /**
22
22
  * 播放器的类名前缀
23
23
  */ var PREFIX_CLASS = 'ezplayer';
24
- /** */ var DATE_PICKER_ICON_WIDTH = 36;
25
24
  /** 填充模式 */ var THEME_SCALE_MODE_TYPE = {
26
25
  /** 画面完全填充canvas区域,画面会被拉伸 */ full: 0,
27
26
  /** 画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边 */ auto: 1,
@@ -145,6 +144,9 @@ var EVENTS = {
145
144
  /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
146
145
  /** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
147
146
  /** AI对话框状态变化 */ aichatChange: 'aichatChange',
147
+ /** 直播模式切换 */ liveChange: 'liveChange',
148
+ /** 回放下拉选择变化 */ recDropdownChange: 'recDropdownChange',
149
+ /** 告警消息面板状态变化 */ alarmMessageChange: 'alarmMessageChange',
148
150
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
149
151
  records: 'records',
150
152
  ptzSpeedChange: 'ptzSpeedChange',
@@ -192,6 +194,12 @@ var EVENTS = {
192
194
  /** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
193
195
  /** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
194
196
  /** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
197
+ /** 直播按钮点击 */ liveChange: 'Control.liveChange',
198
+ /** 直播控件销毁 */ liveDestroy: 'Control.liveDestroy',
199
+ /** 回放下拉选择变化 */ recDropdownChange: 'Control.recDropdownChange',
200
+ /** 回放下拉控件销毁 */ recDropdownDestroy: 'Control.recDropdownDestroy',
201
+ /** 告警消息面板开关 */ alarmMessageChange: 'Control.alarmMessageChange',
202
+ /** 告警消息面板销毁 */ alarmMessageDestroy: 'Control.alarmMessageDestroy',
195
203
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
196
204
  /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
197
205
  /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
@@ -201,6 +209,8 @@ var EVENTS = {
201
209
  /** 日期改变 */ dateChange: 'Control.dateChange',
202
210
  /** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
203
211
  /** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
212
+ /** 时间面板展示隐藏变换 */ timePanelOpenChange: 'Control.timePanelOpenChange',
213
+ /** 时间改变 */ timeChange: 'Control.timeChange',
204
214
  /** 时间轴拖动结束 */ timeLineChange: 'Control.timeLineChange',
205
215
  /** 时间轴图片列表面板 */ timeLinePanelOpenChange: 'Control.timeLinePanelOpenChange',
206
216
  /** 时间轴控件销毁 */ timeLineDestroy: 'Control.timeLineDestroy',
@@ -243,7 +253,7 @@ function _create_class$9(Constructor, protoProps, staticProps) {
243
253
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
244
254
  return Constructor;
245
255
  }
246
- function _inherits$t(subClass, superClass) {
256
+ function _inherits$x(subClass, superClass) {
247
257
  if (typeof superClass !== "function" && superClass !== null) {
248
258
  throw new TypeError("Super expression must either be null or a function");
249
259
  }
@@ -254,14 +264,14 @@ function _inherits$t(subClass, superClass) {
254
264
  configurable: true
255
265
  }
256
266
  });
257
- if (superClass) _set_prototype_of$t(subClass, superClass);
267
+ if (superClass) _set_prototype_of$x(subClass, superClass);
258
268
  }
259
- function _set_prototype_of$t(o, p) {
260
- _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
269
+ function _set_prototype_of$x(o, p) {
270
+ _set_prototype_of$x = Object.setPrototypeOf || function setPrototypeOf(o, p) {
261
271
  o.__proto__ = p;
262
272
  return o;
263
273
  };
264
- return _set_prototype_of$t(o, p);
274
+ return _set_prototype_of$x(o, p);
265
275
  }
266
276
  /**
267
277
  * 控件基类
@@ -275,7 +285,7 @@ function _set_prototype_of$t(o, p) {
275
285
  * const myControl = new MyControl({})
276
286
  * ```
277
287
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
278
- _inherits$t(Control, EventEmitter);
288
+ _inherits$x(Control, EventEmitter);
279
289
  function Control(options) {
280
290
  var _this;
281
291
  var _this___options;
@@ -367,7 +377,7 @@ function _set_prototype_of$t(o, p) {
367
377
  if (this._camelCaseName) {
368
378
  this.emit("Control." + this._camelCaseName + "Destroy");
369
379
  }
370
- if (((_this___options = this.__options) == null ? void 0 : _this___options.controlType) !== 'block') this.$container.addEventListener('dblclick', this._onDBlClick);
380
+ if (((_this___options = this.__options) == null ? void 0 : _this___options.controlType) !== 'block') this.$container.removeEventListener('dblclick', this._onDBlClick);
371
381
  this._active = false;
372
382
  this.removeAllListeners();
373
383
  (_this_$container = this.$container) == null ? void 0 : (_this_$container_remove = _this_$container.remove) == null ? void 0 : _this_$container_remove.call(_this_$container);
@@ -450,8 +460,8 @@ function _set_prototype_of$t(o, p) {
450
460
  return Control;
451
461
  }(EventEmitter);
452
462
 
453
- function _extends$s() {
454
- _extends$s = Object.assign || function(target) {
463
+ function _extends$w() {
464
+ _extends$w = Object.assign || function(target) {
455
465
  for(var i = 1; i < arguments.length; i++){
456
466
  var source = arguments[i];
457
467
  for(var key in source){
@@ -462,9 +472,9 @@ function _extends$s() {
462
472
  }
463
473
  return target;
464
474
  };
465
- return _extends$s.apply(this, arguments);
475
+ return _extends$w.apply(this, arguments);
466
476
  }
467
- function _inherits$s(subClass, superClass) {
477
+ function _inherits$w(subClass, superClass) {
468
478
  if (typeof superClass !== "function" && superClass !== null) {
469
479
  throw new TypeError("Super expression must either be null or a function");
470
480
  }
@@ -475,25 +485,25 @@ function _inherits$s(subClass, superClass) {
475
485
  configurable: true
476
486
  }
477
487
  });
478
- if (superClass) _set_prototype_of$s(subClass, superClass);
488
+ if (superClass) _set_prototype_of$w(subClass, superClass);
479
489
  }
480
- function _set_prototype_of$s(o, p) {
481
- _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
490
+ function _set_prototype_of$w(o, p) {
491
+ _set_prototype_of$w = Object.setPrototypeOf || function setPrototypeOf(o, p) {
482
492
  o.__proto__ = p;
483
493
  return o;
484
494
  };
485
- return _set_prototype_of$s(o, p);
495
+ return _set_prototype_of$w(o, p);
486
496
  }
487
497
  var LOADING_DEFAULT_OPTIONS = {};
488
498
  /**
489
499
  * 加载动画控件
490
500
  * @category Control
491
501
  */ var Loading = /*#__PURE__*/ function(Control) {
492
- _inherits$s(Loading, Control);
502
+ _inherits$w(Loading, Control);
493
503
  function Loading(options) {
494
504
  if (options === void 0) options = {};
495
505
  var _this;
496
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$s({}, options, {
506
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$w({}, options, {
497
507
  tagName: 'div',
498
508
  controlType: 'block',
499
509
  classNameSuffix: 'loading'
@@ -531,8 +541,8 @@ var LOADING_DEFAULT_OPTIONS = {};
531
541
  return Loading;
532
542
  }(Control);
533
543
 
534
- function _extends$r() {
535
- _extends$r = Object.assign || function(target) {
544
+ function _extends$v() {
545
+ _extends$v = Object.assign || function(target) {
536
546
  for(var i = 1; i < arguments.length; i++){
537
547
  var source = arguments[i];
538
548
  for(var key in source){
@@ -543,9 +553,9 @@ function _extends$r() {
543
553
  }
544
554
  return target;
545
555
  };
546
- return _extends$r.apply(this, arguments);
556
+ return _extends$v.apply(this, arguments);
547
557
  }
548
- function _inherits$r(subClass, superClass) {
558
+ function _inherits$v(subClass, superClass) {
549
559
  if (typeof superClass !== "function" && superClass !== null) {
550
560
  throw new TypeError("Super expression must either be null or a function");
551
561
  }
@@ -556,14 +566,14 @@ function _inherits$r(subClass, superClass) {
556
566
  configurable: true
557
567
  }
558
568
  });
559
- if (superClass) _set_prototype_of$r(subClass, superClass);
569
+ if (superClass) _set_prototype_of$v(subClass, superClass);
560
570
  }
561
- function _set_prototype_of$r(o, p) {
562
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
571
+ function _set_prototype_of$v(o, p) {
572
+ _set_prototype_of$v = Object.setPrototypeOf || function setPrototypeOf(o, p) {
563
573
  o.__proto__ = p;
564
574
  return o;
565
575
  };
566
- return _set_prototype_of$r(o, p);
576
+ return _set_prototype_of$v(o, p);
567
577
  }
568
578
  // 不放在服务器上 是因为有可能http加载失败
569
579
  // prettier-ignore
@@ -575,11 +585,11 @@ var POSTER_OPTIONS = {
575
585
  * 封面控件
576
586
  * @category Control
577
587
  */ var Poster = /*#__PURE__*/ function(Control) {
578
- _inherits$r(Poster, Control);
588
+ _inherits$v(Poster, Control);
579
589
  function Poster(options) {
580
590
  if (options === void 0) options = {};
581
591
  var _this;
582
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$r({}, options, {
592
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$v({}, options, {
583
593
  tagName: 'div',
584
594
  controlType: 'block',
585
595
  classNameSuffix: 'poster'
@@ -685,7 +695,11 @@ var Icons = {
685
695
  warnCircleOutLined: '<svg width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" focusable="false" aria-hidden="true" data-icon="info-circle">\n <path d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM7.5 8.875C7.5 8.94375 7.55625 9 7.625 9L8.375 9C8.44375 9 8.5 8.94375 8.5 8.875L8.5 4.625C8.5 4.55625 8.44375 4.5 8.375 4.5L7.625 4.5C7.55625 4.5 7.5 4.55625 7.5 4.625L7.5 8.875ZM7.25 10.75C7.25 11.1642 7.58579 11.5 8 11.5C8.41421 11.5 8.75 11.1642 8.75 10.75C8.75 10.3358 8.41421 10 8 10C7.58579 10 7.25 10.3358 7.25 10.75Z" fill-rule="evenodd" />\n </svg>',
686
696
  date: '<svg width="1em" height="1em" viewBox="0 0 20 20" fill="currentColor" focusable="false" aria-hidden="true" data-icon="date">\n <g>\n <path d="m13.35,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.3,0.5 -0.5,0.5z" />\n <path d="m6.65,5.9c-0.3,0 -0.5,-0.2 -0.5,-0.5l0,-3.3c0,-0.3 0.2,-0.5 0.5,-0.5s0.5,0.2 0.5,0.5l0,3.3c0,0.3 -0.2,0.5 -0.5,0.5z" />\n <path d="m17.45,8.4l-15,0c-0.3,0 -0.5,-0.2 -0.5,-0.5s0.2,-0.5 0.5,-0.5l15,0c0.3,0 0.5,0.2 0.5,0.5s-0.2,0.5 -0.5,0.5z" />\n <path d="m15.85,18.4l-11.7,0c-1.2,0 -2.2,-1 -2.2,-2.2l0,-10.8c0,-1.2 1,-2.2 2.2,-2.2l11.7,0c1.2,0 2.2,1 2.2,2.2l0,10.8c-0.1,1.3 -1,2.2 -2.2,2.2zm-11.7,-14.1c-0.6,0 -1.2,0.5 -1.2,1.2l0,10.8c0,0.6 0.5,1.2 1.2,1.2l11.7,0c0.6,0 1.2,-0.5 1.2,-1.2l0,-10.9c0,-0.6 -0.5,-1.2 -1.2,-1.2l-11.7,0l0,0.1z" />\n <path d="m9.95,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5s0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7z" />\n <path d="m14.15,12c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2c0.4,0 0.7,0.3 0.7,0.7s-0.3,0.7 -0.7,0.7zm0,-1c-0.2,0 -0.3,0.1 -0.3,0.3c0,0.2 0.3,0.4 0.5,0.2c0.1,-0.1 0.1,-0.1 0.1,-0.2c0,-0.2 -0.1,-0.3 -0.3,-0.3z" />\n <path d="m5.85,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0,0.4 -0.3,0.7 -0.7,0.7z" />\n <path d="m9.95,15.3c-0.4,0 -0.7,-0.3 -0.7,-0.7c0,-0.2 0.1,-0.4 0.2,-0.5c0.1,-0.1 0.3,-0.2 0.5,-0.2l0,0l0,0c0.4,0 0.7,0.3 0.7,0.7c0.1,0.4 -0.3,0.7 -0.7,0.7z" />\n </g>\n </svg>',
687
697
  add: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="add">\n <path d="M10.5859 2.96875L9.41406 2.96875C9.3099 2.96875 9.25781 3.02083 9.25781 3.125L9.25781 9.25781L3.4375 9.25781C3.38542 9.25781 3.34635 9.27083 3.32031 9.29688C3.29427 9.32292 3.28125 9.36198 3.28125 9.41406L3.28125 10.5859C3.28125 10.6901 3.33333 10.7422 3.4375 10.7422L9.25781 10.7422L9.25781 16.875C9.25781 16.9792 9.3099 17.0312 9.41406 17.0312L10.5859 17.0312C10.6901 17.0312 10.7422 16.9792 10.7422 16.875L10.7422 10.7422L16.5625 10.7422C16.6667 10.7422 16.7188 10.6901 16.7188 10.5859L16.7188 9.41406C16.7188 9.3099 16.6667 9.25781 16.5625 9.25781L10.7422 9.25781L10.7422 3.125C10.7422 3.07292 10.7292 3.03385 10.7031 3.00781C10.6771 2.98177 10.638 2.96875 10.5859 2.96875Z" fill-rule="evenodd" /></svg>',
688
- reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>'
698
+ reduce: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="reduce">\n <path d="M3.4375 9.25781L16.5625 9.25781C16.6667 9.25781 16.7188 9.3099 16.7188 9.41406L16.7188 10.5859C16.7188 10.6901 16.6667 10.7422 16.5625 10.7422L3.4375 10.7422C3.33333 10.7422 3.28125 10.6901 3.28125 10.5859L3.28125 9.41406C3.28125 9.3099 3.33333 9.25781 3.4375 9.25781Z" fill-rule="evenodd" />\n </svg>',
699
+ /** 直播 */ live: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="live">\n <rect width="18" height="13" x="3" y="7" rx="1.6" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M8.26636 4.8L10.466 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M15.996 4.8L13.796 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M9.8 17L15.4 13.354L9.8 10L9.8 17Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
700
+ /** 回放 */ recDropdown: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="rec-dropdown">\n <path d="M9.168 2.556C9.168 2.556 12.51 4.445 12 4.445C7.306 4.445 3.5 8.251 3.5 12.945C3.5 17.64 7.306 21.445 12 21.445C16.695 21.445 20.5 17.64 20.5 12.945C20.5 10.622 19.568 8.517 18.058 6.982" stroke-linecap="round" stroke-width="1.5"/>\n <path d="M11.61 9.829L11.61 13.731L16.064 13.731" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
701
+ /** 消息/告警 */ alarmMessage: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="alarm-message">\n <path d="M9.708 18.344L9.708 18.709C9.708 19.974 10.734 21 12 21C13.266 21 14.292 19.974 14.292 18.709L14.292 18.343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M13.833 5.751L13.833 4.833C13.833 3.821 13.013 3 12 3C10.987 3 10.167 3.821 10.167 4.833L10.167 5.751" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n <path d="M6.563 10.189C6.563 7.686 8.592 5.657 11.094 5.657L12.907 5.657C15.41 5.657 17.438 7.686 17.438 10.189L17.438 12.986C17.438 13.516 17.649 14.025 18.024 14.4L18.665 15.04C19.04 15.416 19.251 15.925 19.251 16.455C19.251 17.499 18.405 18.345 17.361 18.345L6.64 18.345C5.596 18.345 4.75 17.499 4.75 16.455C4.75 15.925 4.961 15.416 5.336 15.04L5.977 14.4C6.352 14.025 6.563 13.516 6.563 12.986L6.563 10.189Z" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>\n </svg>',
702
+ time: '<svg fill="currentColor" width="1em" height="1em" viewBox="0 0 20 20" focusable="false" aria-hidden="true" data-icon="time">\n <path d="M10 1.66504C14.6026 1.66521 18.333 5.39635 18.333 9.99902C18.3328 14.6015 14.6025 18.3319 10 18.332C5.39733 18.332 1.66619 14.6017 1.66602 9.99902C1.66602 5.39624 5.39722 1.66504 10 1.66504ZM10 2.91504C6.08758 2.91504 2.91602 6.0866 2.91602 9.99902C2.91619 13.9113 6.08769 17.082 10 17.082C13.9122 17.0819 17.0828 13.9112 17.083 9.99902C17.083 6.08671 13.9123 2.91521 10 2.91504ZM10 6.875C10.3451 6.87508 10.625 7.1549 10.625 7.5V9.59863L10.71 9.63672C12.71 10.5481 13.253 10.796 13.6406 10.9727L13.7217 11.0098L13.8008 11.0459C13.8799 11.082 13.9609 11.1179 14.0557 11.1611C14.3697 11.3043 14.5083 11.6752 14.3652 11.9893C14.2221 12.3034 13.8512 12.442 13.5371 12.2988C13.4108 12.2412 13.3093 12.1949 13.2031 12.1465L13.1221 12.1094C12.7068 11.9201 12.1127 11.6495 9.74023 10.5684C9.51771 10.4667 9.375 10.2447 9.375 10V7.5C9.37504 7.15485 9.65485 6.875 10 6.875Z"/>\n </svg>'
689
703
  };
690
704
 
691
705
  /**
@@ -843,11 +857,27 @@ var IconComponents = {
843
857
  reduce: function(attr) {
844
858
  if (attr === void 0) attr = {};
845
859
  return createIcon(Icons.reduce, 'reduce', attr);
860
+ },
861
+ /** 直播 */ live: function(attr) {
862
+ if (attr === void 0) attr = {};
863
+ return createIcon(Icons.live, 'live', attr);
864
+ },
865
+ /** 回放 */ recDropdown: function(attr) {
866
+ if (attr === void 0) attr = {};
867
+ return createIcon(Icons.recDropdown, 'rec-dropdown', attr);
868
+ },
869
+ /** 消息 */ alarmMessage: function(attr) {
870
+ if (attr === void 0) attr = {};
871
+ return createIcon(Icons.alarmMessage, 'alarm-message', attr);
872
+ },
873
+ time: function(attr) {
874
+ if (attr === void 0) attr = {};
875
+ return createIcon(Icons.time, 'time', attr);
846
876
  }
847
877
  };
848
878
 
849
- function _extends$q() {
850
- _extends$q = Object.assign || function(target) {
879
+ function _extends$u() {
880
+ _extends$u = Object.assign || function(target) {
851
881
  for(var i = 1; i < arguments.length; i++){
852
882
  var source = arguments[i];
853
883
  for(var key in source){
@@ -858,9 +888,9 @@ function _extends$q() {
858
888
  }
859
889
  return target;
860
890
  };
861
- return _extends$q.apply(this, arguments);
891
+ return _extends$u.apply(this, arguments);
862
892
  }
863
- function _inherits$q(subClass, superClass) {
893
+ function _inherits$u(subClass, superClass) {
864
894
  if (typeof superClass !== "function" && superClass !== null) {
865
895
  throw new TypeError("Super expression must either be null or a function");
866
896
  }
@@ -871,25 +901,25 @@ function _inherits$q(subClass, superClass) {
871
901
  configurable: true
872
902
  }
873
903
  });
874
- if (superClass) _set_prototype_of$q(subClass, superClass);
904
+ if (superClass) _set_prototype_of$u(subClass, superClass);
875
905
  }
876
- function _set_prototype_of$q(o, p) {
877
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
906
+ function _set_prototype_of$u(o, p) {
907
+ _set_prototype_of$u = Object.setPrototypeOf || function setPrototypeOf(o, p) {
878
908
  o.__proto__ = p;
879
909
  return o;
880
910
  };
881
- return _set_prototype_of$q(o, p);
911
+ return _set_prototype_of$u(o, p);
882
912
  }
883
913
  var MESSAGE_DEFAULT_OPTIONS = {};
884
914
  /**
885
915
  * 消息控件
886
916
  * @category Control
887
917
  */ var Message = /*#__PURE__*/ function(Control) {
888
- _inherits$q(Message, Control);
918
+ _inherits$u(Message, Control);
889
919
  function Message(options) {
890
920
  if (options === void 0) options = {};
891
921
  var _this;
892
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
922
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$u({}, options, {
893
923
  tagName: 'div',
894
924
  controlType: 'block'
895
925
  }))) || this, _this._$toast = null;
@@ -1042,8 +1072,8 @@ function _create_class$8(Constructor, protoProps, staticProps) {
1042
1072
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1043
1073
  return Constructor;
1044
1074
  }
1045
- function _extends$p() {
1046
- _extends$p = Object.assign || function(target) {
1075
+ function _extends$t() {
1076
+ _extends$t = Object.assign || function(target) {
1047
1077
  for(var i = 1; i < arguments.length; i++){
1048
1078
  var source = arguments[i];
1049
1079
  for(var key in source){
@@ -1054,9 +1084,9 @@ function _extends$p() {
1054
1084
  }
1055
1085
  return target;
1056
1086
  };
1057
- return _extends$p.apply(this, arguments);
1087
+ return _extends$t.apply(this, arguments);
1058
1088
  }
1059
- function _inherits$p(subClass, superClass) {
1089
+ function _inherits$t(subClass, superClass) {
1060
1090
  if (typeof superClass !== "function" && superClass !== null) {
1061
1091
  throw new TypeError("Super expression must either be null or a function");
1062
1092
  }
@@ -1067,23 +1097,23 @@ function _inherits$p(subClass, superClass) {
1067
1097
  configurable: true
1068
1098
  }
1069
1099
  });
1070
- if (superClass) _set_prototype_of$p(subClass, superClass);
1100
+ if (superClass) _set_prototype_of$t(subClass, superClass);
1071
1101
  }
1072
- function _set_prototype_of$p(o, p) {
1073
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1102
+ function _set_prototype_of$t(o, p) {
1103
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1074
1104
  o.__proto__ = p;
1075
1105
  return o;
1076
1106
  };
1077
- return _set_prototype_of$p(o, p);
1107
+ return _set_prototype_of$t(o, p);
1078
1108
  }
1079
1109
  /**
1080
1110
  * 播放/暂停控件
1081
1111
  * @category Control
1082
1112
  */ var Play = /*#__PURE__*/ function(Control) {
1083
- _inherits$p(Play, Control);
1113
+ _inherits$t(Play, Control);
1084
1114
  function Play(options) {
1085
1115
  var _this;
1086
- _this = Control.call(this, _extends$p({}, options, {
1116
+ _this = Control.call(this, _extends$t({}, options, {
1087
1117
  tagName: 'span',
1088
1118
  controlType: 'button',
1089
1119
  classNameSuffix: 'play'
@@ -1699,8 +1729,8 @@ function _create_class$6(Constructor, protoProps, staticProps) {
1699
1729
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
1700
1730
  return Constructor;
1701
1731
  }
1702
- function _extends$o() {
1703
- _extends$o = Object.assign || function(target) {
1732
+ function _extends$s() {
1733
+ _extends$s = Object.assign || function(target) {
1704
1734
  for(var i = 1; i < arguments.length; i++){
1705
1735
  var source = arguments[i];
1706
1736
  for(var key in source){
@@ -1711,9 +1741,9 @@ function _extends$o() {
1711
1741
  }
1712
1742
  return target;
1713
1743
  };
1714
- return _extends$o.apply(this, arguments);
1744
+ return _extends$s.apply(this, arguments);
1715
1745
  }
1716
- function _inherits$o(subClass, superClass) {
1746
+ function _inherits$s(subClass, superClass) {
1717
1747
  if (typeof superClass !== "function" && superClass !== null) {
1718
1748
  throw new TypeError("Super expression must either be null or a function");
1719
1749
  }
@@ -1724,14 +1754,14 @@ function _inherits$o(subClass, superClass) {
1724
1754
  configurable: true
1725
1755
  }
1726
1756
  });
1727
- if (superClass) _set_prototype_of$o(subClass, superClass);
1757
+ if (superClass) _set_prototype_of$s(subClass, superClass);
1728
1758
  }
1729
- function _set_prototype_of$o(o, p) {
1730
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1759
+ function _set_prototype_of$s(o, p) {
1760
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1731
1761
  o.__proto__ = p;
1732
1762
  return o;
1733
1763
  };
1734
- return _set_prototype_of$o(o, p);
1764
+ return _set_prototype_of$s(o, p);
1735
1765
  }
1736
1766
  var VOLUME_DEFAULT_OPTIONS = {
1737
1767
  volume: 0.8,
@@ -1745,12 +1775,12 @@ var VOLUME_DEFAULT_OPTIONS = {
1745
1775
  * 音量调节控件
1746
1776
  * @category Control
1747
1777
  */ var Volume = /*#__PURE__*/ function(Control) {
1748
- _inherits$o(Volume, Control);
1778
+ _inherits$s(Volume, Control);
1749
1779
  function Volume(options) {
1750
1780
  if (options === void 0) options = {};
1751
1781
  var _this;
1752
1782
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
1753
- _this = Control.call(this, _extends$o({}, options, {
1783
+ _this = Control.call(this, _extends$s({}, options, {
1754
1784
  tagName: 'span',
1755
1785
  classNameSuffix: 'volume',
1756
1786
  controlType: 'button'
@@ -2410,8 +2440,8 @@ var __fullscreenProvider__ = Provider.getInstance();
2410
2440
  return Fullscreen;
2411
2441
  }();
2412
2442
 
2413
- function _extends$n() {
2414
- _extends$n = Object.assign || function(target) {
2443
+ function _extends$r() {
2444
+ _extends$r = Object.assign || function(target) {
2415
2445
  for(var i = 1; i < arguments.length; i++){
2416
2446
  var source = arguments[i];
2417
2447
  for(var key in source){
@@ -2422,9 +2452,9 @@ function _extends$n() {
2422
2452
  }
2423
2453
  return target;
2424
2454
  };
2425
- return _extends$n.apply(this, arguments);
2455
+ return _extends$r.apply(this, arguments);
2426
2456
  }
2427
- function _inherits$n(subClass, superClass) {
2457
+ function _inherits$r(subClass, superClass) {
2428
2458
  if (typeof superClass !== "function" && superClass !== null) {
2429
2459
  throw new TypeError("Super expression must either be null or a function");
2430
2460
  }
@@ -2435,24 +2465,24 @@ function _inherits$n(subClass, superClass) {
2435
2465
  configurable: true
2436
2466
  }
2437
2467
  });
2438
- if (superClass) _set_prototype_of$n(subClass, superClass);
2468
+ if (superClass) _set_prototype_of$r(subClass, superClass);
2439
2469
  }
2440
- function _set_prototype_of$n(o, p) {
2441
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2470
+ function _set_prototype_of$r(o, p) {
2471
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2442
2472
  o.__proto__ = p;
2443
2473
  return o;
2444
2474
  };
2445
- return _set_prototype_of$n(o, p);
2475
+ return _set_prototype_of$r(o, p);
2446
2476
  }
2447
2477
  /**
2448
2478
  * 全屏控件
2449
2479
  * @category Control
2450
2480
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
2451
- _inherits$n(Fullscreen, Control);
2481
+ _inherits$r(Fullscreen, Control);
2452
2482
  function Fullscreen(options) {
2453
2483
  var _this;
2454
2484
  var _options_props, _this_options;
2455
- _this = Control.call(this, _extends$n({
2485
+ _this = Control.call(this, _extends$r({
2456
2486
  tagName: 'span',
2457
2487
  classNameSuffix: 'fullscreen',
2458
2488
  controlType: 'button'
@@ -2517,8 +2547,8 @@ function _set_prototype_of$n(o, p) {
2517
2547
  return Fullscreen;
2518
2548
  }(Control);
2519
2549
 
2520
- function _extends$m() {
2521
- _extends$m = Object.assign || function(target) {
2550
+ function _extends$q() {
2551
+ _extends$q = Object.assign || function(target) {
2522
2552
  for(var i = 1; i < arguments.length; i++){
2523
2553
  var source = arguments[i];
2524
2554
  for(var key in source){
@@ -2529,9 +2559,9 @@ function _extends$m() {
2529
2559
  }
2530
2560
  return target;
2531
2561
  };
2532
- return _extends$m.apply(this, arguments);
2562
+ return _extends$q.apply(this, arguments);
2533
2563
  }
2534
- function _inherits$m(subClass, superClass) {
2564
+ function _inherits$q(subClass, superClass) {
2535
2565
  if (typeof superClass !== "function" && superClass !== null) {
2536
2566
  throw new TypeError("Super expression must either be null or a function");
2537
2567
  }
@@ -2542,24 +2572,24 @@ function _inherits$m(subClass, superClass) {
2542
2572
  configurable: true
2543
2573
  }
2544
2574
  });
2545
- if (superClass) _set_prototype_of$m(subClass, superClass);
2575
+ if (superClass) _set_prototype_of$q(subClass, superClass);
2546
2576
  }
2547
- function _set_prototype_of$m(o, p) {
2548
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2577
+ function _set_prototype_of$q(o, p) {
2578
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2549
2579
  o.__proto__ = p;
2550
2580
  return o;
2551
2581
  };
2552
- return _set_prototype_of$m(o, p);
2582
+ return _set_prototype_of$q(o, p);
2553
2583
  }
2554
2584
  /**
2555
2585
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
2556
2586
  * @category Control
2557
2587
  */ var Rec = /*#__PURE__*/ function(Control) {
2558
- _inherits$m(Rec, Control);
2588
+ _inherits$q(Rec, Control);
2559
2589
  function Rec(options) {
2560
2590
  var _this;
2561
2591
  var _options_props;
2562
- _this = Control.call(this, _extends$m({}, options, {
2592
+ _this = Control.call(this, _extends$q({}, options, {
2563
2593
  tagName: 'div',
2564
2594
  controlType: 'block',
2565
2595
  classNameSuffix: 'rec'
@@ -2836,6 +2866,12 @@ var zh = {
2836
2866
  BTN_TALK: '对讲',
2837
2867
  BTN_BROADCAST: '语音广播',
2838
2868
  BTN_AICHAT: 'AI对话',
2869
+ BTN_LIVE: '直播',
2870
+ BTN_REC_DROPDOWN: '回放',
2871
+ BTN_ALARM_MESSAGE: '消息',
2872
+ REC_DROPDOWN_CLOUD_REC: '云存储',
2873
+ REC_DROPDOWN_CLOUD_RECORD: '云录制',
2874
+ REC_DROPDOWN_LOCAL_REC: '本地回放',
2839
2875
  BTN_ZOOM: '电子放大',
2840
2876
  BTN_3D_ZOOM: '3D定位',
2841
2877
  BTN_PTZ: '云台控制',
@@ -2849,6 +2885,7 @@ var zh = {
2849
2885
  BTN_CLOUDRECORD: '云录制',
2850
2886
  BTN_REC: '本地存储',
2851
2887
  BTN_CALENDAR: '日历',
2888
+ BTN_TIME: '时间',
2852
2889
  BTN_MORE: '更多',
2853
2890
  DEVICE_NAME: '设备名称',
2854
2891
  DEVICE_ID: '设备序列号',
@@ -3108,6 +3145,12 @@ var en = {
3108
3145
  BTN_TALK: 'Intercom',
3109
3146
  BTN_BROADCAST: 'Voice broadcast',
3110
3147
  BTN_AICHAT: 'AI Chat',
3148
+ BTN_LIVE: 'Live',
3149
+ BTN_REC_DROPDOWN: 'Playback',
3150
+ BTN_ALARM_MESSAGE: 'Messages',
3151
+ REC_DROPDOWN_CLOUD_REC: 'Cloud Storage',
3152
+ REC_DROPDOWN_CLOUD_RECORD: 'Cloud Recording',
3153
+ REC_DROPDOWN_LOCAL_REC: 'Local Playback',
3111
3154
  BTN_ZOOM: 'Electronic zoom',
3112
3155
  BTN_3D_ZOOM: '3D positioning',
3113
3156
  BTN_PTZ: 'PTZ control',
@@ -3123,6 +3166,7 @@ var en = {
3123
3166
  BTN_CLOUDRECORD: 'Cloud recording',
3124
3167
  BTN_REC: 'Local storage',
3125
3168
  BTN_CALENDAR: 'Calendar',
3169
+ BTN_TIME: 'Time',
3126
3170
  BTN_MORE: 'More',
3127
3171
  DEVICE_NAME: 'Device name',
3128
3172
  DEVICE_ID: 'Device serial number',
@@ -3303,6 +3347,21 @@ var en = {
3303
3347
  iconId: 'deviceName',
3304
3348
  part: 'left',
3305
3349
  isrender: 1
3350
+ },
3351
+ {
3352
+ iconId: 'live',
3353
+ part: 'right',
3354
+ isrender: 1
3355
+ },
3356
+ {
3357
+ iconId: 'recDropdown',
3358
+ part: 'right',
3359
+ isrender: 1
3360
+ },
3361
+ {
3362
+ iconId: 'alarmMessage',
3363
+ part: 'right',
3364
+ isrender: 1
3306
3365
  }
3307
3366
  ]
3308
3367
  },
@@ -3390,19 +3449,19 @@ var en = {
3390
3449
  isrender: 1
3391
3450
  },
3392
3451
  {
3393
- iconId: 'cloudRec',
3452
+ iconId: 'live',
3394
3453
  part: 'right',
3395
3454
  defaultActive: 0,
3396
3455
  isrender: 1
3397
3456
  },
3398
3457
  {
3399
- iconId: 'cloudRecord',
3458
+ iconId: 'recDropdown',
3400
3459
  part: 'right',
3401
3460
  defaultActive: 0,
3402
3461
  isrender: 1
3403
3462
  },
3404
3463
  {
3405
- iconId: 'rec',
3464
+ iconId: 'alarmMessage',
3406
3465
  part: 'right',
3407
3466
  defaultActive: 0,
3408
3467
  isrender: 1
@@ -3805,7 +3864,7 @@ var en = {
3805
3864
  voice: voice
3806
3865
  };
3807
3866
 
3808
- function _inherits$l(subClass, superClass) {
3867
+ function _inherits$p(subClass, superClass) {
3809
3868
  if (typeof superClass !== "function" && superClass !== null) {
3810
3869
  throw new TypeError("Super expression must either be null or a function");
3811
3870
  }
@@ -3816,20 +3875,20 @@ function _inherits$l(subClass, superClass) {
3816
3875
  configurable: true
3817
3876
  }
3818
3877
  });
3819
- if (superClass) _set_prototype_of$l(subClass, superClass);
3878
+ if (superClass) _set_prototype_of$p(subClass, superClass);
3820
3879
  }
3821
- function _set_prototype_of$l(o, p) {
3822
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3880
+ function _set_prototype_of$p(o, p) {
3881
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3823
3882
  o.__proto__ = p;
3824
3883
  return o;
3825
3884
  };
3826
- return _set_prototype_of$l(o, p);
3885
+ return _set_prototype_of$p(o, p);
3827
3886
  }
3828
3887
  /**
3829
3888
  * 截图控件
3830
3889
  * @category Content
3831
3890
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
3832
- _inherits$l(Content, EventEmitter);
3891
+ _inherits$p(Content, EventEmitter);
3833
3892
  function Content(options) {
3834
3893
  var _this;
3835
3894
  _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
@@ -3944,8 +4003,8 @@ function _set_prototype_of$l(o, p) {
3944
4003
  return Content;
3945
4004
  }(EventEmitter);
3946
4005
 
3947
- function _extends$l() {
3948
- _extends$l = Object.assign || function(target) {
4006
+ function _extends$p() {
4007
+ _extends$p = Object.assign || function(target) {
3949
4008
  for(var i = 1; i < arguments.length; i++){
3950
4009
  var source = arguments[i];
3951
4010
  for(var key in source){
@@ -3956,9 +4015,9 @@ function _extends$l() {
3956
4015
  }
3957
4016
  return target;
3958
4017
  };
3959
- return _extends$l.apply(this, arguments);
4018
+ return _extends$p.apply(this, arguments);
3960
4019
  }
3961
- function _inherits$k(subClass, superClass) {
4020
+ function _inherits$o(subClass, superClass) {
3962
4021
  if (typeof superClass !== "function" && superClass !== null) {
3963
4022
  throw new TypeError("Super expression must either be null or a function");
3964
4023
  }
@@ -3969,23 +4028,23 @@ function _inherits$k(subClass, superClass) {
3969
4028
  configurable: true
3970
4029
  }
3971
4030
  });
3972
- if (superClass) _set_prototype_of$k(subClass, superClass);
4031
+ if (superClass) _set_prototype_of$o(subClass, superClass);
3973
4032
  }
3974
- function _set_prototype_of$k(o, p) {
3975
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4033
+ function _set_prototype_of$o(o, p) {
4034
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3976
4035
  o.__proto__ = p;
3977
4036
  return o;
3978
4037
  };
3979
- return _set_prototype_of$k(o, p);
4038
+ return _set_prototype_of$o(o, p);
3980
4039
  }
3981
4040
  /**
3982
4041
  * 更多控件
3983
4042
  * @category Control
3984
4043
  */ var More = /*#__PURE__*/ function(Control) {
3985
- _inherits$k(More, Control);
4044
+ _inherits$o(More, Control);
3986
4045
  function More(options) {
3987
4046
  var _this;
3988
- _this = Control.call(this, _extends$l({}, options, {
4047
+ _this = Control.call(this, _extends$p({}, options, {
3989
4048
  tagName: 'span',
3990
4049
  controlType: 'button',
3991
4050
  classNameSuffix: 'more'
@@ -4201,6 +4260,15 @@ function debounce(func, wait) {
4201
4260
  }
4202
4261
  });
4203
4262
  // =======================================================
4263
+ // 告警消息
4264
+ // =======================================================
4265
+ theme.on(EVENTS.alarmMessageChange, function(active) {
4266
+ var _theme_controls;
4267
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.alarmMessageControl) {
4268
+ theme.controls.alarmMessageControl._panelOpen = active;
4269
+ }
4270
+ });
4271
+ // =======================================================
4204
4272
  // 录制
4205
4273
  // =======================================================
4206
4274
  theme.on(EVENTS.recordingChange, function(recording) {
@@ -4296,7 +4364,7 @@ function debounce(func, wait) {
4296
4364
  *
4297
4365
  * @param theme - Theme
4298
4366
  */ function _controlEventemitter(theme) {
4299
- 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;
4367
+ 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;
4300
4368
  // Controls
4301
4369
  if (theme._recFooter) {
4302
4370
  theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
@@ -4407,8 +4475,50 @@ function debounce(func, wait) {
4407
4475
  theme.emit(EVENTS.control.aichatDestroy);
4408
4476
  });
4409
4477
  }
4478
+ // 直播按钮
4479
+ if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.liveControl) {
4480
+ theme.controls.liveControl.on(EVENTS.control.liveChange, function() {
4481
+ var _theme_controls;
4482
+ // 直接设置回放下拉控件为非激活状态
4483
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.recDropdownControl) {
4484
+ theme.controls.recDropdownControl.active = false;
4485
+ }
4486
+ theme.emit(EVENTS.control.liveChange);
4487
+ });
4488
+ }
4489
+ // 回放下拉
4490
+ if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.recDropdownControl) {
4491
+ theme.controls.recDropdownControl.on(EVENTS.control.recDropdownChange, function(type) {
4492
+ var _theme_controls;
4493
+ // 直接设置直播控件为非激活状态
4494
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
4495
+ theme.controls.liveControl.active = false;
4496
+ }
4497
+ theme.emit(EVENTS.control.recDropdownChange, type);
4498
+ });
4499
+ }
4500
+ // 告警消息
4501
+ if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.alarmMessageControl) {
4502
+ theme.controls.alarmMessageControl.on(EVENTS.control.alarmMessageChange, function(active) {
4503
+ theme.emit(EVENTS.control.alarmMessageChange, active);
4504
+ });
4505
+ }
4506
+ // 播放地址切换后同步 Live/RecDropdown 激活状态
4507
+ // changePlayUrl 后 urlInfo 已更新,firstFrameDisplay 表示新地址播放成功
4508
+ if (((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.liveControl) || ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.recDropdownControl)) {
4509
+ theme.on(EVENTS.firstFrameDisplay, function() {
4510
+ var _theme_controls, _theme_controls1;
4511
+ var urlInfo = theme.urlInfo;
4512
+ if ((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.liveControl) {
4513
+ theme.controls.liveControl._syncActiveByUrlInfo(urlInfo);
4514
+ }
4515
+ if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1.recDropdownControl) {
4516
+ theme.controls.recDropdownControl._syncActiveByUrlInfo(urlInfo);
4517
+ }
4518
+ });
4519
+ }
4410
4520
  // 缩放控件
4411
- if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
4521
+ if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.zoomControl) {
4412
4522
  theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
4413
4523
  if (theme.zoom !== value) {
4414
4524
  theme.zoom = value;
@@ -4430,7 +4540,7 @@ function debounce(func, wait) {
4430
4540
  });
4431
4541
  }
4432
4542
  // 清晰度控件
4433
- if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
4543
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.definitionControl) {
4434
4544
  theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
4435
4545
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
4436
4546
  theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
@@ -4443,7 +4553,7 @@ function debounce(func, wait) {
4443
4553
  });
4444
4554
  }
4445
4555
  // 倍速控件
4446
- if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
4556
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.speedControl) {
4447
4557
  theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
4448
4558
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
4449
4559
  theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
@@ -4456,7 +4566,7 @@ function debounce(func, wait) {
4456
4566
  });
4457
4567
  }
4458
4568
  // 截图控件
4459
- if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
4569
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.capturePictureControl) {
4460
4570
  theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
4461
4571
  theme.emit(EVENTS.control.capturePicture, options);
4462
4572
  });
@@ -4465,25 +4575,25 @@ function debounce(func, wait) {
4465
4575
  });
4466
4576
  }
4467
4577
  // 全屏控件
4468
- if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
4578
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.fullscreenControl) {
4469
4579
  theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
4470
4580
  theme.emit(EVENTS.control.fullscreenDestroy);
4471
4581
  });
4472
4582
  }
4473
4583
  // 全局全屏控件
4474
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
4584
+ if ((_theme_controls17 = theme.controls) == null ? void 0 : _theme_controls17.globalFullscreenControl) {
4475
4585
  theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
4476
4586
  theme.emit(EVENTS.control.globalFullscreenDestroy);
4477
4587
  });
4478
4588
  }
4479
4589
  // 设备信息控件
4480
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
4590
+ if ((_theme_controls18 = theme.controls) == null ? void 0 : _theme_controls18.deviceControl) {
4481
4591
  theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
4482
4592
  theme.emit(EVENTS.control.deviceDestroy);
4483
4593
  });
4484
4594
  }
4485
4595
  // 回放类型切换控件
4486
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
4596
+ if ((_theme_controls19 = theme.controls) == null ? void 0 : _theme_controls19.recControl) {
4487
4597
  // prettier-ignore
4488
4598
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
4489
4599
  if (theme.recType !== type) {
@@ -4504,15 +4614,19 @@ function debounce(func, wait) {
4504
4614
  });
4505
4615
  }
4506
4616
  // 时间轴控件
4507
- if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
4617
+ if ((_theme_controls20 = theme.controls) == null ? void 0 : _theme_controls20.timeLineControl) {
4508
4618
  theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
4509
4619
  theme.emit(EVENTS.control.timeLineChange, date);
4510
4620
  });
4511
4621
  theme.controls.timeLineControl.on(EVENTS.control.timeLinePanelOpenChange, function(open) {
4512
- var _theme_controls_dateControl, _theme_controls;
4622
+ var _theme_controls_dateControl, _theme_controls, _theme_controls_timeControl, _theme_controls1;
4513
4623
  if ((_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_dateControl = _theme_controls.dateControl) == null ? void 0 : _theme_controls_dateControl.datePicker) {
4514
- var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls1;
4515
- (_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_dateControl1 = _theme_controls1.dateControl) == null ? void 0 : (_theme_controls_dateControl_datePicker = _theme_controls_dateControl1.datePicker) == null ? void 0 : _theme_controls_dateControl_datePicker.hide();
4624
+ var _theme_controls_dateControl_datePicker, _theme_controls_dateControl1, _theme_controls2;
4625
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_dateControl1 = _theme_controls2.dateControl) == null ? void 0 : (_theme_controls_dateControl_datePicker = _theme_controls_dateControl1.datePicker) == null ? void 0 : _theme_controls_dateControl_datePicker.hide();
4626
+ }
4627
+ if ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_timeControl = _theme_controls1.timeControl) == null ? void 0 : _theme_controls_timeControl.timePicker) {
4628
+ var _theme_controls_timeControl_timePicker, _theme_controls_timeControl1, _theme_controls3;
4629
+ (_theme_controls3 = theme.controls) == null ? void 0 : (_theme_controls_timeControl1 = _theme_controls3.timeControl) == null ? void 0 : (_theme_controls_timeControl_timePicker = _theme_controls_timeControl1.timePicker) == null ? void 0 : _theme_controls_timeControl_timePicker.hide();
4516
4630
  }
4517
4631
  theme.emit(EVENTS.control.timeLinePanelOpenChange, open);
4518
4632
  });
@@ -4521,7 +4635,7 @@ function debounce(func, wait) {
4521
4635
  });
4522
4636
  }
4523
4637
  // 日历控件
4524
- if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
4638
+ if ((_theme_controls21 = theme.controls) == null ? void 0 : _theme_controls21.dateControl) {
4525
4639
  theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
4526
4640
  theme.emit(EVENTS.control.datePanelOpenChange, open, date);
4527
4641
  });
@@ -4532,6 +4646,15 @@ function debounce(func, wait) {
4532
4646
  theme.emit(EVENTS.control.recDestroy);
4533
4647
  });
4534
4648
  }
4649
+ // 时间控件
4650
+ if ((_theme_controls22 = theme.controls) == null ? void 0 : _theme_controls22.timeControl) {
4651
+ theme.controls.timeControl.on(EVENTS.control.timePanelOpenChange, function(open, time) {
4652
+ theme.emit(EVENTS.control.timePanelOpenChange, open, time);
4653
+ });
4654
+ theme.controls.timeControl.on(EVENTS.control.timeChange, function(time) {
4655
+ theme.emit(EVENTS.control.timeChange, time);
4656
+ });
4657
+ }
4535
4658
  }
4536
4659
  var ignoreList = [
4537
4660
  EVENTS.getOSDTime,
@@ -4616,8 +4739,8 @@ function _create_class$5(Constructor, protoProps, staticProps) {
4616
4739
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
4617
4740
  return Constructor;
4618
4741
  }
4619
- function _extends$k() {
4620
- _extends$k = Object.assign || function(target) {
4742
+ function _extends$o() {
4743
+ _extends$o = Object.assign || function(target) {
4621
4744
  for(var i = 1; i < arguments.length; i++){
4622
4745
  var source = arguments[i];
4623
4746
  for(var key in source){
@@ -4628,9 +4751,9 @@ function _extends$k() {
4628
4751
  }
4629
4752
  return target;
4630
4753
  };
4631
- return _extends$k.apply(this, arguments);
4754
+ return _extends$o.apply(this, arguments);
4632
4755
  }
4633
- function _inherits$j(subClass, superClass) {
4756
+ function _inherits$n(subClass, superClass) {
4634
4757
  if (typeof superClass !== "function" && superClass !== null) {
4635
4758
  throw new TypeError("Super expression must either be null or a function");
4636
4759
  }
@@ -4641,14 +4764,14 @@ function _inherits$j(subClass, superClass) {
4641
4764
  configurable: true
4642
4765
  }
4643
4766
  });
4644
- if (superClass) _set_prototype_of$j(subClass, superClass);
4767
+ if (superClass) _set_prototype_of$n(subClass, superClass);
4645
4768
  }
4646
- function _set_prototype_of$j(o, p) {
4647
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4769
+ function _set_prototype_of$n(o, p) {
4770
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4648
4771
  o.__proto__ = p;
4649
4772
  return o;
4650
4773
  };
4651
- return _set_prototype_of$j(o, p);
4774
+ return _set_prototype_of$n(o, p);
4652
4775
  }
4653
4776
  var ZOOM_DEFAULT_OPTIONS = {
4654
4777
  open: false,
@@ -4658,10 +4781,10 @@ var ZOOM_DEFAULT_OPTIONS = {
4658
4781
  * 电子放大控件
4659
4782
  * @category Control
4660
4783
  */ var Zoom = /*#__PURE__*/ function(Control) {
4661
- _inherits$j(Zoom, Control);
4784
+ _inherits$n(Zoom, Control);
4662
4785
  function Zoom(options) {
4663
4786
  var _this;
4664
- _this = Control.call(this, _extends$k({}, options, {
4787
+ _this = Control.call(this, _extends$o({}, options, {
4665
4788
  tagName: 'span',
4666
4789
  controlType: 'button',
4667
4790
  classNameSuffix: 'zoom'
@@ -4789,8 +4912,8 @@ var ZOOM_DEFAULT_OPTIONS = {
4789
4912
  return Zoom;
4790
4913
  }(Control);
4791
4914
 
4792
- function _extends$j() {
4793
- _extends$j = Object.assign || function(target) {
4915
+ function _extends$n() {
4916
+ _extends$n = Object.assign || function(target) {
4794
4917
  for(var i = 1; i < arguments.length; i++){
4795
4918
  var source = arguments[i];
4796
4919
  for(var key in source){
@@ -4801,10 +4924,10 @@ function _extends$j() {
4801
4924
  }
4802
4925
  return target;
4803
4926
  };
4804
- return _extends$j.apply(this, arguments);
4927
+ return _extends$n.apply(this, arguments);
4805
4928
  }
4806
4929
  function __zoom(theme, container, options) {
4807
- theme.zoomUtil = new Zoom$1(container, _extends$j({}, options || {}, {
4930
+ theme.zoomUtil = new Zoom$1(container, _extends$n({}, options || {}, {
4808
4931
  min: 1,
4809
4932
  onChange: function(zoom, reset) {
4810
4933
  if (zoom !== theme._zoom) {
@@ -5029,8 +5152,8 @@ function _async_to_generator$5(fn) {
5029
5152
  });
5030
5153
  };
5031
5154
  }
5032
- function _extends$i() {
5033
- _extends$i = Object.assign || function(target) {
5155
+ function _extends$m() {
5156
+ _extends$m = Object.assign || function(target) {
5034
5157
  for(var i = 1; i < arguments.length; i++){
5035
5158
  var source = arguments[i];
5036
5159
  for(var key in source){
@@ -5041,7 +5164,7 @@ function _extends$i() {
5041
5164
  }
5042
5165
  return target;
5043
5166
  };
5044
- return _extends$i.apply(this, arguments);
5167
+ return _extends$m.apply(this, arguments);
5045
5168
  }
5046
5169
  function _ts_generator$5(thisArg, body) {
5047
5170
  var f, y, t, _ = {
@@ -5169,7 +5292,7 @@ function _ts_generator$5(thisArg, body) {
5169
5292
  }
5170
5293
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
5171
5294
  // TODO: 因为回放是一组, 位置以第一个位置为准
5172
- recControls.push(recControls[0] ? _extends$i({}, item, {
5295
+ recControls.push(recControls[0] ? _extends$m({}, item, {
5173
5296
  part: recControls[0].part
5174
5297
  }) : item);
5175
5298
  return false;
@@ -5192,7 +5315,7 @@ function _ts_generator$5(thisArg, body) {
5192
5315
  }
5193
5316
  if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
5194
5317
  // TODO: 因为回放是一组, 位置以第一个位置为准
5195
- recControls.push(recControls[0] ? _extends$i({}, item, {
5318
+ recControls.push(recControls[0] ? _extends$m({}, item, {
5196
5319
  part: recControls[0].part
5197
5320
  }) : item);
5198
5321
  return false;
@@ -5443,8 +5566,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
5443
5566
  return Component;
5444
5567
  }();
5445
5568
 
5446
- function _extends$h() {
5447
- _extends$h = Object.assign || function(target) {
5569
+ function _extends$l() {
5570
+ _extends$l = Object.assign || function(target) {
5448
5571
  for(var i = 1; i < arguments.length; i++){
5449
5572
  var source = arguments[i];
5450
5573
  for(var key in source){
@@ -5455,9 +5578,9 @@ function _extends$h() {
5455
5578
  }
5456
5579
  return target;
5457
5580
  };
5458
- return _extends$h.apply(this, arguments);
5581
+ return _extends$l.apply(this, arguments);
5459
5582
  }
5460
- function _inherits$i(subClass, superClass) {
5583
+ function _inherits$m(subClass, superClass) {
5461
5584
  if (typeof superClass !== "function" && superClass !== null) {
5462
5585
  throw new TypeError("Super expression must either be null or a function");
5463
5586
  }
@@ -5468,28 +5591,28 @@ function _inherits$i(subClass, superClass) {
5468
5591
  configurable: true
5469
5592
  }
5470
5593
  });
5471
- if (superClass) _set_prototype_of$i(subClass, superClass);
5594
+ if (superClass) _set_prototype_of$m(subClass, superClass);
5472
5595
  }
5473
- function _set_prototype_of$i(o, p) {
5474
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5596
+ function _set_prototype_of$m(o, p) {
5597
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5475
5598
  o.__proto__ = p;
5476
5599
  return o;
5477
5600
  };
5478
- return _set_prototype_of$i(o, p);
5601
+ return _set_prototype_of$m(o, p);
5479
5602
  }
5480
5603
  var Footer = /*#__PURE__*/ function(Component) {
5481
- _inherits$i(Footer, Component);
5604
+ _inherits$m(Footer, Component);
5482
5605
  function Footer(options) {
5483
5606
  if (options === void 0) options = {};
5484
- return Component.call(this, _extends$h({}, options, {
5607
+ return Component.call(this, _extends$l({}, options, {
5485
5608
  cType: 'footer'
5486
5609
  })) || this;
5487
5610
  }
5488
5611
  return Footer;
5489
5612
  }(Component);
5490
5613
 
5491
- function _extends$g() {
5492
- _extends$g = Object.assign || function(target) {
5614
+ function _extends$k() {
5615
+ _extends$k = Object.assign || function(target) {
5493
5616
  for(var i = 1; i < arguments.length; i++){
5494
5617
  var source = arguments[i];
5495
5618
  for(var key in source){
@@ -5500,9 +5623,9 @@ function _extends$g() {
5500
5623
  }
5501
5624
  return target;
5502
5625
  };
5503
- return _extends$g.apply(this, arguments);
5626
+ return _extends$k.apply(this, arguments);
5504
5627
  }
5505
- function _inherits$h(subClass, superClass) {
5628
+ function _inherits$l(subClass, superClass) {
5506
5629
  if (typeof superClass !== "function" && superClass !== null) {
5507
5630
  throw new TypeError("Super expression must either be null or a function");
5508
5631
  }
@@ -5513,20 +5636,20 @@ function _inherits$h(subClass, superClass) {
5513
5636
  configurable: true
5514
5637
  }
5515
5638
  });
5516
- if (superClass) _set_prototype_of$h(subClass, superClass);
5639
+ if (superClass) _set_prototype_of$l(subClass, superClass);
5517
5640
  }
5518
- function _set_prototype_of$h(o, p) {
5519
- _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5641
+ function _set_prototype_of$l(o, p) {
5642
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5520
5643
  o.__proto__ = p;
5521
5644
  return o;
5522
5645
  };
5523
- return _set_prototype_of$h(o, p);
5646
+ return _set_prototype_of$l(o, p);
5524
5647
  }
5525
5648
  var Header = /*#__PURE__*/ function(Component) {
5526
- _inherits$h(Header, Component);
5649
+ _inherits$l(Header, Component);
5527
5650
  function Header(options) {
5528
5651
  if (options === void 0) options = {};
5529
- return Component.call(this, _extends$g({}, options, {
5652
+ return Component.call(this, _extends$k({}, options, {
5530
5653
  cType: 'header'
5531
5654
  })) || this;
5532
5655
  }
@@ -5692,8 +5815,8 @@ function interactiveHF($container, second, callback) {
5692
5815
  };
5693
5816
  }
5694
5817
 
5695
- function _extends$f() {
5696
- _extends$f = Object.assign || function(target) {
5818
+ function _extends$j() {
5819
+ _extends$j = Object.assign || function(target) {
5697
5820
  for(var i = 1; i < arguments.length; i++){
5698
5821
  var source = arguments[i];
5699
5822
  for(var key in source){
@@ -5704,9 +5827,9 @@ function _extends$f() {
5704
5827
  }
5705
5828
  return target;
5706
5829
  };
5707
- return _extends$f.apply(this, arguments);
5830
+ return _extends$j.apply(this, arguments);
5708
5831
  }
5709
- function _inherits$g(subClass, superClass) {
5832
+ function _inherits$k(subClass, superClass) {
5710
5833
  if (typeof superClass !== "function" && superClass !== null) {
5711
5834
  throw new TypeError("Super expression must either be null or a function");
5712
5835
  }
@@ -5717,23 +5840,23 @@ function _inherits$g(subClass, superClass) {
5717
5840
  configurable: true
5718
5841
  }
5719
5842
  });
5720
- if (superClass) _set_prototype_of$g(subClass, superClass);
5843
+ if (superClass) _set_prototype_of$k(subClass, superClass);
5721
5844
  }
5722
- function _set_prototype_of$g(o, p) {
5723
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5845
+ function _set_prototype_of$k(o, p) {
5846
+ _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5724
5847
  o.__proto__ = p;
5725
5848
  return o;
5726
5849
  };
5727
- return _set_prototype_of$g(o, p);
5850
+ return _set_prototype_of$k(o, p);
5728
5851
  }
5729
5852
  /**
5730
5853
  * 全局全屏
5731
5854
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
5732
5855
  * @category Control
5733
5856
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
5734
- _inherits$g(GlobalFullscreen, Fullscreen);
5857
+ _inherits$k(GlobalFullscreen, Fullscreen);
5735
5858
  function GlobalFullscreen(options) {
5736
- return Fullscreen.call(this, _extends$f({}, options, {
5859
+ return Fullscreen.call(this, _extends$j({}, options, {
5737
5860
  controlType: 'button',
5738
5861
  classNameSuffix: 'global-fullscreen'
5739
5862
  })) || this;
@@ -5764,8 +5887,8 @@ function _set_prototype_of$g(o, p) {
5764
5887
  return GlobalFullscreen;
5765
5888
  }(Fullscreen);
5766
5889
 
5767
- function _extends$e() {
5768
- _extends$e = Object.assign || function(target) {
5890
+ function _extends$i() {
5891
+ _extends$i = Object.assign || function(target) {
5769
5892
  for(var i = 1; i < arguments.length; i++){
5770
5893
  var source = arguments[i];
5771
5894
  for(var key in source){
@@ -5776,9 +5899,9 @@ function _extends$e() {
5776
5899
  }
5777
5900
  return target;
5778
5901
  };
5779
- return _extends$e.apply(this, arguments);
5902
+ return _extends$i.apply(this, arguments);
5780
5903
  }
5781
- function _inherits$f(subClass, superClass) {
5904
+ function _inherits$j(subClass, superClass) {
5782
5905
  if (typeof superClass !== "function" && superClass !== null) {
5783
5906
  throw new TypeError("Super expression must either be null or a function");
5784
5907
  }
@@ -5789,23 +5912,23 @@ function _inherits$f(subClass, superClass) {
5789
5912
  configurable: true
5790
5913
  }
5791
5914
  });
5792
- if (superClass) _set_prototype_of$f(subClass, superClass);
5915
+ if (superClass) _set_prototype_of$j(subClass, superClass);
5793
5916
  }
5794
- function _set_prototype_of$f(o, p) {
5795
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5917
+ function _set_prototype_of$j(o, p) {
5918
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5796
5919
  o.__proto__ = p;
5797
5920
  return o;
5798
5921
  };
5799
- return _set_prototype_of$f(o, p);
5922
+ return _set_prototype_of$j(o, p);
5800
5923
  }
5801
5924
  /**
5802
5925
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
5803
5926
  * @category Control
5804
5927
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
5805
- _inherits$f(CapturePicture, Control);
5928
+ _inherits$j(CapturePicture, Control);
5806
5929
  function CapturePicture(options) {
5807
5930
  var _this;
5808
- _this = Control.call(this, _extends$e({}, options, {
5931
+ _this = Control.call(this, _extends$i({}, options, {
5809
5932
  tagName: 'span',
5810
5933
  classNameSuffix: 'capture-picture'
5811
5934
  })) || this, _this._timer = null;
@@ -5871,8 +5994,8 @@ function _create_class$4(Constructor, protoProps, staticProps) {
5871
5994
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
5872
5995
  return Constructor;
5873
5996
  }
5874
- function _extends$d() {
5875
- _extends$d = Object.assign || function(target) {
5997
+ function _extends$h() {
5998
+ _extends$h = Object.assign || function(target) {
5876
5999
  for(var i = 1; i < arguments.length; i++){
5877
6000
  var source = arguments[i];
5878
6001
  for(var key in source){
@@ -5883,9 +6006,9 @@ function _extends$d() {
5883
6006
  }
5884
6007
  return target;
5885
6008
  };
5886
- return _extends$d.apply(this, arguments);
6009
+ return _extends$h.apply(this, arguments);
5887
6010
  }
5888
- function _inherits$e(subClass, superClass) {
6011
+ function _inherits$i(subClass, superClass) {
5889
6012
  if (typeof superClass !== "function" && superClass !== null) {
5890
6013
  throw new TypeError("Super expression must either be null or a function");
5891
6014
  }
@@ -5896,23 +6019,23 @@ function _inherits$e(subClass, superClass) {
5896
6019
  configurable: true
5897
6020
  }
5898
6021
  });
5899
- if (superClass) _set_prototype_of$e(subClass, superClass);
6022
+ if (superClass) _set_prototype_of$i(subClass, superClass);
5900
6023
  }
5901
- function _set_prototype_of$e(o, p) {
5902
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6024
+ function _set_prototype_of$i(o, p) {
6025
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
5903
6026
  o.__proto__ = p;
5904
6027
  return o;
5905
6028
  };
5906
- return _set_prototype_of$e(o, p);
6029
+ return _set_prototype_of$i(o, p);
5907
6030
  }
5908
6031
  /**
5909
6032
  * 云台控件
5910
6033
  * @category Control
5911
6034
  */ var Ptz = /*#__PURE__*/ function(Control) {
5912
- _inherits$e(Ptz, Control);
6035
+ _inherits$i(Ptz, Control);
5913
6036
  function Ptz(options) {
5914
6037
  var _this;
5915
- _this = Control.call(this, _extends$d({}, options, {
6038
+ _this = Control.call(this, _extends$h({}, options, {
5916
6039
  tagName: 'span',
5917
6040
  controlType: 'button',
5918
6041
  classNameSuffix: 'ptz'
@@ -5955,7 +6078,7 @@ function _set_prototype_of$e(o, p) {
5955
6078
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
5956
6079
  this.$panel.appendChild(this.$turntable);
5957
6080
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5958
- this._ptzControl = new controlPtz.Ptz(this.$turntable, _extends$d({}, this._options, {
6081
+ this._ptzControl = new controlPtz.Ptz(this.$turntable, _extends$h({}, this._options, {
5959
6082
  onSpeedChange: this._onSpeedChange.bind(this),
5960
6083
  onDirection: this._onDirection.bind(this)
5961
6084
  }));
@@ -5964,7 +6087,7 @@ function _set_prototype_of$e(o, p) {
5964
6087
  };
5965
6088
  _proto.renderMobileExtend = function renderMobileExtend($container) {
5966
6089
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5967
- if (!this._ptzControl1) this._ptzControl1 = new controlPtz.MobilePtz($container, _extends$d({}, this._options, {
6090
+ if (!this._ptzControl1) this._ptzControl1 = new controlPtz.MobilePtz($container, _extends$h({}, this._options, {
5968
6091
  onSpeedChange: this._onSpeedChange.bind(this),
5969
6092
  onDirection: this._onDirection.bind(this)
5970
6093
  }));
@@ -6067,8 +6190,8 @@ function _create_class$3(Constructor, protoProps, staticProps) {
6067
6190
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
6068
6191
  return Constructor;
6069
6192
  }
6070
- function _extends$c() {
6071
- _extends$c = Object.assign || function(target) {
6193
+ function _extends$g() {
6194
+ _extends$g = Object.assign || function(target) {
6072
6195
  for(var i = 1; i < arguments.length; i++){
6073
6196
  var source = arguments[i];
6074
6197
  for(var key in source){
@@ -6079,9 +6202,9 @@ function _extends$c() {
6079
6202
  }
6080
6203
  return target;
6081
6204
  };
6082
- return _extends$c.apply(this, arguments);
6205
+ return _extends$g.apply(this, arguments);
6083
6206
  }
6084
- function _inherits$d(subClass, superClass) {
6207
+ function _inherits$h(subClass, superClass) {
6085
6208
  if (typeof superClass !== "function" && superClass !== null) {
6086
6209
  throw new TypeError("Super expression must either be null or a function");
6087
6210
  }
@@ -6092,14 +6215,14 @@ function _inherits$d(subClass, superClass) {
6092
6215
  configurable: true
6093
6216
  }
6094
6217
  });
6095
- if (superClass) _set_prototype_of$d(subClass, superClass);
6218
+ if (superClass) _set_prototype_of$h(subClass, superClass);
6096
6219
  }
6097
- function _set_prototype_of$d(o, p) {
6098
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6220
+ function _set_prototype_of$h(o, p) {
6221
+ _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6099
6222
  o.__proto__ = p;
6100
6223
  return o;
6101
6224
  };
6102
- return _set_prototype_of$d(o, p);
6225
+ return _set_prototype_of$h(o, p);
6103
6226
  }
6104
6227
  var RECORD_DEFAULT_OPTIONS = {
6105
6228
  maxDuration: 3600
@@ -6113,10 +6236,10 @@ var RECORD_DEFAULT_OPTIONS = {
6113
6236
  * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
6114
6237
  * @category Control
6115
6238
  */ var Record = /*#__PURE__*/ function(Control) {
6116
- _inherits$d(Record, Control);
6239
+ _inherits$h(Record, Control);
6117
6240
  function Record(options) {
6118
6241
  var _this;
6119
- _this = Control.call(this, _extends$c({}, options, {
6242
+ _this = Control.call(this, _extends$g({}, options, {
6120
6243
  tagName: 'span',
6121
6244
  controlType: 'button',
6122
6245
  classNameSuffix: 'record'
@@ -6257,8 +6380,8 @@ function _create_class$2(Constructor, protoProps, staticProps) {
6257
6380
  if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
6258
6381
  return Constructor;
6259
6382
  }
6260
- function _extends$b() {
6261
- _extends$b = Object.assign || function(target) {
6383
+ function _extends$f() {
6384
+ _extends$f = Object.assign || function(target) {
6262
6385
  for(var i = 1; i < arguments.length; i++){
6263
6386
  var source = arguments[i];
6264
6387
  for(var key in source){
@@ -6269,9 +6392,9 @@ function _extends$b() {
6269
6392
  }
6270
6393
  return target;
6271
6394
  };
6272
- return _extends$b.apply(this, arguments);
6395
+ return _extends$f.apply(this, arguments);
6273
6396
  }
6274
- function _inherits$c(subClass, superClass) {
6397
+ function _inherits$g(subClass, superClass) {
6275
6398
  if (typeof superClass !== "function" && superClass !== null) {
6276
6399
  throw new TypeError("Super expression must either be null or a function");
6277
6400
  }
@@ -6282,14 +6405,14 @@ function _inherits$c(subClass, superClass) {
6282
6405
  configurable: true
6283
6406
  }
6284
6407
  });
6285
- if (superClass) _set_prototype_of$c(subClass, superClass);
6408
+ if (superClass) _set_prototype_of$g(subClass, superClass);
6286
6409
  }
6287
- function _set_prototype_of$c(o, p) {
6288
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6410
+ function _set_prototype_of$g(o, p) {
6411
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6289
6412
  o.__proto__ = p;
6290
6413
  return o;
6291
6414
  };
6292
- return _set_prototype_of$c(o, p);
6415
+ return _set_prototype_of$g(o, p);
6293
6416
  }
6294
6417
  function _ts_generator$4(thisArg, body) {
6295
6418
  var f, y, t, _ = {
@@ -6391,10 +6514,10 @@ function _ts_generator$4(thisArg, body) {
6391
6514
  *
6392
6515
  * @category Control
6393
6516
  */ var Talk = /*#__PURE__*/ function(Control) {
6394
- _inherits$c(Talk, Control);
6517
+ _inherits$g(Talk, Control);
6395
6518
  function Talk(options) {
6396
6519
  var _this;
6397
- _this = Control.call(this, _extends$b({}, options, {
6520
+ _this = Control.call(this, _extends$f({}, options, {
6398
6521
  tagName: 'span',
6399
6522
  controlType: 'button',
6400
6523
  classNameSuffix: 'talk'
@@ -6527,8 +6650,8 @@ function _async_to_generator$3(fn) {
6527
6650
  });
6528
6651
  };
6529
6652
  }
6530
- function _extends$a() {
6531
- _extends$a = Object.assign || function(target) {
6653
+ function _extends$e() {
6654
+ _extends$e = Object.assign || function(target) {
6532
6655
  for(var i = 1; i < arguments.length; i++){
6533
6656
  var source = arguments[i];
6534
6657
  for(var key in source){
@@ -6539,9 +6662,9 @@ function _extends$a() {
6539
6662
  }
6540
6663
  return target;
6541
6664
  };
6542
- return _extends$a.apply(this, arguments);
6665
+ return _extends$e.apply(this, arguments);
6543
6666
  }
6544
- function _inherits$b(subClass, superClass) {
6667
+ function _inherits$f(subClass, superClass) {
6545
6668
  if (typeof superClass !== "function" && superClass !== null) {
6546
6669
  throw new TypeError("Super expression must either be null or a function");
6547
6670
  }
@@ -6552,14 +6675,14 @@ function _inherits$b(subClass, superClass) {
6552
6675
  configurable: true
6553
6676
  }
6554
6677
  });
6555
- if (superClass) _set_prototype_of$b(subClass, superClass);
6678
+ if (superClass) _set_prototype_of$f(subClass, superClass);
6556
6679
  }
6557
- function _set_prototype_of$b(o, p) {
6558
- _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6680
+ function _set_prototype_of$f(o, p) {
6681
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6559
6682
  o.__proto__ = p;
6560
6683
  return o;
6561
6684
  };
6562
- return _set_prototype_of$b(o, p);
6685
+ return _set_prototype_of$f(o, p);
6563
6686
  }
6564
6687
  function _ts_generator$3(thisArg, body) {
6565
6688
  var f, y, t, _ = {
@@ -6659,10 +6782,10 @@ function _ts_generator$3(thisArg, body) {
6659
6782
  *
6660
6783
  * @category Control
6661
6784
  */ var Broadcast = /*#__PURE__*/ function(Control) {
6662
- _inherits$b(Broadcast, Control);
6785
+ _inherits$f(Broadcast, Control);
6663
6786
  function Broadcast(options) {
6664
6787
  var _this;
6665
- _this = Control.call(this, _extends$a({}, options, {
6788
+ _this = Control.call(this, _extends$e({}, options, {
6666
6789
  tagName: 'span',
6667
6790
  controlType: 'button',
6668
6791
  classNameSuffix: 'broadcast'
@@ -6757,8 +6880,8 @@ function _async_to_generator$2(fn) {
6757
6880
  });
6758
6881
  };
6759
6882
  }
6760
- function _extends$9() {
6761
- _extends$9 = Object.assign || function(target) {
6883
+ function _extends$d() {
6884
+ _extends$d = Object.assign || function(target) {
6762
6885
  for(var i = 1; i < arguments.length; i++){
6763
6886
  var source = arguments[i];
6764
6887
  for(var key in source){
@@ -6769,9 +6892,9 @@ function _extends$9() {
6769
6892
  }
6770
6893
  return target;
6771
6894
  };
6772
- return _extends$9.apply(this, arguments);
6895
+ return _extends$d.apply(this, arguments);
6773
6896
  }
6774
- function _inherits$a(subClass, superClass) {
6897
+ function _inherits$e(subClass, superClass) {
6775
6898
  if (typeof superClass !== "function" && superClass !== null) {
6776
6899
  throw new TypeError("Super expression must either be null or a function");
6777
6900
  }
@@ -6782,14 +6905,14 @@ function _inherits$a(subClass, superClass) {
6782
6905
  configurable: true
6783
6906
  }
6784
6907
  });
6785
- if (superClass) _set_prototype_of$a(subClass, superClass);
6908
+ if (superClass) _set_prototype_of$e(subClass, superClass);
6786
6909
  }
6787
- function _set_prototype_of$a(o, p) {
6788
- _set_prototype_of$a = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6910
+ function _set_prototype_of$e(o, p) {
6911
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6789
6912
  o.__proto__ = p;
6790
6913
  return o;
6791
6914
  };
6792
- return _set_prototype_of$a(o, p);
6915
+ return _set_prototype_of$e(o, p);
6793
6916
  }
6794
6917
  function _ts_generator$2(thisArg, body) {
6795
6918
  var f, y, t, _ = {
@@ -6889,10 +7012,10 @@ function _ts_generator$2(thisArg, body) {
6889
7012
  *
6890
7013
  * @category Control
6891
7014
  */ var AIChat = /*#__PURE__*/ function(Control) {
6892
- _inherits$a(AIChat, Control);
7015
+ _inherits$e(AIChat, Control);
6893
7016
  function AIChat(options) {
6894
7017
  var _this;
6895
- _this = Control.call(this, _extends$9({}, options, {
7018
+ _this = Control.call(this, _extends$d({}, options, {
6896
7019
  tagName: 'span',
6897
7020
  controlType: 'button',
6898
7021
  classNameSuffix: 'aichat'
@@ -6958,6 +7081,348 @@ function _ts_generator$2(thisArg, body) {
6958
7081
  return AIChat;
6959
7082
  }(Control);
6960
7083
 
7084
+ function _extends$c() {
7085
+ _extends$c = Object.assign || function(target) {
7086
+ for(var i = 1; i < arguments.length; i++){
7087
+ var source = arguments[i];
7088
+ for(var key in source){
7089
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
7090
+ target[key] = source[key];
7091
+ }
7092
+ }
7093
+ }
7094
+ return target;
7095
+ };
7096
+ return _extends$c.apply(this, arguments);
7097
+ }
7098
+ function _inherits$d(subClass, superClass) {
7099
+ if (typeof superClass !== "function" && superClass !== null) {
7100
+ throw new TypeError("Super expression must either be null or a function");
7101
+ }
7102
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
7103
+ constructor: {
7104
+ value: subClass,
7105
+ writable: true,
7106
+ configurable: true
7107
+ }
7108
+ });
7109
+ if (superClass) _set_prototype_of$d(subClass, superClass);
7110
+ }
7111
+ function _set_prototype_of$d(o, p) {
7112
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7113
+ o.__proto__ = p;
7114
+ return o;
7115
+ };
7116
+ return _set_prototype_of$d(o, p);
7117
+ }
7118
+ /**
7119
+ * 直播按钮控件
7120
+ *
7121
+ * 点击切换到直播模式
7122
+ *
7123
+ * @category Control
7124
+ */ var Live = /*#__PURE__*/ function(Control) {
7125
+ _inherits$d(Live, Control);
7126
+ function Live(options) {
7127
+ var _this;
7128
+ var _this___options_props1;
7129
+ _this = Control.call(this, _extends$c({}, options, {
7130
+ tagName: 'span',
7131
+ controlType: 'button',
7132
+ classNameSuffix: 'live'
7133
+ })) || this;
7134
+ _this._options = options;
7135
+ _this._render();
7136
+ // H5 端不展示直播/回放切换按钮
7137
+ if (Utils.isMobile) {
7138
+ _this.$container.style.display = 'none';
7139
+ }
7140
+ // 初始化时根据当前播放模式确定激活状态
7141
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
7142
+ return _this;
7143
+ }
7144
+ var _proto = Live.prototype;
7145
+ /**
7146
+ * 根据 urlInfo 同步激活状态
7147
+ * 在初始化和播放地址切换后调用
7148
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
7149
+ var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
7150
+ this.active = shouldBeActive;
7151
+ };
7152
+ _proto._render = function _render() {
7153
+ var _this_locale;
7154
+ this.$container.innerHTML = IconComponents.live({
7155
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
7156
+ });
7157
+ };
7158
+ /**
7159
+ * 销毁
7160
+ */ _proto.destroy = function destroy() {
7161
+ Control.prototype.destroy.call(this);
7162
+ };
7163
+ /**
7164
+ * 点击 Control 会触发
7165
+ */ _proto._onControlClick = function _onControlClick(e) {
7166
+ var _this__options_onChange, _this__options;
7167
+ Control.prototype._onControlClick.call(this, e);
7168
+ // 已经是直播模式则不触发
7169
+ if (this.active) {
7170
+ return;
7171
+ }
7172
+ this.active = true;
7173
+ this.emit(EVENTS.control.liveChange);
7174
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options);
7175
+ };
7176
+ return Live;
7177
+ }(Control);
7178
+
7179
+ function _extends$b() {
7180
+ _extends$b = Object.assign || function(target) {
7181
+ for(var i = 1; i < arguments.length; i++){
7182
+ var source = arguments[i];
7183
+ for(var key in source){
7184
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
7185
+ target[key] = source[key];
7186
+ }
7187
+ }
7188
+ }
7189
+ return target;
7190
+ };
7191
+ return _extends$b.apply(this, arguments);
7192
+ }
7193
+ function _inherits$c(subClass, superClass) {
7194
+ if (typeof superClass !== "function" && superClass !== null) {
7195
+ throw new TypeError("Super expression must either be null or a function");
7196
+ }
7197
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
7198
+ constructor: {
7199
+ value: subClass,
7200
+ writable: true,
7201
+ configurable: true
7202
+ }
7203
+ });
7204
+ if (superClass) _set_prototype_of$c(subClass, superClass);
7205
+ }
7206
+ function _set_prototype_of$c(o, p) {
7207
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7208
+ o.__proto__ = p;
7209
+ return o;
7210
+ };
7211
+ return _set_prototype_of$c(o, p);
7212
+ }
7213
+ /**
7214
+ * 回放下拉控件
7215
+ *
7216
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
7217
+ *
7218
+ * @category Control
7219
+ */ var RecDropdown = /*#__PURE__*/ function(Control) {
7220
+ _inherits$c(RecDropdown, Control);
7221
+ function RecDropdown(options) {
7222
+ var _this;
7223
+ var _options_props, _this___options_props1;
7224
+ _this = Control.call(this, _extends$b({}, options, {
7225
+ tagName: 'span',
7226
+ controlType: 'button',
7227
+ classNameSuffix: 'rec-dropdown'
7228
+ })) || this;
7229
+ _this._options = options;
7230
+ // H5 端不展示直播/回放切换按钮
7231
+ if (Utils.isMobile) {
7232
+ _this.$container.style.display = 'none';
7233
+ }
7234
+ // 初始化时根据 urlInfo 确定当前回放类型和激活状态
7235
+ _this._recType = options.recType || ((_options_props = options.props) == null ? void 0 : _options_props.recType) || 'cloudRec';
7236
+ _this._syncActiveByUrlInfo((_this___options_props1 = _this.__options.props) == null ? void 0 : _this___options_props1.urlInfo);
7237
+ _this._render();
7238
+ _this._initPicker();
7239
+ return _this;
7240
+ }
7241
+ var _proto = RecDropdown.prototype;
7242
+ /**
7243
+ * 根据 urlInfo 同步激活状态和回放类型
7244
+ * 在初始化和播放地址切换后调用
7245
+ */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
7246
+ if (urlInfo && urlInfo.type === 'rec') {
7247
+ var _urlInfo_searchParams1;
7248
+ this.active = true;
7249
+ if (urlInfo.recType === 'cloud' && ((_urlInfo_searchParams1 = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams1.busType) === '7') {
7250
+ this._recType = 'cloudRecord';
7251
+ } else if (urlInfo.recType === 'cloud') {
7252
+ this._recType = 'cloudRec';
7253
+ } else {
7254
+ this._recType = 'rec';
7255
+ }
7256
+ this._activeOption(this._recType);
7257
+ } else {
7258
+ this.active = false;
7259
+ }
7260
+ };
7261
+ _proto._render = function _render() {
7262
+ var _this_locale;
7263
+ this.$container.innerHTML = IconComponents.recDropdown({
7264
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_REC_DROPDOWN) || '回放'
7265
+ });
7266
+ };
7267
+ _proto._initPicker = function _initPicker() {
7268
+ var _this = this;
7269
+ this._picker = new Picker(this.$container, {
7270
+ getPopupContainer: function() {
7271
+ return Utils.isMobile ? _this.__options.rootContainer : _this.$container;
7272
+ },
7273
+ trigger: Utils.isMobile ? 'click' : 'hover',
7274
+ isMobile: Utils.isMobile,
7275
+ wrapClassName: "" + PREFIX_CLASS + "-rec-dropdown-picker",
7276
+ placement: 'bottom',
7277
+ offset: [
7278
+ 0,
7279
+ 4
7280
+ ]
7281
+ });
7282
+ this._picker.innerHTML(this._getPanelHTML());
7283
+ this._activeOption(this._recType);
7284
+ this._bindPanelEvents();
7285
+ };
7286
+ _proto._getPanelHTML = function _getPanelHTML() {
7287
+ var _this_locale, _this_locale1, _this_locale2;
7288
+ var cloudRecLabel = ((_this_locale = this.locale) == null ? void 0 : _this_locale.REC_DROPDOWN_CLOUD_REC) || '云存储';
7289
+ var cloudRecordLabel = ((_this_locale1 = this.locale) == null ? void 0 : _this_locale1.REC_DROPDOWN_CLOUD_RECORD) || '云录制';
7290
+ var localRecLabel = ((_this_locale2 = this.locale) == null ? void 0 : _this_locale2.REC_DROPDOWN_LOCAL_REC) || '本地回放';
7291
+ return '<div class="' + PREFIX_CLASS + '-rec-dropdown-panel">\n <ul class="' + PREFIX_CLASS + '-rec-dropdown-list">\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRec">\n <span>' + cloudRecLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="cloudRecord">\n <span>' + cloudRecordLabel + '</span>\n </li>\n <li class="' + PREFIX_CLASS + '-rec-dropdown-item" data-type="rec">\n <span>' + localRecLabel + "</span>\n </li>\n </ul>\n </div>";
7292
+ };
7293
+ _proto._bindPanelEvents = function _bindPanelEvents() {
7294
+ var _this = this;
7295
+ this._delegation = delegate(this._picker.$body, "." + PREFIX_CLASS + "-rec-dropdown-item", 'click', function(e) {
7296
+ e.stopPropagation();
7297
+ var type = e.delegateTarget.getAttribute('data-type');
7298
+ if (type) {
7299
+ var _this__options_onChange, _this__options;
7300
+ _this._recType = type;
7301
+ _this._activeOption(type);
7302
+ // 设置自身为激活状态
7303
+ _this.active = true;
7304
+ _this.emit(EVENTS.control.recDropdownChange, type);
7305
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, type);
7306
+ _this._picker.open = false;
7307
+ }
7308
+ });
7309
+ };
7310
+ _proto._activeOption = function _activeOption(type) {
7311
+ var _this__picker;
7312
+ if ((_this__picker = this._picker) == null ? void 0 : _this__picker.$body) {
7313
+ var items = this._picker.$body.querySelectorAll("." + PREFIX_CLASS + "-rec-dropdown-item");
7314
+ items.forEach(function(item) {
7315
+ item.classList.remove("" + PREFIX_CLASS + "-active");
7316
+ });
7317
+ var target = this._picker.$body.querySelector("." + PREFIX_CLASS + '-rec-dropdown-item[data-type="' + type + '"]');
7318
+ target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
7319
+ }
7320
+ };
7321
+ /**
7322
+ * 销毁
7323
+ */ _proto.destroy = function destroy() {
7324
+ var _this__delegation_destroy, _this__delegation;
7325
+ (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
7326
+ this._delegation = null;
7327
+ if (this._picker) {
7328
+ this._picker.destroy();
7329
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7330
+ this._picker = null;
7331
+ }
7332
+ Control.prototype.destroy.call(this);
7333
+ };
7334
+ /**
7335
+ * 点击 Control 会触发(移动端 click 触发 picker)
7336
+ */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7337
+ _proto._onControlClick = function _onControlClick(_e) {
7338
+ // picker 自行处理 click/hover,这里不额外处理
7339
+ };
7340
+ return RecDropdown;
7341
+ }(Control);
7342
+
7343
+ function _extends$a() {
7344
+ _extends$a = Object.assign || function(target) {
7345
+ for(var i = 1; i < arguments.length; i++){
7346
+ var source = arguments[i];
7347
+ for(var key in source){
7348
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
7349
+ target[key] = source[key];
7350
+ }
7351
+ }
7352
+ }
7353
+ return target;
7354
+ };
7355
+ return _extends$a.apply(this, arguments);
7356
+ }
7357
+ function _inherits$b(subClass, superClass) {
7358
+ if (typeof superClass !== "function" && superClass !== null) {
7359
+ throw new TypeError("Super expression must either be null or a function");
7360
+ }
7361
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
7362
+ constructor: {
7363
+ value: subClass,
7364
+ writable: true,
7365
+ configurable: true
7366
+ }
7367
+ });
7368
+ if (superClass) _set_prototype_of$b(subClass, superClass);
7369
+ }
7370
+ function _set_prototype_of$b(o, p) {
7371
+ _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7372
+ o.__proto__ = p;
7373
+ return o;
7374
+ };
7375
+ return _set_prototype_of$b(o, p);
7376
+ }
7377
+ /**
7378
+ * 告警消息按钮控件
7379
+ *
7380
+ * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
7381
+ *
7382
+ * @category Control
7383
+ */ var AlarmMessage = /*#__PURE__*/ function(Control) {
7384
+ _inherits$b(AlarmMessage, Control);
7385
+ function AlarmMessage(options) {
7386
+ var _this;
7387
+ _this = Control.call(this, _extends$a({}, options, {
7388
+ tagName: 'span',
7389
+ controlType: 'button',
7390
+ classNameSuffix: 'alarm-message'
7391
+ })) || this, _this._panelOpen = false;
7392
+ _this._options = options;
7393
+ _this._render();
7394
+ _this.on(EVENTS.alarmMessageChange, function(open) {
7395
+ _this._panelOpen = open;
7396
+ });
7397
+ return _this;
7398
+ }
7399
+ var _proto = AlarmMessage.prototype;
7400
+ _proto._render = function _render() {
7401
+ var _this_locale;
7402
+ this.$container.innerHTML = IconComponents.alarmMessage({
7403
+ title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
7404
+ });
7405
+ };
7406
+ /**
7407
+ * 销毁
7408
+ */ _proto.destroy = function destroy() {
7409
+ if (this._panelOpen) {
7410
+ this.emit(EVENTS.control.alarmMessageChange, false);
7411
+ }
7412
+ Control.prototype.destroy.call(this);
7413
+ };
7414
+ /**
7415
+ * 点击 Control 会触发
7416
+ */ _proto._onControlClick = function _onControlClick(e) {
7417
+ var _this__options_onChange, _this__options;
7418
+ Control.prototype._onControlClick.call(this, e);
7419
+ this._panelOpen = !this._panelOpen;
7420
+ this.emit(EVENTS.control.alarmMessageChange, this._panelOpen);
7421
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this._panelOpen);
7422
+ };
7423
+ return AlarmMessage;
7424
+ }(Control);
7425
+
6961
7426
  function _defineProperties$1(target, props) {
6962
7427
  for(var i = 0; i < props.length; i++){
6963
7428
  var descriptor = props[i];
@@ -6971,8 +7436,8 @@ function _create_class$1(Constructor, protoProps, staticProps) {
6971
7436
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
6972
7437
  return Constructor;
6973
7438
  }
6974
- function _extends$8() {
6975
- _extends$8 = Object.assign || function(target) {
7439
+ function _extends$9() {
7440
+ _extends$9 = Object.assign || function(target) {
6976
7441
  for(var i = 1; i < arguments.length; i++){
6977
7442
  var source = arguments[i];
6978
7443
  for(var key in source){
@@ -6983,9 +7448,9 @@ function _extends$8() {
6983
7448
  }
6984
7449
  return target;
6985
7450
  };
6986
- return _extends$8.apply(this, arguments);
7451
+ return _extends$9.apply(this, arguments);
6987
7452
  }
6988
- function _inherits$9(subClass, superClass) {
7453
+ function _inherits$a(subClass, superClass) {
6989
7454
  if (typeof superClass !== "function" && superClass !== null) {
6990
7455
  throw new TypeError("Super expression must either be null or a function");
6991
7456
  }
@@ -6996,14 +7461,14 @@ function _inherits$9(subClass, superClass) {
6996
7461
  configurable: true
6997
7462
  }
6998
7463
  });
6999
- if (superClass) _set_prototype_of$9(subClass, superClass);
7464
+ if (superClass) _set_prototype_of$a(subClass, superClass);
7000
7465
  }
7001
- function _set_prototype_of$9(o, p) {
7002
- _set_prototype_of$9 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7466
+ function _set_prototype_of$a(o, p) {
7467
+ _set_prototype_of$a = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7003
7468
  o.__proto__ = p;
7004
7469
  return o;
7005
7470
  };
7006
- return _set_prototype_of$9(o, p);
7471
+ return _set_prototype_of$a(o, p);
7007
7472
  }
7008
7473
  var SELECT_DEFAULT_OPTIONS = {
7009
7474
  fieldNames: {
@@ -7065,11 +7530,11 @@ var SELECT_DEFAULT_OPTIONS = {
7065
7530
  * }
7066
7531
  * ```
7067
7532
  */ var Select = /*#__PURE__*/ function(Control) {
7068
- _inherits$9(Select, Control);
7533
+ _inherits$a(Select, Control);
7069
7534
  function Select(options) {
7070
7535
  var _this;
7071
7536
  var _this__options_fieldNames, _this__picker_$body;
7072
- _this = Control.call(this, _extends$8({
7537
+ _this = Control.call(this, _extends$9({
7073
7538
  tagName: 'span',
7074
7539
  type: 'button',
7075
7540
  controlType: 'button'
@@ -7267,8 +7732,8 @@ function _assert_this_initialized$1(self) {
7267
7732
  }
7268
7733
  return self;
7269
7734
  }
7270
- function _extends$7() {
7271
- _extends$7 = Object.assign || function(target) {
7735
+ function _extends$8() {
7736
+ _extends$8 = Object.assign || function(target) {
7272
7737
  for(var i = 1; i < arguments.length; i++){
7273
7738
  var source = arguments[i];
7274
7739
  for(var key in source){
@@ -7279,9 +7744,9 @@ function _extends$7() {
7279
7744
  }
7280
7745
  return target;
7281
7746
  };
7282
- return _extends$7.apply(this, arguments);
7747
+ return _extends$8.apply(this, arguments);
7283
7748
  }
7284
- function _inherits$8(subClass, superClass) {
7749
+ function _inherits$9(subClass, superClass) {
7285
7750
  if (typeof superClass !== "function" && superClass !== null) {
7286
7751
  throw new TypeError("Super expression must either be null or a function");
7287
7752
  }
@@ -7292,14 +7757,14 @@ function _inherits$8(subClass, superClass) {
7292
7757
  configurable: true
7293
7758
  }
7294
7759
  });
7295
- if (superClass) _set_prototype_of$8(subClass, superClass);
7760
+ if (superClass) _set_prototype_of$9(subClass, superClass);
7296
7761
  }
7297
- function _set_prototype_of$8(o, p) {
7298
- _set_prototype_of$8 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7762
+ function _set_prototype_of$9(o, p) {
7763
+ _set_prototype_of$9 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7299
7764
  o.__proto__ = p;
7300
7765
  return o;
7301
7766
  };
7302
- return _set_prototype_of$8(o, p);
7767
+ return _set_prototype_of$9(o, p);
7303
7768
  }
7304
7769
  function _type_of(obj) {
7305
7770
  "@swc/helpers - typeof";
@@ -7349,12 +7814,12 @@ function __filter(list, locale) {
7349
7814
  *
7350
7815
  * @category Control
7351
7816
  */ var Definition = /*#__PURE__*/ function(Select) {
7352
- _inherits$8(Definition, Select);
7817
+ _inherits$9(Definition, Select);
7353
7818
  function Definition(options) {
7354
7819
  if (options === void 0) options = {};
7355
7820
  var _this;
7356
7821
  var _options_props, _options_props1, _options_locales_options_language;
7357
- _this = Select.call(this, _extends$7({}, DEFINITION_DEFAULT_OPTIONS, {
7822
+ _this = Select.call(this, _extends$8({}, DEFINITION_DEFAULT_OPTIONS, {
7358
7823
  value: (_options_props = options.props) == null ? void 0 : _options_props.videoLevel
7359
7824
  }, options, {
7360
7825
  fieldNames: {
@@ -7428,8 +7893,8 @@ function _assert_this_initialized(self) {
7428
7893
  }
7429
7894
  return self;
7430
7895
  }
7431
- function _extends$6() {
7432
- _extends$6 = Object.assign || function(target) {
7896
+ function _extends$7() {
7897
+ _extends$7 = Object.assign || function(target) {
7433
7898
  for(var i = 1; i < arguments.length; i++){
7434
7899
  var source = arguments[i];
7435
7900
  for(var key in source){
@@ -7440,9 +7905,9 @@ function _extends$6() {
7440
7905
  }
7441
7906
  return target;
7442
7907
  };
7443
- return _extends$6.apply(this, arguments);
7908
+ return _extends$7.apply(this, arguments);
7444
7909
  }
7445
- function _inherits$7(subClass, superClass) {
7910
+ function _inherits$8(subClass, superClass) {
7446
7911
  if (typeof superClass !== "function" && superClass !== null) {
7447
7912
  throw new TypeError("Super expression must either be null or a function");
7448
7913
  }
@@ -7453,14 +7918,14 @@ function _inherits$7(subClass, superClass) {
7453
7918
  configurable: true
7454
7919
  }
7455
7920
  });
7456
- if (superClass) _set_prototype_of$7(subClass, superClass);
7921
+ if (superClass) _set_prototype_of$8(subClass, superClass);
7457
7922
  }
7458
- function _set_prototype_of$7(o, p) {
7459
- _set_prototype_of$7 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7923
+ function _set_prototype_of$8(o, p) {
7924
+ _set_prototype_of$8 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7460
7925
  o.__proto__ = p;
7461
7926
  return o;
7462
7927
  };
7463
- return _set_prototype_of$7(o, p);
7928
+ return _set_prototype_of$8(o, p);
7464
7929
  }
7465
7930
  // 支持的倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
7466
7931
  var SUPPORT_SPEED = [
@@ -7494,11 +7959,11 @@ var SPEED_DEFAULT_OPTIONS = {
7494
7959
  * 2. 标准流不支持;
7495
7960
  * @category Control
7496
7961
  */ var Speed = /*#__PURE__*/ function(Select) {
7497
- _inherits$7(Speed, Select);
7962
+ _inherits$8(Speed, Select);
7498
7963
  function Speed(options) {
7499
7964
  var _this;
7500
7965
  var _options_locales_options_language, _options_locales;
7501
- _this = Select.call(this, _extends$6({}, SPEED_DEFAULT_OPTIONS, options, {
7966
+ _this = Select.call(this, _extends$7({}, SPEED_DEFAULT_OPTIONS, options, {
7502
7967
  value: (options.props.speed || 1) + '',
7503
7968
  classNameSuffix: 'speed',
7504
7969
  controlType: 'button',
@@ -7552,8 +8017,8 @@ var SPEED_DEFAULT_OPTIONS = {
7552
8017
  return Speed;
7553
8018
  }(Select);
7554
8019
 
7555
- function _extends$5() {
7556
- _extends$5 = Object.assign || function(target) {
8020
+ function _extends$6() {
8021
+ _extends$6 = Object.assign || function(target) {
7557
8022
  for(var i = 1; i < arguments.length; i++){
7558
8023
  var source = arguments[i];
7559
8024
  for(var key in source){
@@ -7564,9 +8029,9 @@ function _extends$5() {
7564
8029
  }
7565
8030
  return target;
7566
8031
  };
7567
- return _extends$5.apply(this, arguments);
8032
+ return _extends$6.apply(this, arguments);
7568
8033
  }
7569
- function _inherits$6(subClass, superClass) {
8034
+ function _inherits$7(subClass, superClass) {
7570
8035
  if (typeof superClass !== "function" && superClass !== null) {
7571
8036
  throw new TypeError("Super expression must either be null or a function");
7572
8037
  }
@@ -7577,24 +8042,24 @@ function _inherits$6(subClass, superClass) {
7577
8042
  configurable: true
7578
8043
  }
7579
8044
  });
7580
- if (superClass) _set_prototype_of$6(subClass, superClass);
8045
+ if (superClass) _set_prototype_of$7(subClass, superClass);
7581
8046
  }
7582
- function _set_prototype_of$6(o, p) {
7583
- _set_prototype_of$6 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8047
+ function _set_prototype_of$7(o, p) {
8048
+ _set_prototype_of$7 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7584
8049
  o.__proto__ = p;
7585
8050
  return o;
7586
8051
  };
7587
- return _set_prototype_of$6(o, p);
8052
+ return _set_prototype_of$7(o, p);
7588
8053
  }
7589
8054
  /**
7590
8055
  * 日历选择器控件
7591
8056
  * @category Control
7592
8057
  */ var DatePickerControl = /*#__PURE__*/ function(Control) {
7593
- _inherits$6(DatePickerControl, Control);
8058
+ _inherits$7(DatePickerControl, Control);
7594
8059
  function DatePickerControl(options) {
7595
8060
  var _this;
7596
8061
  var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
7597
- _this = Control.call(this, _extends$5({
8062
+ _this = Control.call(this, _extends$6({
7598
8063
  maxDate: new Date()
7599
8064
  }, options, {
7600
8065
  tagName: 'span',
@@ -7625,11 +8090,8 @@ function _set_prototype_of$6(o, p) {
7625
8090
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_CALENDAR
7626
8091
  });
7627
8092
  }
7628
- this.datePicker = new controlDatePicker.DatePicker(this.$container, {
8093
+ this.datePicker = new controlDatePicker.DatePicker(this.$container, _extends$6({
7629
8094
  isMobile: isMobile1,
7630
- getPopupContainer: function() {
7631
- return _this.$container;
7632
- },
7633
8095
  mode: 'date',
7634
8096
  offset: [
7635
8097
  0,
@@ -7642,6 +8104,11 @@ function _set_prototype_of$6(o, p) {
7642
8104
  triggerClose: true,
7643
8105
  disabledDate: function(date) {
7644
8106
  return date.getTime() > (_this.options.maxDate || new Date()).getTime();
8107
+ }
8108
+ }, this.options || {}, {
8109
+ // 不支持自定义
8110
+ getPopupContainer: function() {
8111
+ return _this.$container;
7645
8112
  },
7646
8113
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7647
8114
  onOk: function(date, _mode) {
@@ -7665,7 +8132,7 @@ function _set_prototype_of$6(o, p) {
7665
8132
  _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
7666
8133
  _this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
7667
8134
  }
7668
- });
8135
+ }));
7669
8136
  };
7670
8137
  /**
7671
8138
  * 设置日期, change = true 时触发 onChange 事件
@@ -7710,6 +8177,145 @@ function _set_prototype_of$6(o, p) {
7710
8177
  return DatePickerControl;
7711
8178
  }(Control);
7712
8179
 
8180
+ function _extends$5() {
8181
+ _extends$5 = Object.assign || function(target) {
8182
+ for(var i = 1; i < arguments.length; i++){
8183
+ var source = arguments[i];
8184
+ for(var key in source){
8185
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8186
+ target[key] = source[key];
8187
+ }
8188
+ }
8189
+ }
8190
+ return target;
8191
+ };
8192
+ return _extends$5.apply(this, arguments);
8193
+ }
8194
+ function _inherits$6(subClass, superClass) {
8195
+ if (typeof superClass !== "function" && superClass !== null) {
8196
+ throw new TypeError("Super expression must either be null or a function");
8197
+ }
8198
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8199
+ constructor: {
8200
+ value: subClass,
8201
+ writable: true,
8202
+ configurable: true
8203
+ }
8204
+ });
8205
+ if (superClass) _set_prototype_of$6(subClass, superClass);
8206
+ }
8207
+ function _set_prototype_of$6(o, p) {
8208
+ _set_prototype_of$6 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8209
+ o.__proto__ = p;
8210
+ return o;
8211
+ };
8212
+ return _set_prototype_of$6(o, p);
8213
+ }
8214
+ /** 时间格式 HH:mm:ss */ var TIME_FORMAT = 'HH:mm:ss';
8215
+ /**
8216
+ * 时间选择器控件
8217
+ * @category Control
8218
+ */ var TimePickerControl = /*#__PURE__*/ function(Control) {
8219
+ _inherits$6(TimePickerControl, Control);
8220
+ function TimePickerControl(options) {
8221
+ var _this;
8222
+ var _this_options_props_urlInfo_searchParams, _this_options_props_urlInfo, _this_options_props;
8223
+ _this = Control.call(this, _extends$5({}, options, {
8224
+ tagName: 'span',
8225
+ controlType: 'button',
8226
+ classNameSuffix: 'time'
8227
+ })) || this;
8228
+ _this.options = options;
8229
+ _this._value = utilsTools.DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || _this.options.current || new Date(), TIME_FORMAT);
8230
+ _this._render();
8231
+ return _this;
8232
+ }
8233
+ var _proto = TimePickerControl.prototype;
8234
+ _proto._render = function _render() {
8235
+ var _this = this;
8236
+ var _this_locale;
8237
+ utilsTools.isMobile();
8238
+ // if (isMobile1) {
8239
+ // this.$container.innerHTML = `
8240
+ // <span class="${PREFIX_CLASS}-mobile-date-filter" title="${(this.locale?.BTN_TIME || '') as string}">
8241
+ // <span class="${PREFIX_CLASS}-mobile-date-filter-value">${this._getTimeStr()}</span>
8242
+ // ${IconComponents.filter()}
8243
+ // <span>`;
8244
+ // } else {
8245
+ this.$container.innerHTML = IconComponents.time({
8246
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TIME
8247
+ });
8248
+ // }
8249
+ this.timePicker = new controlDatePicker.TimePicker(this.$container, _extends$5({
8250
+ showHeader: false,
8251
+ isMobile: false,
8252
+ offset: [
8253
+ 0,
8254
+ -10
8255
+ ],
8256
+ language: this.options.language === 'zh' ? 'zh' : 'en',
8257
+ current: this._value,
8258
+ placement: 'tr',
8259
+ triggerClose: true
8260
+ }, this.options || {}, {
8261
+ // 不支持自定义
8262
+ getPopupContainer: function() {
8263
+ return _this.$container;
8264
+ },
8265
+ onChange: function(time, _times) {
8266
+ if (time && _this._value !== time) {
8267
+ _this._value = time;
8268
+ _this.options.onChange == null ? void 0 : _this.options.onChange.call(_this.options, time, _times);
8269
+ _this.emit(EVENTS.control.timeChange, time);
8270
+ }
8271
+ },
8272
+ onOpenChange: function(open) {
8273
+ _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.timePicker.current);
8274
+ _this.emit(EVENTS.control.timePanelOpenChange, open, _this.timePicker.current);
8275
+ }
8276
+ }));
8277
+ };
8278
+ /**
8279
+ * 设置时间
8280
+ * @param time 设置的时间 HH:mm:ss
8281
+ */ _proto.setTime = function setTime(time) {
8282
+ var _this_timePicker;
8283
+ (_this_timePicker = this.timePicker) == null ? void 0 : _this_timePicker.setCurrent(time);
8284
+ if (time && this._value !== time) {
8285
+ this._value = time;
8286
+ var valueEl = this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value");
8287
+ if (valueEl) {
8288
+ valueEl.innerHTML = this._getTimeStr();
8289
+ }
8290
+ }
8291
+ };
8292
+ _proto.reset = function reset() {
8293
+ if (this.timePicker) this.timePicker.open = false;
8294
+ Control.prototype.reset.call(this);
8295
+ };
8296
+ /**
8297
+ * 销毁控件
8298
+ * @override
8299
+ */ _proto.destroy = function destroy() {
8300
+ if (this.timePicker) {
8301
+ this.timePicker.destroy();
8302
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
8303
+ this.timePicker = null;
8304
+ }
8305
+ Control.prototype.destroy.call(this);
8306
+ };
8307
+ _proto._getTimeStr = function _getTimeStr() {
8308
+ return this._value;
8309
+ };
8310
+ /**
8311
+ * 点击 Control 会触发
8312
+ * @overload super._onControlClick(e: Event)
8313
+ */ _proto._onControlClick = function _onControlClick(e) {
8314
+ Control.prototype._onControlClick.call(this, e);
8315
+ };
8316
+ return TimePickerControl;
8317
+ }(Control);
8318
+
7713
8319
  function _extends$4() {
7714
8320
  _extends$4 = Object.assign || function(target) {
7715
8321
  for(var i = 1; i < arguments.length; i++){
@@ -7755,9 +8361,16 @@ function _set_prototype_of$5(o, p) {
7755
8361
  tagName: 'div',
7756
8362
  controlType: 'block',
7757
8363
  classNameSuffix: 'time-line'
7758
- })) || this, _this._$add = null, _this._$reduce = null, _this._currentTime = 0, _this.records = [];
8364
+ })) || this, _this._$add = null, _this._$reduce = null, _this._$scaleWrapper = null, _this._currentTime = 0, _this.records = [];
7759
8365
  _this._currentTime = 0;
7760
- _this._options = options;
8366
+ _this._options = deepmerge.all([
8367
+ {
8368
+ showTimeWidthBtn: true
8369
+ },
8370
+ options
8371
+ ], {
8372
+ clone: false
8373
+ });
7761
8374
  _this.records = ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : _this__options_props.recordList) || [];
7762
8375
  _this._render();
7763
8376
  _this.on(EVENTS.setAllDayRecTimes, function(records) {
@@ -7782,11 +8395,19 @@ function _set_prototype_of$5(o, p) {
7782
8395
  var _this = this;
7783
8396
  var _this_timeLineUtil_updateTimeSections, _this_timeLineUtil;
7784
8397
  var _this__options_showTimeWidthBtn, _this__options_showCoverFold;
7785
- var _timeLineOptions = {
8398
+ var _timeLineOptions = _extends$4({
7786
8399
  language: this._options.language || 'zh',
7787
8400
  coverQuery: this._options.coverQuery || '',
7788
8401
  showTimeWidthBtn: (_this__options_showTimeWidthBtn = this._options.showTimeWidthBtn) != null ? _this__options_showTimeWidthBtn : true,
7789
8402
  showCoverFold: (_this__options_showCoverFold = this._options.showCoverFold) != null ? _this__options_showCoverFold : true,
8403
+ hoverTipPlacement: 'top'
8404
+ }, this._options || {}, {
8405
+ onClickSeek: function(date) {
8406
+ if (date == null ? void 0 : date.getTime()) {
8407
+ _this._options.onClickSeek == null ? void 0 : _this._options.onClickSeek.call(_this._options, date);
8408
+ _this.emit(EVENTS.control.timeLineChange, date);
8409
+ }
8410
+ },
7790
8411
  onChange: function(date) {
7791
8412
  if (_this._currentTime !== (date == null ? void 0 : date.getTime())) {
7792
8413
  _this._options.onChange == null ? void 0 : _this._options.onChange.call(_this._options, date);
@@ -7808,12 +8429,12 @@ function _set_prototype_of$5(o, p) {
7808
8429
  } catch (error) {
7809
8430
  }
7810
8431
  }
7811
- };
8432
+ });
7812
8433
  if (utilsTools.isMobile()) {
7813
8434
  this.timeLineUtil = new controlTimeLine.MobileTimeLine(this.$container, _timeLineOptions);
7814
8435
  } else {
7815
8436
  this.timeLineUtil = new controlTimeLine.TimeLine(this.$container, _timeLineOptions);
7816
- this._renderAddReduce();
8437
+ if (this._options.showTimeWidthBtn) this._renderAddReduce();
7817
8438
  }
7818
8439
  (_this_timeLineUtil = this.timeLineUtil) == null ? void 0 : (_this_timeLineUtil_updateTimeSections = _this_timeLineUtil.updateTimeSections) == null ? void 0 : _this_timeLineUtil_updateTimeSections.call(_this_timeLineUtil, this.records);
7819
8440
  this.timeLineUtil.update(new Date());
@@ -7824,7 +8445,7 @@ function _set_prototype_of$5(o, p) {
7824
8445
  _proto._renderAddReduce = function _renderAddReduce() {
7825
8446
  var _this = this;
7826
8447
  this._$add = document.createElement('span');
7827
- this._$add.classList.add("" + PREFIX_CLASS + "-time-line-scale-add");
8448
+ this._$add.classList.add("" + PREFIX_CLASS + "-time-line-zoom-add");
7828
8449
  this._$add.innerHTML = IconComponents.add();
7829
8450
  this._$add.addEventListener('click', function() {
7830
8451
  if (_this.timeLineUtil) {
@@ -7833,7 +8454,7 @@ function _set_prototype_of$5(o, p) {
7833
8454
  }
7834
8455
  });
7835
8456
  this._$reduce = document.createElement('span');
7836
- this._$reduce.classList.add("" + PREFIX_CLASS + "-time-line-scale-sub");
8457
+ this._$reduce.classList.add("" + PREFIX_CLASS + "-time-line-zoom-sub");
7837
8458
  this._$reduce.innerHTML = IconComponents.reduce();
7838
8459
  this._$reduce.addEventListener('click', function() {
7839
8460
  if (_this.timeLineUtil) {
@@ -7841,8 +8462,11 @@ function _set_prototype_of$5(o, p) {
7841
8462
  _this.timeLineUtil.setTimeWidth(currentScale - 1);
7842
8463
  }
7843
8464
  });
7844
- this.$container.appendChild(this._$add);
7845
- this.$container.appendChild(this._$reduce);
8465
+ this._$scaleWrapper = document.createElement('span');
8466
+ this._$scaleWrapper.classList.add("" + PREFIX_CLASS + "-time-line-zoom");
8467
+ this._$scaleWrapper.appendChild(this._$add);
8468
+ this._$scaleWrapper.appendChild(this._$reduce);
8469
+ this.$container.appendChild(this._$scaleWrapper);
7846
8470
  };
7847
8471
  _proto.destroy = function destroy() {
7848
8472
  if (this._$add) {
@@ -7853,6 +8477,10 @@ function _set_prototype_of$5(o, p) {
7853
8477
  this._$reduce.remove();
7854
8478
  this._$reduce = null;
7855
8479
  }
8480
+ if (this._$scaleWrapper) {
8481
+ this._$scaleWrapper.remove();
8482
+ this._$scaleWrapper = null;
8483
+ }
7856
8484
  if (this.timeLineUtil) {
7857
8485
  this.timeLineUtil.destroy();
7858
8486
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -7950,6 +8578,9 @@ var Controls = {
7950
8578
  talk: Talk,
7951
8579
  broadcast: Broadcast,
7952
8580
  aiChat: AIChat,
8581
+ live: Live,
8582
+ recDropdown: RecDropdown,
8583
+ alarmMessage: AlarmMessage,
7953
8584
  zoom: Zoom,
7954
8585
  definition: Definition,
7955
8586
  fullscreen: Fullscreen,
@@ -7957,6 +8588,7 @@ var Controls = {
7957
8588
  rec: Rec,
7958
8589
  speed: Speed,
7959
8590
  date: DatePickerControl,
8591
+ time: TimePickerControl,
7960
8592
  timeLine: TimeLineControl
7961
8593
  };
7962
8594
 
@@ -7992,17 +8624,25 @@ var RecFooter = /*#__PURE__*/ function(EventEmitter) {
7992
8624
  _this.$container = container;
7993
8625
  _this.$popupContainer = document.createElement('div');
7994
8626
  _this.$popupContainer.classList.add("" + PREFIX_CLASS + "-rec-footer");
7995
- if (_this.options.hasDatePicker) {
7996
- _this.$popupContainer.classList.add("" + PREFIX_CLASS + "-rec-footer-has-date-picker");
7997
- }
7998
8627
  _this.$container.appendChild(_this.$popupContainer);
7999
8628
  _this.$timeLineContainer = document.createElement('div');
8000
8629
  _this.$timeLineContainer.classList.add("" + PREFIX_CLASS + "-rec-footer-time-line");
8001
- if (_this.options.hasDatePicker) {
8630
+ if (_this.options.hasDatePicker || _this.options.hasTimePicker) {
8002
8631
  _this.$popupContainer.appendChild(_this.$timeLineContainer);
8632
+ // 右侧容器: 放置时间选择器和日期选择器
8633
+ _this.$rightContainer = document.createElement('div');
8634
+ _this.$rightContainer.classList.add("" + PREFIX_CLASS + "-rec-footer-right");
8635
+ _this.$popupContainer.appendChild(_this.$rightContainer);
8636
+ }
8637
+ if (_this.options.hasTimePicker) {
8638
+ _this.$timePickerContainer = document.createElement('div');
8639
+ _this.$timePickerContainer.classList.add("" + PREFIX_CLASS + "-rec-footer-btn", "" + PREFIX_CLASS + "-rec-footer-time-picker");
8640
+ _this.$rightContainer.appendChild(_this.$timePickerContainer);
8641
+ }
8642
+ if (_this.options.hasDatePicker) {
8003
8643
  _this.$datePickerContainer = document.createElement('div');
8004
- _this.$datePickerContainer.classList.add("" + PREFIX_CLASS + "-rec-footer-date-picker");
8005
- _this.$popupContainer.appendChild(_this.$datePickerContainer);
8644
+ _this.$datePickerContainer.classList.add("" + PREFIX_CLASS + "-rec-footer-btn", "" + PREFIX_CLASS + "-rec-footer-date-picker");
8645
+ _this.$rightContainer.appendChild(_this.$datePickerContainer);
8006
8646
  }
8007
8647
  _this.$popupContainer.addEventListener('dblclick', function(e) {
8008
8648
  e.preventDefault();
@@ -8016,6 +8656,14 @@ var RecFooter = /*#__PURE__*/ function(EventEmitter) {
8016
8656
  this.$datePickerContainer.remove();
8017
8657
  this.$datePickerContainer = null;
8018
8658
  }
8659
+ if (this.$timePickerContainer) {
8660
+ this.$timePickerContainer.remove();
8661
+ this.$timePickerContainer = null;
8662
+ }
8663
+ if (this.$rightContainer) {
8664
+ this.$rightContainer.remove();
8665
+ this.$rightContainer = null;
8666
+ }
8019
8667
  if (this.$timeLineContainer) {
8020
8668
  var _this_$timeLineContainer_remove, _this_$timeLineContainer;
8021
8669
  (_this_$timeLineContainer = this.$timeLineContainer) == null ? void 0 : (_this_$timeLineContainer_remove = _this_$timeLineContainer.remove) == null ? void 0 : _this_$timeLineContainer_remove.call(_this_$timeLineContainer);
@@ -8483,7 +9131,10 @@ function _ts_generator$1(thisArg, body) {
8483
9131
  // 需要权限的控件
8484
9132
  var AUTH_KEY = [
8485
9133
  'ptz',
8486
- 'aiChat'
9134
+ 'aiChat',
9135
+ 'live',
9136
+ 'recDropdown',
9137
+ 'alarmMessage'
8487
9138
  ];
8488
9139
  /**
8489
9140
  * 渲染控件
@@ -8563,7 +9214,7 @@ function _renderControls(theme, $container, btnList, props) {
8563
9214
  }
8564
9215
  function _renderTheme(theme, data) {
8565
9216
  return _async_to_generator$1(function() {
8566
- var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
9217
+ 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, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_controls2, _theme_options_mobileExtendOptions4, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions5, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1, _theme_options;
8567
9218
  return _ts_generator$1(this, function(_state) {
8568
9219
  switch(_state.label){
8569
9220
  case 0:
@@ -8704,13 +9355,14 @@ function _renderTheme(theme, data) {
8704
9355
  list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
8705
9356
  // FIXME: 这个逻辑实际上是有问题的
8706
9357
  _needTimeLine = list.some(function(item) {
8707
- return REC_GROUP.includes(item.iconId);
8708
- });
9358
+ return REC_GROUP.includes(item.iconId) || item.iconId === 'recDropdown';
9359
+ }) && ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.type) === 'rec';
8709
9360
  theme.$container.classList.remove("" + PREFIX_CLASS + "-has-time-line");
8710
9361
  // PC 单独渲染timeLine
8711
9362
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
8712
9363
  theme._recFooter = new RecFooter(theme.$container, {
8713
- hasDatePicker: theme.options.dateOptions !== null
9364
+ hasDatePicker: theme.options.dateOptions !== null,
9365
+ hasTimePicker: theme.options.timeOptions !== null
8714
9366
  });
8715
9367
  //
8716
9368
  _renderTimeLine(theme, theme._recFooter.$timeLineContainer, props);
@@ -8721,6 +9373,9 @@ function _renderTheme(theme, data) {
8721
9373
  if (theme.options.dateOptions !== null) {
8722
9374
  _renderDatePicker(theme, theme._recFooter.$datePickerContainer, props);
8723
9375
  }
9376
+ if (theme.options.timeOptions !== null) {
9377
+ _renderTimePicker(theme, theme._recFooter.$timePickerContainer, props);
9378
+ }
8724
9379
  }
8725
9380
  // 移动端扩展
8726
9381
  if (Utils.isMobile && ((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.length)) {
@@ -8732,22 +9387,46 @@ function _renderTheme(theme, data) {
8732
9387
  if (theme.options.dateOptions !== null && ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions1.controls.includes('date')) && _needTimeLine) {
8733
9388
  _renderDatePicker(theme, theme._mobileExtend.$topLeft, props);
8734
9389
  }
8735
- if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
9390
+ if (theme.options.timeOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('time')) && _needTimeLine) {
9391
+ _renderTimePicker(theme, theme._mobileExtend.$topLeft, props);
9392
+ }
9393
+ if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('rec')) && _needTimeLine) {
8736
9394
  [].concat(((_filterThemeData_header1 = filterThemeData.header) == null ? void 0 : _filterThemeData_header1.btnList) || [], (_filterThemeData_footer_btnList1 = (_filterThemeData_footer1 = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer1.btnList) != null ? _filterThemeData_footer_btnList1 : []).forEach(function(item) {
8737
9395
  var _theme__mobileExtend;
8738
9396
  if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
8739
9397
  });
8740
9398
  }
8741
- if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
9399
+ // 移动端:在 rec 控件旁渲染 alarmMessage 按钮
9400
+ if (theme.options.alarmMessageOptions !== null && !((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['alarmMessageControl'])) {
9401
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9402
+ theme.controls['alarmMessageControl'] = new Controls['alarmMessage'](_extends$1({
9403
+ rootContainer: theme.$container,
9404
+ getPopupContainer: function() {
9405
+ var _theme__mobileExtend;
9406
+ return (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight;
9407
+ },
9408
+ language: theme.options.language || 'zh',
9409
+ locales: theme.i18n.translations,
9410
+ sdkType: theme.options.sdkType,
9411
+ urlInfo: theme.urlInfo
9412
+ }, ((_theme_options = theme.options) == null ? void 0 : _theme_options.alarmMessageOptions) || {}, {
9413
+ props: props
9414
+ }));
9415
+ }
9416
+ if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions4 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions4.controls.includes('timeLine')) && _needTimeLine) {
8742
9417
  _renderTimeLine(theme, theme._mobileExtend.$content, props);
8743
9418
  }
8744
- if (Utils.isMobile && ((_theme_options_mobileExtendOptions4 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls1 = _theme_options_mobileExtendOptions4.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls1.includes('ptz')) && hasPtz && theme.controls.ptzControl) {
9419
+ if (Utils.isMobile && ((_theme_options_mobileExtendOptions5 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls1 = _theme_options_mobileExtendOptions5.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls1.includes('ptz')) && hasPtz && theme.controls.ptzControl) {
8745
9420
  theme.controls.ptzControl.renderMobileExtend(theme._mobileExtend.$content);
8746
9421
  }
8747
9422
  }
8748
9423
  }
8749
9424
  theme.emit(EVENTS.control.mountedControls);
8750
9425
  if (!theme.playing) theme._disabled(true);
9426
+ // 同步 loading 状态(修复:_loadingControl 创建前设置的 loading=true 不生效的问题)
9427
+ if (theme._loading && theme._loadingControl) {
9428
+ theme._loadingControl.show();
9429
+ }
8751
9430
  _controlEventemitter(theme);
8752
9431
  return [
8753
9432
  2
@@ -8789,6 +9468,22 @@ var _renderDatePicker = function(theme, container, props) {
8789
9468
  }));
8790
9469
  }
8791
9470
  };
9471
+ var _renderTimePicker = function(theme, container, props) {
9472
+ if (props === void 0) props = {};
9473
+ if (!theme.controls.timeControl && theme.options.timeOptions !== null) {
9474
+ var _theme_options;
9475
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
9476
+ theme.controls.timeControl = new Controls['time'](_extends$1({
9477
+ getPopupContainer: function() {
9478
+ return container;
9479
+ },
9480
+ language: theme.options.language,
9481
+ locales: theme.i18n.translations
9482
+ }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["timeOptions"]) || {}, {
9483
+ props: props
9484
+ }));
9485
+ }
9486
+ };
8792
9487
  var _renderRecType = function(theme, container, recType, props) {
8793
9488
  if (props === void 0) props = {};
8794
9489
  var _theme_controls, _theme_controls1, _theme_controls2;
@@ -9601,7 +10296,9 @@ var THEME_DEFAULT_OPTIONS = {
9601
10296
  _this._width = width;
9602
10297
  _this._height = height;
9603
10298
  if ((_this_controls = _this.controls) == null ? void 0 : _this_controls.timeLineControl) {
9604
- _this.controls.timeLineControl.setWidth(width - 20 - DATE_PICKER_ICON_WIDTH);
10299
+ var _this_$container_querySelector;
10300
+ var rcFooterRightWidth = ((_this_$container_querySelector = _this.$container.querySelector("." + PREFIX_CLASS + "-rec-footer-right")) == null ? void 0 : _this_$container_querySelector.clientWidth) || 0;
10301
+ _this.controls.timeLineControl.setWidth(width - rcFooterRightWidth);
9605
10302
  }
9606
10303
  // header 和 footer 使用防抖去实现, 避免频繁触发,
9607
10304
  _this._headerMoreControlShow();
@@ -10355,7 +11052,7 @@ var THEME_DEFAULT_OPTIONS = {
10355
11052
  zh: zh,
10356
11053
  en: en
10357
11054
  };
10358
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.0.2-beta.1';
11055
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.0-beta.1';
10359
11056
 
10360
11057
  exports.Control = Control;
10361
11058
  exports.EVENTS = EVENTS;