@ezuikit/player-theme 3.1.5-beta.3 → 3.1.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v3.1.5-beta.3
3
- * Copyright (c) 2026-09-04 06:40:24 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v3.1.6-beta.1
3
+ * Copyright (c) 2026-09-16 19:24:27 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
@@ -219,6 +219,8 @@ var EVENTS = {
219
219
  /** 日期面板展示隐藏变换 */ datePanelOpenChange: 'Control.datePanelOpenChange',
220
220
  /** 日期改变 */ dateChange: 'Control.dateChange',
221
221
  /** 日期改变 */ dateMonthChange: 'Control.dateMonthChange',
222
+ /** 日期面板展示的月份变化 */ datePanelMonthChange: 'Control.datePanelMonthChange',
223
+ /** 日期面板展示的年份变化 */ datePanelYearChange: 'Control.datePanelYearChange',
222
224
  /** 日期销毁 */ dateDestroy: 'Control.datePanelDestroy',
223
225
  /** 时间面板展示隐藏变换 */ timePanelOpenChange: 'Control.timePanelOpenChange',
224
226
  /** 时间改变 */ timeChange: 'Control.timeChange',
@@ -284,17 +286,17 @@ function _set_prototype_of$z(o, p) {
284
286
  };
285
287
  return _set_prototype_of$z(o, p);
286
288
  }
287
- /**
288
- * 控件基类
289
- * @category Control
290
- * @example
291
- * ```ts
292
- * // 创建控件
293
- * class MyControl extends Control {}
294
- *
295
- * // 使用控件
296
- * const myControl = new MyControl({})
297
- * ```
289
+ /**
290
+ * 控件基类
291
+ * @category Control
292
+ * @example
293
+ * ```ts
294
+ * // 创建控件
295
+ * class MyControl extends Control {}
296
+ *
297
+ * // 使用控件
298
+ * const myControl = new MyControl({})
299
+ * ```
298
300
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
299
301
  _inherits$z(Control, EventEmitter);
300
302
  function Control(options) {
@@ -336,22 +338,22 @@ function _set_prototype_of$z(o, p) {
336
338
  return _this;
337
339
  }
338
340
  var _proto = Control.prototype;
339
- /**
340
- * 重置整个控件
341
+ /**
342
+ * 重置整个控件
341
343
  */ _proto.reset = function reset(hide) {
342
344
  if (this._camelCaseName) {
343
345
  this.emit("Control." + this._camelCaseName + "Reset", hide);
344
346
  }
345
347
  };
346
- /**
347
- * 重置控件挂载节点
348
- * @param popupContainer 重新挂载的节点
349
- * @param append 添加的方式, 默认 append
350
- * @param element 当 append = before 时 需要 element, 插入 element 前
351
- *
352
- * | prepend | append |
353
- * |:-------------:|:---------------:|
354
- * | 插入第一个位置 | 追加在末尾 |
348
+ /**
349
+ * 重置控件挂载节点
350
+ * @param popupContainer 重新挂载的节点
351
+ * @param append 添加的方式, 默认 append
352
+ * @param element 当 append = before 时 需要 element, 插入 element 前
353
+ *
354
+ * | prepend | append |
355
+ * |:-------------:|:---------------:|
356
+ * | 插入第一个位置 | 追加在末尾 |
355
357
  */ _proto.resetPopupContainer = function resetPopupContainer(popupContainer, append, element) {
356
358
  if (popupContainer !== this.$popupContainer) {
357
359
  if (this.$popupContainer.contains(this.$container)) {
@@ -373,16 +375,16 @@ function _set_prototype_of$z(o, p) {
373
375
  }
374
376
  }
375
377
  };
376
- /**
377
- * 隐藏整个控件
378
+ /**
379
+ * 隐藏整个控件
378
380
  */ _proto.hide = function hide() {
379
381
  if (this.$container) {
380
382
  this.$container.style.display = 'none';
381
383
  this.$container.classList.add("" + PREFIX_CLASS + "-hide");
382
384
  }
383
385
  };
384
- /**
385
- * 销毁控件
386
+ /**
387
+ * 销毁控件
386
388
  */ _proto.destroy = function destroy() {
387
389
  var _this___options, _this_$container_remove, _this_$container;
388
390
  if (this._camelCaseName) {
@@ -419,8 +421,8 @@ function _set_prototype_of$z(o, p) {
419
421
  (_this_$container1 = this.$container) == null ? void 0 : _this_$container1.classList.remove("" + PREFIX_CLASS + "-active");
420
422
  }
421
423
  };
422
- /**
423
- * 当点击 Control 时 触发子类的 _onControlClick
424
+ /**
425
+ * 当点击 Control 时 触发子类的 _onControlClick
424
426
  */ _proto._onClick = function _onClick() {
425
427
  var _this = this;
426
428
  // 使用具名 handler 便于在 destroy 时精确移除,避免匿名监听残留
@@ -438,10 +440,10 @@ function _set_prototype_of$z(o, p) {
438
440
  e.stopPropagation();
439
441
  e.preventDefault();
440
442
  };
441
- /**
442
- * 点击 Control 控件触发
443
- * @param {Event} e
444
- * @returns {void}
443
+ /**
444
+ * 点击 Control 控件触发
445
+ * @param {Event} e
446
+ * @returns {void}
445
447
  */ _proto._onControlClick = function _onControlClick(e) {
446
448
  // 这是一个空函数, 子类可以实现重新改方法
447
449
  this.__options.onClick == null ? void 0 : this.__options.onClick.call(this.__options, e);
@@ -449,8 +451,8 @@ function _set_prototype_of$z(o, p) {
449
451
  _create_class$9(Control, [
450
452
  {
451
453
  key: "active",
452
- get: /**
453
- * 是否激活
454
+ get: /**
455
+ * 是否激活
454
456
  */ function get() {
455
457
  return this._active;
456
458
  },
@@ -465,8 +467,8 @@ function _set_prototype_of$z(o, p) {
465
467
  },
466
468
  {
467
469
  key: "disabled",
468
- get: /**
469
- * 是否禁用
470
+ get: /**
471
+ * 是否禁用
470
472
  */ function get() {
471
473
  return this._disabled;
472
474
  },
@@ -510,9 +512,9 @@ function _set_prototype_of$y(o, p) {
510
512
  return _set_prototype_of$y(o, p);
511
513
  }
512
514
  var LOADING_DEFAULT_OPTIONS = {};
513
- /**
514
- * 加载动画控件
515
- * @category Control
515
+ /**
516
+ * 加载动画控件
517
+ * @category Control
516
518
  */ var Loading = /*#__PURE__*/ function(Control) {
517
519
  _inherits$y(Loading, Control);
518
520
  function Loading(options) {
@@ -537,9 +539,9 @@ var LOADING_DEFAULT_OPTIONS = {};
537
539
  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
540
  }
539
541
  };
540
- /**
541
- * 动画展示
542
- * @param html 自定义动画内容, 如果不存在则使用默认动画
542
+ /**
543
+ * 动画展示
544
+ * @param html 自定义动画内容, 如果不存在则使用默认动画
543
545
  */ _proto.show = function show(html) {
544
546
  if (html) this.$container.innerHTML = html;
545
547
  // 初始化, 出流再等待中(回放出流结束不包括)
@@ -547,8 +549,8 @@ var LOADING_DEFAULT_OPTIONS = {};
547
549
  this.$container.classList.remove("" + PREFIX_CLASS + "-hide");
548
550
  this.$popupContainer.classList.add("" + PREFIX_CLASS + "-has-loading");
549
551
  };
550
- /**
551
- * 隐藏动画
552
+ /**
553
+ * 隐藏动画
552
554
  */ _proto.hide = function hide() {
553
555
  Control.prototype.hide.call(this);
554
556
  this.$popupContainer.classList.remove("" + PREFIX_CLASS + "-has-loading");
@@ -592,9 +594,9 @@ var DEFAULT_POSTER = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29
592
594
  var POSTER_OPTIONS = {
593
595
  poster: DEFAULT_POSTER
594
596
  };
595
- /**
596
- * 封面控件
597
- * @category Control
597
+ /**
598
+ * 封面控件
599
+ * @category Control
598
600
  */ var Poster = /*#__PURE__*/ function(Control) {
599
601
  _inherits$x(Poster, Control);
600
602
  function Poster(options) {
@@ -614,18 +616,18 @@ var POSTER_OPTIONS = {
614
616
  return _this;
615
617
  }
616
618
  var _proto = Poster.prototype;
617
- /**
618
- * 封面图片加载失败
619
- * @param error
619
+ /**
620
+ * 封面图片加载失败
621
+ * @param error
620
622
  */ _proto._imgLoadErrorEvent = function _imgLoadErrorEvent(error) {
621
623
  var _error_target;
622
624
  // 封面加载失败, 一般只有自定义封面会出现这种情况
623
625
  // 这里不做img src重置处理 防止无限循环
624
626
  this._options.onLoadImgError == null ? void 0 : this._options.onLoadImgError.call(this._options, ((_error_target = error.target) == null ? void 0 : _error_target.getAttribute('src')) || '');
625
627
  };
626
- /**
627
- * 设置封面 这里不对 poster 进行缓存,如果有值优先使用,如果没有值优先使用 初始化传入的值
628
- * @param {string} poster 封面地址或 base64 数据
628
+ /**
629
+ * 设置封面 这里不对 poster 进行缓存,如果有值优先使用,如果没有值优先使用 初始化传入的值
630
+ * @param {string} poster 封面地址或 base64 数据
629
631
  */ _proto.setPoster = function setPoster(poster) {
630
632
  var // eslint-disable-next-line @typescript-eslint/unbound-method
631
633
  // prettier-ignore
@@ -638,24 +640,24 @@ var POSTER_OPTIONS = {
638
640
  this.$container.innerHTML = '<img class="' + PREFIX_CLASS + '-poster-img" src="' + poster + '" />';
639
641
  (_this_$container_querySelector = this.$container.querySelector("." + PREFIX_CLASS + "-poster-img")) == null ? void 0 : _this_$container_querySelector.addEventListener("error", this._imgLoadErrorEvent);
640
642
  };
641
- /**
642
- * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
643
+ /**
644
+ * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
643
645
  */ _proto.show = function show() {
644
646
  if (this.$container) {
645
647
  this.$container.style.display = 'flex';
646
648
  this.$container.classList.remove("" + PREFIX_CLASS + "-hide");
647
649
  }
648
650
  };
649
- /**
650
- * 隐藏封面
651
+ /**
652
+ * 隐藏封面
651
653
  */ _proto.hide = function hide() {
652
654
  var // eslint-disable-next-line @typescript-eslint/unbound-method
653
655
  _this_$container_querySelector, _this_$container;
654
656
  Control.prototype.hide.call(this);
655
657
  (_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
658
  };
657
- /**
658
- * 销毁
659
+ /**
660
+ * 销毁
659
661
  */ _proto.destroy = function destroy() {
660
662
  this.hide();
661
663
  Control.prototype.destroy.call(this);
@@ -714,15 +716,15 @@ var Icons = {
714
716
  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
717
  };
716
718
 
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
- * ```
719
+ /**
720
+ * 创建 icon 组件
721
+ * @param svg - svg 字符串
722
+ * @param type - icon 类型
723
+ * @returns icon 组件
724
+ * @example
725
+ * ```ts
726
+ * createIcon('<svg>....</svg>', 'logo') // <span class="ezplayer-icon ezplayer-icon-logo"><svg>....</svg></span>
727
+ * ```
726
728
  */ function createIcon(svg, type, attr) {
727
729
  if (attr === void 0) attr = {};
728
730
  var attrStr = '';
@@ -923,9 +925,9 @@ function _set_prototype_of$w(o, p) {
923
925
  return _set_prototype_of$w(o, p);
924
926
  }
925
927
  var MESSAGE_DEFAULT_OPTIONS = {};
926
- /**
927
- * 消息控件
928
- * @category Control
928
+ /**
929
+ * 消息控件
930
+ * @category Control
929
931
  */ var Message = /*#__PURE__*/ function(Control) {
930
932
  _inherits$w(Message, Control);
931
933
  function Message(options) {
@@ -940,34 +942,34 @@ var MESSAGE_DEFAULT_OPTIONS = {};
940
942
  return _this;
941
943
  }
942
944
  var _proto = Message.prototype;
943
- /**
944
- * info 普通消息, 内容默认字体白色
945
- * @param {string} msg 消息内容
946
- * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
945
+ /**
946
+ * info 普通消息, 内容默认字体白色
947
+ * @param {string} msg 消息内容
948
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
947
949
  */ _proto.info = function info(msg, duration) {
948
950
  if (duration === void 0) duration = 2;
949
951
  this._toast(msg, 'info', duration);
950
952
  };
951
- /**
952
- * warn 警告消息, 内容默认字体黄色
953
- * @param {string} msg 消息内容
954
- * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
953
+ /**
954
+ * warn 警告消息, 内容默认字体黄色
955
+ * @param {string} msg 消息内容
956
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 2s后 关闭, 需手动 调用 hide()
955
957
  */ _proto.warn = function warn(msg, duration) {
956
958
  if (duration === void 0) duration = 2;
957
959
  this._toast(msg, 'warn', duration);
958
960
  };
959
- /**
960
- * toast 错误消息(渲染在 rootContainer 上的浮层)
961
- * @param {string} msg 消息内容
962
- * @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
961
+ /**
962
+ * toast 错误消息(渲染在 rootContainer 上的浮层)
963
+ * @param {string} msg 消息内容
964
+ * @param {number} duration 自动关闭延时,单位秒, 默认 2s 后关闭
963
965
  */ _proto.toastError = function toastError(msg, duration) {
964
966
  if (duration === void 0) duration = 2;
965
967
  this._toast(msg, 'error', duration);
966
968
  };
967
- /**
968
- * error 错误消息, 内容默认字体红色
969
- * @param {string} msg 消息内容
970
- * @param {number=} duration 认自动关闭延时,单位秒, 默认 0 不关闭, 需手动 调用 hide()
969
+ /**
970
+ * error 错误消息, 内容默认字体红色
971
+ * @param {string} msg 消息内容
972
+ * @param {number=} duration 认自动关闭延时,单位秒, 默认 0 不关闭, 需手动 调用 hide()
971
973
  */ _proto.error = function error(msg, duration) {
972
974
  if (duration === void 0) duration = 0;
973
975
  this._show(this._getIcon('error') + '<div class="' + PREFIX_CLASS + '-message-msg">' + (msg || '') + "</div>", duration, 'error');
@@ -996,11 +998,11 @@ var MESSAGE_DEFAULT_OPTIONS = {};
996
998
  }
997
999
  }
998
1000
  };
999
- /**
1000
- * 展示消息,如果同时调用多次只展示最后一次的消息
1001
- * @param {string} msg 消息内容, 支持 html dom 字符串
1002
- * @param {number} duration 认自动关闭延时,单位秒, 默认 0 不关闭 需手动 调用 hide()
1003
- * @param {MessageType} type 消息类型
1001
+ /**
1002
+ * 展示消息,如果同时调用多次只展示最后一次的消息
1003
+ * @param {string} msg 消息内容, 支持 html dom 字符串
1004
+ * @param {number} duration 认自动关闭延时,单位秒, 默认 0 不关闭 需手动 调用 hide()
1005
+ * @param {MessageType} type 消息类型
1004
1006
  */ _proto._show = function _show(msg, duration, type) {
1005
1007
  var _this = this;
1006
1008
  if (duration === void 0) duration = 0;
@@ -1028,8 +1030,8 @@ var MESSAGE_DEFAULT_OPTIONS = {};
1028
1030
  }, duration * 1000);
1029
1031
  }
1030
1032
  };
1031
- /**
1032
- * 销毁
1033
+ /**
1034
+ * 销毁
1033
1035
  */ _proto.destroy = function destroy() {
1034
1036
  var _this__$toast;
1035
1037
  if (this._timer) {
@@ -1044,8 +1046,8 @@ var MESSAGE_DEFAULT_OPTIONS = {};
1044
1046
  this.hide();
1045
1047
  Control.prototype.destroy.call(this);
1046
1048
  };
1047
- /**
1048
- * 隐藏消息, 并清空消息内容
1049
+ /**
1050
+ * 隐藏消息, 并清空消息内容
1049
1051
  */ _proto.hide = function hide() {
1050
1052
  var _this = this;
1051
1053
  // 每次隐藏都清空内 消息内容
@@ -1118,9 +1120,9 @@ function _set_prototype_of$v(o, p) {
1118
1120
  };
1119
1121
  return _set_prototype_of$v(o, p);
1120
1122
  }
1121
- /**
1122
- * 播放/暂停控件
1123
- * @category Control
1123
+ /**
1124
+ * 播放/暂停控件
1125
+ * @category Control
1124
1126
  */ var Play = /*#__PURE__*/ function(Control) {
1125
1127
  _inherits$v(Play, Control);
1126
1128
  function Play(options) {
@@ -1142,8 +1144,8 @@ function _set_prototype_of$v(o, p) {
1142
1144
  return _this;
1143
1145
  }
1144
1146
  var _proto = Play.prototype;
1145
- /**
1146
- * 点击 Control 会触发
1147
+ /**
1148
+ * 点击 Control 会触发
1147
1149
  */ _proto._onControlClick = function _onControlClick(e) {
1148
1150
  this._playing = !this._playing;
1149
1151
  this.emit(EVENTS.control.play, this._playing);
@@ -1166,8 +1168,8 @@ function _set_prototype_of$v(o, p) {
1166
1168
  _create_class$8(Play, [
1167
1169
  {
1168
1170
  key: "playing",
1169
- get: /**
1170
- * 播放状态
1171
+ get: /**
1172
+ * 播放状态
1171
1173
  */ function get() {
1172
1174
  return this._playing;
1173
1175
  }
@@ -1176,12 +1178,12 @@ function _set_prototype_of$v(o, p) {
1176
1178
  return Play;
1177
1179
  }(Control);
1178
1180
 
1179
- /**
1180
- * 节流函数
1181
- * @param {Function} func
1182
- * @param {number} wait
1183
- * @typeParam T - 函数类型
1184
- * @returns {Function}
1181
+ /**
1182
+ * 节流函数
1183
+ * @param {Function} func
1184
+ * @param {number} wait
1185
+ * @typeParam T - 函数类型
1186
+ * @returns {Function}
1185
1187
  */ // eslint-disable-next-line @typescript-eslint/ban-types
1186
1188
  function throttle(func, wait) {
1187
1189
  var timeout = null;
@@ -1237,28 +1239,28 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1237
1239
  if (n === "Map" || n === "Set") return Array.from(n);
1238
1240
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
1239
1241
  }
1240
- /**
1241
- * 工具类
1242
- * @category Util
1242
+ /**
1243
+ * 工具类
1244
+ * @category Util
1243
1245
  */ var Utils = /*#__PURE__*/ function() {
1244
1246
  function Utils() {}
1245
1247
  // /(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
1248
  // (/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
- * ```
1249
+ /**
1250
+ * 监听手机旋转, 参考 {@link https://developer.mozilla.org/zh-CN/docs/Web/API/Screen/orientation}
1251
+ * @param {OrientationChangeCallback} change 手机旋转回调
1252
+ * @returns {[ScreenOrientation, CleanUpScreenOrientationFun]} [第一次的结果, 事件移除]
1253
+ *
1254
+ * @example
1255
+ * ```ts
1256
+ * const [orientation, cleanUp] = Utils.orientationEventListener((orientation) => {
1257
+ * console.log("orientation", orientation)
1258
+ * })
1259
+ *
1260
+ * console.log("orientation", orientation)
1261
+ * // 清除监听
1262
+ * cleanUp()
1263
+ * ```
1262
1264
  */ // prettier-ignore
1263
1265
  Utils.orientationEventListener = function orientationEventListener(change) {
1264
1266
  var _orientationTimer = null;
@@ -1348,18 +1350,18 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1348
1350
  }
1349
1351
  ];
1350
1352
  };
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
- * ```
1353
+ /**
1354
+ * 监听节点尺寸变化, 参考 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver}
1355
+ * @param {Element} node
1356
+ * @param callback
1357
+ * @returns {CleanUpResizeObserver}
1358
+ * @example
1359
+ * ```ts
1360
+ * const [unobserve, disconnect] = Utils.resizeObserver(node, (entries, observer) => {});
1361
+ *
1362
+ * // 移除监听
1363
+ * unobserve()
1364
+ * ```
1363
1365
  */ // prettier-ignore
1364
1366
  Utils.resizeObserver = function resizeObserver(node, callback) {
1365
1367
  // prettier-ignore
@@ -1394,12 +1396,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
1394
1396
  return Utils;
1395
1397
  }();
1396
1398
  // 不要使用 window, 如果在 worker 中会报错
1397
- /**
1398
- * 判断是否是移动端, (iPadOS 13+ 移除了 "iPad" 标识)
1399
- * @example
1400
- * ```ts
1401
- * Utils.isMobile // true | false
1402
- * ```
1399
+ /**
1400
+ * 判断是否是移动端, (iPadOS 13+ 移除了 "iPad" 标识)
1401
+ * @example
1402
+ * ```ts
1403
+ * Utils.isMobile // true | false
1404
+ * ```
1403
1405
  */ Utils.isMobile = utilsTools.isMobile();
1404
1406
 
1405
1407
  function _defineProperties$7(target, props) {
@@ -1433,23 +1435,23 @@ var PROGRESS_DEFAULT_OPTIONS = {
1433
1435
  return (percent * 100).toFixed(0);
1434
1436
  }
1435
1437
  };
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
- * })
1438
+ /**
1439
+ * 进度条
1440
+ *
1441
+ * @category Control
1442
+ * @example
1443
+ * ```ts
1444
+ * const progress = new Progress({
1445
+ * container: document.getElementById('progress-container'),
1446
+ * step: 0.01,
1447
+ * range: [0, 1],
1448
+ * onChange: (value, range) => {
1449
+ * console.log(`Progress changed: ${value}, Range: ${range}`);
1450
+ * },
1451
+ * defaultValue: 0.5,
1452
+ * draggable: true,
1453
+ * disabled: false,
1454
+ * })
1453
1455
  */ var Progress = /*#__PURE__*/ function() {
1454
1456
  function Progress(options) {
1455
1457
  var _this_options_defaultValue;
@@ -1482,20 +1484,20 @@ var PROGRESS_DEFAULT_OPTIONS = {
1482
1484
  this.disabled = this.options.disabled;
1483
1485
  }
1484
1486
  var _proto = Progress.prototype;
1485
- /**
1486
- * 是否旋转了
1487
- * @param rotated
1487
+ /**
1488
+ * 是否旋转了
1489
+ * @param rotated
1488
1490
  */ _proto.isRotate = function isRotate(rotated) {
1489
1491
  this._isRotated = rotated;
1490
1492
  };
1491
- /**
1492
- * 销毁 Progress 实例,移除事件监听器
1493
- * @returns {void}
1494
- * @memberof Progress
1495
- * @example
1496
- * ```ts
1497
- * progress.destroy();
1498
- * ```
1493
+ /**
1494
+ * 销毁 Progress 实例,移除事件监听器
1495
+ * @returns {void}
1496
+ * @memberof Progress
1497
+ * @example
1498
+ * ```ts
1499
+ * progress.destroy();
1500
+ * ```
1499
1501
  */ _proto.destroy = function destroy() {
1500
1502
  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
1503
  (_this__delegateSliderMouseDown = this._delegateSliderMouseDown) == null ? void 0 : (_this__delegateSliderMouseDown_destroy = _this__delegateSliderMouseDown.destroy) == null ? void 0 : _this__delegateSliderMouseDown_destroy.call(_this__delegateSliderMouseDown);
@@ -1690,14 +1692,14 @@ var PROGRESS_DEFAULT_OPTIONS = {
1690
1692
  },
1691
1693
  {
1692
1694
  key: "value",
1693
- get: /**
1694
- * 获取进度条值
1695
- * @returns {number} 当前进度条值
1696
- * @example
1697
- * ```ts
1698
- * const value = progress.value; // 获取当前进度条值
1699
- * console.log(value); // 输出值
1700
- * ```
1695
+ get: /**
1696
+ * 获取进度条值
1697
+ * @returns {number} 当前进度条值
1698
+ * @example
1699
+ * ```ts
1700
+ * const value = progress.value; // 获取当前进度条值
1701
+ * console.log(value); // 输出值
1702
+ * ```
1701
1703
  */ function get() {
1702
1704
  return this._value; //
1703
1705
  },
@@ -1707,14 +1709,14 @@ var PROGRESS_DEFAULT_OPTIONS = {
1707
1709
  },
1708
1710
  {
1709
1711
  key: "percent",
1710
- get: /**
1711
- * 获取进度百分比
1712
- * @returns {number} 当前进度条百分比
1713
- * @example
1714
- * ```ts
1715
- * const percent = progress.percent; // 获取当前进度条百分比
1716
- * console.log(percent); // 输出百分比
1717
- * ```
1712
+ get: /**
1713
+ * 获取进度百分比
1714
+ * @returns {number} 当前进度条百分比
1715
+ * @example
1716
+ * ```ts
1717
+ * const percent = progress.percent; // 获取当前进度条百分比
1718
+ * console.log(percent); // 输出百分比
1719
+ * ```
1718
1720
  */ function get() {
1719
1721
  return this._percent;
1720
1722
  },
@@ -1777,9 +1779,9 @@ var VOLUME_DEFAULT_OPTIONS = {
1777
1779
  onOpenChange: function onOpenChange() {},
1778
1780
  onChange: function onChange() {}
1779
1781
  };
1780
- /**
1781
- * 音量调节控件
1782
- * @category Control
1782
+ /**
1783
+ * 音量调节控件
1784
+ * @category Control
1783
1785
  */ var Volume = /*#__PURE__*/ function(Control) {
1784
1786
  _inherits$u(Volume, Control);
1785
1787
  function Volume(options) {
@@ -1853,8 +1855,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1853
1855
  return _this;
1854
1856
  }
1855
1857
  var _proto = Volume.prototype;
1856
- /**
1857
- * 销毁
1858
+ /**
1859
+ * 销毁
1858
1860
  */ _proto.destroy = function destroy() {
1859
1861
  var _this__progress_destroy, _this__progress, _this_picker;
1860
1862
  (_this__progress = this._progress) == null ? void 0 : (_this__progress_destroy = _this__progress.destroy) == null ? void 0 : _this__progress_destroy.call(_this__progress);
@@ -1912,8 +1914,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1912
1914
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_VOLUME
1913
1915
  });
1914
1916
  };
1915
- /**
1916
- * 点击 Control 会触发
1917
+ /**
1918
+ * 点击 Control 会触发
1917
1919
  */ _proto._onControlClick = function _onControlClick() {
1918
1920
  // this._options.onClick?.(e);
1919
1921
  };
@@ -1930,8 +1932,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1930
1932
  _create_class$6(Volume, [
1931
1933
  {
1932
1934
  key: "muted",
1933
- get: /**
1934
- * 是否静音
1935
+ get: /**
1936
+ * 是否静音
1935
1937
  */ function get() {
1936
1938
  return this._muted;
1937
1939
  },
@@ -1955,8 +1957,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1955
1957
  },
1956
1958
  {
1957
1959
  key: "volume",
1958
- get: /**
1959
- * 当前音量值(真实值 即使静音)
1960
+ get: /**
1961
+ * 当前音量值(真实值 即使静音)
1960
1962
  */ function get() {
1961
1963
  return this._lastVolume;
1962
1964
  },
@@ -1979,8 +1981,8 @@ var VOLUME_DEFAULT_OPTIONS = {
1979
1981
  },
1980
1982
  {
1981
1983
  key: "disabled",
1982
- get: /**
1983
- * 是否禁用
1984
+ get: /**
1985
+ * 是否禁用
1984
1986
  */ function get() {
1985
1987
  return this._disabled;
1986
1988
  },
@@ -2480,9 +2482,9 @@ function _set_prototype_of$t(o, p) {
2480
2482
  };
2481
2483
  return _set_prototype_of$t(o, p);
2482
2484
  }
2483
- /**
2484
- * 全屏控件
2485
- * @category Control
2485
+ /**
2486
+ * 全屏控件
2487
+ * @category Control
2486
2488
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
2487
2489
  _inherits$t(Fullscreen, Control);
2488
2490
  function Fullscreen(options) {
@@ -2509,8 +2511,8 @@ function _set_prototype_of$t(o, p) {
2509
2511
  return _this;
2510
2512
  }
2511
2513
  var _proto = Fullscreen.prototype;
2512
- /**
2513
- * 销毁
2514
+ /**
2515
+ * 销毁
2514
2516
  */ _proto.destroy = function destroy() {
2515
2517
  var _this__fullscreenUtil;
2516
2518
  this.$container.innerHTML = '';
@@ -2538,8 +2540,8 @@ function _set_prototype_of$t(o, p) {
2538
2540
  this._render();
2539
2541
  this.options.onChange == null ? void 0 : this.options.onChange.call(this.options, info);
2540
2542
  };
2541
- /**
2542
- * 点击 Control 会触发
2543
+ /**
2544
+ * 点击 Control 会触发
2543
2545
  */ _proto._onControlClick = function _onControlClick() {
2544
2546
  if (this.isCurrentFullscreen) {
2545
2547
  var _this__fullscreenUtil;
@@ -2583,9 +2585,9 @@ function _set_prototype_of$s(o, p) {
2583
2585
  };
2584
2586
  return _set_prototype_of$s(o, p);
2585
2587
  }
2586
- /**
2587
- * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
2588
- * @category Control
2588
+ /**
2589
+ * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
2590
+ * @category Control
2589
2591
  */ var Rec = /*#__PURE__*/ function(Control) {
2590
2592
  _inherits$s(Rec, Control);
2591
2593
  function Rec(options) {
@@ -2604,8 +2606,8 @@ function _set_prototype_of$s(o, p) {
2604
2606
  return _this;
2605
2607
  }
2606
2608
  var _proto = Rec.prototype;
2607
- /**
2608
- * 销毁
2609
+ /**
2610
+ * 销毁
2609
2611
  */ _proto.destroy = function destroy() {
2610
2612
  var _this__delegation;
2611
2613
  this.$container.removeEventListener('dblclick', this._onDBlClick);
@@ -2613,9 +2615,9 @@ function _set_prototype_of$s(o, p) {
2613
2615
  this._delegation = null;
2614
2616
  Control.prototype.destroy.call(this);
2615
2617
  };
2616
- /**
2617
- * 添加回放类型图标
2618
- * @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
2618
+ /**
2619
+ * 添加回放类型图标
2620
+ * @param {string} id 回放类型 'rec' | 'cloudRec' | 'cloudRecord'
2619
2621
  */ _proto.addRecType = function addRecType(id) {
2620
2622
  var spanIcon = '';
2621
2623
  switch(id){
@@ -2682,8 +2684,8 @@ function _set_prototype_of$s(o, p) {
2682
2684
  }
2683
2685
  });
2684
2686
  };
2685
- /**
2686
- * 点击 Control 会触发
2687
+ /**
2688
+ * 点击 Control 会触发
2687
2689
  */ _proto._onControlClick = function _onControlClick(e) {};
2688
2690
  return Rec;
2689
2691
  }(Control);
@@ -3367,8 +3369,8 @@ var en = {
3367
3369
  }
3368
3370
  };
3369
3371
 
3370
- /**
3371
- * flv 预览
3372
+ /**
3373
+ * flv 预览
3372
3374
  */ var hlsLiveTemplate = {
3373
3375
  autoFocus: 3,
3374
3376
  // poster:
@@ -3420,8 +3422,8 @@ var en = {
3420
3422
  }
3421
3423
  };
3422
3424
 
3423
- /**
3424
- * flv 预览
3425
+ /**
3426
+ * flv 预览
3425
3427
  */ var hlsRecTemplate = {
3426
3428
  autoFocus: 3,
3427
3429
  // poster:
@@ -3479,8 +3481,8 @@ var en = {
3479
3481
  }
3480
3482
  };
3481
3483
 
3482
- /**
3483
- * pc 预览
3484
+ /**
3485
+ * pc 预览
3484
3486
  */ var pcLive = {
3485
3487
  autoFocus: 3,
3486
3488
  header: {
@@ -3579,8 +3581,8 @@ var en = {
3579
3581
  }
3580
3582
  };
3581
3583
 
3582
- /**
3583
- * pc 回放
3584
+ /**
3585
+ * pc 回放
3584
3586
  */ var pcRec = {
3585
3587
  header: {
3586
3588
  // color: DEFAULT_COLOR,
@@ -3691,8 +3693,8 @@ var en = {
3691
3693
  }
3692
3694
  };
3693
3695
 
3694
- /**
3695
- * mobile 预览
3696
+ /**
3697
+ * mobile 预览
3696
3698
  */ var mobileLive = {
3697
3699
  header: {
3698
3700
  // color: DEFAULT_COLOR,
@@ -3780,8 +3782,8 @@ var en = {
3780
3782
  }
3781
3783
  };
3782
3784
 
3783
- /**
3784
- * mobile 回放
3785
+ /**
3786
+ * mobile 回放
3785
3787
  */ var mobileRec = {
3786
3788
  header: {
3787
3789
  // color: DEFAULT_COLOR,
@@ -3875,8 +3877,8 @@ var en = {
3875
3877
  }
3876
3878
  };
3877
3879
 
3878
- /**
3879
- * 安防版(预览/回放)
3880
+ /**
3881
+ * 安防版(预览/回放)
3880
3882
  */ var security = {
3881
3883
  header: {
3882
3884
  // color: DEFAULT_COLOR,
@@ -3952,8 +3954,8 @@ var en = {
3952
3954
  }
3953
3955
  };
3954
3956
 
3955
- /**
3956
- * 语音版(预览)
3957
+ /**
3958
+ * 语音版(预览)
3957
3959
  */ var voice = {
3958
3960
  header: {
3959
3961
  // color: DEFAULT_COLOR,
@@ -4005,11 +4007,11 @@ var en = {
4005
4007
  }
4006
4008
  };
4007
4009
 
4008
- /**
4009
- * standard 做特殊处理
4010
- *
4011
- * WARN: 除了 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 做特殊处理, 只能放置在顶部, 其它不做处理,如果配置渲染的有问题需要开发者自行修改
4012
- * FIXME: 暂时不去重, 让开发者自己去修改
4010
+ /**
4011
+ * standard 做特殊处理
4012
+ *
4013
+ * WARN: 除了 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 做特殊处理, 只能放置在顶部, 其它不做处理,如果配置渲染的有问题需要开发者自行修改
4014
+ * FIXME: 暂时不去重, 让开发者自己去修改
4013
4015
  */ var TEMPLATES = {
4014
4016
  pcLive: pcLive,
4015
4017
  pcRec: pcRec,
@@ -4039,9 +4041,9 @@ function _set_prototype_of$r(o, p) {
4039
4041
  };
4040
4042
  return _set_prototype_of$r(o, p);
4041
4043
  }
4042
- /**
4043
- * 截图控件
4044
- * @category Content
4044
+ /**
4045
+ * 截图控件
4046
+ * @category Content
4045
4047
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
4046
4048
  _inherits$r(Content, EventEmitter);
4047
4049
  function Content(options) {
@@ -4071,11 +4073,11 @@ function _set_prototype_of$r(o, p) {
4071
4073
  return _this;
4072
4074
  }
4073
4075
  var _proto = Content.prototype;
4074
- /**
4075
- * 重新画面区域
4076
- * @param {number} originWidth 画面宽度
4077
- * @param {number} originHeight 画面高度
4078
- * @returns {void}
4076
+ /**
4077
+ * 重新画面区域
4078
+ * @param {number} originWidth 画面宽度
4079
+ * @param {number} originHeight 画面高度
4080
+ * @returns {void}
4079
4081
  */ _proto.rerender = function rerender(originWidth, originHeight) {
4080
4082
  if (originWidth === void 0) originWidth = 0;
4081
4083
  if (originHeight === void 0) originHeight = 0;
@@ -4188,9 +4190,9 @@ function _set_prototype_of$q(o, p) {
4188
4190
  };
4189
4191
  return _set_prototype_of$q(o, p);
4190
4192
  }
4191
- /**
4192
- * 更多控件
4193
- * @category Control
4193
+ /**
4194
+ * 更多控件
4195
+ * @category Control
4194
4196
  */ var More = /*#__PURE__*/ function(Control) {
4195
4197
  _inherits$q(More, Control);
4196
4198
  function More(options) {
@@ -4236,9 +4238,9 @@ function _set_prototype_of$q(o, p) {
4236
4238
  }
4237
4239
  // debug
4238
4240
  };
4239
- /**
4240
- * 添加
4241
- * @param control
4241
+ /**
4242
+ * 添加
4243
+ * @param control
4242
4244
  */ _proto.add = function add(key, part, control, props) {
4243
4245
  this.list.unshift({
4244
4246
  part: part,
@@ -4248,9 +4250,9 @@ function _set_prototype_of$q(o, p) {
4248
4250
  height: props.height
4249
4251
  });
4250
4252
  };
4251
- /**
4252
- * 移除
4253
- * @param control
4253
+ /**
4254
+ * 移除
4255
+ * @param control
4254
4256
  */ _proto.remove = function remove(control) {
4255
4257
  var index = this.list.findIndex(function(item) {
4256
4258
  return item.control === control;
@@ -4270,20 +4272,20 @@ function _set_prototype_of$q(o, p) {
4270
4272
  }
4271
4273
  Control.prototype.destroy.call(this);
4272
4274
  };
4273
- /**
4274
- * 点击 Control 会触发
4275
+ /**
4276
+ * 点击 Control 会触发
4275
4277
  */ _proto._onControlClick = function _onControlClick(e) {
4276
4278
  // this._options.onClick?.(e);
4277
4279
  };
4278
4280
  return More;
4279
4281
  }(Control);
4280
4282
 
4281
- /**
4282
- * 函数防抖
4283
- * @param {Function} func
4284
- * @param {number} wait
4285
- * @typeParam T - 函数类型
4286
- * @returns {Function}
4283
+ /**
4284
+ * 函数防抖
4285
+ * @param {Function} func
4286
+ * @param {number} wait
4287
+ * @typeParam T - 函数类型
4288
+ * @returns {Function}
4287
4289
  */ // eslint-disable-next-line @typescript-eslint/ban-types
4288
4290
  function debounce(func, wait) {
4289
4291
  var timeout;
@@ -4848,6 +4850,12 @@ function debounce(func, wait) {
4848
4850
  theme.controls.dateControl.on(EVENTS.control.dateChange, function(date) {
4849
4851
  theme.emit(EVENTS.control.dateChange, date);
4850
4852
  });
4853
+ theme.controls.dateControl.on(EVENTS.control.datePanelMonthChange, function(date, month) {
4854
+ theme.emit(EVENTS.control.datePanelMonthChange, date, month);
4855
+ });
4856
+ theme.controls.dateControl.on(EVENTS.control.datePanelYearChange, function(date, year) {
4857
+ theme.emit(EVENTS.control.datePanelYearChange, date, year);
4858
+ });
4851
4859
  theme.controls.dateControl.on(EVENTS.control.dateDestroy, function() {
4852
4860
  theme.emit(EVENTS.control.dateDestroy);
4853
4861
  });
@@ -4907,23 +4915,23 @@ var ignoreList = [
4907
4915
  });
4908
4916
  }
4909
4917
 
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}
4918
+ /**
4919
+ * 重新调整播放器窗口大小
4920
+ *
4921
+ * Adjust the player window size
4922
+ * @param {number | string} width 宽度(number 类型默认px, 支持字符串大小 "100%" | "50vw")
4923
+ * @param {number | string} height 高度(number 类型默认px, 支持字符串大小 "100%" | "50vh")
4924
+ * @since 0.0.1
4925
+ * @example
4926
+ * ```ts
4927
+ * theme.resize(600, 400) // 600px * 400px
4928
+ * theme.resize("600px", "400px") // 600px * 400px
4929
+ * theme.resize("50%", "1vh")
4930
+ * theme.resize("2em", "2rem")
4931
+ * // 事件监听 event, 这里是具体的宽高(单位px)
4932
+ * theme.on(Theme.EVENTS.resize, (width: number, height: number) => {})
4933
+ * ```
4934
+ * @returns {void}
4927
4935
  */ function _resize(theme, width, height) {
4928
4936
  var cssText = '';
4929
4937
  if (/^\d+(\.\d+)?$/.test(width + '')) {
@@ -4986,9 +4994,9 @@ var ZOOM_DEFAULT_OPTIONS = {
4986
4994
  open: false,
4987
4995
  max: 8
4988
4996
  };
4989
- /**
4990
- * 电子放大控件
4991
- * @category Control
4997
+ /**
4998
+ * 电子放大控件
4999
+ * @category Control
4992
5000
  */ var Zoom = /*#__PURE__*/ function(Control) {
4993
5001
  _inherits$p(Zoom, Control);
4994
5002
  function Zoom(options) {
@@ -5065,8 +5073,8 @@ var ZOOM_DEFAULT_OPTIONS = {
5065
5073
  }
5066
5074
  Control.prototype.destroy.call(this);
5067
5075
  };
5068
- /**
5069
- * 点击 Control 会触发
5076
+ /**
5077
+ * 点击 Control 会触发
5070
5078
  */ _proto._onControlClick = function _onControlClick(e) {
5071
5079
  this.active = !this.active;
5072
5080
  Control.prototype._onControlClick.call(this, e);
@@ -5086,8 +5094,8 @@ var ZOOM_DEFAULT_OPTIONS = {
5086
5094
  },
5087
5095
  {
5088
5096
  key: "active",
5089
- get: /**
5090
- * 是否激活
5097
+ get: /**
5098
+ * 是否激活
5091
5099
  */ function get() {
5092
5100
  return this._active;
5093
5101
  },
@@ -5736,8 +5744,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
5736
5744
  return '';
5737
5745
  }
5738
5746
 
5739
- /**
5740
- * Header
5747
+ /**
5748
+ * Header
5741
5749
  */ var Component = /*#__PURE__*/ function() {
5742
5750
  function Component(options) {
5743
5751
  if (options === void 0) options = {};
@@ -5789,8 +5797,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
5789
5797
  this.$popupContainer.appendChild(this.$container);
5790
5798
  }
5791
5799
  var _proto = Component.prototype;
5792
- /**
5793
- * 销毁 header
5800
+ /**
5801
+ * 销毁 header
5794
5802
  */ _proto.destroy = function destroy() {
5795
5803
  var _this_$popupContainer;
5796
5804
  (_this_$popupContainer = this.$popupContainer) == null ? void 0 : _this_$popupContainer.removeChild(this.$container);
@@ -6066,10 +6074,10 @@ function _set_prototype_of$m(o, p) {
6066
6074
  };
6067
6075
  return _set_prototype_of$m(o, p);
6068
6076
  }
6069
- /**
6070
- * 全局全屏
6071
- * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
6072
- * @category Control
6077
+ /**
6078
+ * 全局全屏
6079
+ * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
6080
+ * @category Control
6073
6081
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
6074
6082
  _inherits$m(GlobalFullscreen, Fullscreen);
6075
6083
  function GlobalFullscreen(options) {
@@ -6087,8 +6095,8 @@ function _set_prototype_of$m(o, p) {
6087
6095
  title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_GLOBAL_FULLSCREEN
6088
6096
  });
6089
6097
  };
6090
- /**
6091
- * 点击 Control 会触发
6098
+ /**
6099
+ * 点击 Control 会触发
6092
6100
  */ _proto._onControlClick = function _onControlClick() {
6093
6101
  // 网页全屏的情况下 还可以执行全局全屏
6094
6102
  if (this.isCurrentFullscreen && this._$rootContainer.classList.contains("" + PREFIX_CLASS + "-global-fullscreen")) {
@@ -6134,9 +6142,9 @@ function _set_prototype_of$l(o, p) {
6134
6142
  };
6135
6143
  return _set_prototype_of$l(o, p);
6136
6144
  }
6137
- /**
6138
- * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
6139
- * @category Control
6145
+ /**
6146
+ * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
6147
+ * @category Control
6140
6148
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
6141
6149
  _inherits$l(CapturePicture, Control);
6142
6150
  function CapturePicture(options) {
@@ -6167,8 +6175,8 @@ function _set_prototype_of$l(o, p) {
6167
6175
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_CAPTURE
6168
6176
  });
6169
6177
  };
6170
- /**
6171
- * 点击 Control 会触发
6178
+ /**
6179
+ * 点击 Control 会触发
6172
6180
  */ _proto._onControlClick = function _onControlClick(e) {
6173
6181
  var _this = this;
6174
6182
  var _this_options_type, _this_options_cloudRecUpload;
@@ -6237,9 +6245,9 @@ function _set_prototype_of$k(o, p) {
6237
6245
  };
6238
6246
  return _set_prototype_of$k(o, p);
6239
6247
  }
6240
- /**
6241
- * 云台控件
6242
- * @category Control
6248
+ /**
6249
+ * 云台控件
6250
+ * @category Control
6243
6251
  */ var Ptz = /*#__PURE__*/ function(Control) {
6244
6252
  _inherits$k(Ptz, Control);
6245
6253
  function Ptz(options) {
@@ -6328,8 +6336,8 @@ function _set_prototype_of$k(o, p) {
6328
6336
  }
6329
6337
  };
6330
6338
  };
6331
- /**
6332
- * 点击 Control 会触发
6339
+ /**
6340
+ * 点击 Control 会触发
6333
6341
  */ _proto._onControlClick = function _onControlClick(e) {
6334
6342
  Control.prototype._onControlClick.call(this, e);
6335
6343
  this.active = !this.active;
@@ -6432,14 +6440,14 @@ function _set_prototype_of$j(o, p) {
6432
6440
  var RECORD_DEFAULT_OPTIONS = {
6433
6441
  maxDuration: 3600
6434
6442
  };
6435
- /**
6436
- * 录制控件,点击开始录制,再次点击停止录制,
6437
- * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
6438
- *
6439
- * 注意:
6440
- * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
6441
- * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
6442
- * @category Control
6443
+ /**
6444
+ * 录制控件,点击开始录制,再次点击停止录制,
6445
+ * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
6446
+ *
6447
+ * 注意:
6448
+ * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
6449
+ * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
6450
+ * @category Control
6443
6451
  */ var Record = /*#__PURE__*/ function(Control) {
6444
6452
  _inherits$j(Record, Control);
6445
6453
  function Record(options) {
@@ -6454,16 +6462,16 @@ var RECORD_DEFAULT_OPTIONS = {
6454
6462
  return _this;
6455
6463
  }
6456
6464
  var _proto = Record.prototype;
6457
- /**
6458
- * 渲染图标
6465
+ /**
6466
+ * 渲染图标
6459
6467
  */ _proto._render = function _render() {
6460
6468
  var _this_locale;
6461
6469
  this.$container.innerHTML = IconComponents.record({
6462
6470
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
6463
6471
  });
6464
6472
  };
6465
- /**
6466
- * 渲染计时器
6473
+ /**
6474
+ * 渲染计时器
6467
6475
  */ _proto._renderTimer = function _renderTimer() {
6468
6476
  var _this = this;
6469
6477
  var _this__options_rootContainer, _this__options;
@@ -6492,8 +6500,8 @@ var RECORD_DEFAULT_OPTIONS = {
6492
6500
  this._destroyTimer();
6493
6501
  Control.prototype.destroy.call(this);
6494
6502
  };
6495
- /**
6496
- * 销毁定时器和销毁节点
6503
+ /**
6504
+ * 销毁定时器和销毁节点
6497
6505
  */ _proto._destroyTimer = function _destroyTimer() {
6498
6506
  this._seconds = 0;
6499
6507
  if (this._timer) {
@@ -6508,8 +6516,8 @@ var RECORD_DEFAULT_OPTIONS = {
6508
6516
  }
6509
6517
  this._active = false;
6510
6518
  };
6511
- /**
6512
- * 点击 Control 会触发
6519
+ /**
6520
+ * 点击 Control 会触发
6513
6521
  */ _proto._onControlClick = function _onControlClick(e) {
6514
6522
  this.active = !this.active;
6515
6523
  Control.prototype._onControlClick.call(this, e);
@@ -6517,8 +6525,8 @@ var RECORD_DEFAULT_OPTIONS = {
6517
6525
  _create_class$3(Record, [
6518
6526
  {
6519
6527
  key: "active",
6520
- get: /**
6521
- * 是否激活
6528
+ get: /**
6529
+ * 是否激活
6522
6530
  */ function get() {
6523
6531
  return this._active;
6524
6532
  },
@@ -6711,14 +6719,14 @@ function _ts_generator$4(thisArg, body) {
6711
6719
  };
6712
6720
  }
6713
6721
  }
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
6722
+ /**
6723
+ * 对讲控件
6724
+ *
6725
+ * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
6726
+ * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
6727
+ * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
6728
+ *
6729
+ * @category Control
6722
6730
  */ var Talk = /*#__PURE__*/ function(Control) {
6723
6731
  _inherits$i(Talk, Control);
6724
6732
  function Talk(options) {
@@ -6761,16 +6769,16 @@ function _ts_generator$4(thisArg, body) {
6761
6769
  Control.prototype.reset.call(this, hide);
6762
6770
  }
6763
6771
  };
6764
- /**
6765
- * 销毁对讲
6772
+ /**
6773
+ * 销毁对讲
6766
6774
  */ _proto.destroy = function destroy() {
6767
6775
  if (this.active) {
6768
6776
  this.reset();
6769
6777
  }
6770
6778
  Control.prototype.destroy.call(this);
6771
6779
  };
6772
- /**
6773
- * 点击 Control 会触发
6780
+ /**
6781
+ * 点击 Control 会触发
6774
6782
  */ _proto._onControlClick = function _onControlClick(e) {
6775
6783
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
6776
6784
  return Control.prototype._onControlClick;
@@ -6790,13 +6798,13 @@ function _ts_generator$4(thisArg, body) {
6790
6798
  _create_class$2(Talk, [
6791
6799
  {
6792
6800
  key: "value",
6793
- get: /**
6794
- * 获取当前值
6801
+ get: /**
6802
+ * 获取当前值
6795
6803
  */ function get() {
6796
6804
  return this._value;
6797
6805
  },
6798
- set: /**
6799
- * 设置当前值 [0-1]
6806
+ set: /**
6807
+ * 设置当前值 [0-1]
6800
6808
  */ function set(value) {
6801
6809
  // 没有激活状态,则不处理
6802
6810
  if (!this.active) {
@@ -6982,12 +6990,12 @@ function _ts_generator$3(thisArg, body) {
6982
6990
  };
6983
6991
  }
6984
6992
  }
6985
- /**
6986
- * 语音广播控件
6987
- *
6988
- * 用于触发语音广播功能的按钮控件
6989
- *
6990
- * @category Control
6993
+ /**
6994
+ * 语音广播控件
6995
+ *
6996
+ * 用于触发语音广播功能的按钮控件
6997
+ *
6998
+ * @category Control
6991
6999
  */ var Broadcast = /*#__PURE__*/ function(Control) {
6992
7000
  _inherits$h(Broadcast, Control);
6993
7001
  function Broadcast(options) {
@@ -7027,16 +7035,16 @@ function _ts_generator$3(thisArg, body) {
7027
7035
  Control.prototype.reset.call(this, hide);
7028
7036
  }
7029
7037
  };
7030
- /**
7031
- * 销毁语音广播控件
7038
+ /**
7039
+ * 销毁语音广播控件
7032
7040
  */ _proto.destroy = function destroy() {
7033
7041
  if (this.active) {
7034
7042
  this.reset();
7035
7043
  }
7036
7044
  Control.prototype.destroy.call(this);
7037
7045
  };
7038
- /**
7039
- * 点击 Control 会触发
7046
+ /**
7047
+ * 点击 Control 会触发
7040
7048
  */ _proto._onControlClick = function _onControlClick(e) {
7041
7049
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
7042
7050
  return Control.prototype._onControlClick;
@@ -7213,12 +7221,12 @@ function _ts_generator$2(thisArg, body) {
7213
7221
  };
7214
7222
  }
7215
7223
  }
7216
- /**
7217
- * AI对话框控件
7218
- *
7219
- * 用于触发AI对话框功能的按钮控件
7220
- *
7221
- * @category Control
7224
+ /**
7225
+ * AI对话框控件
7226
+ *
7227
+ * 用于触发AI对话框功能的按钮控件
7228
+ *
7229
+ * @category Control
7222
7230
  */ var AIChat = /*#__PURE__*/ function(Control) {
7223
7231
  _inherits$g(AIChat, Control);
7224
7232
  function AIChat(options) {
@@ -7259,16 +7267,16 @@ function _ts_generator$2(thisArg, body) {
7259
7267
  Control.prototype.reset.call(this, hide);
7260
7268
  }
7261
7269
  };
7262
- /**
7263
- * 销毁AI对话框控件
7270
+ /**
7271
+ * 销毁AI对话框控件
7264
7272
  */ _proto.destroy = function destroy() {
7265
7273
  if (this.active) {
7266
7274
  this.reset();
7267
7275
  }
7268
7276
  Control.prototype.destroy.call(this);
7269
7277
  };
7270
- /**
7271
- * 点击 Control 会触发
7278
+ /**
7279
+ * 点击 Control 会触发
7272
7280
  */ _proto._onControlClick = function _onControlClick(e) {
7273
7281
  var _this = this, _superprop_get__onControlClick = function _superprop_get__onControlClick() {
7274
7282
  return Control.prototype._onControlClick;
@@ -7320,12 +7328,12 @@ function _set_prototype_of$f(o, p) {
7320
7328
  };
7321
7329
  return _set_prototype_of$f(o, p);
7322
7330
  }
7323
- /**
7324
- * 直播按钮控件
7325
- *
7326
- * 点击切换到直播模式
7327
- *
7328
- * @category Control
7331
+ /**
7332
+ * 直播按钮控件
7333
+ *
7334
+ * 点击切换到直播模式
7335
+ *
7336
+ * @category Control
7329
7337
  */ var Live = /*#__PURE__*/ function(Control) {
7330
7338
  _inherits$f(Live, Control);
7331
7339
  function Live(options) {
@@ -7347,9 +7355,9 @@ function _set_prototype_of$f(o, p) {
7347
7355
  return _this;
7348
7356
  }
7349
7357
  var _proto = Live.prototype;
7350
- /**
7351
- * 根据 urlInfo 同步激活状态
7352
- * 在初始化和播放地址切换后调用
7358
+ /**
7359
+ * 根据 urlInfo 同步激活状态
7360
+ * 在初始化和播放地址切换后调用
7353
7361
  */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
7354
7362
  var shouldBeActive = !!(urlInfo && urlInfo.type === 'live');
7355
7363
  this.active = shouldBeActive;
@@ -7360,13 +7368,13 @@ function _set_prototype_of$f(o, p) {
7360
7368
  title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_LIVE) || '直播'
7361
7369
  });
7362
7370
  };
7363
- /**
7364
- * 销毁
7371
+ /**
7372
+ * 销毁
7365
7373
  */ _proto.destroy = function destroy() {
7366
7374
  Control.prototype.destroy.call(this);
7367
7375
  };
7368
- /**
7369
- * 点击 Control 会触发
7376
+ /**
7377
+ * 点击 Control 会触发
7370
7378
  */ _proto._onControlClick = function _onControlClick(e) {
7371
7379
  var _this__options_onChange, _this__options;
7372
7380
  Control.prototype._onControlClick.call(this, e);
@@ -7411,12 +7419,12 @@ function _set_prototype_of$e(o, p) {
7411
7419
  };
7412
7420
  return _set_prototype_of$e(o, p);
7413
7421
  }
7414
- /**
7415
- * 回放下拉控件
7416
- *
7417
- * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
7418
- *
7419
- * @category Control
7422
+ /**
7423
+ * 回放下拉控件
7424
+ *
7425
+ * 鼠标移入弹出气泡,展示云存储、云录制、本地回放三个选项
7426
+ *
7427
+ * @category Control
7420
7428
  */ var RecDropdown = /*#__PURE__*/ function(Control) {
7421
7429
  _inherits$e(RecDropdown, Control);
7422
7430
  function RecDropdown(options) {
@@ -7440,9 +7448,9 @@ function _set_prototype_of$e(o, p) {
7440
7448
  return _this;
7441
7449
  }
7442
7450
  var _proto = RecDropdown.prototype;
7443
- /**
7444
- * 根据 urlInfo 同步激活状态和回放类型
7445
- * 在初始化和播放地址切换后调用
7451
+ /**
7452
+ * 根据 urlInfo 同步激活状态和回放类型
7453
+ * 在初始化和播放地址切换后调用
7446
7454
  */ _proto._syncActiveByUrlInfo = function _syncActiveByUrlInfo(urlInfo) {
7447
7455
  if (urlInfo && urlInfo.type === 'rec') {
7448
7456
  var _urlInfo_searchParams1;
@@ -7519,8 +7527,8 @@ function _set_prototype_of$e(o, p) {
7519
7527
  target == null ? void 0 : target.classList.add("" + PREFIX_CLASS + "-active");
7520
7528
  }
7521
7529
  };
7522
- /**
7523
- * 销毁
7530
+ /**
7531
+ * 销毁
7524
7532
  */ _proto.destroy = function destroy() {
7525
7533
  var _this__delegation_destroy, _this__delegation;
7526
7534
  (_this__delegation = this._delegation) == null ? void 0 : (_this__delegation_destroy = _this__delegation.destroy) == null ? void 0 : _this__delegation_destroy.call(_this__delegation);
@@ -7532,8 +7540,8 @@ function _set_prototype_of$e(o, p) {
7532
7540
  }
7533
7541
  Control.prototype.destroy.call(this);
7534
7542
  };
7535
- /**
7536
- * 点击 Control 会触发(移动端 click 触发 picker)
7543
+ /**
7544
+ * 点击 Control 会触发(移动端 click 触发 picker)
7537
7545
  */ // eslint-disable-next-line @typescript-eslint/no-unused-vars
7538
7546
  _proto._onControlClick = function _onControlClick(_e) {
7539
7547
  // picker 自行处理 click/hover,这里不额外处理
@@ -7610,11 +7618,20 @@ function _set_prototype_of$d(o, p) {
7610
7618
  }
7611
7619
  }));
7612
7620
  _this.on(EVENTS.setAllDayRecTimes, function(records) {
7613
- var // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7621
+ var _this__options_props_urlInfo, _this__options_props, _this__options, // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7614
7622
  _this__modal;
7615
7623
  _this.disabled = records.length === 0;
7616
7624
  _this.records = records;
7617
- (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(records);
7625
+ 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) {
7626
+ _this.records = records.map(function(item) {
7627
+ var _this__options_props_urlInfo, _this__options_props, _this__options;
7628
+ return _extends$c({}, item, {
7629
+ // 加密图片的地址是有时效的
7630
+ 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)
7631
+ });
7632
+ });
7633
+ }
7634
+ (_this__modal = _this._modal) == null ? void 0 : _this__modal.setSections(_this.records);
7618
7635
  // this._modal?.showEventFilter(this._options.showEventFilter ?? true);
7619
7636
  });
7620
7637
  _this.on(EVENTS.getOSDTime, function(time) {
@@ -7719,12 +7736,12 @@ function _set_prototype_of$c(o, p) {
7719
7736
  };
7720
7737
  return _set_prototype_of$c(o, p);
7721
7738
  }
7722
- /**
7723
- * 告警消息按钮控件
7724
- *
7725
- * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
7726
- *
7727
- * @category Control
7739
+ /**
7740
+ * 告警消息按钮控件
7741
+ *
7742
+ * 点击弹出告警消息列表弹窗(纯触发按钮,无激活状态)
7743
+ *
7744
+ * @category Control
7728
7745
  */ var AlarmMessage = /*#__PURE__*/ function(Control) {
7729
7746
  _inherits$c(AlarmMessage, Control);
7730
7747
  function AlarmMessage(options) {
@@ -7748,16 +7765,16 @@ function _set_prototype_of$c(o, p) {
7748
7765
  title: ((_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_ALARM_MESSAGE) || '消息'
7749
7766
  });
7750
7767
  };
7751
- /**
7752
- * 销毁
7768
+ /**
7769
+ * 销毁
7753
7770
  */ _proto.destroy = function destroy() {
7754
7771
  if (this._panelOpen) {
7755
7772
  this.emit(EVENTS.control.alarmMessageChange, false);
7756
7773
  }
7757
7774
  Control.prototype.destroy.call(this);
7758
7775
  };
7759
- /**
7760
- * 点击 Control 会触发
7776
+ /**
7777
+ * 点击 Control 会触发
7761
7778
  */ _proto._onControlClick = function _onControlClick(e) {
7762
7779
  var _this__options_onChange, _this__options;
7763
7780
  Control.prototype._onControlClick.call(this, e);
@@ -7822,54 +7839,54 @@ var SELECT_DEFAULT_OPTIONS = {
7822
7839
  onChange: function onChange() {},
7823
7840
  onOpenChange: function onOpenChange() {}
7824
7841
  };
7825
- /**
7826
- * 选择器切换 (支持PC/Mobile)
7827
- * @category Control
7828
- * @example
7829
- * ```ts
7830
- * new Select({
7831
- * title: '清晰度',
7832
- * list: [
7833
- * {
7834
- * label: '高清',
7835
- * value: 'hd',
7836
- * streamTypeIn: 1,
7837
- * },
7838
- * {
7839
- * label: '超清',
7840
- * value: 'super',
7841
- * streamTypeIn: 2,
7842
- * }
7843
- * ],
7844
- * value: 'hd',
7845
- * onChange: (value, item) => {
7846
- * console.log('选择了', value, item);
7847
- * }
7848
- * })
7849
- *
7850
- * // 如果想扩展 Select 组件,可以继承 Select 组件
7851
- * // 例如清晰度切换组件
7852
- * class Definition extends Select {
7853
- * options: DefinitionOptions;
7854
- * constructor(options: DefinitionOptions) {
7855
- * super({
7856
- * ...options,
7857
- * fieldNames: { label: 'name', value: 'level',},
7858
- * title: options?.locale?.definition,
7859
- * controlType: 'button',
7860
- * classNameSuffix: 'definition',
7861
- * onChange: (value: SelectItem['value'], item) => {
7862
- * options?.onChange?.(value, item);
7863
- * this.emit(EVENTS.control.definitionChange, value, item);
7864
- * },
7865
- * onOpenChange: (open: boolean, value: SelectItem['value'], item) => {
7866
- * options?.onOpenChange?.(open, value, item);
7867
- * this.emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
7868
- * }
7869
- * });
7870
- * }
7871
- * }
7872
- * ```
7842
+ /**
7843
+ * 选择器切换 (支持PC/Mobile)
7844
+ * @category Control
7845
+ * @example
7846
+ * ```ts
7847
+ * new Select({
7848
+ * title: '清晰度',
7849
+ * list: [
7850
+ * {
7851
+ * label: '高清',
7852
+ * value: 'hd',
7853
+ * streamTypeIn: 1,
7854
+ * },
7855
+ * {
7856
+ * label: '超清',
7857
+ * value: 'super',
7858
+ * streamTypeIn: 2,
7859
+ * }
7860
+ * ],
7861
+ * value: 'hd',
7862
+ * onChange: (value, item) => {
7863
+ * console.log('选择了', value, item);
7864
+ * }
7865
+ * })
7866
+ *
7867
+ * // 如果想扩展 Select 组件,可以继承 Select 组件
7868
+ * // 例如清晰度切换组件
7869
+ * class Definition extends Select {
7870
+ * options: DefinitionOptions;
7871
+ * constructor(options: DefinitionOptions) {
7872
+ * super({
7873
+ * ...options,
7874
+ * fieldNames: { label: 'name', value: 'level',},
7875
+ * title: options?.locale?.definition,
7876
+ * controlType: 'button',
7877
+ * classNameSuffix: 'definition',
7878
+ * onChange: (value: SelectItem['value'], item) => {
7879
+ * options?.onChange?.(value, item);
7880
+ * this.emit(EVENTS.control.definitionChange, value, item);
7881
+ * },
7882
+ * onOpenChange: (open: boolean, value: SelectItem['value'], item) => {
7883
+ * options?.onOpenChange?.(open, value, item);
7884
+ * this.emit(EVENTS.control.definitionPanelOpenChange, open, value, item);
7885
+ * }
7886
+ * });
7887
+ * }
7888
+ * }
7889
+ * ```
7873
7890
  */ var Select = /*#__PURE__*/ function(Control) {
7874
7891
  _inherits$b(Select, Control);
7875
7892
  function Select(options) {
@@ -7921,9 +7938,9 @@ var SELECT_DEFAULT_OPTIONS = {
7921
7938
  return _this;
7922
7939
  }
7923
7940
  var _proto = Select.prototype;
7924
- /**
7925
- * 更新选项列表
7926
- * @param list - 选项列表
7941
+ /**
7942
+ * 更新选项列表
7943
+ * @param list - 选项列表
7927
7944
  */ _proto.updateOptions = function updateOptions(list) {
7928
7945
  var _this = this;
7929
7946
  if (list === void 0) list = [];
@@ -8008,8 +8025,8 @@ var SELECT_DEFAULT_OPTIONS = {
8008
8025
  });
8009
8026
  }
8010
8027
  };
8011
- /**
8012
- * 销毁
8028
+ /**
8029
+ * 销毁
8013
8030
  */ _proto.destroy = function destroy() {
8014
8031
  var _this__delegationOption_destroy, _this__delegationOption, _this__delegationClose_destroy, _this__delegationClose, _this__delegationCancel_destroy, _this__delegationCancel;
8015
8032
  (_this__delegationOption = this._delegationOption) == null ? void 0 : (_this__delegationOption_destroy = _this__delegationOption.destroy) == null ? void 0 : _this__delegationOption_destroy.call(_this__delegationOption);
@@ -8031,8 +8048,8 @@ var SELECT_DEFAULT_OPTIONS = {
8031
8048
  e.stopPropagation();
8032
8049
  e.preventDefault();
8033
8050
  };
8034
- /**
8035
- * 点击 Control 会触发
8051
+ /**
8052
+ * 点击 Control 会触发
8036
8053
  */ _proto._onControlClick = function _onControlClick(e) {
8037
8054
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
8038
8055
  };
@@ -8051,8 +8068,8 @@ var SELECT_DEFAULT_OPTIONS = {
8051
8068
  },
8052
8069
  {
8053
8070
  key: "disabled",
8054
- get: /**
8055
- * 是否禁用
8071
+ get: /**
8072
+ * 是否禁用
8056
8073
  */ function get() {
8057
8074
  return this._disabled;
8058
8075
  },
@@ -8138,15 +8155,15 @@ function __filter(list, locale) {
8138
8155
  };
8139
8156
  });
8140
8157
  }
8141
- /**
8142
- * 清晰度切换控件
8143
- *
8144
- * 清晰度切换控件有三套UI
8145
- * 1. PC 端默认UI,hover 展示清晰度切换面板
8146
- * 2. 移动端 picker选择器清晰度切换面板 + 取消按钮
8147
- * 3. 移动端全屏模式右侧菜单清晰度切换面板
8148
- *
8149
- * @category Control
8158
+ /**
8159
+ * 清晰度切换控件
8160
+ *
8161
+ * 清晰度切换控件有三套UI
8162
+ * 1. PC 端默认UI,hover 展示清晰度切换面板
8163
+ * 2. 移动端 picker选择器清晰度切换面板 + 取消按钮
8164
+ * 3. 移动端全屏模式右侧菜单清晰度切换面板
8165
+ *
8166
+ * @category Control
8150
8167
  */ var Definition = /*#__PURE__*/ function(Select) {
8151
8168
  _inherits$a(Definition, Select);
8152
8169
  function Definition(options) {
@@ -8212,9 +8229,9 @@ function __filter(list, locale) {
8212
8229
  return _this;
8213
8230
  }
8214
8231
  var _proto = Definition.prototype;
8215
- /**
8216
- * 重置,恢复默认值
8217
- * @param hide 默认不隐藏
8232
+ /**
8233
+ * 重置,恢复默认值
8234
+ * @param hide 默认不隐藏
8218
8235
  */ _proto.reset = function reset(hide) {
8219
8236
  Select.prototype.reset.call(this, hide);
8220
8237
  };
@@ -8265,13 +8282,13 @@ var SUPPORT_SPEED = [
8265
8282
  16
8266
8283
  ]; // 8, 16
8267
8284
  var SPEED_DEFAULT_OPTIONS = {
8268
- /**
8269
- * 默认倍速 1, 如果传入的值不在列表中会使用 1 倍速,可能会没有选中
8270
- * 暂时不支持初始化时设置倍速
8285
+ /**
8286
+ * 默认倍速 1, 如果传入的值不在列表中会使用 1 倍速,可能会没有选中
8287
+ * 暂时不支持初始化时设置倍速
8271
8288
  */ // value: 1, // 对应list 中的 value
8272
8289
  // 这里不要设置多语言, 比较麻烦
8273
- /**
8274
- * 倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
8290
+ /**
8291
+ * 倍速列表, 需要是 2 的指数,不能小于 0.5, 最大 16 倍
8275
8292
  */ list: SUPPORT_SPEED.reverse().map(function(speed) {
8276
8293
  return {
8277
8294
  label: "" + speed + "x",
@@ -8279,13 +8296,13 @@ var SPEED_DEFAULT_OPTIONS = {
8279
8296
  };
8280
8297
  })
8281
8298
  };
8282
- /**
8283
- * 倍速切换控件, 不支持动态切换倍速列表
8284
- *
8285
- * 注意:
8286
- * 1. 本地回放倍速需要设备本身支持才可以, 如果不支持切换后的倍数不会生效, 云端回放(云存储,云录制)倍速都是支持, 需要是 2 的指数,不能小于 0.5, 最大 16 倍;
8287
- * 2. 标准流不支持;
8288
- * @category Control
8299
+ /**
8300
+ * 倍速切换控件, 不支持动态切换倍速列表
8301
+ *
8302
+ * 注意:
8303
+ * 1. 本地回放倍速需要设备本身支持才可以, 如果不支持切换后的倍数不会生效, 云端回放(云存储,云录制)倍速都是支持, 需要是 2 的指数,不能小于 0.5, 最大 16 倍;
8304
+ * 2. 标准流不支持;
8305
+ * @category Control
8289
8306
  */ var Speed = /*#__PURE__*/ function(Select) {
8290
8307
  _inherits$9(Speed, Select);
8291
8308
  function Speed(options) {
@@ -8319,10 +8336,10 @@ var SPEED_DEFAULT_OPTIONS = {
8319
8336
  return _this;
8320
8337
  }
8321
8338
  var _proto = Speed.prototype;
8322
- /**
8323
- * 滤掉本地回放不支持的倍速
8324
- * @param optionsList 初始化配置倍速列表
8325
- * @param type 回放类型
8339
+ /**
8340
+ * 滤掉本地回放不支持的倍速
8341
+ * @param optionsList 初始化配置倍速列表
8342
+ * @param type 回放类型
8326
8343
  */ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
8327
8344
  if (!optionsList) {
8328
8345
  // 非用户自定义 /openpb/ 是标准流回放路径
@@ -8398,6 +8415,8 @@ function _set_prototype_of$8(o, p) {
8398
8415
  })) || this;
8399
8416
  _this.options = options;
8400
8417
  _this._value = utilsTools.DateTime.format(((_this_options_props = _this.options.props) == null ? void 0 : (_this_options_props_urlInfo = _this_options_props.urlInfo) == null ? void 0 : (_this_options_props_urlInfo_searchParams = _this_options_props_urlInfo.searchParams) == null ? void 0 : _this_options_props_urlInfo_searchParams.begin) || new Date(), 'YYYY-MM-DD');
8418
+ // 面板首次展示的就是选中日期所在月份,初始化后不应触发年 / 月变化
8419
+ _this._renderMonth = _this._value.slice(0, 7);
8401
8420
  _this._render();
8402
8421
  // 日期上的点
8403
8422
  _this.on(EVENTS.control.dateMonthChange, function(dates) {
@@ -8458,9 +8477,26 @@ function _set_prototype_of$8(o, p) {
8458
8477
  _this.emit(EVENTS.control.dateChange, date);
8459
8478
  }
8460
8479
  },
8480
+ // 日历面板「上一月 / 上一年」,底层两种翻页都回调 onPrevMonth
8481
+ onPrevMonth: function onPrevMonth(current, prev) {
8482
+ _this.options.onPrevMonth == null ? void 0 : _this.options.onPrevMonth.call(_this.options, current, prev);
8483
+ _this._onPanelDateChange(prev);
8484
+ },
8485
+ // 日历面板「下一月 / 下一年」,底层两种翻页都回调 onNextMonth
8486
+ onNextMonth: function onNextMonth(current, next) {
8487
+ _this.options.onNextMonth == null ? void 0 : _this.options.onNextMonth.call(_this.options, current, next);
8488
+ _this._onPanelDateChange(next);
8489
+ },
8490
+ // 月 / 年面板中点选单元格同样会改变日历展示的年月,但底层不回调翻页钩子
8491
+ onCell: function onCell(date, mode) {
8492
+ _this.options.onCell == null ? void 0 : _this.options.onCell.call(_this.options, date, mode);
8493
+ if (mode !== 'date' && !_this._isPanelCellDisabled(date, mode)) _this._onPanelDateChange(date);
8494
+ },
8461
8495
  onOpenChange: function onOpenChange(open) {
8462
8496
  _this.options.onPanelChange == null ? void 0 : _this.options.onPanelChange.call(_this.options, open, _this.datePicker.current);
8463
8497
  _this.emit(EVENTS.control.datePanelOpenChange, open, _this.datePicker.current);
8498
+ // 面板重新打开会跳回选中日期所在月份,且底层不会回调翻页钩子,这里补齐
8499
+ if (open) _this._onPanelDateChange(_this.datePicker.current);
8464
8500
  }
8465
8501
  }));
8466
8502
  };
@@ -8472,6 +8508,8 @@ function _set_prototype_of$8(o, p) {
8472
8508
  if (change === void 0) change = true;
8473
8509
  var _this_datePicker;
8474
8510
  (_this_datePicker = this.datePicker) == null ? void 0 : _this_datePicker.setCurrent(date, change);
8511
+ // 主动设值由调用方发起,同步展示月份但不触发年 / 月变化回调
8512
+ if (date) this._renderMonth = utilsTools.DateTime.format(date, 'YYYY-MM');
8475
8513
  if (date && !change && this._value !== utilsTools.DateTime.format(date, 'YYYY-MM-DD')) {
8476
8514
  this._value = utilsTools.DateTime.format(date, 'YYYY-MM-DD');
8477
8515
  if (date && this.$container.querySelector("." + PREFIX_CLASS + "-mobile-date-filter-value")) {
@@ -8499,6 +8537,36 @@ function _set_prototype_of$8(o, p) {
8499
8537
  return arr[1] + "." + arr[2];
8500
8538
  };
8501
8539
  /**
8540
+ * 月 / 年面板中被点选的单元格是否已被调用方禁用
8541
+ *
8542
+ * 禁用的单元格底层不会切换展示的年月,因此不应派发变化
8543
+ * @param date 单元格日期
8544
+ * @param mode 当前面板模式
8545
+ */ _proto._isPanelCellDisabled = function _isPanelCellDisabled(date, mode) {
8546
+ if (mode === 'month') return !!(this.options.disabledMonth == null ? void 0 : this.options.disabledMonth.call(this.options, date, utilsTools.DateTime.format(date, 'YYYY-MM')));
8547
+ if (mode === 'year') return !!(this.options.disabledYear == null ? void 0 : this.options.disabledYear.call(this.options, date, date.getFullYear()));
8548
+ return false;
8549
+ };
8550
+ /**
8551
+ * 日历面板展示的年月发生变化时,派发年份 / 月份变化
8552
+ *
8553
+ * 年份变化会先于月份变化派发;跨年翻页(如 2026-01 -> 2025-12)两者都会触发
8554
+ * @param renderDate 面板当前展示的日期
8555
+ */ _proto._onPanelDateChange = function _onPanelDateChange(renderDate) {
8556
+ if (!renderDate) return;
8557
+ var month = utilsTools.DateTime.format(renderDate, 'YYYY-MM');
8558
+ if (!month || month === this._renderMonth) return;
8559
+ var prevYear = this._renderMonth.slice(0, 4);
8560
+ var year = month.slice(0, 4);
8561
+ this._renderMonth = month;
8562
+ if (year !== prevYear) {
8563
+ this.options.onYearChange == null ? void 0 : this.options.onYearChange.call(this.options, renderDate, year);
8564
+ this.emit(EVENTS.control.datePanelYearChange, renderDate, year);
8565
+ }
8566
+ this.options.onMonthChange == null ? void 0 : this.options.onMonthChange.call(this.options, renderDate, month);
8567
+ this.emit(EVENTS.control.datePanelMonthChange, renderDate, month);
8568
+ };
8569
+ /**
8502
8570
  * 点击 Control 会触发
8503
8571
  * @overload super._onControlClick(e: Event)
8504
8572
  */ _proto._onControlClick = function _onControlClick(e) {
@@ -8538,9 +8606,9 @@ function _set_prototype_of$7(o, p) {
8538
8606
  return _set_prototype_of$7(o, p);
8539
8607
  }
8540
8608
  /** 时间格式 HH:mm:ss */ var TIME_FORMAT = 'HH:mm:ss';
8541
- /**
8542
- * 时间选择器控件
8543
- * @category Control
8609
+ /**
8610
+ * 时间选择器控件
8611
+ * @category Control
8544
8612
  */ var TimePickerControl = /*#__PURE__*/ function(Control) {
8545
8613
  _inherits$7(TimePickerControl, Control);
8546
8614
  function TimePickerControl(options) {
@@ -8601,9 +8669,9 @@ function _set_prototype_of$7(o, p) {
8601
8669
  }
8602
8670
  }));
8603
8671
  };
8604
- /**
8605
- * 设置时间
8606
- * @param time 设置的时间 HH:mm:ss
8672
+ /**
8673
+ * 设置时间
8674
+ * @param time 设置的时间 HH:mm:ss
8607
8675
  */ _proto.setTime = function setTime(time) {
8608
8676
  var _this_timePicker;
8609
8677
  (_this_timePicker = this.timePicker) == null ? void 0 : _this_timePicker.setCurrent(time);
@@ -8619,9 +8687,9 @@ function _set_prototype_of$7(o, p) {
8619
8687
  if (this.timePicker) this.timePicker.open = false;
8620
8688
  Control.prototype.reset.call(this);
8621
8689
  };
8622
- /**
8623
- * 销毁控件
8624
- * @override
8690
+ /**
8691
+ * 销毁控件
8692
+ * @override
8625
8693
  */ _proto.destroy = function destroy() {
8626
8694
  if (this.timePicker) {
8627
8695
  this.timePicker.destroy();
@@ -8633,9 +8701,9 @@ function _set_prototype_of$7(o, p) {
8633
8701
  _proto._getTimeStr = function _getTimeStr() {
8634
8702
  return this._value;
8635
8703
  };
8636
- /**
8637
- * 点击 Control 会触发
8638
- * @overload super._onControlClick(e: Event)
8704
+ /**
8705
+ * 点击 Control 会触发
8706
+ * @overload super._onControlClick(e: Event)
8639
8707
  */ _proto._onControlClick = function _onControlClick(e) {
8640
8708
  Control.prototype._onControlClick.call(this, e);
8641
8709
  };
@@ -8672,8 +8740,8 @@ function _set_prototype_of$6(o, p) {
8672
8740
  };
8673
8741
  return _set_prototype_of$6(o, p);
8674
8742
  }
8675
- /**
8676
- * 回放时间轴控件
8743
+ /**
8744
+ * 回放时间轴控件
8677
8745
  */ var TimeLineControl = /*#__PURE__*/ function(Control) {
8678
8746
  _inherits$6(TimeLineControl, Control);
8679
8747
  function TimeLineControl(options) {
@@ -8833,8 +8901,8 @@ function _set_prototype_of$6(o, p) {
8833
8901
  }
8834
8902
  Control.prototype.destroy.call(this);
8835
8903
  };
8836
- /**
8837
- * 点击 Control 会触发
8904
+ /**
8905
+ * 点击 Control 会触发
8838
8906
  */ _proto._onControlClick = function _onControlClick(e) {
8839
8907
  this._options.onClick == null ? void 0 : this._options.onClick.call(this._options, e);
8840
8908
  };
@@ -8871,24 +8939,24 @@ function _set_prototype_of$5(o, p) {
8871
8939
  };
8872
8940
  return _set_prototype_of$5(o, p);
8873
8941
  }
8874
- /**
8875
- * 播放结束后忽略 OSD 回写的静默期(毫秒)
8876
- *
8877
- * 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
8878
- * api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
8879
- * 会把刚补满的进度拉回去。取值需覆盖该窗口。
8880
- *
8881
- * 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
8882
- * 进度条的 onChange,永久忽略会让进度条卡死不再更新。
8942
+ /**
8943
+ * 播放结束后忽略 OSD 回写的静默期(毫秒)
8944
+ *
8945
+ * 断流结束时 SDK 不会立刻停掉 OSD 轮询(要让时间轴光标跟到画面最后一帧,见
8946
+ * api/_playbackRange.ts 的 OSD_SETTLE_MS = 2500),这些回写的时间早于区间末端,
8947
+ * 会把刚补满的进度拉回去。取值需覆盖该窗口。
8948
+ *
8949
+ * 用静默期而不是永久忽略:用户可能从时间轴点回区间内继续看,那条 seek 不经过
8950
+ * 进度条的 onChange,永久忽略会让进度条卡死不再更新。
8883
8951
  */ var PLAYBACK_END_SILENCE_MS = 3000;
8884
- /**
8885
- * 读取录像片段的起止时间(毫秒)
8886
- *
8887
- * 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
8888
- * 两套字段名在不同回放类型下都出现过,这里统一兼容。
8889
- *
8890
- * @param seg 录像片段
8891
- * @param which 取起点还是终点
8952
+ /**
8953
+ * 读取录像片段的起止时间(毫秒)
8954
+ *
8955
+ * 录像列表是服务端原始返回、未做字段归一化,`begin/end` 与 `startTime/endTime`
8956
+ * 两套字段名在不同回放类型下都出现过,这里统一兼容。
8957
+ *
8958
+ * @param seg 录像片段
8959
+ * @param which 取起点还是终点
8892
8960
  */ function segMs(seg, which) {
8893
8961
  var _ref, _ref1;
8894
8962
  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;
@@ -8896,12 +8964,12 @@ function _set_prototype_of$5(o, p) {
8896
8964
  if (typeof value === 'number') return value < 1e12 ? value * 1000 : value;
8897
8965
  return utilsTools.DateTime.toDate(value).getTime();
8898
8966
  }
8899
- /**
8900
- * 回放片段进度条控件(移动端)
8901
- *
8902
- * 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
8903
- * 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
8904
- * @category Control
8967
+ /**
8968
+ * 回放片段进度条控件(移动端)
8969
+ *
8970
+ * 只在设置了播放区间时渲染,范围是「当前录像片段 ∩ 播放区间」。
8971
+ * 区间内跨片段的定位由时间轴承担,这里只负责当前片段的精细拖动。
8972
+ * @category Control
8905
8973
  */ var SegmentProgressControl = /*#__PURE__*/ function(Control) {
8906
8974
  _inherits$5(SegmentProgressControl, Control);
8907
8975
  function SegmentProgressControl(options) {
@@ -8968,9 +9036,9 @@ function _set_prototype_of$5(o, p) {
8968
9036
  });
8969
9037
  this._updateVisible();
8970
9038
  };
8971
- /**
8972
- * 设置播放区间
8973
- * @param range 区间;null 表示解除约束
9039
+ /**
9040
+ * 设置播放区间
9041
+ * @param range 区间;null 表示解除约束
8974
9042
  */ _proto._setRange = function _setRange(range) {
8975
9043
  if ((range == null ? void 0 : range.begin) && (range == null ? void 0 : range.end)) {
8976
9044
  this._rangeBeginMs = utilsTools.DateTime.toDate(range.begin).getTime();
@@ -8981,9 +9049,9 @@ function _set_prototype_of$5(o, p) {
8981
9049
  }
8982
9050
  this._updateVisible();
8983
9051
  };
8984
- /**
8985
- * 用区间裁剪录像片段
8986
- * @param records 全天录像片段
9052
+ /**
9053
+ * 用区间裁剪录像片段
9054
+ * @param records 全天录像片段
8987
9055
  */ _proto._setSegments = function _setSegments(records) {
8988
9056
  var _this = this;
8989
9057
  if (!this._hasRange() || !Array.isArray(records)) {
@@ -9011,9 +9079,9 @@ function _set_prototype_of$5(o, p) {
9011
9079
  if (force) this._currentIndex = -1;
9012
9080
  this._updateVisible();
9013
9081
  };
9014
- /**
9015
- * 按播放进度更新片段与进度
9016
- * @param currentMs 当前播放时间(毫秒)
9082
+ /**
9083
+ * 按播放进度更新片段与进度
9084
+ * @param currentMs 当前播放时间(毫秒)
9017
9085
  */ _proto._syncCurrent = function _syncCurrent(currentMs) {
9018
9086
  if (!this._hasRange()) return;
9019
9087
  var index = this._segments.findIndex(function(seg) {
@@ -9084,9 +9152,9 @@ function _set_prototype_of$4(o, p) {
9084
9152
  };
9085
9153
  return _set_prototype_of$4(o, p);
9086
9154
  }
9087
- /**
9088
- * 展示设备序列号控件
9089
- * @category Control
9155
+ /**
9156
+ * 展示设备序列号控件
9157
+ * @category Control
9090
9158
  */ var Device = /*#__PURE__*/ function(Control) {
9091
9159
  _inherits$4(Device, Control);
9092
9160
  function Device(options) {
@@ -9104,10 +9172,10 @@ function _set_prototype_of$4(o, p) {
9104
9172
  var _this___options_props_urlInfo, _this___options_props;
9105
9173
  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>";
9106
9174
  };
9107
- /**
9108
- * 更新设备序列号
9109
- * @param deviceSerial - 设备序列号
9110
- * @param deviceName - 设备名称
9175
+ /**
9176
+ * 更新设备序列号
9177
+ * @param deviceSerial - 设备序列号
9178
+ * @param deviceName - 设备名称
9111
9179
  */ _proto.update = function update(deviceName, deviceSerial) {
9112
9180
  if (this.$container.querySelector("." + PREFIX_CLASS + "-text-device")) {
9113
9181
  var $span = this.$container.querySelector("." + PREFIX_CLASS + "-text-device");
@@ -9265,8 +9333,8 @@ function _set_prototype_of$2(o, p) {
9265
9333
  // const MobileExtend_DEFAULT_Options = {
9266
9334
  // controls: MOBILE_EXTENDS,
9267
9335
  // };
9268
- /**
9269
- * 移动端扩展
9336
+ /**
9337
+ * 移动端扩展
9270
9338
  */ var MobileExtend = /*#__PURE__*/ function(EventEmitter) {
9271
9339
  _inherits$2(MobileExtend, EventEmitter);
9272
9340
  function MobileExtend($siblingContainer) {
@@ -9343,9 +9411,9 @@ function _set_prototype_of$1(o, p) {
9343
9411
  return _set_prototype_of$1(o, p);
9344
9412
  }
9345
9413
  var PAUSE_DEFAULT_OPTIONS = {};
9346
- /**
9347
- * 暂停控件(仅在第一次非自动播放时可以点击播放), 防止和放大有冲突
9348
- * @category Control
9414
+ /**
9415
+ * 暂停控件(仅在第一次非自动播放时可以点击播放), 防止和放大有冲突
9416
+ * @category Control
9349
9417
  */ var Pause = /*#__PURE__*/ function(Control) {
9350
9418
  _inherits$1(Pause, Control);
9351
9419
  function Pause(options) {
@@ -9361,8 +9429,8 @@ var PAUSE_DEFAULT_OPTIONS = {};
9361
9429
  return _this;
9362
9430
  }
9363
9431
  var _proto = Pause.prototype;
9364
- /**
9365
- * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
9432
+ /**
9433
+ * 展示封面 这里不对 poster 进行缓存, 如果有值优先使用, 如果没有值优先使用 初始化传入的值
9366
9434
  */ _proto.show = function show(playing, always) {
9367
9435
  var _this = this;
9368
9436
  var _this_$container_classList, _this_$container;
@@ -9407,8 +9475,8 @@ var PAUSE_DEFAULT_OPTIONS = {};
9407
9475
  }, 300);
9408
9476
  }, 10);
9409
9477
  };
9410
- /**
9411
- * 销毁
9478
+ /**
9479
+ * 销毁
9412
9480
  */ _proto.destroy = function destroy() {
9413
9481
  if (this._timer) {
9414
9482
  clearTimeout(this._timer);
@@ -9696,10 +9764,10 @@ var AUTH_KEY = [
9696
9764
  'recDropdown',
9697
9765
  'alarmMessage'
9698
9766
  ];
9699
- /**
9700
- * 渲染控件
9701
- * @param $container - 控件渲染节点
9702
- * @param btnList - 控件按钮列表
9767
+ /**
9768
+ * 渲染控件
9769
+ * @param $container - 控件渲染节点
9770
+ * @param btnList - 控件按钮列表
9703
9771
  */ // prettier-ignore
9704
9772
  function _renderControls(theme, $container, btnList, props) {
9705
9773
  if (props === void 0) props = {};
@@ -10101,27 +10169,27 @@ var _renderRecType = function _renderRecType(theme, container, recType, props) {
10101
10169
  if ((_theme_controls1 = theme.controls) == null ? void 0 : _theme_controls1['recControl']) ((_theme_controls2 = theme.controls) == null ? void 0 : _theme_controls2['recControl']).addRecType(recType);
10102
10170
  };
10103
10171
 
10104
- /**
10105
- * 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
10106
- *
10107
- * @remarks
10108
- * 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
10109
- * 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
10110
- * 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
10111
- */ /**
10112
- * 一次 classList 变更集合:需要添加与需要移除的类名。
10113
- */ /**
10114
- * 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
10115
- *
10116
- * 档位规则:
10117
- * - `(280, 375]` → medium
10118
- * - `(200, 280]` → small
10119
- * - `<= 200` → mini
10120
- * - 其它(> 375)→ 无档位(移除全部)
10121
- *
10122
- * @param size 尺寸(px)
10123
- * @param axis `'width'` 或 `'height'`
10124
- * @param prefix 类名前缀(如 `ezplayer`)
10172
+ /**
10173
+ * 布局溢出(More 收纳)与响应式尺寸分档的**纯函数**模块。
10174
+ *
10175
+ * @remarks
10176
+ * 这些函数只做「计算 / 判定」,不含任何 DOM 副作用,因此可以在没有布局引擎的环境(如 jsdom)
10177
+ * 中被完整单元测试。`theme.ts` 中的命令式外壳(读取 `clientWidth`、增删 class、创建 More、
10178
+ * 搬移控件)负责副作用,具体的判定逻辑全部下沉到这里。
10179
+ */ /**
10180
+ * 一次 classList 变更集合:需要添加与需要移除的类名。
10181
+ */ /**
10182
+ * 根据尺寸计算某一维度(宽或高)需要增删的响应式档位类名。
10183
+ *
10184
+ * 档位规则:
10185
+ * - `(280, 375]` → medium
10186
+ * - `(200, 280]` → small
10187
+ * - `<= 200` → mini
10188
+ * - 其它(> 375)→ 无档位(移除全部)
10189
+ *
10190
+ * @param size 尺寸(px)
10191
+ * @param axis `'width'` 或 `'height'`
10192
+ * @param prefix 类名前缀(如 `ezplayer`)
10125
10193
  */ function computeDimensionClasses(size, axis, prefix) {
10126
10194
  var medium = prefix + "-medium-" + axis;
10127
10195
  var small = prefix + "-small-" + axis;
@@ -10147,11 +10215,11 @@ var _renderRecType = function _renderRecType(theme, container, recType, props) {
10147
10215
  remove: remove
10148
10216
  };
10149
10217
  }
10150
- /**
10151
- * 计算宽、高两个维度的响应式档位类名增删集合。
10152
- * @param width 容器宽度(px)
10153
- * @param height 容器高度(px)
10154
- * @param prefix 类名前缀
10218
+ /**
10219
+ * 计算宽、高两个维度的响应式档位类名增删集合。
10220
+ * @param width 容器宽度(px)
10221
+ * @param height 容器高度(px)
10222
+ * @param prefix 类名前缀
10155
10223
  */ function computeSizeClasses(width, height, prefix) {
10156
10224
  var w = computeDimensionClasses(width, 'width', prefix);
10157
10225
  var h = computeDimensionClasses(height, 'height', prefix);
@@ -10160,34 +10228,34 @@ var _renderRecType = function _renderRecType(theme, container, recType, props) {
10160
10228
  remove: [].concat(w.remove, h.remove)
10161
10229
  };
10162
10230
  }
10163
- /**
10164
- * header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
10231
+ /**
10232
+ * header 左右控件宽度之和 + 30 是否超过容器宽度 —— 超过则需要显示 More。
10165
10233
  */ function shouldShowHeaderMore(width, leftWidth, rightWidth) {
10166
10234
  return leftWidth + rightWidth + 30 > width;
10167
10235
  }
10168
- /**
10169
- * header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
10236
+ /**
10237
+ * header 剩余空间是否 > 100 —— 足够则可以移除 More,把控件放回工具栏。
10170
10238
  */ function shouldRemoveHeaderMore(width, leftWidth, rightWidth) {
10171
10239
  return width - leftWidth - rightWidth > 100;
10172
10240
  }
10173
- /**
10174
- * footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
10241
+ /**
10242
+ * footer 剩余空间是否 < 16 —— 不足则需要把控件收拢进 More。
10175
10243
  */ function shouldCollapseFooter(width, leftWidth, rightWidth) {
10176
10244
  return width - leftWidth - rightWidth < 16;
10177
10245
  }
10178
- /**
10179
- * footer 从 More 中释放控件时的展开阈值。
10180
- *
10181
- * 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
10182
- * `50 + firstItemWidth || 0`)。
10183
- * @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
10246
+ /**
10247
+ * footer 从 More 中释放控件时的展开阈值。
10248
+ *
10249
+ * 基准为 50;当 More 中已有控件时,加上首个控件宽度(保持与历史实现一致的运算与兜底:
10250
+ * `50 + firstItemWidth || 0`)。
10251
+ * @param firstItemWidth More 列表中第一个控件的宽度;未提供表示 More 为空。
10184
10252
  */ function computeFooterExpandOffset(firstItemWidth) {
10185
10253
  var base = 50;
10186
10254
  if (firstItemWidth === undefined) return base;
10187
10255
  return base + firstItemWidth || 0;
10188
10256
  }
10189
- /**
10190
- * footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
10257
+ /**
10258
+ * footer 剩余空间是否足够把一个控件从 More 释放回工具栏。
10191
10259
  */ function shouldExpandFooter(width, leftWidth, rightWidth, offset) {
10192
10260
  return width - leftWidth - rightWidth > offset;
10193
10261
  }
@@ -11861,7 +11929,7 @@ var THEME_DEFAULT_OPTIONS = {
11861
11929
  zh: zh,
11862
11930
  en: en
11863
11931
  };
11864
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.5-beta.3';
11932
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.6-beta.1';
11865
11933
 
11866
11934
  exports.Control = Control;
11867
11935
  exports.EVENTS = EVENTS;