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