@ezuikit/player-theme 3.1.5-beta.2 → 3.1.5-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v3.1.5-beta.2
3
- * Copyright (c) 2026-09-04 02:44:28 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.1.5-beta.4
3
+ * Copyright (c) 2026-09-15 13:35:29 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import EventEmitter from 'eventemitter3';
@@ -18,8 +18,8 @@ import { DatePicker, TimePicker } from '@ezuikit/control-date-picker';
18
18
  import { MobileTimeLine, TimeLine } from '@ezuikit/control-time-line';
19
19
  import SegmentProgress from '@ezuikit/control-segment-progress';
20
20
 
21
- /**
22
- * 播放器的类名前缀
21
+ /**
22
+ * 播放器的类名前缀
23
23
  */ var PREFIX_CLASS = 'ezplayer';
24
24
  /** 填充模式 */ var THEME_SCALE_MODE_TYPE = {
25
25
  /** 画面完全填充canvas区域,画面会被拉伸 */ full: 0,
@@ -51,32 +51,32 @@ var THEME_PROPS = [
51
51
  // 播放区间(片段分享)。通过 props 下发而不是靠事件,避免主题异步渲染时错过初始化事件
52
52
  'playbackRange'
53
53
  ];
54
- /**
55
- * 当移动端 picker 控件打开时需要关闭动画(定时器)
54
+ /**
55
+ * 当移动端 picker 控件打开时需要关闭动画(定时器)
56
56
  */ var CLEAR_TIMER_HEADER_FOOTER_ANIMATION = 'CLEAR_TIMER_HEADER_FOOTER_ANIMATION';
57
- /**
58
- * 'rec', 'cloudRec', 'cloudRecord' 是一个组,并且要在头部(移动端特殊处理)
59
- *
60
- * | rec | cloudRec | cloudRecord |
61
- * |:---------------------:|:------------:|:---------------:|
62
- * | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
57
+ /**
58
+ * 'rec', 'cloudRec', 'cloudRecord' 是一个组,并且要在头部(移动端特殊处理)
59
+ *
60
+ * | rec | cloudRec | cloudRecord |
61
+ * |:---------------------:|:------------:|:---------------:|
62
+ * | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
63
63
  */ var REC_GROUP = [
64
64
  'rec',
65
65
  'cloudRec',
66
66
  'cloudRecord'
67
67
  ];
68
- /**
69
- * 设备信息
70
- *
71
- * | deviceID | deviceName |
72
- * |:-------------------:|:-------------:|
73
- * | 设备ID(唯一标识) | 设备名称 |
68
+ /**
69
+ * 设备信息
70
+ *
71
+ * | deviceID | deviceName |
72
+ * |:-------------------:|:-------------:|
73
+ * | 设备ID(唯一标识) | 设备名称 |
74
74
  */ var DEVICE_INFO_GROUP = [
75
75
  'deviceID',
76
76
  'deviceName'
77
77
  ];
78
- /**
79
- * 暂停时能禁用的控件按钮
78
+ /**
79
+ * 暂停时能禁用的控件按钮
80
80
  */ var PAUSE_DISABLED_BTN = [
81
81
  'capturePicture',
82
82
  'volume',
@@ -87,9 +87,9 @@ var THEME_PROPS = [
87
87
  'speed',
88
88
  'globalFullscreen'
89
89
  ];
90
- /**
91
- * 移动端可以扩展的控件
92
- * ['ptz', 'talk', 'record', 'capturePicture', 'timeLine', 'rec', 'date'];
90
+ /**
91
+ * 移动端可以扩展的控件
92
+ * ['ptz', 'talk', 'record', 'capturePicture', 'timeLine', 'rec', 'date'];
93
93
  */ var MOBILE_EXTENDS = [
94
94
  'ptz',
95
95
  'timeLine',
@@ -97,25 +97,25 @@ var THEME_PROPS = [
97
97
  'date',
98
98
  'segmentProgress'
99
99
  ];
100
- /**
101
- *
102
- * 事件名
103
- *
104
- * --------------- ------------------
105
- * - - theme.emit(EVENTS.xxxxx) - -
106
- * - - -------------------------------------> - -
107
- * - - - -
108
- * - Theme - - Controls -
109
- * - - control.emit(EVENTS.control.xxx) - -
110
- * - - <-------------------------------------- - -
111
- * --------------- ------------------
112
- *
113
- * @example
114
- * ```ts
115
- * theme.on(EVENTS.loading)
116
- * theme.on(EVENTS.loading)
117
- * ```
118
- *
100
+ /**
101
+ *
102
+ * 事件名
103
+ *
104
+ * --------------- ------------------
105
+ * - - theme.emit(EVENTS.xxxxx) - -
106
+ * - - -------------------------------------> - -
107
+ * - - - -
108
+ * - Theme - - Controls -
109
+ * - - control.emit(EVENTS.control.xxx) - -
110
+ * - - <-------------------------------------- - -
111
+ * --------------- ------------------
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * theme.on(EVENTS.loading)
116
+ * theme.on(EVENTS.loading)
117
+ * ```
118
+ *
119
119
  */ // 事件命名不要超过两层
120
120
  var EVENTS = {
121
121
  loading: 'loading',
@@ -130,11 +130,11 @@ var EVENTS = {
130
130
  /** 首帧 */ firstFrameDisplay: 'firstFrameDisplay',
131
131
  /** 全屏 */ fullscreen: 'fullscreen',
132
132
  /** 退出全屏 */ exitFullscreen: 'exitFullscreen',
133
- /**
134
- * 全屏变化(移动端也支持触发, 不过移动端是模拟的web全屏 即旋转 180度)
135
- * 当 isCurrentFullscreen 为 true 时,表示当前容器全局全屏状态
136
- *
137
- * 注意:同一个页面中只要有全屏的操作或取消全屏的操作,都会触发该事件 (移动端除外)
133
+ /**
134
+ * 全屏变化(移动端也支持触发, 不过移动端是模拟的web全屏 即旋转 180度)
135
+ * 当 isCurrentFullscreen 为 true 时,表示当前容器全局全屏状态
136
+ *
137
+ * 注意:同一个页面中只要有全屏的操作或取消全屏的操作,都会触发该事件 (移动端除外)
138
138
  */ fullscreenChange: 'fullscreenChange',
139
139
  /** 重置容器尺寸 */ resize: 'resize',
140
140
  /** 屏幕旋转方向变化 */ orientationChange: 'orientationChange',
@@ -161,8 +161,8 @@ var EVENTS = {
161
161
  setAllDayRecTimes: 'setAllDayRecTimes',
162
162
  getOSDTime: 'getOSDTime',
163
163
  /** 播放区间播放结束(SDK 层 playbackRange 特性) */ playbackEnd: 'playbackEnd',
164
- /**
165
- * 控件相关
164
+ /**
165
+ * 控件相关
166
166
  */ control: {
167
167
  /** 点击播放播放/暂停按钮 */ play: 'Control.play',
168
168
  /** 播放控件销毁 */ playDestroy: 'Control.playDestroy',
@@ -233,8 +233,8 @@ var EVENTS = {
233
233
  /** 播放器内容区域销毁 */ contentDestroy: 'Control.contentDestroy',
234
234
  /** 播放器内容区域重新渲染 */ contentRerender: 'Control.contentRerender'
235
235
  },
236
- /**
237
- * 主题控件相关
236
+ /**
237
+ * 主题控件相关
238
238
  */ theme: {
239
239
  /** 销毁前 */ beforeDestroy: 'Theme.beforeDestroy',
240
240
  /** 销毁后 */ destroyed: 'Theme.destroyed',
@@ -282,17 +282,17 @@ function _set_prototype_of$z(o, p) {
282
282
  };
283
283
  return _set_prototype_of$z(o, p);
284
284
  }
285
- /**
286
- * 控件基类
287
- * @category Control
288
- * @example
289
- * ```ts
290
- * // 创建控件
291
- * class MyControl extends Control {}
292
- *
293
- * // 使用控件
294
- * const myControl = new MyControl({})
295
- * ```
285
+ /**
286
+ * 控件基类
287
+ * @category Control
288
+ * @example
289
+ * ```ts
290
+ * // 创建控件
291
+ * class MyControl extends Control {}
292
+ *
293
+ * // 使用控件
294
+ * const myControl = new MyControl({})
295
+ * ```
296
296
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
297
297
  _inherits$z(Control, EventEmitter);
298
298
  function Control(options) {
@@ -334,22 +334,22 @@ function _set_prototype_of$z(o, p) {
334
334
  return _this;
335
335
  }
336
336
  var _proto = Control.prototype;
337
- /**
338
- * 重置整个控件
337
+ /**
338
+ * 重置整个控件
339
339
  */ _proto.reset = function reset(hide) {
340
340
  if (this._camelCaseName) {
341
341
  this.emit("Control." + this._camelCaseName + "Reset", hide);
342
342
  }
343
343
  };
344
- /**
345
- * 重置控件挂载节点
346
- * @param popupContainer 重新挂载的节点
347
- * @param append 添加的方式, 默认 append
348
- * @param element 当 append = before 时 需要 element, 插入 element 前
349
- *
350
- * | prepend | append |
351
- * |:-------------:|:---------------:|
352
- * | 插入第一个位置 | 追加在末尾 |
344
+ /**
345
+ * 重置控件挂载节点
346
+ * @param popupContainer 重新挂载的节点
347
+ * @param append 添加的方式, 默认 append
348
+ * @param element 当 append = before 时 需要 element, 插入 element 前
349
+ *
350
+ * | prepend | append |
351
+ * |:-------------:|:---------------:|
352
+ * | 插入第一个位置 | 追加在末尾 |
353
353
  */ _proto.resetPopupContainer = function resetPopupContainer(popupContainer, append, element) {
354
354
  if (popupContainer !== this.$popupContainer) {
355
355
  if (this.$popupContainer.contains(this.$container)) {
@@ -371,16 +371,16 @@ function _set_prototype_of$z(o, p) {
371
371
  }
372
372
  }
373
373
  };
374
- /**
375
- * 隐藏整个控件
374
+ /**
375
+ * 隐藏整个控件
376
376
  */ _proto.hide = function hide() {
377
377
  if (this.$container) {
378
378
  this.$container.style.display = 'none';
379
379
  this.$container.classList.add("" + PREFIX_CLASS + "-hide");
380
380
  }
381
381
  };
382
- /**
383
- * 销毁控件
382
+ /**
383
+ * 销毁控件
384
384
  */ _proto.destroy = function destroy() {
385
385
  var _this___options, _this_$container_remove, _this_$container;
386
386
  if (this._camelCaseName) {
@@ -417,8 +417,8 @@ function _set_prototype_of$z(o, p) {
417
417
  (_this_$container1 = this.$container) == null ? void 0 : _this_$container1.classList.remove("" + PREFIX_CLASS + "-active");
418
418
  }
419
419
  };
420
- /**
421
- * 当点击 Control 时 触发子类的 _onControlClick
420
+ /**
421
+ * 当点击 Control 时 触发子类的 _onControlClick
422
422
  */ _proto._onClick = function _onClick() {
423
423
  var _this = this;
424
424
  // 使用具名 handler 便于在 destroy 时精确移除,避免匿名监听残留
@@ -436,10 +436,10 @@ function _set_prototype_of$z(o, p) {
436
436
  e.stopPropagation();
437
437
  e.preventDefault();
438
438
  };
439
- /**
440
- * 点击 Control 控件触发
441
- * @param {Event} e
442
- * @returns {void}
439
+ /**
440
+ * 点击 Control 控件触发
441
+ * @param {Event} e
442
+ * @returns {void}
443
443
  */ _proto._onControlClick = function _onControlClick(e) {
444
444
  // 这是一个空函数, 子类可以实现重新改方法
445
445
  this.__options.onClick == null ? void 0 : this.__options.onClick.call(this.__options, e);
@@ -447,8 +447,8 @@ function _set_prototype_of$z(o, p) {
447
447
  _create_class$9(Control, [
448
448
  {
449
449
  key: "active",
450
- get: /**
451
- * 是否激活
450
+ get: /**
451
+ * 是否激活
452
452
  */ function get() {
453
453
  return this._active;
454
454
  },
@@ -463,8 +463,8 @@ function _set_prototype_of$z(o, p) {
463
463
  },
464
464
  {
465
465
  key: "disabled",
466
- get: /**
467
- * 是否禁用
466
+ get: /**
467
+ * 是否禁用
468
468
  */ function get() {
469
469
  return this._disabled;
470
470
  },
@@ -508,9 +508,9 @@ function _set_prototype_of$y(o, p) {
508
508
  return _set_prototype_of$y(o, p);
509
509
  }
510
510
  var LOADING_DEFAULT_OPTIONS = {};
511
- /**
512
- * 加载动画控件
513
- * @category Control
511
+ /**
512
+ * 加载动画控件
513
+ * @category Control
514
514
  */ var Loading = /*#__PURE__*/ function(Control) {
515
515
  _inherits$y(Loading, Control);
516
516
  function Loading(options) {
@@ -535,9 +535,9 @@ var LOADING_DEFAULT_OPTIONS = {};
535
535
  this.$container.innerHTML = '\n <span class="' + PREFIX_CLASS + "-loading-dot " + PREFIX_CLASS + '-loading-dot-load">\n <i class="' + PREFIX_CLASS + '-loading-dot-item"></i>\n <i class="' + PREFIX_CLASS + '-loading-dot-item"></i>\n <i class="' + PREFIX_CLASS + '-loading-dot-item"></i>\n <i class="' + PREFIX_CLASS + '-loading-dot-item"></i>\n </span>\n <div class="' + PREFIX_CLASS + '-loading-text">' + (((_this_locale = this.locale) == null ? void 0 : _this_locale.LOADING) || 'loading...') + "</div>\n ";
536
536
  }
537
537
  };
538
- /**
539
- * 动画展示
540
- * @param html 自定义动画内容, 如果不存在则使用默认动画
538
+ /**
539
+ * 动画展示
540
+ * @param html 自定义动画内容, 如果不存在则使用默认动画
541
541
  */ _proto.show = function show(html) {
542
542
  if (html) this.$container.innerHTML = html;
543
543
  // 初始化, 出流再等待中(回放出流结束不包括)
@@ -545,8 +545,8 @@ var LOADING_DEFAULT_OPTIONS = {};
545
545
  this.$container.classList.remove("" + PREFIX_CLASS + "-hide");
546
546
  this.$popupContainer.classList.add("" + PREFIX_CLASS + "-has-loading");
547
547
  };
548
- /**
549
- * 隐藏动画
548
+ /**
549
+ * 隐藏动画
550
550
  */ _proto.hide = function hide() {
551
551
  Control.prototype.hide.call(this);
552
552
  this.$popupContainer.classList.remove("" + PREFIX_CLASS + "-has-loading");
@@ -590,9 +590,9 @@ var DEFAULT_POSTER = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29
590
590
  var POSTER_OPTIONS = {
591
591
  poster: DEFAULT_POSTER
592
592
  };
593
- /**
594
- * 封面控件
595
- * @category Control
593
+ /**
594
+ * 封面控件
595
+ * @category Control
596
596
  */ var Poster = /*#__PURE__*/ function(Control) {
597
597
  _inherits$x(Poster, Control);
598
598
  function Poster(options) {
@@ -612,18 +612,18 @@ var POSTER_OPTIONS = {
612
612
  return _this;
613
613
  }
614
614
  var _proto = Poster.prototype;
615
- /**
616
- * 封面图片加载失败
617
- * @param error
615
+ /**
616
+ * 封面图片加载失败
617
+ * @param error
618
618
  */ _proto._imgLoadErrorEvent = function _imgLoadErrorEvent(error) {
619
619
  var _error_target;
620
620
  // 封面加载失败, 一般只有自定义封面会出现这种情况
621
621
  // 这里不做img src重置处理 防止无限循环
622
622
  this._options.onLoadImgError == null ? void 0 : this._options.onLoadImgError.call(this._options, ((_error_target = error.target) == null ? void 0 : _error_target.getAttribute('src')) || '');
623
623
  };
624
- /**
625
- * 设置封面 这里不对 poster 进行缓存,如果有值优先使用,如果没有值优先使用 初始化传入的值
626
- * @param {string} poster 封面地址或 base64 数据
624
+ /**
625
+ * 设置封面 这里不对 poster 进行缓存,如果有值优先使用,如果没有值优先使用 初始化传入的值
626
+ * @param {string} poster 封面地址或 base64 数据
627
627
  */ _proto.setPoster = function setPoster(poster) {
628
628
  var // eslint-disable-next-line @typescript-eslint/unbound-method
629
629
  // prettier-ignore
@@ -636,24 +636,24 @@ var POSTER_OPTIONS = {
636
636
  this.$container.innerHTML = '<img class="' + PREFIX_CLASS + '-poster-img" src="' + poster + '" />';
637
637
  (_this_$container_querySelector = this.$container.querySelector("." + PREFIX_CLASS + "-poster-img")) == null ? void 0 : _this_$container_querySelector.addEventListener("error", this._imgLoadErrorEvent);
638
638
  };
639
- /**
640
- * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
639
+ /**
640
+ * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
641
641
  */ _proto.show = function show() {
642
642
  if (this.$container) {
643
643
  this.$container.style.display = 'flex';
644
644
  this.$container.classList.remove("" + PREFIX_CLASS + "-hide");
645
645
  }
646
646
  };
647
- /**
648
- * 隐藏封面
647
+ /**
648
+ * 隐藏封面
649
649
  */ _proto.hide = function hide() {
650
650
  var // eslint-disable-next-line @typescript-eslint/unbound-method
651
651
  _this_$container_querySelector, _this_$container;
652
652
  Control.prototype.hide.call(this);
653
653
  (_this_$container = this.$container) == null ? void 0 : (_this_$container_querySelector = _this_$container.querySelector("." + PREFIX_CLASS + "-poster-img")) == null ? void 0 : _this_$container_querySelector.removeEventListener('error', this._imgLoadErrorEvent);
654
654
  };
655
- /**
656
- * 销毁
655
+ /**
656
+ * 销毁
657
657
  */ _proto.destroy = function destroy() {
658
658
  this.hide();
659
659
  Control.prototype.destroy.call(this);
@@ -712,15 +712,15 @@ var Icons = {
712
712
  list: '<svg stroke="currentColor" fill="none" width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="list">\n <path d="M10.9995 5H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.9995 12H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10.9995 19H21.0005" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 5C6.99951 3.896 6.10351 3 4.99951 3C3.89551 3 2.99951 3.896 2.99951 5C2.99951 6.105 3.89551 7 4.99951 7C6.10351 7 6.99951 6.105 6.99951 5V5Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 12C6.99951 10.896 6.10351 10 4.99951 10C3.89551 10 2.99951 10.896 2.99951 12C2.99951 13.105 3.89551 14 4.99951 14C6.10351 14 6.99951 13.105 6.99951 12V12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 12C6.99951 10.896 6.10351 10 4.99951 10C3.89551 10 2.99951 10.896 2.99951 12C2.99951 13.105 3.89551 14 4.99951 14C6.10351 14 6.99951 13.105 6.99951 12V12Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M6.99951 19C6.99951 17.896 6.10351 17 4.99951 17C3.89551 17 2.99951 17.896 2.99951 19C2.99951 20.105 3.89551 21 4.99951 21C6.10351 21 6.99951 20.105 6.99951 19V19Z" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'
713
713
  };
714
714
 
715
- /**
716
- * 创建 icon 组件
717
- * @param svg - svg 字符串
718
- * @param type - icon 类型
719
- * @returns icon 组件
720
- * @example
721
- * ```ts
722
- * createIcon('<svg>....</svg>', 'logo') // <span class="ezplayer-icon ezplayer-icon-logo"><svg>....</svg></span>
723
- * ```
715
+ /**
716
+ * 创建 icon 组件
717
+ * @param svg - svg 字符串
718
+ * @param type - icon 类型
719
+ * @returns icon 组件
720
+ * @example
721
+ * ```ts
722
+ * createIcon('<svg>....</svg>', 'logo') // <span class="ezplayer-icon ezplayer-icon-logo"><svg>....</svg></span>
723
+ * ```
724
724
  */ function createIcon(svg, type, attr) {
725
725
  if (attr === void 0) attr = {};
726
726
  var attrStr = '';
@@ -921,9 +921,9 @@ function _set_prototype_of$w(o, p) {
921
921
  return _set_prototype_of$w(o, p);
922
922
  }
923
923
  var MESSAGE_DEFAULT_OPTIONS = {};
924
- /**
925
- * 消息控件
926
- * @category Control
924
+ /**
925
+ * 消息控件
926
+ * @category Control
927
927
  */ var Message = /*#__PURE__*/ function(Control) {
928
928
  _inherits$w(Message, Control);
929
929
  function Message(options) {
@@ -938,34 +938,34 @@ var MESSAGE_DEFAULT_OPTIONS = {};
938
938
  return _this;
939
939
  }
940
940
  var _proto = Message.prototype;
941
- /**
942
- * info 普通消息, 内容默认字体白色
943
- * @param {string} msg 消息内容
944
- * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
941
+ /**
942
+ * info 普通消息, 内容默认字体白色
943
+ * @param {string} msg 消息内容
944
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
945
945
  */ _proto.info = function info(msg, duration) {
946
946
  if (duration === void 0) duration = 2;
947
947
  this._toast(msg, 'info', duration);
948
948
  };
949
- /**
950
- * warn 警告消息, 内容默认字体黄色
951
- * @param {string} msg 消息内容
952
- * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
949
+ /**
950
+ * warn 警告消息, 内容默认字体黄色
951
+ * @param {string} msg 消息内容
952
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
953
953
  */ _proto.warn = function warn(msg, duration) {
954
954
  if (duration === void 0) duration = 2;
955
955
  this._toast(msg, 'warn', duration);
956
956
  };
957
- /**
958
- * toast 错误消息(渲染在 rootContainer 上的浮层)
959
- * @param {string} msg 消息内容
960
- * @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
957
+ /**
958
+ * toast 错误消息(渲染在 rootContainer 上的浮层)
959
+ * @param {string} msg 消息内容
960
+ * @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
961
961
  */ _proto.toastError = function toastError(msg, duration) {
962
962
  if (duration === void 0) duration = 2;
963
963
  this._toast(msg, 'error', duration);
964
964
  };
965
- /**
966
- * error 错误消息, 内容默认字体红色
967
- * @param {string} msg 消息内容
968
- * @param {number=} duration 认自动关闭延时,单位秒, 默认 0 不关闭, 需手动 调用 hide()
965
+ /**
966
+ * error 错误消息, 内容默认字体红色
967
+ * @param {string} msg 消息内容
968
+ * @param {number=} duration 认自动关闭延时,单位秒, 默认 0 不关闭, 需手动 调用 hide()
969
969
  */ _proto.error = function error(msg, duration) {
970
970
  if (duration === void 0) duration = 0;
971
971
  this._show(this._getIcon('error') + '<div class="' + PREFIX_CLASS + '-message-msg">' + (msg || '') + "</div>", duration, 'error');
@@ -994,11 +994,11 @@ var MESSAGE_DEFAULT_OPTIONS = {};
994
994
  }
995
995
  }
996
996
  };
997
- /**
998
- * 展示消息,如果同时调用多次只展示最后一次的消息
999
- * @param {string} msg 消息内容, 支持 html dom 字符串
1000
- * @param {number} duration 认自动关闭延时,单位秒, 默认 0 不关闭 需手动 调用 hide()
1001
- * @param {MessageType} type 消息类型
997
+ /**
998
+ * 展示消息,如果同时调用多次只展示最后一次的消息
999
+ * @param {string} msg 消息内容, 支持 html dom 字符串
1000
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 0 不关闭 需手动 调用 hide()
1001
+ * @param {MessageType} type 消息类型
1002
1002
  */ _proto._show = function _show(msg, duration, type) {
1003
1003
  var _this = this;
1004
1004
  if (duration === void 0) duration = 0;
@@ -1026,8 +1026,8 @@ var MESSAGE_DEFAULT_OPTIONS = {};
1026
1026
  }, duration * 1000);
1027
1027
  }
1028
1028
  };
1029
- /**
1030
- * 销毁
1029
+ /**
1030
+ * 销毁
1031
1031
  */ _proto.destroy = function destroy() {
1032
1032
  var _this__$toast;
1033
1033
  if (this._timer) {
@@ -1042,8 +1042,8 @@ var MESSAGE_DEFAULT_OPTIONS = {};
1042
1042
  this.hide();
1043
1043
  Control.prototype.destroy.call(this);
1044
1044
  };
1045
- /**
1046
- * 隐藏消息, 并清空消息内容
1045
+ /**
1046
+ * 隐藏消息, 并清空消息内容
1047
1047
  */ _proto.hide = function hide() {
1048
1048
  var _this = this;
1049
1049
  // 每次隐藏都清空内 消息内容
@@ -1116,9 +1116,9 @@ function _set_prototype_of$v(o, p) {
1116
1116
  };
1117
1117
  return _set_prototype_of$v(o, p);
1118
1118
  }
1119
- /**
1120
- * 播放/暂停控件
1121
- * @category Control
1119
+ /**
1120
+ * 播放/暂停控件
1121
+ * @category Control
1122
1122
  */ var Play = /*#__PURE__*/ function(Control) {
1123
1123
  _inherits$v(Play, Control);
1124
1124
  function Play(options) {
@@ -1140,8 +1140,8 @@ function _set_prototype_of$v(o, p) {
1140
1140
  return _this;
1141
1141
  }
1142
1142
  var _proto = Play.prototype;
1143
- /**
1144
- * 点击 Control 会触发
1143
+ /**
1144
+ * 点击 Control 会触发
1145
1145
  */ _proto._onControlClick = function _onControlClick(e) {
1146
1146
  this._playing = !this._playing;
1147
1147
  this.emit(EVENTS.control.play, this._playing);
@@ -1164,8 +1164,8 @@ function _set_prototype_of$v(o, p) {
1164
1164
  _create_class$8(Play, [
1165
1165
  {
1166
1166
  key: "playing",
1167
- get: /**
1168
- * 播放状态
1167
+ get: /**
1168
+ * 播放状态
1169
1169
  */ function get() {
1170
1170
  return this._playing;
1171
1171
  }
@@ -1174,12 +1174,12 @@ function _set_prototype_of$v(o, p) {
1174
1174
  return Play;
1175
1175
  }(Control);
1176
1176
 
1177
- /**
1178
- * 节流函数
1179
- * @param {Function} func
1180
- * @param {number} wait
1181
- * @typeParam T - 函数类型
1182
- * @returns {Function}
1177
+ /**
1178
+ * 节流函数
1179
+ * @param {Function} func
1180
+ * @param {number} wait
1181
+ * @typeParam T - 函数类型
1182
+ * @returns {Function}
1183
1183
  */ // eslint-disable-next-line @typescript-eslint/ban-types
1184
1184
  function throttle(func, wait) {
1185
1185
  var timeout = null;
@@ -1235,28 +1235,28 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1235
1235
  if (n === "Map" || n === "Set") return Array.from(n);
1236
1236
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
1237
1237
  }
1238
- /**
1239
- * 工具类
1240
- * @category Util
1238
+ /**
1239
+ * 工具类
1240
+ * @category Util
1241
1241
  */ var Utils = /*#__PURE__*/ function() {
1242
1242
  function Utils() {}
1243
1243
  // /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i.test(navigator?.userAgent) ||
1244
1244
  // (/Macintosh/i.test(navigator?.userAgent) && navigator?.maxTouchPoints > 1); // iPad 支持多点触控;
1245
- /**
1246
- * 监听手机旋转, 参考 {@link https://developer.mozilla.org/zh-CN/docs/Web/API/Screen/orientation}
1247
- * @param {OrientationChangeCallback} change 手机旋转回调
1248
- * @returns {[ScreenOrientation, CleanUpScreenOrientationFun]} [第一次的结果, 事件移除]
1249
- *
1250
- * @example
1251
- * ```ts
1252
- * const [orientation, cleanUp] = Utils.orientationEventListener((orientation) => {
1253
- * console.log("orientation", orientation)
1254
- * })
1255
- *
1256
- * console.log("orientation", orientation)
1257
- * // 清除监听
1258
- * cleanUp()
1259
- * ```
1245
+ /**
1246
+ * 监听手机旋转, 参考 {@link https://developer.mozilla.org/zh-CN/docs/Web/API/Screen/orientation}
1247
+ * @param {OrientationChangeCallback} change 手机旋转回调
1248
+ * @returns {[ScreenOrientation, CleanUpScreenOrientationFun]} [第一次的结果, 事件移除]
1249
+ *
1250
+ * @example
1251
+ * ```ts
1252
+ * const [orientation, cleanUp] = Utils.orientationEventListener((orientation) => {
1253
+ * console.log("orientation", orientation)
1254
+ * })
1255
+ *
1256
+ * console.log("orientation", orientation)
1257
+ * // 清除监听
1258
+ * cleanUp()
1259
+ * ```
1260
1260
  */ // prettier-ignore
1261
1261
  Utils.orientationEventListener = function orientationEventListener(change) {
1262
1262
  var _orientationTimer = null;
@@ -1346,18 +1346,18 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1346
1346
  }
1347
1347
  ];
1348
1348
  };
1349
- /**
1350
- * 监听节点尺寸变化, 参考 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver}
1351
- * @param {Element} node
1352
- * @param callback
1353
- * @returns {CleanUpResizeObserver}
1354
- * @example
1355
- * ```ts
1356
- * const [unobserve, disconnect] = Utils.resizeObserver(node, (entries, observer) => {});
1357
- *
1358
- * // 移除监听
1359
- * unobserve()
1360
- * ```
1349
+ /**
1350
+ * 监听节点尺寸变化, 参考 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver}
1351
+ * @param {Element} node
1352
+ * @param callback
1353
+ * @returns {CleanUpResizeObserver}
1354
+ * @example
1355
+ * ```ts
1356
+ * const [unobserve, disconnect] = Utils.resizeObserver(node, (entries, observer) => {});
1357
+ *
1358
+ * // 移除监听
1359
+ * unobserve()
1360
+ * ```
1361
1361
  */ // prettier-ignore
1362
1362
  Utils.resizeObserver = function resizeObserver(node, callback) {
1363
1363
  // prettier-ignore
@@ -1392,12 +1392,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1392
1392
  return Utils;
1393
1393
  }();
1394
1394
  // 不要使用 window, 如果在 worker 中会报错
1395
- /**
1396
- * 判断是否是移动端, (iPadOS 13+ 移除了 "iPad" 标识)
1397
- * @example
1398
- * ```ts
1399
- * Utils.isMobile // true | false
1400
- * ```
1395
+ /**
1396
+ * 判断是否是移动端, (iPadOS 13+ 移除了 "iPad" 标识)
1397
+ * @example
1398
+ * ```ts
1399
+ * Utils.isMobile // true | false
1400
+ * ```
1401
1401
  */ Utils.isMobile = isMobile();
1402
1402
 
1403
1403
  function _defineProperties$7(target, props) {
@@ -1431,23 +1431,23 @@ var PROGRESS_DEFAULT_OPTIONS = {
1431
1431
  return (percent * 100).toFixed(0);
1432
1432
  }
1433
1433
  };
1434
- /**
1435
- * 进度条
1436
- *
1437
- * @category Control
1438
- * @example
1439
- * ```ts
1440
- * const progress = new Progress({
1441
- * container: document.getElementById('progress-container'),
1442
- * step: 0.01,
1443
- * range: [0, 1],
1444
- * onChange: (value, range) => {
1445
- * console.log(`Progress changed: ${value}, Range: ${range}`);
1446
- * },
1447
- * defaultValue: 0.5,
1448
- * draggable: true,
1449
- * disabled: false,
1450
- * })
1434
+ /**
1435
+ * 进度条
1436
+ *
1437
+ * @category Control
1438
+ * @example
1439
+ * ```ts
1440
+ * const progress = new Progress({
1441
+ * container: document.getElementById('progress-container'),
1442
+ * step: 0.01,
1443
+ * range: [0, 1],
1444
+ * onChange: (value, range) => {
1445
+ * console.log(`Progress changed: ${value}, Range: ${range}`);
1446
+ * },
1447
+ * defaultValue: 0.5,
1448
+ * draggable: true,
1449
+ * disabled: false,
1450
+ * })
1451
1451
  */ var Progress = /*#__PURE__*/ function() {
1452
1452
  function Progress(options) {
1453
1453
  var _this_options_defaultValue;
@@ -1480,20 +1480,20 @@ var PROGRESS_DEFAULT_OPTIONS = {
1480
1480
  this.disabled = this.options.disabled;
1481
1481
  }
1482
1482
  var _proto = Progress.prototype;
1483
- /**
1484
- * 是否旋转了
1485
- * @param rotated
1483
+ /**
1484
+ * 是否旋转了
1485
+ * @param rotated
1486
1486
  */ _proto.isRotate = function isRotate(rotated) {
1487
1487
  this._isRotated = rotated;
1488
1488
  };
1489
- /**
1490
- * 销毁 Progress 实例,移除事件监听器
1491
- * @returns {void}
1492
- * @memberof Progress
1493
- * @example
1494
- * ```ts
1495
- * progress.destroy();
1496
- * ```
1489
+ /**
1490
+ * 销毁 Progress 实例,移除事件监听器
1491
+ * @returns {void}
1492
+ * @memberof Progress
1493
+ * @example
1494
+ * ```ts
1495
+ * progress.destroy();
1496
+ * ```
1497
1497
  */ _proto.destroy = function destroy() {
1498
1498
  var _this__delegateSliderMouseDown_destroy, _this__delegateSliderMouseDown, _this__delegateSliderHandleMouseDown_destroy, _this__delegateSliderHandleMouseDown, _this__delegateProgressMouseDown_destroy, _this__delegateProgressMouseDown, _this__delegatePlusClick_destroy, _this__delegatePlusClick, _this__delegateMinusClick_destroy, _this__delegateMinusClick;
1499
1499
  (_this__delegateSliderMouseDown = this._delegateSliderMouseDown) == null ? void 0 : (_this__delegateSliderMouseDown_destroy = _this__delegateSliderMouseDown.destroy) == null ? void 0 : _this__delegateSliderMouseDown_destroy.call(_this__delegateSliderMouseDown);
@@ -1688,14 +1688,14 @@ var PROGRESS_DEFAULT_OPTIONS = {
1688
1688
  },
1689
1689
  {
1690
1690
  key: "value",
1691
- get: /**
1692
- * 获取进度条值
1693
- * @returns {number} 当前进度条值
1694
- * @example
1695
- * ```ts
1696
- * const value = progress.value; // 获取当前进度条值
1697
- * console.log(value); // 输出值
1698
- * ```
1691
+ get: /**
1692
+ * 获取进度条值
1693
+ * @returns {number} 当前进度条值
1694
+ * @example
1695
+ * ```ts
1696
+ * const value = progress.value; // 获取当前进度条值
1697
+ * console.log(value); // 输出值
1698
+ * ```
1699
1699
  */ function get() {
1700
1700
  return this._value; //
1701
1701
  },
@@ -1705,14 +1705,14 @@ var PROGRESS_DEFAULT_OPTIONS = {
1705
1705
  },
1706
1706
  {
1707
1707
  key: "percent",
1708
- get: /**
1709
- * 获取进度百分比
1710
- * @returns {number} 当前进度条百分比
1711
- * @example
1712
- * ```ts
1713
- * const percent = progress.percent; // 获取当前进度条百分比
1714
- * console.log(percent); // 输出百分比
1715
- * ```
1708
+ get: /**
1709
+ * 获取进度百分比
1710
+ * @returns {number} 当前进度条百分比
1711
+ * @example
1712
+ * ```ts
1713
+ * const percent = progress.percent; // 获取当前进度条百分比
1714
+ * console.log(percent); // 输出百分比
1715
+ * ```
1716
1716
  */ function get() {
1717
1717
  return this._percent;
1718
1718
  },
@@ -1775,9 +1775,9 @@ var VOLUME_DEFAULT_OPTIONS = {
1775
1775
  onOpenChange: function onOpenChange() {},
1776
1776
  onChange: function onChange() {}
1777
1777
  };
1778
- /**
1779
- * 音量调节控件
1780
- * @category Control
1778
+ /**
1779
+ * 音量调节控件
1780
+ * @category Control
1781
1781
  */ var Volume = /*#__PURE__*/ function(Control) {
1782
1782
  _inherits$u(Volume, Control);
1783
1783
  function Volume(options) {
@@ -1851,8 +1851,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1851
1851
  return _this;
1852
1852
  }
1853
1853
  var _proto = Volume.prototype;
1854
- /**
1855
- * 销毁
1854
+ /**
1855
+ * 销毁
1856
1856
  */ _proto.destroy = function destroy() {
1857
1857
  var _this__progress_destroy, _this__progress, _this_picker;
1858
1858
  (_this__progress = this._progress) == null ? void 0 : (_this__progress_destroy = _this__progress.destroy) == null ? void 0 : _this__progress_destroy.call(_this__progress);
@@ -1910,8 +1910,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1910
1910
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_VOLUME
1911
1911
  });
1912
1912
  };
1913
- /**
1914
- * 点击 Control 会触发
1913
+ /**
1914
+ * 点击 Control 会触发
1915
1915
  */ _proto._onControlClick = function _onControlClick() {
1916
1916
  // this._options.onClick?.(e);
1917
1917
  };
@@ -1928,8 +1928,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1928
1928
  _create_class$6(Volume, [
1929
1929
  {
1930
1930
  key: "muted",
1931
- get: /**
1932
- * 是否静音
1931
+ get: /**
1932
+ * 是否静音
1933
1933
  */ function get() {
1934
1934
  return this._muted;
1935
1935
  },
@@ -1953,8 +1953,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1953
1953
  },
1954
1954
  {
1955
1955
  key: "volume",
1956
- get: /**
1957
- * 当前音量值(真实值 即使静音)
1956
+ get: /**
1957
+ * 当前音量值(真实值 即使静音)
1958
1958
  */ function get() {
1959
1959
  return this._lastVolume;
1960
1960
  },
@@ -1977,8 +1977,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1977
1977
  },
1978
1978
  {
1979
1979
  key: "disabled",
1980
- get: /**
1981
- * 是否禁用
1980
+ get: /**
1981
+ * 是否禁用
1982
1982
  */ function get() {
1983
1983
  return this._disabled;
1984
1984
  },
@@ -2478,9 +2478,9 @@ function _set_prototype_of$t(o, p) {
2478
2478
  };
2479
2479
  return _set_prototype_of$t(o, p);
2480
2480
  }
2481
- /**
2482
- * 全屏控件
2483
- * @category Control
2481
+ /**
2482
+ * 全屏控件
2483
+ * @category Control
2484
2484
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
2485
2485
  _inherits$t(Fullscreen, Control);
2486
2486
  function Fullscreen(options) {
@@ -2507,8 +2507,8 @@ function _set_prototype_of$t(o, p) {
2507
2507
  return _this;
2508
2508
  }
2509
2509
  var _proto = Fullscreen.prototype;
2510
- /**
2511
- * 销毁
2510
+ /**
2511
+ * 销毁
2512
2512
  */ _proto.destroy = function destroy() {
2513
2513
  var _this__fullscreenUtil;
2514
2514
  this.$container.innerHTML = '';
@@ -2536,8 +2536,8 @@ function _set_prototype_of$t(o, p) {
2536
2536
  this._render();
2537
2537
  this.options.onChange == null ? void 0 : this.options.onChange.call(this.options, info);
2538
2538
  };
2539
- /**
2540
- * 点击 Control 会触发
2539
+ /**
2540
+ * 点击 Control 会触发
2541
2541
  */ _proto._onControlClick = function _onControlClick() {
2542
2542
  if (this.isCurrentFullscreen) {
2543
2543
  var _this__fullscreenUtil;
@@ -2581,9 +2581,9 @@ function _set_prototype_of$s(o, p) {
2581
2581
  };
2582
2582
  return _set_prototype_of$s(o, p);
2583
2583
  }
2584
- /**
2585
- * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
2586
- * @category Control
2584
+ /**
2585
+ * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
2586
+ * @category Control
2587
2587
  */ var Rec = /*#__PURE__*/ function(Control) {
2588
2588
  _inherits$s(Rec, Control);
2589
2589
  function Rec(options) {
@@ -2602,8 +2602,8 @@ function _set_prototype_of$s(o, p) {
2602
2602
  return _this;
2603
2603
  }
2604
2604
  var _proto = Rec.prototype;
2605
- /**
2606
- * 销毁
2605
+ /**
2606
+ * 销毁
2607
2607
  */ _proto.destroy = function destroy() {
2608
2608
  var _this__delegation;
2609
2609
  this.$container.removeEventListener('dblclick', this._onDBlClick);
@@ -2611,9 +2611,9 @@ function _set_prototype_of$s(o, p) {
2611
2611
  this._delegation = null;
2612
2612
  Control.prototype.destroy.call(this);
2613
2613
  };
2614
- /**
2615
- * 添加回放类型图标
2616
- * @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
2614
+ /**
2615
+ * 添加回放类型图标
2616
+ * @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
2617
2617
  */ _proto.addRecType = function addRecType(id) {
2618
2618
  var spanIcon = '';
2619
2619
  switch(id){
@@ -2680,8 +2680,8 @@ function _set_prototype_of$s(o, p) {
2680
2680
  }
2681
2681
  });
2682
2682
  };
2683
- /**
2684
- * 点击 Control 会触发
2683
+ /**
2684
+ * 点击 Control 会触发
2685
2685
  */ _proto._onControlClick = function _onControlClick(e) {};
2686
2686
  return Rec;
2687
2687
  }(Control);
@@ -2839,6 +2839,8 @@ var zh = {
2839
2839
  GET_SPEED: '获取当前播放速率',
2840
2840
  MAX_SPEED_LIMIT: '播放速度最大为4倍速度',
2841
2841
  MIN_SPEED_LIMIT: '播放速度最小为0.5倍速度',
2842
+ SPEED_SWITCH_ERRROR: '切换播放速度失败',
2843
+ SPEED_SWITCH_NOT_SUPPORT: '切换倍速({{rate}})不支持',
2842
2844
  SEEK_CANNOT_CROSS_DAYS: 'seek时间不能跨日期',
2843
2845
  SEEK_TIMEFORMAT_ERROR: 'seek时间格式错误',
2844
2846
  PAUSE: '暂停',
@@ -3119,6 +3121,8 @@ var en = {
3119
3121
  GET_SPEED: 'Get the current playback rate',
3120
3122
  MAX_SPEED_LIMIT: 'The maximum playback speed is 4 times the speed',
3121
3123
  MIN_SPEED_LIMIT: 'The minimum playback speed is 0.5 times the speed',
3124
+ SPEED_SWITCH_ERRROR: 'Failed to switch playback speed',
3125
+ SPEED_SWITCH_NOT_SUPPORT: 'Switching speed({{rate}}) is not supported',
3122
3126
  SEEK_CANNOT_CROSS_DAYS: 'The seek time cannot cross dates',
3123
3127
  SEEK_TIMEFORMAT_ERROR: 'The seek time format is wrong',
3124
3128
  PAUSE: 'Pause',
@@ -3361,8 +3365,8 @@ var en = {
3361
3365
  }
3362
3366
  };
3363
3367
 
3364
- /**
3365
- * flv 预览
3368
+ /**
3369
+ * flv 预览
3366
3370
  */ var hlsLiveTemplate = {
3367
3371
  autoFocus: 3,
3368
3372
  // poster:
@@ -3414,8 +3418,8 @@ var en = {
3414
3418
  }
3415
3419
  };
3416
3420
 
3417
- /**
3418
- * flv 预览
3421
+ /**
3422
+ * flv 预览
3419
3423
  */ var hlsRecTemplate = {
3420
3424
  autoFocus: 3,
3421
3425
  // poster:
@@ -3473,8 +3477,8 @@ var en = {
3473
3477
  }
3474
3478
  };
3475
3479
 
3476
- /**
3477
- * pc 预览
3480
+ /**
3481
+ * pc 预览
3478
3482
  */ var pcLive = {
3479
3483
  autoFocus: 3,
3480
3484
  header: {
@@ -3573,8 +3577,8 @@ var en = {
3573
3577
  }
3574
3578
  };
3575
3579
 
3576
- /**
3577
- * pc 回放
3580
+ /**
3581
+ * pc 回放
3578
3582
  */ var pcRec = {
3579
3583
  header: {
3580
3584
  // color: DEFAULT_COLOR,
@@ -3685,8 +3689,8 @@ var en = {
3685
3689
  }
3686
3690
  };
3687
3691
 
3688
- /**
3689
- * mobile 预览
3692
+ /**
3693
+ * mobile 预览
3690
3694
  */ var mobileLive = {
3691
3695
  header: {
3692
3696
  // color: DEFAULT_COLOR,
@@ -3774,8 +3778,8 @@ var en = {
3774
3778
  }
3775
3779
  };
3776
3780
 
3777
- /**
3778
- * mobile 回放
3781
+ /**
3782
+ * mobile 回放
3779
3783
  */ var mobileRec = {
3780
3784
  header: {
3781
3785
  // color: DEFAULT_COLOR,
@@ -3869,8 +3873,8 @@ var en = {
3869
3873
  }
3870
3874
  };
3871
3875
 
3872
- /**
3873
- * 安防版(预览/回放)
3876
+ /**
3877
+ * 安防版(预览/回放)
3874
3878
  */ var security = {
3875
3879
  header: {
3876
3880
  // color: DEFAULT_COLOR,
@@ -3946,8 +3950,8 @@ var en = {
3946
3950
  }
3947
3951
  };
3948
3952
 
3949
- /**
3950
- * 语音版(预览)
3953
+ /**
3954
+ * 语音版(预览)
3951
3955
  */ var voice = {
3952
3956
  header: {
3953
3957
  // color: DEFAULT_COLOR,
@@ -3999,11 +4003,11 @@ var en = {
3999
4003
  }
4000
4004
  };
4001
4005
 
4002
- /**
4003
- * standard 做特殊处理
4004
- *
4005
- * WARN: 除了 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 做特殊处理, 只能放置在顶部, 其它不做处理,如果配置渲染的有问题需要开发者自行修改
4006
- * FIXME: 暂时不去重, 让开发者自己去修改
4006
+ /**
4007
+ * standard 做特殊处理
4008
+ *
4009
+ * WARN: 除了 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 做特殊处理, 只能放置在顶部, 其它不做处理,如果配置渲染的有问题需要开发者自行修改
4010
+ * FIXME: 暂时不去重, 让开发者自己去修改
4007
4011
  */ var TEMPLATES = {
4008
4012
  pcLive: pcLive,
4009
4013
  pcRec: pcRec,
@@ -4033,9 +4037,9 @@ function _set_prototype_of$r(o, p) {
4033
4037
  };
4034
4038
  return _set_prototype_of$r(o, p);
4035
4039
  }
4036
- /**
4037
- * 截图控件
4038
- * @category Content
4040
+ /**
4041
+ * 截图控件
4042
+ * @category Content
4039
4043
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
4040
4044
  _inherits$r(Content, EventEmitter);
4041
4045
  function Content(options) {
@@ -4065,11 +4069,11 @@ function _set_prototype_of$r(o, p) {
4065
4069
  return _this;
4066
4070
  }
4067
4071
  var _proto = Content.prototype;
4068
- /**
4069
- * 重新画面区域
4070
- * @param {number} originWidth 画面宽度
4071
- * @param {number} originHeight 画面高度
4072
- * @returns {void}
4072
+ /**
4073
+ * 重新画面区域
4074
+ * @param {number} originWidth 画面宽度
4075
+ * @param {number} originHeight 画面高度
4076
+ * @returns {void}
4073
4077
  */ _proto.rerender = function rerender(originWidth, originHeight) {
4074
4078
  if (originWidth === void 0) originWidth = 0;
4075
4079
  if (originHeight === void 0) originHeight = 0;
@@ -4182,9 +4186,9 @@ function _set_prototype_of$q(o, p) {
4182
4186
  };
4183
4187
  return _set_prototype_of$q(o, p);
4184
4188
  }
4185
- /**
4186
- * 更多控件
4187
- * @category Control
4189
+ /**
4190
+ * 更多控件
4191
+ * @category Control
4188
4192
  */ var More = /*#__PURE__*/ function(Control) {
4189
4193
  _inherits$q(More, Control);
4190
4194
  function More(options) {
@@ -4230,9 +4234,9 @@ function _set_prototype_of$q(o, p) {
4230
4234
  }
4231
4235
  // debug
4232
4236
  };
4233
- /**
4234
- * 添加
4235
- * @param control
4237
+ /**
4238
+ * 添加
4239
+ * @param control
4236
4240
  */ _proto.add = function add(key, part, control, props) {
4237
4241
  this.list.unshift({
4238
4242
  part: part,
@@ -4242,9 +4246,9 @@ function _set_prototype_of$q(o, p) {
4242
4246
  height: props.height
4243
4247
  });
4244
4248
  };
4245
- /**
4246
- * 移除
4247
- * @param control
4249
+ /**
4250
+ * 移除
4251
+ * @param control
4248
4252
  */ _proto.remove = function remove(control) {
4249
4253
  var index = this.list.findIndex(function(item) {
4250
4254
  return item.control === control;
@@ -4264,20 +4268,20 @@ function _set_prototype_of$q(o, p) {
4264
4268
  }
4265
4269
  Control.prototype.destroy.call(this);
4266
4270
  };
4267
- /**
4268
- * 点击 Control 会触发
4271
+ /**
4272
+ * 点击 Control 会触发
4269
4273
  */ _proto._onControlClick = function _onControlClick(e) {
4270
4274
  // this._options.onClick?.(e);
4271
4275
  };
4272
4276
  return More;
4273
4277
  }(Control);
4274
4278
 
4275
- /**
4276
- * 函数防抖
4277
- * @param {Function} func
4278
- * @param {number} wait
4279
- * @typeParam T - 函数类型
4280
- * @returns {Function}
4279
+ /**
4280
+ * 函数防抖
4281
+ * @param {Function} func
4282
+ * @param {number} wait
4283
+ * @typeParam T - 函数类型
4284
+ * @returns {Function}
4281
4285
  */ // eslint-disable-next-line @typescript-eslint/ban-types
4282
4286
  function debounce(func, wait) {
4283
4287
  var timeout;
@@ -4901,23 +4905,23 @@ var ignoreList = [
4901
4905
  });
4902
4906
  }
4903
4907
 
4904
- /**
4905
- * 重新调整播放器窗口大小
4906
- *
4907
- * Adjust the player window size
4908
- * @param {number | string} width 宽度(number 类型默认px, 支持字符串大小 "100%" | "50vw")
4909
- * @param {number | string} height 高度(number 类型默认px, 支持字符串大小 "100%" | "50vh")
4910
- * @since 0.0.1
4911
- * @example
4912
- * ```ts
4913
- * theme.resize(600, 400) // 600px * 400px
4914
- * theme.resize("600px", "400px") // 600px * 400px
4915
- * theme.resize("50%", "1vh")
4916
- * theme.resize("2em", "2rem")
4917
- * // 事件监听 event, 这里是具体的宽高(单位px)
4918
- * theme.on(Theme.EVENTS.resize, (width: number, height: number) => {})
4919
- * ```
4920
- * @returns {void}
4908
+ /**
4909
+ * 重新调整播放器窗口大小
4910
+ *
4911
+ * Adjust the player window size
4912
+ * @param {number | string} width 宽度(number 类型默认px, 支持字符串大小 "100%" | "50vw")
4913
+ * @param {number | string} height 高度(number 类型默认px, 支持字符串大小 "100%" | "50vh")
4914
+ * @since 0.0.1
4915
+ * @example
4916
+ * ```ts
4917
+ * theme.resize(600, 400) // 600px * 400px
4918
+ * theme.resize("600px", "400px") // 600px * 400px
4919
+ * theme.resize("50%", "1vh")
4920
+ * theme.resize("2em", "2rem")
4921
+ * // 事件监听 event, 这里是具体的宽高(单位px)
4922
+ * theme.on(Theme.EVENTS.resize, (width: number, height: number) => {})
4923
+ * ```
4924
+ * @returns {void}
4921
4925
  */ function _resize(theme, width, height) {
4922
4926
  var cssText = '';
4923
4927
  if (/^\d+(\.\d+)?$/.test(width + '')) {
@@ -4980,9 +4984,9 @@ var ZOOM_DEFAULT_OPTIONS = {
4980
4984
  open: false,
4981
4985
  max: 8
4982
4986
  };
4983
- /**
4984
- * 电子放大控件
4985
- * @category Control
4987
+ /**
4988
+ * 电子放大控件
4989
+ * @category Control
4986
4990
  */ var Zoom = /*#__PURE__*/ function(Control) {
4987
4991
  _inherits$p(Zoom, Control);
4988
4992
  function Zoom(options) {
@@ -5059,8 +5063,8 @@ var ZOOM_DEFAULT_OPTIONS = {
5059
5063
  }
5060
5064
  Control.prototype.destroy.call(this);
5061
5065
  };
5062
- /**
5063
- * 点击 Control 会触发
5066
+ /**
5067
+ * 点击 Control 会触发
5064
5068
  */ _proto._onControlClick = function _onControlClick(e) {
5065
5069
  this.active = !this.active;
5066
5070
  Control.prototype._onControlClick.call(this, e);
@@ -5080,8 +5084,8 @@ var ZOOM_DEFAULT_OPTIONS = {
5080
5084
  },
5081
5085
  {
5082
5086
  key: "active",
5083
- get: /**
5084
- * 是否激活
5087
+ get: /**
5088
+ * 是否激活
5085
5089
  */ function get() {
5086
5090
  return this._active;
5087
5091
  },
@@ -5730,8 +5734,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
5730
5734
  return '';
5731
5735
  }
5732
5736
 
5733
- /**
5734
- * Header
5737
+ /**
5738
+ * Header
5735
5739
  */ var Component = /*#__PURE__*/ function() {
5736
5740
  function Component(options) {
5737
5741
  if (options === void 0) options = {};
@@ -5783,8 +5787,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
5783
5787
  this.$popupContainer.appendChild(this.$container);
5784
5788
  }
5785
5789
  var _proto = Component.prototype;
5786
- /**
5787
- * 销毁 header
5790
+ /**
5791
+ * 销毁 header
5788
5792
  */ _proto.destroy = function destroy() {
5789
5793
  var _this_$popupContainer;
5790
5794
  (_this_$popupContainer = this.$popupContainer) == null ? void 0 : _this_$popupContainer.removeChild(this.$container);
@@ -6060,10 +6064,10 @@ function _set_prototype_of$m(o, p) {
6060
6064
  };
6061
6065
  return _set_prototype_of$m(o, p);
6062
6066
  }
6063
- /**
6064
- * 全局全屏
6065
- * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
6066
- * @category Control
6067
+ /**
6068
+ * 全局全屏
6069
+ * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
6070
+ * @category Control
6067
6071
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
6068
6072
  _inherits$m(GlobalFullscreen, Fullscreen);
6069
6073
  function GlobalFullscreen(options) {
@@ -6081,8 +6085,8 @@ function _set_prototype_of$m(o, p) {
6081
6085
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_GLOBAL_FULLSCREEN
6082
6086
  });
6083
6087
  };
6084
- /**
6085
- * 点击 Control 会触发
6088
+ /**
6089
+ * 点击 Control 会触发
6086
6090
  */ _proto._onControlClick = function _onControlClick() {
6087
6091
  // 网页全屏的情况下 还可以执行全局全屏
6088
6092
  if (this.isCurrentFullscreen && this._$rootContainer.classList.contains("" + PREFIX_CLASS + "-global-fullscreen")) {
@@ -6128,9 +6132,9 @@ function _set_prototype_of$l(o, p) {
6128
6132
  };
6129
6133
  return _set_prototype_of$l(o, p);
6130
6134
  }
6131
- /**
6132
- * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
6133
- * @category Control
6135
+ /**
6136
+ * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
6137
+ * @category Control
6134
6138
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
6135
6139
  _inherits$l(CapturePicture, Control);
6136
6140
  function CapturePicture(options) {
@@ -6161,8 +6165,8 @@ function _set_prototype_of$l(o, p) {
6161
6165
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CAPTURE
6162
6166
  });
6163
6167
  };
6164
- /**
6165
- * 点击 Control 会触发
6168
+ /**
6169
+ * 点击 Control 会触发
6166
6170
  */ _proto._onControlClick = function _onControlClick(e) {
6167
6171
  var _this = this;
6168
6172
  var _this_options_type, _this_options_cloudRecUpload;
@@ -6231,9 +6235,9 @@ function _set_prototype_of$k(o, p) {
6231
6235
  };
6232
6236
  return _set_prototype_of$k(o, p);
6233
6237
  }
6234
- /**
6235
- * 云台控件
6236
- * @category Control
6238
+ /**
6239
+ * 云台控件
6240
+ * @category Control
6237
6241
  */ var Ptz = /*#__PURE__*/ function(Control) {
6238
6242
  _inherits$k(Ptz, Control);
6239
6243
  function Ptz(options) {
@@ -6322,8 +6326,8 @@ function _set_prototype_of$k(o, p) {
6322
6326
  }
6323
6327
  };
6324
6328
  };
6325
- /**
6326
- * 点击 Control 会触发
6329
+ /**
6330
+ * 点击 Control 会触发
6327
6331
  */ _proto._onControlClick = function _onControlClick(e) {
6328
6332
  Control.prototype._onControlClick.call(this, e);
6329
6333
  this.active = !this.active;
@@ -6426,14 +6430,14 @@ function _set_prototype_of$j(o, p) {
6426
6430
  var RECORD_DEFAULT_OPTIONS = {
6427
6431
  maxDuration: 3600
6428
6432
  };
6429
- /**
6430
- * 录制控件,点击开始录制,再次点击停止录制,
6431
- * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
6432
- *
6433
- * 注意:
6434
- * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
6435
- * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
6436
- * @category Control
6433
+ /**
6434
+ * 录制控件,点击开始录制,再次点击停止录制,
6435
+ * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
6436
+ *
6437
+ * 注意:
6438
+ * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
6439
+ * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
6440
+ * @category Control
6437
6441
  */ var Record = /*#__PURE__*/ function(Control) {
6438
6442
  _inherits$j(Record, Control);
6439
6443
  function Record(options) {
@@ -6448,16 +6452,16 @@ var RECORD_DEFAULT_OPTIONS = {
6448
6452
  return _this;
6449
6453
  }
6450
6454
  var _proto = Record.prototype;
6451
- /**
6452
- * 渲染图标
6455
+ /**
6456
+ * 渲染图标
6453
6457
  */ _proto._render = function _render() {
6454
6458
  var _this_locale;
6455
6459
  this.$container.innerHTML = IconComponents.record({
6456
6460
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
6457
6461
  });
6458
6462
  };
6459
- /**
6460
- * 渲染计时器
6463
+ /**
6464
+ * 渲染计时器
6461
6465
  */ _proto._renderTimer = function _renderTimer() {
6462
6466
  var _this = this;
6463
6467
  var _this__options_rootContainer, _this__options;
@@ -6486,8 +6490,8 @@ var RECORD_DEFAULT_OPTIONS = {
6486
6490
  this._destroyTimer();
6487
6491
  Control.prototype.destroy.call(this);
6488
6492
  };
6489
- /**
6490
- * 销毁定时器和销毁节点
6493
+ /**
6494
+ * 销毁定时器和销毁节点
6491
6495
  */ _proto._destroyTimer = function _destroyTimer() {
6492
6496
  this._seconds = 0;
6493
6497
  if (this._timer) {
@@ -6502,8 +6506,8 @@ var RECORD_DEFAULT_OPTIONS = {
6502
6506
  }
6503
6507
  this._active = false;
6504
6508
  };
6505
- /**
6506
- * 点击 Control 会触发
6509
+ /**
6510
+ * 点击 Control 会触发
6507
6511
  */ _proto._onControlClick = function _onControlClick(e) {
6508
6512
  this.active = !this.active;
6509
6513
  Control.prototype._onControlClick.call(this, e);
@@ -6511,8 +6515,8 @@ var RECORD_DEFAULT_OPTIONS = {
6511
6515
  _create_class$3(Record, [
6512
6516
  {
6513
6517
  key: "active",
6514
- get: /**
6515
- * 是否激活
6518
+ get: /**
6519
+ * 是否激活
6516
6520
  */ function get() {
6517
6521
  return this._active;
6518
6522
  },
@@ -6705,14 +6709,14 @@ function _ts_generator$4(thisArg, body) {
6705
6709
  };
6706
6710
  }
6707
6711
  }
6708
- /**
6709
- * 对讲控件
6710
- *
6711
- * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
6712
- * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
6713
- * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
6714
- *
6715
- * @category Control
6712
+ /**
6713
+ * 对讲控件
6714
+ *
6715
+ * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
6716
+ * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
6717
+ * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
6718
+ *
6719
+ * @category Control
6716
6720
  */ var Talk = /*#__PURE__*/ function(Control) {
6717
6721
  _inherits$i(Talk, Control);
6718
6722
  function Talk(options) {
@@ -6755,16 +6759,16 @@ function _ts_generator$4(thisArg, body) {
6755
6759
  Control.prototype.reset.call(this, hide);
6756
6760
  }
6757
6761
  };
6758
- /**
6759
- * 销毁对讲
6762
+ /**
6763
+ * 销毁对讲
6760
6764
  */ _proto.destroy = function destroy() {
6761
6765
  if (this.active) {
6762
6766
  this.reset();
6763
6767
  }
6764
6768
  Control.prototype.destroy.call(this);
6765
6769
  };
6766
- /**
6767
- * 点击 Control 会触发
6770
+ /**
6771
+ * 点击 Control 会触发
6768
6772
  */ _proto._onControlClick = function _onControlClick(e) {
6769
6773
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
6770
6774
  return Control.prototype._onControlClick;
@@ -6784,13 +6788,13 @@ function _ts_generator$4(thisArg, body) {
6784
6788
  _create_class$2(Talk, [
6785
6789
  {
6786
6790
  key: "value",
6787
- get: /**
6788
- * 获取当前值
6791
+ get: /**
6792
+ * 获取当前值
6789
6793
  */ function get() {
6790
6794
  return this._value;
6791
6795
  },
6792
- set: /**
6793
- * 设置当前值 [0-1]
6796
+ set: /**
6797
+ * 设置当前值 [0-1]
6794
6798
  */ function set(value) {
6795
6799
  // 没有激活状态,则不处理
6796
6800
  if (!this.active) {
@@ -6976,12 +6980,12 @@ function _ts_generator$3(thisArg, body) {
6976
6980
  };
6977
6981
  }
6978
6982
  }
6979
- /**
6980
- * 语音广播控件
6981
- *
6982
- * 用于触发语音广播功能的按钮控件
6983
- *
6984
- * @category Control
6983
+ /**
6984
+ * 语音广播控件
6985
+ *
6986
+ * 用于触发语音广播功能的按钮控件
6987
+ *
6988
+ * @category Control
6985
6989
  */ var Broadcast = /*#__PURE__*/ function(Control) {
6986
6990
  _inherits$h(Broadcast, Control);
6987
6991
  function Broadcast(options) {
@@ -7021,16 +7025,16 @@ function _ts_generator$3(thisArg, body) {
7021
7025
  Control.prototype.reset.call(this, hide);
7022
7026
  }
7023
7027
  };
7024
- /**
7025
- * 销毁语音广播控件
7028
+ /**
7029
+ * 销毁语音广播控件
7026
7030
  */ _proto.destroy = function destroy() {
7027
7031
  if (this.active) {
7028
7032
  this.reset();
7029
7033
  }
7030
7034
  Control.prototype.destroy.call(this);
7031
7035
  };
7032
- /**
7033
- * 点击 Control 会触发
7036
+ /**
7037
+ * 点击 Control 会触发
7034
7038
  */ _proto._onControlClick = function _onControlClick(e) {
7035
7039
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
7036
7040
  return Control.prototype._onControlClick;
@@ -7207,12 +7211,12 @@ function _ts_generator$2(thisArg, body) {
7207
7211
  };
7208
7212
  }
7209
7213
  }
7210
- /**
7211
- * AI对话框控件
7212
- *
7213
- * 用于触发AI对话框功能的按钮控件
7214
- *
7215
- * @category Control
7214
+ /**
7215
+ * AI对话框控件
7216
+ *
7217
+ * 用于触发AI对话框功能的按钮控件
7218
+ *
7219
+ * @category Control
7216
7220
  */ var AIChat = /*#__PURE__*/ function(Control) {
7217
7221
  _inherits$g(AIChat, Control);
7218
7222
  function AIChat(options) {
@@ -7253,16 +7257,16 @@ function _ts_generator$2(thisArg, body) {
7253
7257
  Control.prototype.reset.call(this, hide);
7254
7258
  }
7255
7259
  };
7256
- /**
7257
- * 销毁AI对话框控件
7260
+ /**
7261
+ * 销毁AI对话框控件
7258
7262
  */ _proto.destroy = function destroy() {
7259
7263
  if (this.active) {
7260
7264
  this.reset();
7261
7265
  }
7262
7266
  Control.prototype.destroy.call(this);
7263
7267
  };
7264
- /**
7265
- * 点击 Control 会触发
7268
+ /**
7269
+ * 点击 Control 会触发
7266
7270
  */ _proto._onControlClick = function _onControlClick(e) {
7267
7271
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
7268
7272
  return Control.prototype._onControlClick;
@@ -7314,12 +7318,12 @@ function _set_prototype_of$f(o, p) {
7314
7318
  };
7315
7319
  return _set_prototype_of$f(o, p);
7316
7320
  }
7317
- /**
7318
- * 直播按钮控件
7319
- *
7320
- * 点击切换到直播模式
7321
- *
7322
- * @category Control
7321
+ /**
7322
+ * 直播按钮控件
7323
+ *
7324
+ * 点击切换到直播模式
7325
+ *
7326
+ * @category Control
7323
7327
  */ var Live = /*#__PURE__*/ function(Control) {
7324
7328
  _inherits$f(Live, Control);
7325
7329
  function Live(options) {
@@ -7341,9 +7345,9 @@ function _set_prototype_of$f(o, p) {
7341
7345
  return _this;
7342
7346
  }
7343
7347
  var _proto = Live.prototype;
7344
- /**
7345
- * 根据 urlInfo 同步激活状态
7346
- * 在初始化和播放地址切换后调用
7348
+ /**
7349
+ * 根据 urlInfo 同步激活状态
7350
+ * 在初始化和播放地址切换后调用
7347
7351
  */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
7348
7352
  var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
7349
7353
  this.active = shouldBeActive;
@@ -7354,13 +7358,13 @@ function _set_prototype_of$f(o, p) {
7354
7358
  title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
7355
7359
  });
7356
7360
  };
7357
- /**
7358
- * 销毁
7361
+ /**
7362
+ * 销毁
7359
7363
  */ _proto.destroy = function destroy() {
7360
7364
  Control.prototype.destroy.call(this);
7361
7365
  };
7362
- /**
7363
- * 点击 Control 会触发
7366
+ /**
7367
+ * 点击 Control 会触发
7364
7368
  */ _proto._onControlClick = function _onControlClick(e) {
7365
7369
  var _this__options_onChange, _this__options;
7366
7370
  Control.prototype._onControlClick.call(this, e);
@@ -7405,12 +7409,12 @@ function _set_prototype_of$e(o, p) {
7405
7409
  };
7406
7410
  return _set_prototype_of$e(o, p);
7407
7411
  }
7408
- /**
7409
- * 回放下拉控件
7410
- *
7411
- * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
7412
- *
7413
- * @category Control
7412
+ /**
7413
+ * 回放下拉控件
7414
+ *
7415
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
7416
+ *
7417
+ * @category Control
7414
7418
  */ var RecDropdown = /*#__PURE__*/ function(Control) {
7415
7419
  _inherits$e(RecDropdown, Control);
7416
7420
  function RecDropdown(options) {
@@ -7434,9 +7438,9 @@ function _set_prototype_of$e(o, p) {
7434
7438
  return _this;
7435
7439
  }
7436
7440
  var _proto = RecDropdown.prototype;
7437
- /**
7438
- * 根据 urlInfo 同步激活状态和回放类型
7439
- * 在初始化和播放地址切换后调用
7441
+ /**
7442
+ * 根据 urlInfo 同步激活状态和回放类型
7443
+ * 在初始化和播放地址切换后调用
7440
7444
  */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
7441
7445
  if (urlInfo && urlInfo.type === 'rec') {
7442
7446
  var _urlInfo_searchParams1;
@@ -7513,8 +7517,8 @@ function _set_prototype_of$e(o, p) {
7513
7517
  target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
7514
7518
  }
7515
7519
  };
7516
- /**
7517
- * 销毁
7520
+ /**
7521
+ * 销毁
7518
7522
  */ _proto.destroy = function destroy() {
7519
7523
  var _this__delegation_destroy, _this__delegation;
7520
7524
  (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
@@ -7526,8 +7530,8 @@ function _set_prototype_of$e(o, p) {
7526
7530
  }
7527
7531
  Control.prototype.destroy.call(this);
7528
7532
  };
7529
- /**
7530
- * 点击 Control 会触发(移动端 click 触发 picker)
7533
+ /**
7534
+ * 点击 Control 会触发(移动端 click 触发 picker)
7531
7535
  */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7532
7536
  _proto._onControlClick = function _onControlClick(_e) {
7533
7537
  // picker 自行处理 click/hover,这里不额外处理
@@ -7604,11 +7608,20 @@ function _set_prototype_of$d(o, p) {
7604
7608
  }
7605
7609
  }));
7606
7610
  _this.on(EVENTS.setAllDayRecTimes, function(records) {
7607
- var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7611
+ var _this__options_props_urlInfo, _this__options_props, _this__options, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7608
7612
  _this__modal;
7609
7613
  _this.disabled = records.length === 0;
7610
7614
  _this.records = records;
7611
- (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(records);
7615
+ if ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : (_this__options_props_urlInfo = _this__options_props.urlInfo) == null ? void 0 : _this__options_props_urlInfo.validateCode) {
7616
+ _this.records = records.map(function(item) {
7617
+ var _this__options_props_urlInfo, _this__options_props, _this__options;
7618
+ return _extends$c({}, item, {
7619
+ // 加密图片的地址是有时效的
7620
+ coverPic: item.coverPic + "&decodekey=" + ((_this__options = _this._options) == null ? void 0 : (_this__options_props = _this__options.props) == null ? void 0 : (_this__options_props_urlInfo = _this__options_props.urlInfo) == null ? void 0 : _this__options_props_urlInfo.validateCode)
7621
+ });
7622
+ });
7623
+ }
7624
+ (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(_this.records);
7612
7625
  // this._modal?.showEventFilter(this._options.showEventFilter ?? true);
7613
7626
  });
7614
7627
  _this.on(EVENTS.getOSDTime, function(time) {
@@ -7713,12 +7726,12 @@ function _set_prototype_of$c(o, p) {
7713
7726
  };
7714
7727
  return _set_prototype_of$c(o, p);
7715
7728
  }
7716
- /**
7717
- * 告警消息按钮控件
7718
- *
7719
- * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
7720
- *
7721
- * @category Control
7729
+ /**
7730
+ * 告警消息按钮控件
7731
+ *
7732
+ * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
7733
+ *
7734
+ * @category Control
7722
7735
  */ var AlarmMessage = /*#__PURE__*/ function(Control) {
7723
7736
  _inherits$c(AlarmMessage, Control);
7724
7737
  function AlarmMessage(options) {
@@ -7742,16 +7755,16 @@ function _set_prototype_of$c(o, p) {
7742
7755
  title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
7743
7756
  });
7744
7757
  };
7745
- /**
7746
- * 销毁
7758
+ /**
7759
+ * 销毁
7747
7760
  */ _proto.destroy = function destroy() {
7748
7761
  if (this._panelOpen) {
7749
7762
  this.emit(EVENTS.control.alarmMessageChange, false);
7750
7763
  }
7751
7764
  Control.prototype.destroy.call(this);
7752
7765
  };
7753
- /**
7754
- * 点击 Control 会触发
7766
+ /**
7767
+ * 点击 Control 会触发
7755
7768
  */ _proto._onControlClick = function _onControlClick(e) {
7756
7769
  var _this__options_onChange, _this__options;
7757
7770
  Control.prototype._onControlClick.call(this, e);
@@ -7816,54 +7829,54 @@ var SELECT_DEFAULT_OPTIONS = {
7816
7829
  onChange: function onChange() {},
7817
7830
  onOpenChange: function onOpenChange() {}
7818
7831
  };
7819
- /**
7820
- * 选择器切换 (支持PC/Mobile)
7821
- * @category Control
7822
- * @example
7823
- * ```ts
7824
- * new Select({
7825
- * title: '清晰度',
7826
- * list: [
7827
- * {
7828
- * label: '高清',
7829
- * value: 'hd',
7830
- * streamTypeIn: 1,
7831
- * },
7832
- * {
7833
- * label: '超清',
7834
- * value: 'super',
7835
- * streamTypeIn: 2,
7836
- * }
7837
- * ],
7838
- * value: 'hd',
7839
- * onChange: (value, item) => {
7840
- * console.log('选择了', value, item);
7841
- * }
7842
- * })
7843
- *
7844
- * // 如果想扩展 Select 组件,可以继承 Select 组件
7845
- * // 例如清晰度切换组件
7846
- * class Definition extends Select {
7847
- * options: DefinitionOptions;
7848
- * constructor(options: DefinitionOptions) {
7849
- * super({
7850
- * ...options,
7851
- * fieldNames: { label: 'name', value: 'level',},
7852
- * title: options?.locale?.definition,
7853
- * controlType: 'button',
7854
- * classNameSuffix: 'definition',
7855
- * onChange: (value: SelectItem['value'], item) => {
7856
- * options?.onChange?.(value, item);
7857
- * this.emit(EVENTS.control.definitionChange, value, item);
7858
- * },
7859
- * onOpenChange: (open: boolean, value: SelectItem['value'], item) => {
7860
- * options?.onOpenChange?.(open, value, item);
7861
- * this.emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
7862
- * }
7863
- * });
7864
- * }
7865
- * }
7866
- * ```
7832
+ /**
7833
+ * 选择器切换 (支持PC/Mobile)
7834
+ * @category Control
7835
+ * @example
7836
+ * ```ts
7837
+ * new Select({
7838
+ * title: '清晰度',
7839
+ * list: [
7840
+ * {
7841
+ * label: '高清',
7842
+ * value: 'hd',
7843
+ * streamTypeIn: 1,
7844
+ * },
7845
+ * {
7846
+ * label: '超清',
7847
+ * value: 'super',
7848
+ * streamTypeIn: 2,
7849
+ * }
7850
+ * ],
7851
+ * value: 'hd',
7852
+ * onChange: (value, item) => {
7853
+ * console.log('选择了', value, item);
7854
+ * }
7855
+ * })
7856
+ *
7857
+ * // 如果想扩展 Select 组件,可以继承 Select 组件
7858
+ * // 例如清晰度切换组件
7859
+ * class Definition extends Select {
7860
+ * options: DefinitionOptions;
7861
+ * constructor(options: DefinitionOptions) {
7862
+ * super({
7863
+ * ...options,
7864
+ * fieldNames: { label: 'name', value: 'level',},
7865
+ * title: options?.locale?.definition,
7866
+ * controlType: 'button',
7867
+ * classNameSuffix: 'definition',
7868
+ * onChange: (value: SelectItem['value'], item) => {
7869
+ * options?.onChange?.(value, item);
7870
+ * this.emit(EVENTS.control.definitionChange, value, item);
7871
+ * },
7872
+ * onOpenChange: (open: boolean, value: SelectItem['value'], item) => {
7873
+ * options?.onOpenChange?.(open, value, item);
7874
+ * this.emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
7875
+ * }
7876
+ * });
7877
+ * }
7878
+ * }
7879
+ * ```
7867
7880
  */ var Select = /*#__PURE__*/ function(Control) {
7868
7881
  _inherits$b(Select, Control);
7869
7882
  function Select(options) {
@@ -7915,9 +7928,9 @@ var SELECT_DEFAULT_OPTIONS = {
7915
7928
  return _this;
7916
7929
  }
7917
7930
  var _proto = Select.prototype;
7918
- /**
7919
- * 更新选项列表
7920
- * @param list - 选项列表
7931
+ /**
7932
+ * 更新选项列表
7933
+ * @param list - 选项列表
7921
7934
  */ _proto.updateOptions = function updateOptions(list) {
7922
7935
  var _this = this;
7923
7936
  if (list === void 0) list = [];
@@ -8002,8 +8015,8 @@ var SELECT_DEFAULT_OPTIONS = {
8002
8015
  });
8003
8016
  }
8004
8017
  };
8005
- /**
8006
- * 销毁
8018
+ /**
8019
+ * 销毁
8007
8020
  */ _proto.destroy = function destroy() {
8008
8021
  var _this__delegationOption_destroy, _this__delegationOption, _this__delegationClose_destroy, _this__delegationClose, _this__delegationCancel_destroy, _this__delegationCancel;
8009
8022
  (_this__delegationOption = this._delegationOption) == null ? void 0 : (_this__delegationOption_destroy = _this__delegationOption.destroy) == null ? void 0 : _this__delegationOption_destroy.call(_this__delegationOption);
@@ -8025,8 +8038,8 @@ var SELECT_DEFAULT_OPTIONS = {
8025
8038
  e.stopPropagation();
8026
8039
  e.preventDefault();
8027
8040
  };
8028
- /**
8029
- * 点击 Control 会触发
8041
+ /**
8042
+ * 点击 Control 会触发
8030
8043
  */ _proto._onControlClick = function _onControlClick(e) {
8031
8044
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
8032
8045
  };
@@ -8045,8 +8058,8 @@ var SELECT_DEFAULT_OPTIONS = {
8045
8058
  },
8046
8059
  {
8047
8060
  key: "disabled",
8048
- get: /**
8049
- * 是否禁用
8061
+ get: /**
8062
+ * 是否禁用
8050
8063
  */ function get() {
8051
8064
  return this._disabled;
8052
8065
  },
@@ -8132,15 +8145,15 @@ function __filter(list, locale) {
8132
8145
  };
8133
8146
  });
8134
8147
  }
8135
- /**
8136
- * 清晰度切换控件
8137
- *
8138
- * 清晰度切换控件有三套UI
8139
- * 1. PC 端默认UI,hover 展示清晰度切换面板
8140
- * 2. 移动端 picker选择器清晰度切换面板 + 取消按钮
8141
- * 3. 移动端全屏模式右侧菜单清晰度切换面板
8142
- *
8143
- * @category Control
8148
+ /**
8149
+ * 清晰度切换控件
8150
+ *
8151
+ * 清晰度切换控件有三套UI
8152
+ * 1. PC 端默认UI,hover 展示清晰度切换面板
8153
+ * 2. 移动端 picker选择器清晰度切换面板 + 取消按钮
8154
+ * 3. 移动端全屏模式右侧菜单清晰度切换面板
8155
+ *
8156
+ * @category Control
8144
8157
  */ var Definition = /*#__PURE__*/ function(Select) {
8145
8158
  _inherits$a(Definition, Select);
8146
8159
  function Definition(options) {
@@ -8206,9 +8219,9 @@ function __filter(list, locale) {
8206
8219
  return _this;
8207
8220
  }
8208
8221
  var _proto = Definition.prototype;
8209
- /**
8210
- * 重置,恢复默认值
8211
- * @param hide 默认不隐藏
8222
+ /**
8223
+ * 重置,恢复默认值
8224
+ * @param hide 默认不隐藏
8212
8225
  */ _proto.reset = function reset(hide) {
8213
8226
  Select.prototype.reset.call(this, hide);
8214
8227
  };
@@ -8259,13 +8272,13 @@ var SUPPORT_SPEED = [
8259
8272
  16
8260
8273
  ]; // 8, 16
8261
8274
  var SPEED_DEFAULT_OPTIONS = {
8262
- /**
8263
- * 默认倍速 1, 如果传入的值不在列表中会使用 1 倍速,可能会没有选中
8264
- * 暂时不支持初始化时设置倍速
8275
+ /**
8276
+ * 默认倍速 1, 如果传入的值不在列表中会使用 1 倍速,可能会没有选中
8277
+ * 暂时不支持初始化时设置倍速
8265
8278
  */ // value: 1, // 对应list 中的 value
8266
8279
  // 这里不要设置多语言, 比较麻烦
8267
- /**
8268
- * 倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
8280
+ /**
8281
+ * 倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
8269
8282
  */ list: SUPPORT_SPEED.reverse().map(function(speed) {
8270
8283
  return {
8271
8284
  label: "" + speed + "x",
@@ -8273,13 +8286,13 @@ var SPEED_DEFAULT_OPTIONS = {
8273
8286
  };
8274
8287
  })
8275
8288
  };
8276
- /**
8277
- * 倍速切换控件, 不支持动态切换倍速列表
8278
- *
8279
- * 注意:
8280
- * 1. 本地回放倍速需要设备本身支持才可以, 如果不支持切换后的倍数不会生效, 云端回放(云存储,云录制)倍速都是支持, 需要是 2 的指数,不能小于 0.5, 最大 16 倍;
8281
- * 2. 标准流不支持;
8282
- * @category Control
8289
+ /**
8290
+ * 倍速切换控件, 不支持动态切换倍速列表
8291
+ *
8292
+ * 注意:
8293
+ * 1. 本地回放倍速需要设备本身支持才可以, 如果不支持切换后的倍数不会生效, 云端回放(云存储,云录制)倍速都是支持, 需要是 2 的指数,不能小于 0.5, 最大 16 倍;
8294
+ * 2. 标准流不支持;
8295
+ * @category Control
8283
8296
  */ var Speed = /*#__PURE__*/ function(Select) {
8284
8297
  _inherits$9(Speed, Select);
8285
8298
  function Speed(options) {
@@ -8313,10 +8326,10 @@ var SPEED_DEFAULT_OPTIONS = {
8313
8326
  return _this;
8314
8327
  }
8315
8328
  var _proto = Speed.prototype;
8316
- /**
8317
- * 滤掉本地回放不支持的倍速
8318
- * @param optionsList 初始化配置倍速列表
8319
- * @param type 回放类型
8329
+ /**
8330
+ * 滤掉本地回放不支持的倍速
8331
+ * @param optionsList 初始化配置倍速列表
8332
+ * @param type 回放类型
8320
8333
  */ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
8321
8334
  if (!optionsList) {
8322
8335
  // 非用户自定义 /openpb/ 是标准流回放路径
@@ -8375,9 +8388,9 @@ function _set_prototype_of$8(o, p) {
8375
8388
  };
8376
8389
  return _set_prototype_of$8(o, p);
8377
8390
  }
8378
- /**
8379
- * 日历选择器控件
8380
- * @category Control
8391
+ /**
8392
+ * 日历选择器控件
8393
+ * @category Control
8381
8394
  */ var DatePickerControl = /*#__PURE__*/ function(Control) {
8382
8395
  _inherits$8(DatePickerControl, Control);
8383
8396
  function DatePickerControl(options) {
@@ -8458,10 +8471,10 @@ function _set_prototype_of$8(o, p) {
8458
8471
  }
8459
8472
  }));
8460
8473
  };
8461
- /**
8462
- * 设置日期, change = true 时触发 onChange 事件
8463
- * @param date 设置的日期
8464
- * @param change 是否触发 onChange 事件
8474
+ /**
8475
+ * 设置日期, change = true 时触发 onChange 事件
8476
+ * @param date 设置的日期
8477
+ * @param change 是否触发 onChange 事件
8465
8478
  */ _proto.setDate = function setDate(date, change) {
8466
8479
  if (change === void 0) change = true;
8467
8480
  var _this_datePicker;
@@ -8477,9 +8490,9 @@ function _set_prototype_of$8(o, p) {
8477
8490
  if (this.datePicker) this.datePicker.open = false;
8478
8491
  Control.prototype.reset.call(this);
8479
8492
  };
8480
- /**
8481
- * 销毁控件
8482
- * @override
8493
+ /**
8494
+ * 销毁控件
8495
+ * @override
8483
8496
  */ _proto.destroy = function destroy() {
8484
8497
  if (this.datePicker) {
8485
8498
  this.datePicker.destroy();
@@ -8492,9 +8505,9 @@ function _set_prototype_of$8(o, p) {
8492
8505
  var arr = this._value.split('-');
8493
8506
  return arr[1] + "." + arr[2];
8494
8507
  };
8495
- /**
8496
- * 点击 Control 会触发
8497
- * @overload super._onControlClick(e: Event)
8508
+ /**
8509
+ * 点击 Control 会触发
8510
+ * @overload super._onControlClick(e: Event)
8498
8511
  */ _proto._onControlClick = function _onControlClick(e) {
8499
8512
  Control.prototype._onControlClick.call(this, e);
8500
8513
  };
@@ -8532,9 +8545,9 @@ function _set_prototype_of$7(o, p) {
8532
8545
  return _set_prototype_of$7(o, p);
8533
8546
  }
8534
8547
  /** 时间格式 HH:mm:ss */ var TIME_FORMAT = 'HH:mm:ss';
8535
- /**
8536
- * 时间选择器控件
8537
- * @category Control
8548
+ /**
8549
+ * 时间选择器控件
8550
+ * @category Control
8538
8551
  */ var TimePickerControl = /*#__PURE__*/ function(Control) {
8539
8552
  _inherits$7(TimePickerControl, Control);
8540
8553
  function TimePickerControl(options) {
@@ -8595,9 +8608,9 @@ function _set_prototype_of$7(o, p) {
8595
8608
  }
8596
8609
  }));
8597
8610
  };
8598
- /**
8599
- * 设置时间
8600
- * @param time 设置的时间 HH:mm:ss
8611
+ /**
8612
+ * 设置时间
8613
+ * @param time 设置的时间 HH:mm:ss
8601
8614
  */ _proto.setTime = function setTime(time) {
8602
8615
  var _this_timePicker;
8603
8616
  (_this_timePicker = this.timePicker) == null ? void 0 : _this_timePicker.setCurrent(time);
@@ -8613,9 +8626,9 @@ function _set_prototype_of$7(o, p) {
8613
8626
  if (this.timePicker) this.timePicker.open = false;
8614
8627
  Control.prototype.reset.call(this);
8615
8628
  };
8616
- /**
8617
- * 销毁控件
8618
- * @override
8629
+ /**
8630
+ * 销毁控件
8631
+ * @override
8619
8632
  */ _proto.destroy = function destroy() {
8620
8633
  if (this.timePicker) {
8621
8634
  this.timePicker.destroy();
@@ -8627,9 +8640,9 @@ function _set_prototype_of$7(o, p) {
8627
8640
  _proto._getTimeStr = function _getTimeStr() {
8628
8641
  return this._value;
8629
8642
  };
8630
- /**
8631
- * 点击 Control 会触发
8632
- * @overload super._onControlClick(e: Event)
8643
+ /**
8644
+ * 点击 Control 会触发
8645
+ * @overload super._onControlClick(e: Event)
8633
8646
  */ _proto._onControlClick = function _onControlClick(e) {
8634
8647
  Control.prototype._onControlClick.call(this, e);
8635
8648
  };
@@ -8666,8 +8679,8 @@ function _set_prototype_of$6(o, p) {
8666
8679
  };
8667
8680
  return _set_prototype_of$6(o, p);
8668
8681
  }
8669
- /**
8670
- * 回放时间轴控件
8682
+ /**
8683
+ * 回放时间轴控件
8671
8684
  */ var TimeLineControl = /*#__PURE__*/ function(Control) {
8672
8685
  _inherits$6(TimeLineControl, Control);
8673
8686
  function TimeLineControl(options) {
@@ -8827,8 +8840,8 @@ function _set_prototype_of$6(o, p) {
8827
8840
  }
8828
8841
  Control.prototype.destroy.call(this);
8829
8842
  };
8830
- /**
8831
- * 点击 Control 会触发
8843
+ /**
8844
+ * 点击 Control 会触发
8832
8845
  */ _proto._onControlClick = function _onControlClick(e) {
8833
8846
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
8834
8847
  };
@@ -8865,24 +8878,24 @@ function _set_prototype_of$5(o, p) {
8865
8878
  };
8866
8879
  return _set_prototype_of$5(o, p);
8867
8880
  }
8868
- /**
8869
- * 播放结束后忽略 OSD 回写的静默期(毫秒)
8870
- *
8871
- * 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
8872
- * api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
8873
- * 会把刚补满的进度拉回去。取值需覆盖该窗口。
8874
- *
8875
- * 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
8876
- * 进度条的 onChange,永久忽略会让进度条卡死不再更新。
8881
+ /**
8882
+ * 播放结束后忽略 OSD 回写的静默期(毫秒)
8883
+ *
8884
+ * 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
8885
+ * api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
8886
+ * 会把刚补满的进度拉回去。取值需覆盖该窗口。
8887
+ *
8888
+ * 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
8889
+ * 进度条的 onChange,永久忽略会让进度条卡死不再更新。
8877
8890
  */ var PLAYBACK_END_SILENCE_MS = 3000;
8878
- /**
8879
- * 读取录像片段的起止时间(毫秒)
8880
- *
8881
- * 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
8882
- * 两套字段名在不同回放类型下都出现过,这里统一兼容。
8883
- *
8884
- * @param seg 录像片段
8885
- * @param which 取起点还是终点
8891
+ /**
8892
+ * 读取录像片段的起止时间(毫秒)
8893
+ *
8894
+ * 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
8895
+ * 两套字段名在不同回放类型下都出现过,这里统一兼容。
8896
+ *
8897
+ * @param seg 录像片段
8898
+ * @param which 取起点还是终点
8886
8899
  */ function segMs(seg, which) {
8887
8900
  var _ref, _ref1;
8888
8901
  var value = which === 'start' ? (_ref = seg == null ? void 0 : seg.startTime) != null ? _ref : seg == null ? void 0 : seg.begin : (_ref1 = seg == null ? void 0 : seg.endTime) != null ? _ref1 : seg == null ? void 0 : seg.end;
@@ -8890,12 +8903,12 @@ function _set_prototype_of$5(o, p) {
8890
8903
  if (typeof value === 'number') return value < 1e12 ? value * 1000 : value;
8891
8904
  return DateTime.toDate(value).getTime();
8892
8905
  }
8893
- /**
8894
- * 回放片段进度条控件(移动端)
8895
- *
8896
- * 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
8897
- * 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
8898
- * @category Control
8906
+ /**
8907
+ * 回放片段进度条控件(移动端)
8908
+ *
8909
+ * 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
8910
+ * 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
8911
+ * @category Control
8899
8912
  */ var SegmentProgressControl = /*#__PURE__*/ function(Control) {
8900
8913
  _inherits$5(SegmentProgressControl, Control);
8901
8914
  function SegmentProgressControl(options) {
@@ -8962,9 +8975,9 @@ function _set_prototype_of$5(o, p) {
8962
8975
  });
8963
8976
  this._updateVisible();
8964
8977
  };
8965
- /**
8966
- * 设置播放区间
8967
- * @param range 区间;null 表示解除约束
8978
+ /**
8979
+ * 设置播放区间
8980
+ * @param range 区间;null 表示解除约束
8968
8981
  */ _proto._setRange = function _setRange(range) {
8969
8982
  if ((range == null ? void 0 : range.begin) && (range == null ? void 0 : range.end)) {
8970
8983
  this._rangeBeginMs = DateTime.toDate(range.begin).getTime();
@@ -8975,9 +8988,9 @@ function _set_prototype_of$5(o, p) {
8975
8988
  }
8976
8989
  this._updateVisible();
8977
8990
  };
8978
- /**
8979
- * 用区间裁剪录像片段
8980
- * @param records 全天录像片段
8991
+ /**
8992
+ * 用区间裁剪录像片段
8993
+ * @param records 全天录像片段
8981
8994
  */ _proto._setSegments = function _setSegments(records) {
8982
8995
  var _this = this;
8983
8996
  if (!this._hasRange() || !Array.isArray(records)) {
@@ -9005,9 +9018,9 @@ function _set_prototype_of$5(o, p) {
9005
9018
  if (force) this._currentIndex = -1;
9006
9019
  this._updateVisible();
9007
9020
  };
9008
- /**
9009
- * 按播放进度更新片段与进度
9010
- * @param currentMs 当前播放时间(毫秒)
9021
+ /**
9022
+ * 按播放进度更新片段与进度
9023
+ * @param currentMs 当前播放时间(毫秒)
9011
9024
  */ _proto._syncCurrent = function _syncCurrent(currentMs) {
9012
9025
  if (!this._hasRange()) return;
9013
9026
  var index = this._segments.findIndex(function(seg) {
@@ -9078,9 +9091,9 @@ function _set_prototype_of$4(o, p) {
9078
9091
  };
9079
9092
  return _set_prototype_of$4(o, p);
9080
9093
  }
9081
- /**
9082
- * 展示设备序列号控件
9083
- * @category Control
9094
+ /**
9095
+ * 展示设备序列号控件
9096
+ * @category Control
9084
9097
  */ var Device = /*#__PURE__*/ function(Control) {
9085
9098
  _inherits$4(Device, Control);
9086
9099
  function Device(options) {
@@ -9098,10 +9111,10 @@ function _set_prototype_of$4(o, p) {
9098
9111
  var _this___options_props_urlInfo, _this___options_props;
9099
9112
  this.$container.innerHTML = '<span class="' + PREFIX_CLASS + "-text " + PREFIX_CLASS + '-text-device">' + this._splicingString(this.__options.deviceName, (_this___options_props = this.__options.props) == null ? void 0 : (_this___options_props_urlInfo = _this___options_props.urlInfo) == null ? void 0 : _this___options_props_urlInfo.deviceSerial) + "</span>";
9100
9113
  };
9101
- /**
9102
- * 更新设备序列号
9103
- * @param deviceSerial - 设备序列号
9104
- * @param deviceName - 设备名称
9114
+ /**
9115
+ * 更新设备序列号
9116
+ * @param deviceSerial - 设备序列号
9117
+ * @param deviceName - 设备名称
9105
9118
  */ _proto.update = function update(deviceName, deviceSerial) {
9106
9119
  if (this.$container.querySelector("." + PREFIX_CLASS + "-text-device")) {
9107
9120
  var $span = this.$container.querySelector("." + PREFIX_CLASS + "-text-device");
@@ -9259,8 +9272,8 @@ function _set_prototype_of$2(o, p) {
9259
9272
  // const MobileExtend_DEFAULT_Options = {
9260
9273
  // controls: MOBILE_EXTENDS,
9261
9274
  // };
9262
- /**
9263
- * 移动端扩展
9275
+ /**
9276
+ * 移动端扩展
9264
9277
  */ var MobileExtend = /*#__PURE__*/ function(EventEmitter) {
9265
9278
  _inherits$2(MobileExtend, EventEmitter);
9266
9279
  function MobileExtend($siblingContainer) {
@@ -9337,9 +9350,9 @@ function _set_prototype_of$1(o, p) {
9337
9350
  return _set_prototype_of$1(o, p);
9338
9351
  }
9339
9352
  var PAUSE_DEFAULT_OPTIONS = {};
9340
- /**
9341
- * 暂停控件(仅在第一次非自动播放时可以点击播放), 防止和放大有冲突
9342
- * @category Control
9353
+ /**
9354
+ * 暂停控件(仅在第一次非自动播放时可以点击播放), 防止和放大有冲突
9355
+ * @category Control
9343
9356
  */ var Pause = /*#__PURE__*/ function(Control) {
9344
9357
  _inherits$1(Pause, Control);
9345
9358
  function Pause(options) {
@@ -9355,8 +9368,8 @@ var PAUSE_DEFAULT_OPTIONS = {};
9355
9368
  return _this;
9356
9369
  }
9357
9370
  var _proto = Pause.prototype;
9358
- /**
9359
- * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
9371
+ /**
9372
+ * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
9360
9373
  */ _proto.show = function show(playing, always) {
9361
9374
  var _this = this;
9362
9375
  var _this_$container_classList, _this_$container;
@@ -9401,8 +9414,8 @@ var PAUSE_DEFAULT_OPTIONS = {};
9401
9414
  }, 300);
9402
9415
  }, 10);
9403
9416
  };
9404
- /**
9405
- * 销毁
9417
+ /**
9418
+ * 销毁
9406
9419
  */ _proto.destroy = function destroy() {
9407
9420
  if (this._timer) {
9408
9421
  clearTimeout(this._timer);
@@ -9690,10 +9703,10 @@ var AUTH_KEY = [
9690
9703
  'recDropdown',
9691
9704
  'alarmMessage'
9692
9705
  ];
9693
- /**
9694
- * 渲染控件
9695
- * @param $container - 控件渲染节点
9696
- * @param btnList - 控件按钮列表
9706
+ /**
9707
+ * 渲染控件
9708
+ * @param $container - 控件渲染节点
9709
+ * @param btnList - 控件按钮列表
9697
9710
  */ // prettier-ignore
9698
9711
  function _renderControls(theme, $container, btnList, props) {
9699
9712
  if (props === void 0) props = {};
@@ -10095,27 +10108,27 @@ var _renderRecType = function _renderRecType(theme, container, recType, props) {
10095
10108
  if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1['recControl']) ((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['recControl']).addRecType(recType);
10096
10109
  };
10097
10110
 
10098
- /**
10099
- * 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
10100
- *
10101
- * @remarks
10102
- * 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
10103
- * 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
10104
- * 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
10105
- */ /**
10106
- * 一次 classList 变更集合:需要添加与需要移除的类名。
10107
- */ /**
10108
- * 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
10109
- *
10110
- * 档位规则:
10111
- * - `(280, 375]` → medium
10112
- * - `(200, 280]` → small
10113
- * - `<= 200` → mini
10114
- * - 其它(> 375)→ 无档位(移除全部)
10115
- *
10116
- * @param size 尺寸(px)
10117
- * @param axis `'width'` 或 `'height'`
10118
- * @param prefix 类名前缀(如 `ezplayer`)
10111
+ /**
10112
+ * 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
10113
+ *
10114
+ * @remarks
10115
+ * 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
10116
+ * 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
10117
+ * 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
10118
+ */ /**
10119
+ * 一次 classList 变更集合:需要添加与需要移除的类名。
10120
+ */ /**
10121
+ * 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
10122
+ *
10123
+ * 档位规则:
10124
+ * - `(280, 375]` → medium
10125
+ * - `(200, 280]` → small
10126
+ * - `<= 200` → mini
10127
+ * - 其它(> 375)→ 无档位(移除全部)
10128
+ *
10129
+ * @param size 尺寸(px)
10130
+ * @param axis `'width'` 或 `'height'`
10131
+ * @param prefix 类名前缀(如 `ezplayer`)
10119
10132
  */ function computeDimensionClasses(size, axis, prefix) {
10120
10133
  var medium = prefix + "-medium-" + axis;
10121
10134
  var small = prefix + "-small-" + axis;
@@ -10141,11 +10154,11 @@ var _renderRecType = function _renderRecType(theme, container, recType, props) {
10141
10154
  remove: remove
10142
10155
  };
10143
10156
  }
10144
- /**
10145
- * 计算宽、高两个维度的响应式档位类名增删集合。
10146
- * @param width 容器宽度(px)
10147
- * @param height 容器高度(px)
10148
- * @param prefix 类名前缀
10157
+ /**
10158
+ * 计算宽、高两个维度的响应式档位类名增删集合。
10159
+ * @param width 容器宽度(px)
10160
+ * @param height 容器高度(px)
10161
+ * @param prefix 类名前缀
10149
10162
  */ function computeSizeClasses(width, height, prefix) {
10150
10163
  var w = computeDimensionClasses(width, 'width', prefix);
10151
10164
  var h = computeDimensionClasses(height, 'height', prefix);
@@ -10154,34 +10167,34 @@ var _renderRecType = function _renderRecType(theme, container, recType, props) {
10154
10167
  remove: [].concat(w.remove, h.remove)
10155
10168
  };
10156
10169
  }
10157
- /**
10158
- * header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
10170
+ /**
10171
+ * header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
10159
10172
  */ function shouldShowHeaderMore(width, leftWidth, rightWidth) {
10160
10173
  return leftWidth + rightWidth + 30 > width;
10161
10174
  }
10162
- /**
10163
- * header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
10175
+ /**
10176
+ * header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
10164
10177
  */ function shouldRemoveHeaderMore(width, leftWidth, rightWidth) {
10165
10178
  return width - leftWidth - rightWidth > 100;
10166
10179
  }
10167
- /**
10168
- * footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
10180
+ /**
10181
+ * footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
10169
10182
  */ function shouldCollapseFooter(width, leftWidth, rightWidth) {
10170
10183
  return width - leftWidth - rightWidth < 16;
10171
10184
  }
10172
- /**
10173
- * footer 从 More 中释放控件时的展开阈值。
10174
- *
10175
- * 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
10176
- * `50 + firstItemWidth || 0`)。
10177
- * @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
10185
+ /**
10186
+ * footer 从 More 中释放控件时的展开阈值。
10187
+ *
10188
+ * 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
10189
+ * `50 + firstItemWidth || 0`)。
10190
+ * @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
10178
10191
  */ function computeFooterExpandOffset(firstItemWidth) {
10179
10192
  var base = 50;
10180
10193
  if (firstItemWidth === undefined) return base;
10181
10194
  return base + firstItemWidth || 0;
10182
10195
  }
10183
- /**
10184
- * footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
10196
+ /**
10197
+ * footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
10185
10198
  */ function shouldExpandFooter(width, leftWidth, rightWidth, offset) {
10186
10199
  return width - leftWidth - rightWidth > offset;
10187
10200
  }
@@ -10397,6 +10410,7 @@ var THEME_DEFAULT_OPTIONS = {
10397
10410
  env: {
10398
10411
  domain: 'https://open.ys7.com'
10399
10412
  },
10413
+ isEzviz: true,
10400
10414
  /** 移动端竖屏, 全屏情况下不展示扩张,放置在 footer 中 */ mobileExtendOptions: {
10401
10415
  controls: MOBILE_EXTENDS
10402
10416
  }
@@ -11821,6 +11835,7 @@ var THEME_DEFAULT_OPTIONS = {
11821
11835
  * 判断播放地址是萤石的播放地址
11822
11836
  * @since 3.1.2
11823
11837
  */ function get() {
11838
+ if (this.options.isEzviz) return true;
11824
11839
  try {
11825
11840
  var _this__url_split, _this__url_split1, _path_split;
11826
11841
  var path = (_this__url_split = this._url.split('?')) == null ? void 0 : _this__url_split[0];
@@ -11833,7 +11848,8 @@ var THEME_DEFAULT_OPTIONS = {
11833
11848
  // https://host:2001/live?dev=D08197169&chn=1&ss=token&stream=1
11834
11849
  if (// 私有流地址
11835
11850
  /^ezopen:\/\//.test(path) || // 标准流地址
11836
- path.includes('/openlive/') || path.includes('/openpb/') && /[a-zA-Z0-9:]+_\d+_\d+/.test(lastPath) || // webtransport 取流
11851
+ // 海外回放 https://test-ali-live.ys7.com/400e03b1738a484685f1bc2359fa141c_live/439ee62f0749a11f24595f35137b50af-BA0844510_1_1.flv?auth_key=1804485786-0-0-043eb3c148737c0f007a63e3e07243e6&begin=20250317190802&end=20250317231056&rec=local&v=1&vc=3
11852
+ (path.includes('/openlive/') || path.includes('/openpb/') || queryStr.includes('v=1') && (queryStr.includes('rec=local') || queryStr.includes('rec=cloud'))) && /[a-zA-Z0-9:]+_\d+_\d+/.test(lastPath) || // webtransport 取流
11837
11853
  isHttp(this._url) && queryStr && /dev=[a-zA-Z0-9:]+/.test(queryStr) && /chn=\d+/.test(queryStr) && /stream=\d+/.test(queryStr) && queryStr.includes('ssn=')) {
11838
11854
  return true;
11839
11855
  }
@@ -11852,6 +11868,6 @@ var THEME_DEFAULT_OPTIONS = {
11852
11868
  zh: zh,
11853
11869
  en: en
11854
11870
  };
11855
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.5-beta.2';
11871
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.5-beta.4';
11856
11872
 
11857
11873
  export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };