@ezuikit/player-theme 2.1.0-beta.8 → 2.1.1-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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.0-beta.8
3
- * Copyright (c) 2026-01-06 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.1-beta.1
3
+ * Copyright (c) 2026-02-05 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
@@ -141,6 +141,8 @@ var EVENTS = {
141
141
  /** 控件开始录制 */ recordingChange: 'recordingChange',
142
142
  /** 对讲状态变化 */ talkingChange: 'talkingChange',
143
143
  /** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
144
+ /** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
145
+ /** AI对话框状态变化 */ aichatChange: 'aichatChange',
144
146
  /** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
145
147
  records: 'records',
146
148
  ptzSpeedChange: 'ptzSpeedChange',
@@ -184,6 +186,10 @@ var EVENTS = {
184
186
  /** 开始对讲 */ talkingChange: 'Control.talkingChange',
185
187
  /** 对讲错误, 一般是麦克风权限被拒绝 */ talkError: 'Control.talkError',
186
188
  /** 对讲控件销毁 */ talkDestroy: 'Control.talkDestroy',
189
+ /** 语音广播状态变化 */ broadcastChange: 'Control.broadcastChange',
190
+ /** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
191
+ /** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
192
+ /** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
187
193
  /** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
188
194
  /** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
189
195
  /** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
@@ -235,7 +241,7 @@ function _create_class$9(Constructor, protoProps, staticProps) {
235
241
  if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
236
242
  return Constructor;
237
243
  }
238
- function _inherits$r(subClass, superClass) {
244
+ function _inherits$t(subClass, superClass) {
239
245
  if (typeof superClass !== "function" && superClass !== null) {
240
246
  throw new TypeError("Super expression must either be null or a function");
241
247
  }
@@ -246,14 +252,14 @@ function _inherits$r(subClass, superClass) {
246
252
  configurable: true
247
253
  }
248
254
  });
249
- if (superClass) _set_prototype_of$r(subClass, superClass);
255
+ if (superClass) _set_prototype_of$t(subClass, superClass);
250
256
  }
251
- function _set_prototype_of$r(o, p) {
252
- _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
257
+ function _set_prototype_of$t(o, p) {
258
+ _set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
253
259
  o.__proto__ = p;
254
260
  return o;
255
261
  };
256
- return _set_prototype_of$r(o, p);
262
+ return _set_prototype_of$t(o, p);
257
263
  }
258
264
  /**
259
265
  * 控件基类
@@ -267,7 +273,7 @@ function _set_prototype_of$r(o, p) {
267
273
  * const myControl = new MyControl({})
268
274
  * ```
269
275
  */ var Control = /*#__PURE__*/ function(EventEmitter) {
270
- _inherits$r(Control, EventEmitter);
276
+ _inherits$t(Control, EventEmitter);
271
277
  function Control(options) {
272
278
  var _this;
273
279
  var _this___options;
@@ -442,8 +448,8 @@ function _set_prototype_of$r(o, p) {
442
448
  return Control;
443
449
  }(EventEmitter);
444
450
 
445
- function _extends$q() {
446
- _extends$q = Object.assign || function(target) {
451
+ function _extends$s() {
452
+ _extends$s = Object.assign || function(target) {
447
453
  for(var i = 1; i < arguments.length; i++){
448
454
  var source = arguments[i];
449
455
  for(var key in source){
@@ -454,9 +460,9 @@ function _extends$q() {
454
460
  }
455
461
  return target;
456
462
  };
457
- return _extends$q.apply(this, arguments);
463
+ return _extends$s.apply(this, arguments);
458
464
  }
459
- function _inherits$q(subClass, superClass) {
465
+ function _inherits$s(subClass, superClass) {
460
466
  if (typeof superClass !== "function" && superClass !== null) {
461
467
  throw new TypeError("Super expression must either be null or a function");
462
468
  }
@@ -467,25 +473,25 @@ function _inherits$q(subClass, superClass) {
467
473
  configurable: true
468
474
  }
469
475
  });
470
- if (superClass) _set_prototype_of$q(subClass, superClass);
476
+ if (superClass) _set_prototype_of$s(subClass, superClass);
471
477
  }
472
- function _set_prototype_of$q(o, p) {
473
- _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
478
+ function _set_prototype_of$s(o, p) {
479
+ _set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
474
480
  o.__proto__ = p;
475
481
  return o;
476
482
  };
477
- return _set_prototype_of$q(o, p);
483
+ return _set_prototype_of$s(o, p);
478
484
  }
479
485
  var LOADING_DEFAULT_OPTIONS = {};
480
486
  /**
481
487
  * 加载动画控件
482
488
  * @category Control
483
489
  */ var Loading = /*#__PURE__*/ function(Control) {
484
- _inherits$q(Loading, Control);
490
+ _inherits$s(Loading, Control);
485
491
  function Loading(options) {
486
492
  if (options === void 0) options = {};
487
493
  var _this;
488
- _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$q({}, options, {
494
+ _this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$s({}, options, {
489
495
  tagName: 'div',
490
496
  controlType: 'block',
491
497
  classNameSuffix: 'loading'
@@ -523,8 +529,8 @@ var LOADING_DEFAULT_OPTIONS = {};
523
529
  return Loading;
524
530
  }(Control);
525
531
 
526
- function _extends$p() {
527
- _extends$p = Object.assign || function(target) {
532
+ function _extends$r() {
533
+ _extends$r = Object.assign || function(target) {
528
534
  for(var i = 1; i < arguments.length; i++){
529
535
  var source = arguments[i];
530
536
  for(var key in source){
@@ -535,9 +541,9 @@ function _extends$p() {
535
541
  }
536
542
  return target;
537
543
  };
538
- return _extends$p.apply(this, arguments);
544
+ return _extends$r.apply(this, arguments);
539
545
  }
540
- function _inherits$p(subClass, superClass) {
546
+ function _inherits$r(subClass, superClass) {
541
547
  if (typeof superClass !== "function" && superClass !== null) {
542
548
  throw new TypeError("Super expression must either be null or a function");
543
549
  }
@@ -548,14 +554,14 @@ function _inherits$p(subClass, superClass) {
548
554
  configurable: true
549
555
  }
550
556
  });
551
- if (superClass) _set_prototype_of$p(subClass, superClass);
557
+ if (superClass) _set_prototype_of$r(subClass, superClass);
552
558
  }
553
- function _set_prototype_of$p(o, p) {
554
- _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
559
+ function _set_prototype_of$r(o, p) {
560
+ _set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
555
561
  o.__proto__ = p;
556
562
  return o;
557
563
  };
558
- return _set_prototype_of$p(o, p);
564
+ return _set_prototype_of$r(o, p);
559
565
  }
560
566
  // 不放在服务器上 是因为有可能http加载失败
561
567
  // prettier-ignore
@@ -567,11 +573,11 @@ var POSTER_OPTIONS = {
567
573
  * 封面控件
568
574
  * @category Control
569
575
  */ var Poster = /*#__PURE__*/ function(Control) {
570
- _inherits$p(Poster, Control);
576
+ _inherits$r(Poster, Control);
571
577
  function Poster(options) {
572
578
  if (options === void 0) options = {};
573
579
  var _this;
574
- _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$p({}, options, {
580
+ _this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$r({}, options, {
575
581
  tagName: 'div',
576
582
  controlType: 'block',
577
583
  classNameSuffix: 'poster'
@@ -666,6 +672,8 @@ var Icons = {
666
672
  talkGrowth: function(prefix) {
667
673
  return '<svg width="1em" height="1em" viewBox="0 0 24 24" focusable="false" aria-hidden="true" data-icon="talk-growth">\n <g fill="currentColor" stroke="currentColor">\n <path stroke="none" d="M9.22313 18.9543C9.6588 18.9543 10.0189 19.2133 10.0759 19.5494L10.0837 19.6428L10.0837 21.7847C10.0837 22.1649 9.69841 22.4732 9.22313 22.4732C8.78745 22.4732 8.42739 22.2142 8.37041 21.8781L8.36255 21.7847L8.36255 19.6428C8.36255 19.2626 8.74784 18.9543 9.22313 18.9543Z" fill-rule="evenodd" />\n <path d="M16.5323 11.3779L16.5323 11.5872C16.5323 15.7472 13.1599 19.1197 8.99981 19.1197C4.83971 19.1197 1.46729 15.7472 1.46729 11.5872L1.46729 11.4335" fill-rule="evenodd" fill="none" stroke-width="1.5" />\n <path stroke="none" d="M4.07861 6.12978C4.07861 3.589 6.30476 1.5293 9.05085 1.5293C11.7969 1.5293 14.0231 3.589 14.0231 6.12978L14.0231 12.075C14.0231 14.6158 11.7969 16.6755 9.05085 16.6755C6.30476 16.6755 4.07861 14.6158 4.07861 12.075L4.07861 6.12978ZM5.57861 12.075L5.57861 6.12978C5.57861 5.94083 5.597 5.75561 5.63376 5.57412C5.67605 5.36539 5.74265 5.16158 5.83357 4.9627C5.86625 4.8912 5.90164 4.82121 5.93974 4.75272C6.09781 4.4685 6.30245 4.21019 6.55365 3.97777C6.64206 3.89597 6.73424 3.81921 6.83019 3.7475C7.0816 3.55959 7.3589 3.40632 7.66207 3.28767C7.79552 3.23545 7.93107 3.19114 8.06871 3.15475C8.38503 3.07111 8.71241 3.0293 9.05085 3.0293C9.38929 3.0293 9.71668 3.07112 10.033 3.15475C10.1706 3.19114 10.3062 3.23545 10.4396 3.28767C10.7428 3.40632 11.0201 3.55959 11.2715 3.74749C11.3675 3.81921 11.4596 3.89596 11.548 3.97777C11.7993 4.2102 12.0039 4.46853 12.162 4.75276C12.2001 4.82124 12.2354 4.89122 12.2681 4.9627C12.359 5.16157 12.4256 5.36536 12.4679 5.57407C12.5047 5.75558 12.5231 5.94082 12.5231 6.12978L12.5231 12.075C12.5231 12.264 12.5047 12.4492 12.4679 12.6307C12.4256 12.8394 12.359 13.0432 12.2681 13.2421C12.2355 13.3136 12.2001 13.3835 12.162 13.452C12.0039 13.7362 11.7993 13.9946 11.548 14.227C11.4596 14.3088 11.3675 14.3856 11.2715 14.4573C11.0201 14.6452 10.7428 14.7985 10.4396 14.9171C10.3062 14.9693 10.1706 15.0136 10.033 15.05C9.71667 15.1337 9.38929 15.1755 9.05085 15.1755C8.71241 15.1755 8.38503 15.1337 8.06871 15.05C7.93107 15.0136 7.79552 14.9693 7.66207 14.9171C7.3589 14.7985 7.0816 14.6452 6.83019 14.4573C6.73424 14.3856 6.64206 14.3088 6.55365 14.227C6.30244 13.9946 6.09779 13.7363 5.93972 13.452C5.90163 13.3836 5.86625 13.3136 5.83357 13.2421C5.74265 13.0432 5.67605 12.8394 5.63377 12.6307C5.597 12.4492 5.57861 12.264 5.57861 12.075Z" fill-rule="evenodd" />\n </g>\n <g class="' + prefix + '-icon-talk-growth-dot">\n <path class="' + prefix + '-icon-talk-growth-dot1" d="M19.1333 6.40039L22.8667 6.40039" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot2" d="M19.1333 10.1338L21.9331 10.1338" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot3" d="M19.1333 13.8672L20.9995 13.8672" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n <path class="' + prefix + '-icon-talk-growth-dot4" d="M19.1333 17.6001L20.0669 17.6001" stroke="currentColor" stroke-linecap="round" stroke-width="1.86666667" />\n </g>\n </svg>';
668
674
  },
675
+ /** 语音广播 */ broadcast: '\n <svg width="1em" height="1em" viewBox="0 0 24 24" fill="currentColor" stroke="none" focusable="false" aria-hidden="true" data-icon="broadcast">\n <g>\n <path id="矢量 1" d="m8.52109,6.76609l6.17823,-2.91335c0.2485,-0.11718 0.5027,-0.19531 0.7627,-0.2351c0.2034,-0.03077 0.4104,-0.03809 0.6211,-0.02173c0.2092,0.01636 0.4116,0.05493 0.6069,0.11621c0.2278,0.07129 0.4461,0.1731 0.6548,0.30542c0.2087,0.13232 0.394,0.28638 0.5557,0.46216l0.0002,0l0,0c0.1384,0.15064 0.2598,0.31714 0.3638,0.49951c0.1047,0.18335 0.1865,0.37354 0.2451,0.57081c0.0752,0.25219 0.1128,0.51562 0.1128,0.79004l0,10.64651c0,0.2744 -0.0376,0.5379 -0.1128,0.7901l0,0c-0.0586,0.197 -0.1404,0.3874 -0.2451,0.5708c-0.104,0.1823 -0.2254,0.3488 -0.364,0.4995c-0.1617,0.1758 -0.347,0.3298 -0.5557,0.4621c-0.2087,0.1324 -0.427,0.2342 -0.6548,0.3054c-0.1953,0.0611 -0.3977,0.0999 -0.6069,0.1163c-0.2107,0.0163 -0.4175,0.009 -0.6209,-0.0218c-0.2602,-0.0398 -0.5144,-0.1181 -0.7629,-0.2351l-5.45044,-2.5703l0,2.759c0,0.1036 -0.01831,0.1995 -0.05494,0.2879c-0.03662,0.0886 -0.09155,0.1692 -0.16479,0.2424c-0.14624,0.1465 -0.32324,0.2197 -0.53027,0.2197l-2,0c-0.14209,0 -0.27344,-0.0373 -0.39429,-0.112c-0.12085,-0.0745 -0.21289,-0.1756 -0.27661,-0.3025l-1.99268,-3.9856c-0.06225,-0.0234 -0.12402,-0.0481 -0.18555,-0.074c-0.26953,-0.114 -0.52417,-0.2502 -0.7644,-0.4084c-0.26636,-0.1758 -0.51489,-0.3789 -0.74512,-0.6094c-0.23047,-0.2302 -0.43359,-0.4788 -0.60937,-0.7451c-0.1582,-0.2403 -0.29444,-0.4949 -0.40845,-0.7644c-0.11328,-0.2679 -0.20068,-0.5413 -0.26245,-0.8206l0,0c-0.07398,-0.3347 -0.11108,-0.6775 -0.11108,-1.0286c0,-0.351 0.0371,-0.6938 0.11108,-1.0285c0.06177,-0.2793 0.14917,-0.5528 0.26245,-0.8206c0.11401,-0.26953 0.25025,-0.52417 0.40845,-0.7644c0.17578,-0.26636 0.3789,-0.5149 0.60937,-0.74512c0.23023,-0.23047 0.47876,-0.4336 0.74512,-0.60938l0,0c0.24023,-0.1582 0.49487,-0.29444 0.7644,-0.40845c0.26783,-0.11328 0.54126,-0.20068 0.82056,-0.26245l0,0l0,0l0,0c0.33472,-0.07398 0.67749,-0.11109 1.02857,-0.11109l2.93872,0c0.02636,-0.0166 0.05444,-0.03198 0.08349,-0.04589zm0.72876,8.47948l6.08937,2.8716c0.1287,0.0606 0.2598,0.0987 0.3935,0.114c0.0772,0.0088 0.1551,0.0103 0.2337,0.0042c0.0857,-0.0068 0.1687,-0.0217 0.2495,-0.0452c0.1133,-0.0329 0.2219,-0.0822 0.3257,-0.1479c0.104,-0.0659 0.1948,-0.1431 0.2729,-0.2317c0.0554,-0.063 0.1045,-0.1318 0.147,-0.2063c0.0393,-0.0686 0.0713,-0.1397 0.0962,-0.2131c0.043,-0.1277 0.0647,-0.2625 0.0647,-0.4046l0,-10.64651c0,-0.14209 -0.0217,-0.2771 -0.0647,-0.40454c-0.0249,-0.07349 -0.0569,-0.14454 -0.0962,-0.21314c-0.0425,-0.07471 -0.0916,-0.14331 -0.147,-0.2063c-0.0781,-0.08862 -0.1689,-0.16577 -0.2729,-0.23169c-0.1038,-0.06567 -0.2124,-0.11523 -0.3257,-0.14795c-0.0808,-0.02344 -0.1638,-0.03833 -0.2495,-0.04517c-0.0786,-0.0061 -0.1565,-0.00463 -0.2337,0.00415c-0.1337,0.01539 -0.2648,0.05347 -0.3935,0.11402l-6.09034,2.87208l0.00097,7.16405zm13.58447,-7.9121l-2,1c-0.3757,0.18775 -0.8184,0.04029 -1.0063,-0.33545c-0.0552,-0.11035 -0.0813,-0.22656 -0.0813,-0.34033c0,-0.27344 0.1516,-0.53321 0.4167,-0.66602l2,-1c0.3757,-0.18775 0.8186,-0.04004 1.0064,0.33545c0.0551,0.11035 0.0813,0.22656 0.0813,0.34033c0,0.27368 -0.1514,0.53345 -0.4168,0.66602zm-15.08544,8.9785l-2.08667,0l1.30029,2.6006l0.78638,0l0,-2.6006zm0,-7.99998l-2.25,0c-0.24976,0 -0.49317,0.02734 -0.73023,0.08179c-0.18188,0.04174 -0.36011,0.09961 -0.53467,0.17334c-0.17944,0.07593 -0.34961,0.1665 -0.51049,0.27124c-0.18702,0.12231 -0.36133,0.26416 -0.52271,0.42554c-0.16138,0.16137 -0.30322,0.33569 -0.42554,0.52267c-0.10473,0.1609 -0.19531,0.3311 -0.27124,0.5105c-0.07373,0.1746 -0.13159,0.3528 -0.17334,0.5347c-0.05444,0.2371 -0.08178,0.4805 -0.08178,0.7302c0,0.2498 0.02734,0.4932 0.08178,0.7303c0.04175,0.1818 0.09961,0.3601 0.17334,0.5346c0.07593,0.1795 0.16651,0.3496 0.27124,0.5105c0.12232,0.187 0.26416,0.3614 0.42554,0.5227c0.16138,0.1614 0.33569,0.3033 0.52271,0.4256c0.16088,0.1047 0.33105,0.1953 0.51049,0.2712c0.17456,0.0737 0.35279,0.1316 0.53467,0.1734c0.23706,0.0544 0.48047,0.0817 0.73023,0.0817l2.25097,0l-0.00097,-6.49998zm12.75004,2.60058l2,0c0.4199,0 0.75,0.3301 0.75,0.75c0,0.4199 -0.3301,0.75 -0.75,0.75l-2,0c-0.42,0 -0.75,-0.3301 -0.75,-0.75c0,-0.4199 0.33,-0.75 0.75,-0.75zm0.3354,4.0791l2,1c0.2654,0.1326 0.4168,0.3924 0.4168,0.6661c0,0.1137 -0.0262,0.2299 -0.0813,0.3403c-0.1878,0.3755 -0.6307,0.5232 -1.0064,0.3354l-2,-1c-0.2651,-0.1328 -0.4167,-0.3925 -0.4167,-0.666c0,-0.1138 0.0261,-0.23 0.0813,-0.3403c0.1879,-0.3758 0.6306,-0.5232 1.0063,-0.3355z" fill-rule="evenodd"/>\n </g>\n</svg>',
676
+ /** AI对话 */ aiChat: '\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none">\n <defs>\n <linearGradient id="gradient0" x1="10.667" x2="10.667" y1="0.667" y2="20.667">\n <stop stop-color="#33D9FF" offset="0.354"/>\n <stop stop-color="#CE77FF" offset="1"/>\n </linearGradient>\n <linearGradient id="gradient1" x1="8.318" x2="8.318" y1="0" y2="18.001">\n <stop stop-color="#33D9FF" offset="0.354"/>\n <stop stop-color="#CE77FF" offset="1"/>\n </linearGradient>\n </defs>\n \n <g transform="scale(1.2) translate(-3, -0.5)">\n <path d="M6.917 0C8.776 0 10.52 0.738 11.808 2.026C12.45 2.668 12.961 3.43 13.309 4.269C13.442 4.588 13.29 4.954 12.971 5.086C12.653 5.218 12.287 5.067 12.155 4.748C11.87 4.061 11.451 3.436 10.925 2.91C9.868 1.854 8.441 1.25 6.917 1.25C3.787 1.25 1.25 3.787 1.25 6.917C1.25 10.047 3.787 12.584 6.917 12.584C8.441 12.584 9.868 11.981 10.925 10.925C11.169 10.681 11.564 10.681 11.808 10.925C12.052 11.169 12.052 11.565 11.808 11.809C10.666 12.951 9.164 13.661 7.542 13.807L7.542 17.376C7.542 17.721 7.262 18.001 6.917 18.001C6.572 18.001 6.292 17.721 6.292 17.376L6.292 13.807C2.765 13.49 0 10.527 0 6.917C0 3.097 3.097 0 6.917 0ZM11.051 6.495C11.295 6.739 11.295 7.135 11.051 7.379L7.547 10.882C7.303 11.126 6.908 11.126 6.664 10.882C6.42 10.638 6.42 10.242 6.664 9.998L10.167 6.495C10.411 6.251 10.807 6.251 11.051 6.495ZM8.566 4.559L6.501 9.5C6.368 9.818 6.002 9.969 5.684 9.836C5.365 9.703 5.215 9.336 5.348 9.018L5.712 8.147L4.094 6.529L3.198 6.884C2.904 7.001 2.575 6.878 2.424 6.61C2.297 6.289 2.418 5.849 2.739 5.722L7.76 3.736C8.274 3.533 8.779 4.049 8.566 4.559ZM16.614 6.171C16.642 6.236 16.642 6.309 16.614 6.373L15.964 7.848C15.936 7.912 15.936 7.986 15.964 8.05L16.614 9.525C16.67 9.651 16.613 9.799 16.486 9.855C16.422 9.883 16.349 9.883 16.285 9.855L14.809 9.205C14.745 9.176 14.672 9.176 14.608 9.205L13.133 9.855C13.006 9.911 12.859 9.853 12.803 9.727C12.775 9.662 12.775 9.589 12.803 9.525L13.453 8.05C13.482 7.986 13.482 7.912 13.453 7.848L12.803 6.373C12.747 6.247 12.805 6.099 12.931 6.043C12.995 6.015 13.068 6.015 13.133 6.043L14.608 6.694C14.672 6.722 14.745 6.722 14.809 6.694L16.285 6.043C16.411 5.988 16.558 6.045 16.614 6.171ZM6.841 5.443L5.361 6.028L6.233 6.9L6.841 5.443Z" fill="url(#gradient1)" transform="matrix(0.707 -0.707 0.707 0.707 0.085 9.868)"/>\n </g>\n </svg>\n ',
669
677
  /** 相机/截图 */ capturePicture: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="capture-picture">\n <path d="M6.94 7.51C7.34 7.51 7.7 7.28 7.86 6.91L8.43 5.6C8.59 5.23 8.95 5 9.35 5L14.69 5C15.04 5 15.37 5.18 15.55 5.49L16.45 7.02C16.63 7.33 16.96 7.51 17.31 7.51L18.5 7.51C19.6 7.51 20.5 8.41 20.5 9.51L20.5 17C20.5 18.1 19.6 19 18.5 19L5.5 19C4.39 19 3.5 18.1 3.5 17L3.5 9.51C3.5 8.41 4.39 7.51 5.5 7.51L6.94 7.51Z" stroke-width="1.5"/>\n <circle cx="12" cy="12.525146" r="3.068097" stroke-width="1.5"/>\n </svg>',
670
678
  /** 电子放大 */ zoom: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="zoom">\n <ellipse cx="10.914795" cy="11.25" rx="8.004043" ry="8.25" stroke-width="1.5"/>\n <path d="M14.31 11.04L8.05 11.14" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M11.13 14.22L11.23 7.95" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M16.45 17.83L19.36 20.83" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',
671
679
  /** 隐私遮蔽 */ privacyMasking: '<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" focusable="false" aria-hidden="true" data-icon="privacy-masking">\n <path d="M12 19C11.15 19 10.31 18.82 9.49 18.5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M20.88 12.46C18.98 15.96 15.49 19 11.99 19" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M19.07 8.92C19.76 9.72 20.38 10.61 20.88 11.53C21.03 11.82 21.03 12.17 20.88 12.46" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M5 19L19 5" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M9.77 14.22C8.54 12.99 8.54 11 9.77 9.77C11 8.54 12.99 8.54 14.22 9.77" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n <path d="M17.04 6.95C15.49 5.75 13.74 5 12 5C8.5 5 5.01 8.03 3.11 11.53C2.96 11.82 2.96 12.17 3.11 12.46C4.06 14.21 5.41 15.84 6.95 17.04" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>\n </svg>',
@@ -750,6 +758,14 @@ var IconComponents = {
750
758
  if (attr === void 0) attr = {};
751
759
  return createIcon(Icons.talk, 'talk', attr);
752
760
  },
761
+ broadcast: function(attr) {
762
+ if (attr === void 0) attr = {};
763
+ return createIcon(Icons.broadcast, 'broadcast', attr);
764
+ },
765
+ aiChat: function(attr) {
766
+ if (attr === void 0) attr = {};
767
+ return createIcon(Icons.aiChat, 'aiChat', attr);
768
+ },
753
769
  talkGrowth: function(attr) {
754
770
  if (attr === void 0) attr = {};
755
771
  return createIcon(Icons.talkGrowth(PREFIX_CLASS), 'talk-growth', attr);
@@ -828,8 +844,8 @@ var IconComponents = {
828
844
  }
829
845
  };
830
846
 
831
- function _extends$o() {
832
- _extends$o = Object.assign || function(target) {
847
+ function _extends$q() {
848
+ _extends$q = Object.assign || function(target) {
833
849
  for(var i = 1; i < arguments.length; i++){
834
850
  var source = arguments[i];
835
851
  for(var key in source){
@@ -840,9 +856,9 @@ function _extends$o() {
840
856
  }
841
857
  return target;
842
858
  };
843
- return _extends$o.apply(this, arguments);
859
+ return _extends$q.apply(this, arguments);
844
860
  }
845
- function _inherits$o(subClass, superClass) {
861
+ function _inherits$q(subClass, superClass) {
846
862
  if (typeof superClass !== "function" && superClass !== null) {
847
863
  throw new TypeError("Super expression must either be null or a function");
848
864
  }
@@ -853,25 +869,25 @@ function _inherits$o(subClass, superClass) {
853
869
  configurable: true
854
870
  }
855
871
  });
856
- if (superClass) _set_prototype_of$o(subClass, superClass);
872
+ if (superClass) _set_prototype_of$q(subClass, superClass);
857
873
  }
858
- function _set_prototype_of$o(o, p) {
859
- _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
874
+ function _set_prototype_of$q(o, p) {
875
+ _set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
860
876
  o.__proto__ = p;
861
877
  return o;
862
878
  };
863
- return _set_prototype_of$o(o, p);
879
+ return _set_prototype_of$q(o, p);
864
880
  }
865
881
  var MESSAGE_DEFAULT_OPTIONS = {};
866
882
  /**
867
883
  * 消息控件
868
884
  * @category Control
869
885
  */ var Message = /*#__PURE__*/ function(Control) {
870
- _inherits$o(Message, Control);
886
+ _inherits$q(Message, Control);
871
887
  function Message(options) {
872
888
  if (options === void 0) options = {};
873
889
  var _this;
874
- _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$o({}, options, {
890
+ _this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
875
891
  tagName: 'div',
876
892
  controlType: 'block'
877
893
  }))) || this;
@@ -1024,8 +1040,8 @@ function _create_class$8(Constructor, protoProps, staticProps) {
1024
1040
  if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
1025
1041
  return Constructor;
1026
1042
  }
1027
- function _extends$n() {
1028
- _extends$n = Object.assign || function(target) {
1043
+ function _extends$p() {
1044
+ _extends$p = Object.assign || function(target) {
1029
1045
  for(var i = 1; i < arguments.length; i++){
1030
1046
  var source = arguments[i];
1031
1047
  for(var key in source){
@@ -1036,9 +1052,9 @@ function _extends$n() {
1036
1052
  }
1037
1053
  return target;
1038
1054
  };
1039
- return _extends$n.apply(this, arguments);
1055
+ return _extends$p.apply(this, arguments);
1040
1056
  }
1041
- function _inherits$n(subClass, superClass) {
1057
+ function _inherits$p(subClass, superClass) {
1042
1058
  if (typeof superClass !== "function" && superClass !== null) {
1043
1059
  throw new TypeError("Super expression must either be null or a function");
1044
1060
  }
@@ -1049,23 +1065,23 @@ function _inherits$n(subClass, superClass) {
1049
1065
  configurable: true
1050
1066
  }
1051
1067
  });
1052
- if (superClass) _set_prototype_of$n(subClass, superClass);
1068
+ if (superClass) _set_prototype_of$p(subClass, superClass);
1053
1069
  }
1054
- function _set_prototype_of$n(o, p) {
1055
- _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1070
+ function _set_prototype_of$p(o, p) {
1071
+ _set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1056
1072
  o.__proto__ = p;
1057
1073
  return o;
1058
1074
  };
1059
- return _set_prototype_of$n(o, p);
1075
+ return _set_prototype_of$p(o, p);
1060
1076
  }
1061
1077
  /**
1062
1078
  * 播放/暂停控件
1063
1079
  * @category Control
1064
1080
  */ var Play = /*#__PURE__*/ function(Control) {
1065
- _inherits$n(Play, Control);
1081
+ _inherits$p(Play, Control);
1066
1082
  function Play(options) {
1067
1083
  var _this;
1068
- _this = Control.call(this, _extends$n({}, options, {
1084
+ _this = Control.call(this, _extends$p({}, options, {
1069
1085
  tagName: 'span',
1070
1086
  controlType: 'button',
1071
1087
  classNameSuffix: 'play'
@@ -1681,8 +1697,8 @@ function _create_class$6(Constructor, protoProps, staticProps) {
1681
1697
  if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
1682
1698
  return Constructor;
1683
1699
  }
1684
- function _extends$m() {
1685
- _extends$m = Object.assign || function(target) {
1700
+ function _extends$o() {
1701
+ _extends$o = Object.assign || function(target) {
1686
1702
  for(var i = 1; i < arguments.length; i++){
1687
1703
  var source = arguments[i];
1688
1704
  for(var key in source){
@@ -1693,9 +1709,9 @@ function _extends$m() {
1693
1709
  }
1694
1710
  return target;
1695
1711
  };
1696
- return _extends$m.apply(this, arguments);
1712
+ return _extends$o.apply(this, arguments);
1697
1713
  }
1698
- function _inherits$m(subClass, superClass) {
1714
+ function _inherits$o(subClass, superClass) {
1699
1715
  if (typeof superClass !== "function" && superClass !== null) {
1700
1716
  throw new TypeError("Super expression must either be null or a function");
1701
1717
  }
@@ -1706,14 +1722,14 @@ function _inherits$m(subClass, superClass) {
1706
1722
  configurable: true
1707
1723
  }
1708
1724
  });
1709
- if (superClass) _set_prototype_of$m(subClass, superClass);
1725
+ if (superClass) _set_prototype_of$o(subClass, superClass);
1710
1726
  }
1711
- function _set_prototype_of$m(o, p) {
1712
- _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1727
+ function _set_prototype_of$o(o, p) {
1728
+ _set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
1713
1729
  o.__proto__ = p;
1714
1730
  return o;
1715
1731
  };
1716
- return _set_prototype_of$m(o, p);
1732
+ return _set_prototype_of$o(o, p);
1717
1733
  }
1718
1734
  var VOLUME_DEFAULT_OPTIONS = {
1719
1735
  volume: 0.8,
@@ -1727,12 +1743,12 @@ var VOLUME_DEFAULT_OPTIONS = {
1727
1743
  * 音量调节控件
1728
1744
  * @category Control
1729
1745
  */ var Volume = /*#__PURE__*/ function(Control) {
1730
- _inherits$m(Volume, Control);
1746
+ _inherits$o(Volume, Control);
1731
1747
  function Volume(options) {
1732
1748
  if (options === void 0) options = {};
1733
1749
  var _this;
1734
1750
  var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
1735
- _this = Control.call(this, _extends$m({}, options, {
1751
+ _this = Control.call(this, _extends$o({}, options, {
1736
1752
  tagName: 'span',
1737
1753
  classNameSuffix: 'volume',
1738
1754
  controlType: 'button'
@@ -1948,7 +1964,7 @@ var VOLUME_DEFAULT_OPTIONS = {
1948
1964
  return Volume;
1949
1965
  }(Control);
1950
1966
 
1951
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
1967
+ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
1952
1968
  try {
1953
1969
  var info = gen[key](arg);
1954
1970
  var value = info.value;
@@ -1962,22 +1978,22 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
1962
1978
  Promise.resolve(value).then(_next, _throw);
1963
1979
  }
1964
1980
  }
1965
- function _async_to_generator$5(fn) {
1981
+ function _async_to_generator$7(fn) {
1966
1982
  return function() {
1967
1983
  var self = this, args = arguments;
1968
1984
  return new Promise(function(resolve, reject) {
1969
1985
  var gen = fn.apply(self, args);
1970
1986
  function _next(value) {
1971
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
1987
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
1972
1988
  }
1973
1989
  function _throw(err) {
1974
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
1990
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
1975
1991
  }
1976
1992
  _next(undefined);
1977
1993
  });
1978
1994
  };
1979
1995
  }
1980
- function _ts_generator$5(thisArg, body) {
1996
+ function _ts_generator$7(thisArg, body) {
1981
1997
  var f, y, t, _ = {
1982
1998
  label: 0,
1983
1999
  sent: function() {
@@ -2191,8 +2207,8 @@ var __fullscreenProvider__ = Provider.getInstance();
2191
2207
  * 全屏
2192
2208
  * @returns Promise<void>
2193
2209
  */ _proto.fullscreen = function fullscreen() {
2194
- return _async_to_generator$5(function() {
2195
- return _ts_generator$5(this, function(_state) {
2210
+ return _async_to_generator$7(function() {
2211
+ return _ts_generator$7(this, function(_state) {
2196
2212
  switch(_state.label){
2197
2213
  case 0:
2198
2214
  if (!Utils.isMobile) return [
@@ -2227,8 +2243,8 @@ var __fullscreenProvider__ = Provider.getInstance();
2227
2243
  * 退出全屏
2228
2244
  * @returns Promise<void>
2229
2245
  */ _proto.exitFullscreen = function exitFullscreen() {
2230
- return _async_to_generator$5(function() {
2231
- return _ts_generator$5(this, function(_state) {
2246
+ return _async_to_generator$7(function() {
2247
+ return _ts_generator$7(this, function(_state) {
2232
2248
  switch(_state.label){
2233
2249
  case 0:
2234
2250
  if (!Utils.isMobile) return [
@@ -2267,8 +2283,8 @@ var __fullscreenProvider__ = Provider.getInstance();
2267
2283
  * 全屏切换
2268
2284
  * @returns Promise<void>
2269
2285
  */ _proto.toggle = function toggle() {
2270
- return _async_to_generator$5(function() {
2271
- return _ts_generator$5(this, function(_state) {
2286
+ return _async_to_generator$7(function() {
2287
+ return _ts_generator$7(this, function(_state) {
2272
2288
  switch(_state.label){
2273
2289
  case 0:
2274
2290
  if (!Utils.isMobile) return [
@@ -2391,8 +2407,8 @@ var __fullscreenProvider__ = Provider.getInstance();
2391
2407
  return Fullscreen;
2392
2408
  }();
2393
2409
 
2394
- function _extends$l() {
2395
- _extends$l = Object.assign || function(target) {
2410
+ function _extends$n() {
2411
+ _extends$n = Object.assign || function(target) {
2396
2412
  for(var i = 1; i < arguments.length; i++){
2397
2413
  var source = arguments[i];
2398
2414
  for(var key in source){
@@ -2403,9 +2419,9 @@ function _extends$l() {
2403
2419
  }
2404
2420
  return target;
2405
2421
  };
2406
- return _extends$l.apply(this, arguments);
2422
+ return _extends$n.apply(this, arguments);
2407
2423
  }
2408
- function _inherits$l(subClass, superClass) {
2424
+ function _inherits$n(subClass, superClass) {
2409
2425
  if (typeof superClass !== "function" && superClass !== null) {
2410
2426
  throw new TypeError("Super expression must either be null or a function");
2411
2427
  }
@@ -2416,24 +2432,24 @@ function _inherits$l(subClass, superClass) {
2416
2432
  configurable: true
2417
2433
  }
2418
2434
  });
2419
- if (superClass) _set_prototype_of$l(subClass, superClass);
2435
+ if (superClass) _set_prototype_of$n(subClass, superClass);
2420
2436
  }
2421
- function _set_prototype_of$l(o, p) {
2422
- _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2437
+ function _set_prototype_of$n(o, p) {
2438
+ _set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2423
2439
  o.__proto__ = p;
2424
2440
  return o;
2425
2441
  };
2426
- return _set_prototype_of$l(o, p);
2442
+ return _set_prototype_of$n(o, p);
2427
2443
  }
2428
2444
  /**
2429
2445
  * 全屏控件
2430
2446
  * @category Control
2431
2447
  */ var Fullscreen = /*#__PURE__*/ function(Control) {
2432
- _inherits$l(Fullscreen, Control);
2448
+ _inherits$n(Fullscreen, Control);
2433
2449
  function Fullscreen(options) {
2434
2450
  var _this;
2435
2451
  var _options_props, _this_options;
2436
- _this = Control.call(this, _extends$l({
2452
+ _this = Control.call(this, _extends$n({
2437
2453
  tagName: 'span',
2438
2454
  classNameSuffix: 'fullscreen',
2439
2455
  controlType: 'button'
@@ -2498,8 +2514,8 @@ function _set_prototype_of$l(o, p) {
2498
2514
  return Fullscreen;
2499
2515
  }(Control);
2500
2516
 
2501
- function _extends$k() {
2502
- _extends$k = Object.assign || function(target) {
2517
+ function _extends$m() {
2518
+ _extends$m = Object.assign || function(target) {
2503
2519
  for(var i = 1; i < arguments.length; i++){
2504
2520
  var source = arguments[i];
2505
2521
  for(var key in source){
@@ -2510,9 +2526,9 @@ function _extends$k() {
2510
2526
  }
2511
2527
  return target;
2512
2528
  };
2513
- return _extends$k.apply(this, arguments);
2529
+ return _extends$m.apply(this, arguments);
2514
2530
  }
2515
- function _inherits$k(subClass, superClass) {
2531
+ function _inherits$m(subClass, superClass) {
2516
2532
  if (typeof superClass !== "function" && superClass !== null) {
2517
2533
  throw new TypeError("Super expression must either be null or a function");
2518
2534
  }
@@ -2523,24 +2539,24 @@ function _inherits$k(subClass, superClass) {
2523
2539
  configurable: true
2524
2540
  }
2525
2541
  });
2526
- if (superClass) _set_prototype_of$k(subClass, superClass);
2542
+ if (superClass) _set_prototype_of$m(subClass, superClass);
2527
2543
  }
2528
- function _set_prototype_of$k(o, p) {
2529
- _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2544
+ function _set_prototype_of$m(o, p) {
2545
+ _set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
2530
2546
  o.__proto__ = p;
2531
2547
  return o;
2532
2548
  };
2533
- return _set_prototype_of$k(o, p);
2549
+ return _set_prototype_of$m(o, p);
2534
2550
  }
2535
2551
  /**
2536
2552
  * 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
2537
2553
  * @category Control
2538
2554
  */ var Rec = /*#__PURE__*/ function(Control) {
2539
- _inherits$k(Rec, Control);
2555
+ _inherits$m(Rec, Control);
2540
2556
  function Rec(options) {
2541
2557
  var _this;
2542
2558
  var _options_props;
2543
- _this = Control.call(this, _extends$k({}, options, {
2559
+ _this = Control.call(this, _extends$m({}, options, {
2544
2560
  tagName: 'div',
2545
2561
  controlType: 'block',
2546
2562
  classNameSuffix: 'rec'
@@ -2815,6 +2831,8 @@ var zh = {
2815
2831
  BTN_RECORDVIDEO: '录屏',
2816
2832
  BTN_CAPTURE: '截图',
2817
2833
  BTN_TALK: '对讲',
2834
+ BTN_BROADCAST: '语音广播',
2835
+ BTN_AICHAT: 'AI对话',
2818
2836
  BTN_ZOOM: '电子放大',
2819
2837
  BTN_3D_ZOOM: '3D定位',
2820
2838
  BTN_PTZ: '云台控制',
@@ -3085,6 +3103,8 @@ var en = {
3085
3103
  BTN_RECORDVIDEO: 'Screen recording',
3086
3104
  BTN_CAPTURE: 'Screenshot',
3087
3105
  BTN_TALK: 'Intercom',
3106
+ BTN_BROADCAST: 'Voice broadcast',
3107
+ BTN_AICHAT: 'AI Chat',
3088
3108
  BTN_ZOOM: 'Electronic zoom',
3089
3109
  BTN_3D_ZOOM: '3D positioning',
3090
3110
  BTN_PTZ: 'PTZ control',
@@ -3271,6 +3291,11 @@ var en = {
3271
3291
  part: 'left',
3272
3292
  isrender: 1
3273
3293
  },
3294
+ {
3295
+ iconId: 'broadcast',
3296
+ part: 'left',
3297
+ isrender: 1
3298
+ },
3274
3299
  {
3275
3300
  iconId: 'zoom',
3276
3301
  part: 'left',
@@ -3374,6 +3399,12 @@ var en = {
3374
3399
  defaultActive: 0,
3375
3400
  isrender: 1
3376
3401
  },
3402
+ {
3403
+ iconId: 'aiChat',
3404
+ part: 'left',
3405
+ defaultActive: 0,
3406
+ isrender: 1
3407
+ },
3377
3408
  {
3378
3409
  iconId: 'speed',
3379
3410
  part: 'right',
@@ -3457,6 +3488,12 @@ var en = {
3457
3488
  defaultActive: 0,
3458
3489
  isrender: 1
3459
3490
  },
3491
+ {
3492
+ iconId: 'broadcast',
3493
+ part: 'left',
3494
+ defaultActive: 0,
3495
+ isrender: 1
3496
+ },
3460
3497
  {
3461
3498
  iconId: 'zoom',
3462
3499
  part: 'left',
@@ -3552,6 +3589,12 @@ var en = {
3552
3589
  defaultActive: 0,
3553
3590
  isrender: 1
3554
3591
  },
3592
+ {
3593
+ iconId: 'aiChat',
3594
+ part: 'left',
3595
+ defaultActive: 0,
3596
+ isrender: 1
3597
+ },
3555
3598
  {
3556
3599
  iconId: 'speed',
3557
3600
  part: 'right',
@@ -3712,7 +3755,7 @@ var en = {
3712
3755
  voice: voice
3713
3756
  };
3714
3757
 
3715
- function _inherits$j(subClass, superClass) {
3758
+ function _inherits$l(subClass, superClass) {
3716
3759
  if (typeof superClass !== "function" && superClass !== null) {
3717
3760
  throw new TypeError("Super expression must either be null or a function");
3718
3761
  }
@@ -3723,23 +3766,23 @@ function _inherits$j(subClass, superClass) {
3723
3766
  configurable: true
3724
3767
  }
3725
3768
  });
3726
- if (superClass) _set_prototype_of$j(subClass, superClass);
3769
+ if (superClass) _set_prototype_of$l(subClass, superClass);
3727
3770
  }
3728
- function _set_prototype_of$j(o, p) {
3729
- _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3771
+ function _set_prototype_of$l(o, p) {
3772
+ _set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3730
3773
  o.__proto__ = p;
3731
3774
  return o;
3732
3775
  };
3733
- return _set_prototype_of$j(o, p);
3776
+ return _set_prototype_of$l(o, p);
3734
3777
  }
3735
3778
  /**
3736
3779
  * 截图控件
3737
3780
  * @category Content
3738
3781
  */ var Content = /*#__PURE__*/ function(EventEmitter) {
3739
- _inherits$j(Content, EventEmitter);
3782
+ _inherits$l(Content, EventEmitter);
3740
3783
  function Content(options) {
3741
3784
  var _this;
3742
- _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
3785
+ _this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
3743
3786
  _this.options = options;
3744
3787
  _this._scaleMode = options.scaleMode || 0;
3745
3788
  _this.$wrapper = document.createElement('div');
@@ -3757,9 +3800,10 @@ function _set_prototype_of$j(o, p) {
3757
3800
  _this.on(EVENTS.videoInfo, function(originWidth, originHeight) {
3758
3801
  _this.rerender(originWidth, originHeight);
3759
3802
  });
3760
- _this.on(EVENTS.resize, function() {
3803
+ // prettier-ignore
3804
+ _this._cleanUpResizeObserver = Utils.resizeObserver(_this.$wrapper, throttle(function() {
3761
3805
  _this.rerender();
3762
- });
3806
+ }, 20));
3763
3807
  return _this;
3764
3808
  }
3765
3809
  var _proto = Content.prototype;
@@ -3792,6 +3836,7 @@ function _set_prototype_of$j(o, p) {
3792
3836
  if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
3793
3837
  objectFill = 'cover';
3794
3838
  }
3839
+ //
3795
3840
  if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
3796
3841
  var left = (width - this._originWidth) / 2;
3797
3842
  var top = (height - this._originHeight) / 2;
@@ -3825,6 +3870,11 @@ function _set_prototype_of$j(o, p) {
3825
3870
  };
3826
3871
  _proto.destroy = function destroy() {
3827
3872
  var _this_$wrapper;
3873
+ if (this._cleanUpResizeObserver) {
3874
+ this._cleanUpResizeObserver.unobserve();
3875
+ // this._cleanUpResizeObserver.disconnect();
3876
+ this._cleanUpResizeObserver = null;
3877
+ }
3828
3878
  if (this.$video) {
3829
3879
  this.$video.remove();
3830
3880
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -3844,8 +3894,8 @@ function _set_prototype_of$j(o, p) {
3844
3894
  return Content;
3845
3895
  }(EventEmitter);
3846
3896
 
3847
- function _extends$j() {
3848
- _extends$j = Object.assign || function(target) {
3897
+ function _extends$l() {
3898
+ _extends$l = Object.assign || function(target) {
3849
3899
  for(var i = 1; i < arguments.length; i++){
3850
3900
  var source = arguments[i];
3851
3901
  for(var key in source){
@@ -3856,9 +3906,9 @@ function _extends$j() {
3856
3906
  }
3857
3907
  return target;
3858
3908
  };
3859
- return _extends$j.apply(this, arguments);
3909
+ return _extends$l.apply(this, arguments);
3860
3910
  }
3861
- function _inherits$i(subClass, superClass) {
3911
+ function _inherits$k(subClass, superClass) {
3862
3912
  if (typeof superClass !== "function" && superClass !== null) {
3863
3913
  throw new TypeError("Super expression must either be null or a function");
3864
3914
  }
@@ -3869,23 +3919,23 @@ function _inherits$i(subClass, superClass) {
3869
3919
  configurable: true
3870
3920
  }
3871
3921
  });
3872
- if (superClass) _set_prototype_of$i(subClass, superClass);
3922
+ if (superClass) _set_prototype_of$k(subClass, superClass);
3873
3923
  }
3874
- function _set_prototype_of$i(o, p) {
3875
- _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3924
+ function _set_prototype_of$k(o, p) {
3925
+ _set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
3876
3926
  o.__proto__ = p;
3877
3927
  return o;
3878
3928
  };
3879
- return _set_prototype_of$i(o, p);
3929
+ return _set_prototype_of$k(o, p);
3880
3930
  }
3881
3931
  /**
3882
3932
  * 更多控件
3883
3933
  * @category Control
3884
3934
  */ var More = /*#__PURE__*/ function(Control) {
3885
- _inherits$i(More, Control);
3935
+ _inherits$k(More, Control);
3886
3936
  function More(options) {
3887
3937
  var _this;
3888
- _this = Control.call(this, _extends$j({}, options, {
3938
+ _this = Control.call(this, _extends$l({}, options, {
3889
3939
  tagName: 'span',
3890
3940
  controlType: 'button',
3891
3941
  classNameSuffix: 'more'
@@ -3929,11 +3979,13 @@ function _set_prototype_of$i(o, p) {
3929
3979
  /**
3930
3980
  * 添加
3931
3981
  * @param control
3932
- */ _proto.add = function add(key, part, control) {
3982
+ */ _proto.add = function add(key, part, control, props) {
3933
3983
  this.list.unshift({
3934
3984
  part: part,
3935
3985
  key: key,
3936
- control: control
3986
+ control: control,
3987
+ width: props.width,
3988
+ height: props.height
3937
3989
  });
3938
3990
  };
3939
3991
  /**
@@ -4079,6 +4131,26 @@ function debounce(func, wait) {
4079
4131
  (_theme_controls = theme.controls) == null ? void 0 : (_theme_controls_talkControl = _theme_controls.talkControl) == null ? void 0 : (_theme_controls_talkControl_emit = _theme_controls_talkControl.emit) == null ? void 0 : _theme_controls_talkControl_emit.call(_theme_controls_talkControl, EVENTS.talkVolumeChange, value);
4080
4132
  });
4081
4133
  // =======================================================
4134
+ // 语音广播
4135
+ // =======================================================
4136
+ theme.on(EVENTS.broadcastChange, function(active) {
4137
+ var _theme_controls, _theme_controls_broadcastControl, _theme_controls1;
4138
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.broadcastControl) && active !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl = _theme_controls1.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl.active)) {
4139
+ var _theme_controls_broadcastControl1, _theme_controls2;
4140
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl1 = _theme_controls2.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl1.emit(EVENTS.broadcastChange, active);
4141
+ }
4142
+ });
4143
+ // =======================================================
4144
+ // AI对话框
4145
+ // =======================================================
4146
+ theme.on(EVENTS.aichatChange, function(active) {
4147
+ var _theme_controls, _theme_controls_aiChatControl, _theme_controls1;
4148
+ if (((_theme_controls = theme.controls) == null ? void 0 : _theme_controls.aiChatControl) && active !== ((_theme_controls1 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl = _theme_controls1.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl.active)) {
4149
+ var _theme_controls_aiChatControl1, _theme_controls2;
4150
+ (_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl1 = _theme_controls2.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl1.emit(EVENTS.aichatChange, active);
4151
+ }
4152
+ });
4153
+ // =======================================================
4082
4154
  // 录制
4083
4155
  // =======================================================
4084
4156
  theme.on(EVENTS.recordingChange, function(recording) {
@@ -4174,7 +4246,7 @@ function debounce(func, wait) {
4174
4246
  *
4175
4247
  * @param theme - Theme
4176
4248
  */ function _controlEventemitter(theme) {
4177
- var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14;
4249
+ var _theme_controls, _theme_controls1, _theme_controls2, _theme_controls3, _theme_controls4, _theme_controls5, _theme_controls6, _theme_controls7, _theme_controls8, _theme_controls9, _theme_controls10, _theme_controls11, _theme_controls12, _theme_controls13, _theme_controls14, _theme_controls15, _theme_controls16;
4178
4250
  // Controls
4179
4251
  if (theme._recFooter) {
4180
4252
  theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
@@ -4267,8 +4339,26 @@ function debounce(func, wait) {
4267
4339
  theme.emit(EVENTS.control.talkDestroy);
4268
4340
  });
4269
4341
  }
4342
+ // 语音广播控件
4343
+ if ((_theme_controls5 = theme.controls) == null ? void 0 : _theme_controls5.broadcastControl) {
4344
+ theme.controls.broadcastControl.on(EVENTS.control.broadcastChange, function(active) {
4345
+ theme.emit(EVENTS.control.broadcastChange, active);
4346
+ });
4347
+ theme.controls.broadcastControl.on(EVENTS.control.broadcastDestroy, function() {
4348
+ theme.emit(EVENTS.control.broadcastDestroy);
4349
+ });
4350
+ }
4351
+ // AI对话框
4352
+ if ((_theme_controls6 = theme.controls) == null ? void 0 : _theme_controls6.aiChatControl) {
4353
+ theme.controls.aiChatControl.on(EVENTS.control.aichatChange, function(active) {
4354
+ theme.emit(EVENTS.control.aichatChange, active);
4355
+ });
4356
+ theme.controls.aiChatControl.on(EVENTS.control.aichatDestroy, function() {
4357
+ theme.emit(EVENTS.control.aichatDestroy);
4358
+ });
4359
+ }
4270
4360
  // 缩放控件
4271
- if ((_theme_controls5 = theme.controls) == null ? void 0 : _theme_controls5.zoomControl) {
4361
+ if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
4272
4362
  theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
4273
4363
  if (theme.zoom !== value) {
4274
4364
  theme.zoom = value;
@@ -4290,7 +4380,7 @@ function debounce(func, wait) {
4290
4380
  });
4291
4381
  }
4292
4382
  // 清晰度控件
4293
- if ((_theme_controls6 = theme.controls) == null ? void 0 : _theme_controls6.definitionControl) {
4383
+ if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
4294
4384
  theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
4295
4385
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
4296
4386
  theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
@@ -4303,7 +4393,7 @@ function debounce(func, wait) {
4303
4393
  });
4304
4394
  }
4305
4395
  // 倍速控件
4306
- if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.speedControl) {
4396
+ if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
4307
4397
  theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
4308
4398
  theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
4309
4399
  theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
@@ -4316,7 +4406,7 @@ function debounce(func, wait) {
4316
4406
  });
4317
4407
  }
4318
4408
  // 截图控件
4319
- if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.capturePictureControl) {
4409
+ if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
4320
4410
  theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
4321
4411
  theme.emit(EVENTS.control.capturePicture, options);
4322
4412
  });
@@ -4325,25 +4415,25 @@ function debounce(func, wait) {
4325
4415
  });
4326
4416
  }
4327
4417
  // 全屏控件
4328
- if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.fullscreenControl) {
4418
+ if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
4329
4419
  theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
4330
4420
  theme.emit(EVENTS.control.fullscreenDestroy);
4331
4421
  });
4332
4422
  }
4333
4423
  // 全局全屏控件
4334
- if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.globalFullscreenControl) {
4424
+ if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
4335
4425
  theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
4336
4426
  theme.emit(EVENTS.control.globalFullscreenDestroy);
4337
4427
  });
4338
4428
  }
4339
4429
  // 设备信息控件
4340
- if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.deviceControl) {
4430
+ if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
4341
4431
  theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
4342
4432
  theme.emit(EVENTS.control.deviceDestroy);
4343
4433
  });
4344
4434
  }
4345
4435
  // 回放类型切换控件
4346
- if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.recControl) {
4436
+ if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
4347
4437
  // prettier-ignore
4348
4438
  theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
4349
4439
  if (theme.recType !== type) {
@@ -4364,7 +4454,7 @@ function debounce(func, wait) {
4364
4454
  });
4365
4455
  }
4366
4456
  // 时间轴控件
4367
- if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.timeLineControl) {
4457
+ if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
4368
4458
  theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
4369
4459
  theme.emit(EVENTS.control.timeLineChange, date);
4370
4460
  });
@@ -4381,7 +4471,7 @@ function debounce(func, wait) {
4381
4471
  });
4382
4472
  }
4383
4473
  // 日历控件
4384
- if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.dateControl) {
4474
+ if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
4385
4475
  theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
4386
4476
  theme.emit(EVENTS.control.datePanelOpenChange, open, date);
4387
4477
  });
@@ -4476,8 +4566,8 @@ function _create_class$5(Constructor, protoProps, staticProps) {
4476
4566
  if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
4477
4567
  return Constructor;
4478
4568
  }
4479
- function _extends$i() {
4480
- _extends$i = Object.assign || function(target) {
4569
+ function _extends$k() {
4570
+ _extends$k = Object.assign || function(target) {
4481
4571
  for(var i = 1; i < arguments.length; i++){
4482
4572
  var source = arguments[i];
4483
4573
  for(var key in source){
@@ -4488,9 +4578,9 @@ function _extends$i() {
4488
4578
  }
4489
4579
  return target;
4490
4580
  };
4491
- return _extends$i.apply(this, arguments);
4581
+ return _extends$k.apply(this, arguments);
4492
4582
  }
4493
- function _inherits$h(subClass, superClass) {
4583
+ function _inherits$j(subClass, superClass) {
4494
4584
  if (typeof superClass !== "function" && superClass !== null) {
4495
4585
  throw new TypeError("Super expression must either be null or a function");
4496
4586
  }
@@ -4501,14 +4591,14 @@ function _inherits$h(subClass, superClass) {
4501
4591
  configurable: true
4502
4592
  }
4503
4593
  });
4504
- if (superClass) _set_prototype_of$h(subClass, superClass);
4594
+ if (superClass) _set_prototype_of$j(subClass, superClass);
4505
4595
  }
4506
- function _set_prototype_of$h(o, p) {
4507
- _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4596
+ function _set_prototype_of$j(o, p) {
4597
+ _set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
4508
4598
  o.__proto__ = p;
4509
4599
  return o;
4510
4600
  };
4511
- return _set_prototype_of$h(o, p);
4601
+ return _set_prototype_of$j(o, p);
4512
4602
  }
4513
4603
  var ZOOM_DEFAULT_OPTIONS = {
4514
4604
  open: false,
@@ -4518,10 +4608,10 @@ var ZOOM_DEFAULT_OPTIONS = {
4518
4608
  * 电子放大控件
4519
4609
  * @category Control
4520
4610
  */ var Zoom$1 = /*#__PURE__*/ function(Control) {
4521
- _inherits$h(Zoom, Control);
4611
+ _inherits$j(Zoom, Control);
4522
4612
  function Zoom(options) {
4523
4613
  var _this;
4524
- _this = Control.call(this, _extends$i({}, options, {
4614
+ _this = Control.call(this, _extends$k({}, options, {
4525
4615
  tagName: 'span',
4526
4616
  controlType: 'button',
4527
4617
  classNameSuffix: 'zoom'
@@ -5378,8 +5468,8 @@ function requireDist$1 () {
5378
5468
  var distExports$1 = requireDist$1();
5379
5469
  var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
5380
5470
 
5381
- function _extends$h() {
5382
- _extends$h = Object.assign || function(target) {
5471
+ function _extends$j() {
5472
+ _extends$j = Object.assign || function(target) {
5383
5473
  for(var i = 1; i < arguments.length; i++){
5384
5474
  var source = arguments[i];
5385
5475
  for(var key in source){
@@ -5390,10 +5480,10 @@ function _extends$h() {
5390
5480
  }
5391
5481
  return target;
5392
5482
  };
5393
- return _extends$h.apply(this, arguments);
5483
+ return _extends$j.apply(this, arguments);
5394
5484
  }
5395
5485
  function __zoom(theme, container, options) {
5396
- theme.zoomUtil = new Zoom(container, _extends$h({}, options || {}, {
5486
+ theme.zoomUtil = new Zoom(container, _extends$j({}, options || {}, {
5397
5487
  min: 1,
5398
5488
  onChange: function(zoom, reset) {
5399
5489
  if (zoom !== theme._zoom) {
@@ -5411,7 +5501,7 @@ function __zoom(theme, container, options) {
5411
5501
  }));
5412
5502
  }
5413
5503
 
5414
- function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
5504
+ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
5415
5505
  try {
5416
5506
  var info = gen[key](arg);
5417
5507
  var value = info.value;
@@ -5425,22 +5515,22 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
5425
5515
  Promise.resolve(value).then(_next, _throw);
5426
5516
  }
5427
5517
  }
5428
- function _async_to_generator$4(fn) {
5518
+ function _async_to_generator$6(fn) {
5429
5519
  return function() {
5430
5520
  var self = this, args = arguments;
5431
5521
  return new Promise(function(resolve, reject) {
5432
5522
  var gen = fn.apply(self, args);
5433
5523
  function _next(value) {
5434
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
5524
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
5435
5525
  }
5436
5526
  function _throw(err) {
5437
- asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
5527
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
5438
5528
  }
5439
5529
  _next(undefined);
5440
5530
  });
5441
5531
  };
5442
5532
  }
5443
- function _ts_generator$4(thisArg, body) {
5533
+ function _ts_generator$6(thisArg, body) {
5444
5534
  var f, y, t, _ = {
5445
5535
  label: 0,
5446
5536
  sent: function() {
@@ -5532,9 +5622,9 @@ function _ts_generator$4(thisArg, body) {
5532
5622
  }
5533
5623
  }
5534
5624
  function getThemeDataByTemplate(theme, id) {
5535
- return _async_to_generator$4(function() {
5625
+ return _async_to_generator$6(function() {
5536
5626
  var _theme_options_token_httpToken, _theme_options_token, url;
5537
- return _ts_generator$4(this, function(_state) {
5627
+ return _ts_generator$6(this, function(_state) {
5538
5628
  switch(_state.label){
5539
5629
  case 0:
5540
5630
  url = theme.options.env.domain + "/api/service/media/template/getDetail?accessToken=" + (theme.options.accessToken || ((_theme_options_token = theme.options.token) == null ? void 0 : (_theme_options_token_httpToken = _theme_options_token.httpToken) == null ? void 0 : _theme_options_token_httpToken.url)) + "&id=" + id;
@@ -5543,8 +5633,8 @@ function getThemeDataByTemplate(theme, id) {
5543
5633
  fetch(url, {
5544
5634
  method: 'GET'
5545
5635
  }).then(function(response) {
5546
- return _async_to_generator$4(function() {
5547
- return _ts_generator$4(this, function(_state) {
5636
+ return _async_to_generator$6(function() {
5637
+ return _ts_generator$6(this, function(_state) {
5548
5638
  switch(_state.label){
5549
5639
  case 0:
5550
5640
  return [
@@ -5589,7 +5679,7 @@ function getThemeDataByTemplate(theme, id) {
5589
5679
  })();
5590
5680
  }
5591
5681
 
5592
- function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
5682
+ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
5593
5683
  try {
5594
5684
  var info = gen[key](arg);
5595
5685
  var value = info.value;
@@ -5603,23 +5693,23 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
5603
5693
  Promise.resolve(value).then(_next, _throw);
5604
5694
  }
5605
5695
  }
5606
- function _async_to_generator$3(fn) {
5696
+ function _async_to_generator$5(fn) {
5607
5697
  return function() {
5608
5698
  var self = this, args = arguments;
5609
5699
  return new Promise(function(resolve, reject) {
5610
5700
  var gen = fn.apply(self, args);
5611
5701
  function _next(value) {
5612
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
5702
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
5613
5703
  }
5614
5704
  function _throw(err) {
5615
- asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
5705
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
5616
5706
  }
5617
5707
  _next(undefined);
5618
5708
  });
5619
5709
  };
5620
5710
  }
5621
- function _extends$g() {
5622
- _extends$g = Object.assign || function(target) {
5711
+ function _extends$i() {
5712
+ _extends$i = Object.assign || function(target) {
5623
5713
  for(var i = 1; i < arguments.length; i++){
5624
5714
  var source = arguments[i];
5625
5715
  for(var key in source){
@@ -5630,9 +5720,9 @@ function _extends$g() {
5630
5720
  }
5631
5721
  return target;
5632
5722
  };
5633
- return _extends$g.apply(this, arguments);
5723
+ return _extends$i.apply(this, arguments);
5634
5724
  }
5635
- function _ts_generator$3(thisArg, body) {
5725
+ function _ts_generator$5(thisArg, body) {
5636
5726
  var f, y, t, _ = {
5637
5727
  label: 0,
5638
5728
  sent: function() {
@@ -5758,7 +5848,7 @@ function _ts_generator$3(thisArg, body) {
5758
5848
  }
5759
5849
  if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
5760
5850
  // TODO: 因为回放是一组, 位置以第一个位置为准
5761
- recControls.push(recControls[0] ? _extends$g({}, item, {
5851
+ recControls.push(recControls[0] ? _extends$i({}, item, {
5762
5852
  part: recControls[0].part
5763
5853
  }) : item);
5764
5854
  return false;
@@ -5781,7 +5871,7 @@ function _ts_generator$3(thisArg, body) {
5781
5871
  }
5782
5872
  if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
5783
5873
  // TODO: 因为回放是一组, 位置以第一个位置为准
5784
- recControls.push(recControls[0] ? _extends$g({}, item, {
5874
+ recControls.push(recControls[0] ? _extends$i({}, item, {
5785
5875
  part: recControls[0].part
5786
5876
  }) : item);
5787
5877
  return false;
@@ -5843,9 +5933,9 @@ function _filterLeftRightControls(btnList) {
5843
5933
  * @param data
5844
5934
  * @returns
5845
5935
  */ function getThemeData(theme, data) {
5846
- return _async_to_generator$3(function() {
5936
+ return _async_to_generator$5(function() {
5847
5937
  var themeData, _theme_logger, template;
5848
- return _ts_generator$3(this, function(_state) {
5938
+ return _ts_generator$5(this, function(_state) {
5849
5939
  switch(_state.label){
5850
5940
  case 0:
5851
5941
  themeData = data;
@@ -6036,8 +6126,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
6036
6126
  return Component;
6037
6127
  }();
6038
6128
 
6039
- function _extends$f() {
6040
- _extends$f = Object.assign || function(target) {
6129
+ function _extends$h() {
6130
+ _extends$h = Object.assign || function(target) {
6041
6131
  for(var i = 1; i < arguments.length; i++){
6042
6132
  var source = arguments[i];
6043
6133
  for(var key in source){
@@ -6048,9 +6138,9 @@ function _extends$f() {
6048
6138
  }
6049
6139
  return target;
6050
6140
  };
6051
- return _extends$f.apply(this, arguments);
6141
+ return _extends$h.apply(this, arguments);
6052
6142
  }
6053
- function _inherits$g(subClass, superClass) {
6143
+ function _inherits$i(subClass, superClass) {
6054
6144
  if (typeof superClass !== "function" && superClass !== null) {
6055
6145
  throw new TypeError("Super expression must either be null or a function");
6056
6146
  }
@@ -6061,28 +6151,28 @@ function _inherits$g(subClass, superClass) {
6061
6151
  configurable: true
6062
6152
  }
6063
6153
  });
6064
- if (superClass) _set_prototype_of$g(subClass, superClass);
6154
+ if (superClass) _set_prototype_of$i(subClass, superClass);
6065
6155
  }
6066
- function _set_prototype_of$g(o, p) {
6067
- _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6156
+ function _set_prototype_of$i(o, p) {
6157
+ _set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6068
6158
  o.__proto__ = p;
6069
6159
  return o;
6070
6160
  };
6071
- return _set_prototype_of$g(o, p);
6161
+ return _set_prototype_of$i(o, p);
6072
6162
  }
6073
6163
  var Footer = /*#__PURE__*/ function(Component) {
6074
- _inherits$g(Footer, Component);
6164
+ _inherits$i(Footer, Component);
6075
6165
  function Footer(options) {
6076
6166
  if (options === void 0) options = {};
6077
- return Component.call(this, _extends$f({}, options, {
6167
+ return Component.call(this, _extends$h({}, options, {
6078
6168
  cType: 'footer'
6079
6169
  })) || this;
6080
6170
  }
6081
6171
  return Footer;
6082
6172
  }(Component);
6083
6173
 
6084
- function _extends$e() {
6085
- _extends$e = Object.assign || function(target) {
6174
+ function _extends$g() {
6175
+ _extends$g = Object.assign || function(target) {
6086
6176
  for(var i = 1; i < arguments.length; i++){
6087
6177
  var source = arguments[i];
6088
6178
  for(var key in source){
@@ -6093,9 +6183,9 @@ function _extends$e() {
6093
6183
  }
6094
6184
  return target;
6095
6185
  };
6096
- return _extends$e.apply(this, arguments);
6186
+ return _extends$g.apply(this, arguments);
6097
6187
  }
6098
- function _inherits$f(subClass, superClass) {
6188
+ function _inherits$h(subClass, superClass) {
6099
6189
  if (typeof superClass !== "function" && superClass !== null) {
6100
6190
  throw new TypeError("Super expression must either be null or a function");
6101
6191
  }
@@ -6106,20 +6196,20 @@ function _inherits$f(subClass, superClass) {
6106
6196
  configurable: true
6107
6197
  }
6108
6198
  });
6109
- if (superClass) _set_prototype_of$f(subClass, superClass);
6199
+ if (superClass) _set_prototype_of$h(subClass, superClass);
6110
6200
  }
6111
- function _set_prototype_of$f(o, p) {
6112
- _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6201
+ function _set_prototype_of$h(o, p) {
6202
+ _set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6113
6203
  o.__proto__ = p;
6114
6204
  return o;
6115
6205
  };
6116
- return _set_prototype_of$f(o, p);
6206
+ return _set_prototype_of$h(o, p);
6117
6207
  }
6118
6208
  var Header = /*#__PURE__*/ function(Component) {
6119
- _inherits$f(Header, Component);
6209
+ _inherits$h(Header, Component);
6120
6210
  function Header(options) {
6121
6211
  if (options === void 0) options = {};
6122
- return Component.call(this, _extends$e({}, options, {
6212
+ return Component.call(this, _extends$g({}, options, {
6123
6213
  cType: 'header'
6124
6214
  })) || this;
6125
6215
  }
@@ -6285,8 +6375,8 @@ function interactiveHF($container, second, callback) {
6285
6375
  };
6286
6376
  }
6287
6377
 
6288
- function _extends$d() {
6289
- _extends$d = Object.assign || function(target) {
6378
+ function _extends$f() {
6379
+ _extends$f = Object.assign || function(target) {
6290
6380
  for(var i = 1; i < arguments.length; i++){
6291
6381
  var source = arguments[i];
6292
6382
  for(var key in source){
@@ -6297,9 +6387,9 @@ function _extends$d() {
6297
6387
  }
6298
6388
  return target;
6299
6389
  };
6300
- return _extends$d.apply(this, arguments);
6390
+ return _extends$f.apply(this, arguments);
6301
6391
  }
6302
- function _inherits$e(subClass, superClass) {
6392
+ function _inherits$g(subClass, superClass) {
6303
6393
  if (typeof superClass !== "function" && superClass !== null) {
6304
6394
  throw new TypeError("Super expression must either be null or a function");
6305
6395
  }
@@ -6310,23 +6400,23 @@ function _inherits$e(subClass, superClass) {
6310
6400
  configurable: true
6311
6401
  }
6312
6402
  });
6313
- if (superClass) _set_prototype_of$e(subClass, superClass);
6403
+ if (superClass) _set_prototype_of$g(subClass, superClass);
6314
6404
  }
6315
- function _set_prototype_of$e(o, p) {
6316
- _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6405
+ function _set_prototype_of$g(o, p) {
6406
+ _set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6317
6407
  o.__proto__ = p;
6318
6408
  return o;
6319
6409
  };
6320
- return _set_prototype_of$e(o, p);
6410
+ return _set_prototype_of$g(o, p);
6321
6411
  }
6322
6412
  /**
6323
6413
  * 全局全屏
6324
6414
  * 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
6325
6415
  * @category Control
6326
6416
  */ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
6327
- _inherits$e(GlobalFullscreen, Fullscreen);
6417
+ _inherits$g(GlobalFullscreen, Fullscreen);
6328
6418
  function GlobalFullscreen(options) {
6329
- return Fullscreen.call(this, _extends$d({}, options, {
6419
+ return Fullscreen.call(this, _extends$f({}, options, {
6330
6420
  controlType: 'button',
6331
6421
  classNameSuffix: 'global-fullscreen'
6332
6422
  })) || this;
@@ -6357,8 +6447,8 @@ function _set_prototype_of$e(o, p) {
6357
6447
  return GlobalFullscreen;
6358
6448
  }(Fullscreen);
6359
6449
 
6360
- function _extends$c() {
6361
- _extends$c = Object.assign || function(target) {
6450
+ function _extends$e() {
6451
+ _extends$e = Object.assign || function(target) {
6362
6452
  for(var i = 1; i < arguments.length; i++){
6363
6453
  var source = arguments[i];
6364
6454
  for(var key in source){
@@ -6369,9 +6459,9 @@ function _extends$c() {
6369
6459
  }
6370
6460
  return target;
6371
6461
  };
6372
- return _extends$c.apply(this, arguments);
6462
+ return _extends$e.apply(this, arguments);
6373
6463
  }
6374
- function _inherits$d(subClass, superClass) {
6464
+ function _inherits$f(subClass, superClass) {
6375
6465
  if (typeof superClass !== "function" && superClass !== null) {
6376
6466
  throw new TypeError("Super expression must either be null or a function");
6377
6467
  }
@@ -6382,23 +6472,23 @@ function _inherits$d(subClass, superClass) {
6382
6472
  configurable: true
6383
6473
  }
6384
6474
  });
6385
- if (superClass) _set_prototype_of$d(subClass, superClass);
6475
+ if (superClass) _set_prototype_of$f(subClass, superClass);
6386
6476
  }
6387
- function _set_prototype_of$d(o, p) {
6388
- _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6477
+ function _set_prototype_of$f(o, p) {
6478
+ _set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
6389
6479
  o.__proto__ = p;
6390
6480
  return o;
6391
6481
  };
6392
- return _set_prototype_of$d(o, p);
6482
+ return _set_prototype_of$f(o, p);
6393
6483
  }
6394
6484
  /**
6395
6485
  * 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
6396
6486
  * @category Control
6397
6487
  */ var CapturePicture = /*#__PURE__*/ function(Control) {
6398
- _inherits$d(CapturePicture, Control);
6488
+ _inherits$f(CapturePicture, Control);
6399
6489
  function CapturePicture(options) {
6400
6490
  var _this;
6401
- _this = Control.call(this, _extends$c({}, options, {
6491
+ _this = Control.call(this, _extends$e({}, options, {
6402
6492
  tagName: 'span',
6403
6493
  classNameSuffix: 'capture-picture'
6404
6494
  })) || this, _this._timer = null;
@@ -7407,8 +7497,8 @@ function _create_class$4(Constructor, protoProps, staticProps) {
7407
7497
  if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
7408
7498
  return Constructor;
7409
7499
  }
7410
- function _extends$b() {
7411
- _extends$b = Object.assign || function(target) {
7500
+ function _extends$d() {
7501
+ _extends$d = Object.assign || function(target) {
7412
7502
  for(var i = 1; i < arguments.length; i++){
7413
7503
  var source = arguments[i];
7414
7504
  for(var key in source){
@@ -7419,9 +7509,9 @@ function _extends$b() {
7419
7509
  }
7420
7510
  return target;
7421
7511
  };
7422
- return _extends$b.apply(this, arguments);
7512
+ return _extends$d.apply(this, arguments);
7423
7513
  }
7424
- function _inherits$c(subClass, superClass) {
7514
+ function _inherits$e(subClass, superClass) {
7425
7515
  if (typeof superClass !== "function" && superClass !== null) {
7426
7516
  throw new TypeError("Super expression must either be null or a function");
7427
7517
  }
@@ -7432,23 +7522,23 @@ function _inherits$c(subClass, superClass) {
7432
7522
  configurable: true
7433
7523
  }
7434
7524
  });
7435
- if (superClass) _set_prototype_of$c(subClass, superClass);
7525
+ if (superClass) _set_prototype_of$e(subClass, superClass);
7436
7526
  }
7437
- function _set_prototype_of$c(o, p) {
7438
- _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7527
+ function _set_prototype_of$e(o, p) {
7528
+ _set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7439
7529
  o.__proto__ = p;
7440
7530
  return o;
7441
7531
  };
7442
- return _set_prototype_of$c(o, p);
7532
+ return _set_prototype_of$e(o, p);
7443
7533
  }
7444
7534
  /**
7445
7535
  * 云台控件
7446
7536
  * @category Control
7447
7537
  */ var Ptz = /*#__PURE__*/ function(Control) {
7448
- _inherits$c(Ptz, Control);
7538
+ _inherits$e(Ptz, Control);
7449
7539
  function Ptz(options) {
7450
7540
  var _this;
7451
- _this = Control.call(this, _extends$b({}, options, {
7541
+ _this = Control.call(this, _extends$d({}, options, {
7452
7542
  tagName: 'span',
7453
7543
  controlType: 'button',
7454
7544
  classNameSuffix: 'ptz'
@@ -7491,7 +7581,7 @@ function _set_prototype_of$c(o, p) {
7491
7581
  this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
7492
7582
  this.$panel.appendChild(this.$turntable);
7493
7583
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7494
- this._ptzControl = new distExports.Ptz(this.$turntable, _extends$b({}, this._options, {
7584
+ this._ptzControl = new distExports.Ptz(this.$turntable, _extends$d({}, this._options, {
7495
7585
  onSpeedChange: this._onSpeedChange.bind(this),
7496
7586
  onDirection: this._onDirection.bind(this)
7497
7587
  }));
@@ -7500,7 +7590,7 @@ function _set_prototype_of$c(o, p) {
7500
7590
  };
7501
7591
  _proto.renderMobileExtend = function renderMobileExtend($container) {
7502
7592
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7503
- if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$b({}, this._options, {
7593
+ if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$d({}, this._options, {
7504
7594
  onSpeedChange: this._onSpeedChange.bind(this),
7505
7595
  onDirection: this._onDirection.bind(this)
7506
7596
  }));
@@ -7603,8 +7693,8 @@ function _create_class$3(Constructor, protoProps, staticProps) {
7603
7693
  if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
7604
7694
  return Constructor;
7605
7695
  }
7606
- function _extends$a() {
7607
- _extends$a = Object.assign || function(target) {
7696
+ function _extends$c() {
7697
+ _extends$c = Object.assign || function(target) {
7608
7698
  for(var i = 1; i < arguments.length; i++){
7609
7699
  var source = arguments[i];
7610
7700
  for(var key in source){
@@ -7615,9 +7705,9 @@ function _extends$a() {
7615
7705
  }
7616
7706
  return target;
7617
7707
  };
7618
- return _extends$a.apply(this, arguments);
7708
+ return _extends$c.apply(this, arguments);
7619
7709
  }
7620
- function _inherits$b(subClass, superClass) {
7710
+ function _inherits$d(subClass, superClass) {
7621
7711
  if (typeof superClass !== "function" && superClass !== null) {
7622
7712
  throw new TypeError("Super expression must either be null or a function");
7623
7713
  }
@@ -7628,127 +7718,635 @@ function _inherits$b(subClass, superClass) {
7628
7718
  configurable: true
7629
7719
  }
7630
7720
  });
7631
- if (superClass) _set_prototype_of$b(subClass, superClass);
7721
+ if (superClass) _set_prototype_of$d(subClass, superClass);
7632
7722
  }
7633
- function _set_prototype_of$b(o, p) {
7634
- _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7723
+ function _set_prototype_of$d(o, p) {
7724
+ _set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7635
7725
  o.__proto__ = p;
7636
7726
  return o;
7637
7727
  };
7638
- return _set_prototype_of$b(o, p);
7728
+ return _set_prototype_of$d(o, p);
7729
+ }
7730
+ var RECORD_DEFAULT_OPTIONS = {
7731
+ maxDuration: 3600
7732
+ };
7733
+ /**
7734
+ * 录制控件,点击开始录制,再次点击停止录制,
7735
+ * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
7736
+ *
7737
+ * 注意:
7738
+ * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
7739
+ * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7740
+ * @category Control
7741
+ */ var Record = /*#__PURE__*/ function(Control) {
7742
+ _inherits$d(Record, Control);
7743
+ function Record(options) {
7744
+ var _this;
7745
+ _this = Control.call(this, _extends$c({}, options, {
7746
+ tagName: 'span',
7747
+ controlType: 'button',
7748
+ classNameSuffix: 'record'
7749
+ })) || this, /** 计时秒 */ _this._seconds = 0;
7750
+ _this._options = Object.assign({}, RECORD_DEFAULT_OPTIONS, options);
7751
+ _this._render();
7752
+ return _this;
7753
+ }
7754
+ var _proto = Record.prototype;
7755
+ /**
7756
+ * 渲染图标
7757
+ */ _proto._render = function _render() {
7758
+ var _this_locale;
7759
+ this.$container.innerHTML = IconComponents.record({
7760
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
7761
+ });
7762
+ };
7763
+ /**
7764
+ * 渲染计时器
7765
+ */ _proto._renderTimer = function _renderTimer() {
7766
+ var _this = this;
7767
+ var _this__options_rootContainer, _this__options;
7768
+ this._timerNode = document.createElement('span');
7769
+ this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
7770
+ (_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
7771
+ this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
7772
+ var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
7773
+ this._timer = setInterval(function() {
7774
+ _this._seconds++;
7775
+ if (_this._seconds >= _this._options.maxDuration) {
7776
+ // 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
7777
+ _this._destroyTimer();
7778
+ return;
7779
+ }
7780
+ if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
7781
+ }, 1000);
7782
+ };
7783
+ _proto.reset = function reset() {
7784
+ if (this.active) {
7785
+ this.active = false;
7786
+ Control.prototype.reset.call(this);
7787
+ }
7788
+ };
7789
+ _proto.destroy = function destroy() {
7790
+ this._destroyTimer();
7791
+ Control.prototype.destroy.call(this);
7792
+ };
7793
+ /**
7794
+ * 销毁定时器和销毁节点
7795
+ */ _proto._destroyTimer = function _destroyTimer() {
7796
+ this._seconds = 0;
7797
+ if (this._timer) {
7798
+ clearInterval(this._timer);
7799
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7800
+ this._timer = null;
7801
+ }
7802
+ if (this._timerNode) {
7803
+ this._timerNode.remove();
7804
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7805
+ this._timerNode = null;
7806
+ }
7807
+ this._active = false;
7808
+ };
7809
+ /**
7810
+ * 点击 Control 会触发
7811
+ */ _proto._onControlClick = function _onControlClick(e) {
7812
+ this.active = !this.active;
7813
+ Control.prototype._onControlClick.call(this, e);
7814
+ };
7815
+ _create_class$3(Record, [
7816
+ {
7817
+ key: "active",
7818
+ get: /**
7819
+ * 是否激活
7820
+ */ function get() {
7821
+ return this._active;
7822
+ },
7823
+ set: function set(active) {
7824
+ if (this._disabled && !this._active) {
7825
+ // 不允许禁用情况下激活
7826
+ return;
7827
+ }
7828
+ if (this._active !== active) {
7829
+ this._active = active;
7830
+ this._updateActiveState(active);
7831
+ if (this.active) {
7832
+ this._renderTimer();
7833
+ } else {
7834
+ this._destroyTimer();
7835
+ }
7836
+ this.emit(EVENTS.control.recordingChange, this._active);
7837
+ }
7838
+ }
7839
+ }
7840
+ ]);
7841
+ return Record;
7842
+ }(Control);
7843
+
7844
+ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
7845
+ try {
7846
+ var info = gen[key](arg);
7847
+ var value = info.value;
7848
+ } catch (error) {
7849
+ reject(error);
7850
+ return;
7851
+ }
7852
+ if (info.done) {
7853
+ resolve(value);
7854
+ } else {
7855
+ Promise.resolve(value).then(_next, _throw);
7856
+ }
7857
+ }
7858
+ function _async_to_generator$4(fn) {
7859
+ return function() {
7860
+ var self = this, args = arguments;
7861
+ return new Promise(function(resolve, reject) {
7862
+ var gen = fn.apply(self, args);
7863
+ function _next(value) {
7864
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
7865
+ }
7866
+ function _throw(err) {
7867
+ asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
7868
+ }
7869
+ _next(undefined);
7870
+ });
7871
+ };
7872
+ }
7873
+ function _defineProperties$2(target, props) {
7874
+ for(var i = 0; i < props.length; i++){
7875
+ var descriptor = props[i];
7876
+ descriptor.enumerable = descriptor.enumerable || false;
7877
+ descriptor.configurable = true;
7878
+ if ("value" in descriptor) descriptor.writable = true;
7879
+ Object.defineProperty(target, descriptor.key, descriptor);
7880
+ }
7881
+ }
7882
+ function _create_class$2(Constructor, protoProps, staticProps) {
7883
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
7884
+ return Constructor;
7885
+ }
7886
+ function _extends$b() {
7887
+ _extends$b = Object.assign || function(target) {
7888
+ for(var i = 1; i < arguments.length; i++){
7889
+ var source = arguments[i];
7890
+ for(var key in source){
7891
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
7892
+ target[key] = source[key];
7893
+ }
7894
+ }
7895
+ }
7896
+ return target;
7897
+ };
7898
+ return _extends$b.apply(this, arguments);
7899
+ }
7900
+ function _inherits$c(subClass, superClass) {
7901
+ if (typeof superClass !== "function" && superClass !== null) {
7902
+ throw new TypeError("Super expression must either be null or a function");
7903
+ }
7904
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
7905
+ constructor: {
7906
+ value: subClass,
7907
+ writable: true,
7908
+ configurable: true
7909
+ }
7910
+ });
7911
+ if (superClass) _set_prototype_of$c(subClass, superClass);
7912
+ }
7913
+ function _set_prototype_of$c(o, p) {
7914
+ _set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
7915
+ o.__proto__ = p;
7916
+ return o;
7917
+ };
7918
+ return _set_prototype_of$c(o, p);
7919
+ }
7920
+ function _ts_generator$4(thisArg, body) {
7921
+ var f, y, t, _ = {
7922
+ label: 0,
7923
+ sent: function() {
7924
+ if (t[0] & 1) throw t[1];
7925
+ return t[1];
7926
+ },
7927
+ trys: [],
7928
+ ops: []
7929
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
7930
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
7931
+ return this;
7932
+ }), g;
7933
+ function verb(n) {
7934
+ return function(v) {
7935
+ return step([
7936
+ n,
7937
+ v
7938
+ ]);
7939
+ };
7940
+ }
7941
+ function step(op) {
7942
+ if (f) throw new TypeError("Generator is already executing.");
7943
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
7944
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
7945
+ if (y = 0, t) op = [
7946
+ op[0] & 2,
7947
+ t.value
7948
+ ];
7949
+ switch(op[0]){
7950
+ case 0:
7951
+ case 1:
7952
+ t = op;
7953
+ break;
7954
+ case 4:
7955
+ _.label++;
7956
+ return {
7957
+ value: op[1],
7958
+ done: false
7959
+ };
7960
+ case 5:
7961
+ _.label++;
7962
+ y = op[1];
7963
+ op = [
7964
+ 0
7965
+ ];
7966
+ continue;
7967
+ case 7:
7968
+ op = _.ops.pop();
7969
+ _.trys.pop();
7970
+ continue;
7971
+ default:
7972
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
7973
+ _ = 0;
7974
+ continue;
7975
+ }
7976
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
7977
+ _.label = op[1];
7978
+ break;
7979
+ }
7980
+ if (op[0] === 6 && _.label < t[1]) {
7981
+ _.label = t[1];
7982
+ t = op;
7983
+ break;
7984
+ }
7985
+ if (t && _.label < t[2]) {
7986
+ _.label = t[2];
7987
+ _.ops.push(op);
7988
+ break;
7989
+ }
7990
+ if (t[2]) _.ops.pop();
7991
+ _.trys.pop();
7992
+ continue;
7993
+ }
7994
+ op = body.call(thisArg, _);
7995
+ } catch (e) {
7996
+ op = [
7997
+ 6,
7998
+ e
7999
+ ];
8000
+ y = 0;
8001
+ } finally{
8002
+ f = t = 0;
8003
+ }
8004
+ if (op[0] & 5) throw op[1];
8005
+ return {
8006
+ value: op[0] ? op[1] : void 0,
8007
+ done: true
8008
+ };
8009
+ }
8010
+ }
8011
+ /**
8012
+ * 对讲控件
8013
+ *
8014
+ * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
8015
+ * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
8016
+ * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
8017
+ *
8018
+ * @category Control
8019
+ */ var Talk = /*#__PURE__*/ function(Control) {
8020
+ _inherits$c(Talk, Control);
8021
+ function Talk(options) {
8022
+ var _this;
8023
+ _this = Control.call(this, _extends$b({}, options, {
8024
+ tagName: 'span',
8025
+ controlType: 'button',
8026
+ classNameSuffix: 'talk'
8027
+ })) || this, _this._value = 0;
8028
+ _this._options = options;
8029
+ _this._render();
8030
+ _this.on(EVENTS.talkingChange, function(talking) {
8031
+ if (_this.active !== talking) {
8032
+ _this.active = talking;
8033
+ _this._render();
8034
+ }
8035
+ });
8036
+ _this.on(EVENTS.talkVolumeChange, function(value) {
8037
+ var _this__options_onChange, _this__options;
8038
+ _this.value = value;
8039
+ (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
8040
+ });
8041
+ return _this;
8042
+ }
8043
+ var _proto = Talk.prototype;
8044
+ _proto._render = function _render() {
8045
+ var _this_locale, _this_locale1;
8046
+ this.$container.innerHTML = this.active ? IconComponents.talkGrowth({
8047
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TALK
8048
+ }) : IconComponents.talk({
8049
+ title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_TALK
8050
+ });
8051
+ };
8052
+ _proto.reset = function reset(hide) {
8053
+ if (this.active) {
8054
+ this._value = 0;
8055
+ this.active = false;
8056
+ this._render();
8057
+ this.emit(EVENTS.control.talkingChange, false);
8058
+ Control.prototype.reset.call(this, hide);
8059
+ }
8060
+ };
8061
+ /**
8062
+ * 销毁对讲
8063
+ */ _proto.destroy = function destroy() {
8064
+ if (this.active) {
8065
+ this.reset();
8066
+ }
8067
+ Control.prototype.destroy.call(this);
8068
+ };
8069
+ /**
8070
+ * 点击 Control 会触发
8071
+ */ _proto._onControlClick = function _onControlClick(e) {
8072
+ var _this = this, _superprop_get__onControlClick = function() {
8073
+ return Control.prototype._onControlClick;
8074
+ };
8075
+ return _async_to_generator$4(function() {
8076
+ return _ts_generator$4(this, function(_state) {
8077
+ _superprop_get__onControlClick().call(_this, e);
8078
+ this.active = !this.active;
8079
+ this.emit(EVENTS.control.talkingChange, this.active);
8080
+ this._render();
8081
+ return [
8082
+ 2
8083
+ ];
8084
+ });
8085
+ }).call(this);
8086
+ };
8087
+ _create_class$2(Talk, [
8088
+ {
8089
+ key: "value",
8090
+ get: /**
8091
+ * 获取当前值
8092
+ */ function get() {
8093
+ return this._value;
8094
+ },
8095
+ set: /**
8096
+ * 设置当前值 [0-1]
8097
+ */ function set(value) {
8098
+ // 没有激活状态,则不处理
8099
+ if (!this.active) {
8100
+ return;
8101
+ }
8102
+ if (value < 0 || value > 1) {
8103
+ return;
8104
+ }
8105
+ this._value = value;
8106
+ var gainType = 'silent';
8107
+ if (value > 0 && value < 0.25) {
8108
+ gainType = 'low';
8109
+ } else if (value >= 0.25 && value < 0.5) {
8110
+ gainType = 'normal';
8111
+ } else if (value >= 0.5 && value < 0.75) {
8112
+ gainType = 'high';
8113
+ } else if (value >= 0.75) {
8114
+ gainType = 'deafening';
8115
+ }
8116
+ var className = Array.from(this.$container.classList).find(function(className) {
8117
+ return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
8118
+ });
8119
+ if (className) this.$container.classList.remove(className);
8120
+ this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
8121
+ }
8122
+ }
8123
+ ]);
8124
+ return Talk;
8125
+ }(Control);
8126
+
8127
+ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
8128
+ try {
8129
+ var info = gen[key](arg);
8130
+ var value = info.value;
8131
+ } catch (error) {
8132
+ reject(error);
8133
+ return;
8134
+ }
8135
+ if (info.done) {
8136
+ resolve(value);
8137
+ } else {
8138
+ Promise.resolve(value).then(_next, _throw);
8139
+ }
8140
+ }
8141
+ function _async_to_generator$3(fn) {
8142
+ return function() {
8143
+ var self = this, args = arguments;
8144
+ return new Promise(function(resolve, reject) {
8145
+ var gen = fn.apply(self, args);
8146
+ function _next(value) {
8147
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
8148
+ }
8149
+ function _throw(err) {
8150
+ asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
8151
+ }
8152
+ _next(undefined);
8153
+ });
8154
+ };
8155
+ }
8156
+ function _extends$a() {
8157
+ _extends$a = Object.assign || function(target) {
8158
+ for(var i = 1; i < arguments.length; i++){
8159
+ var source = arguments[i];
8160
+ for(var key in source){
8161
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8162
+ target[key] = source[key];
8163
+ }
8164
+ }
8165
+ }
8166
+ return target;
8167
+ };
8168
+ return _extends$a.apply(this, arguments);
8169
+ }
8170
+ function _inherits$b(subClass, superClass) {
8171
+ if (typeof superClass !== "function" && superClass !== null) {
8172
+ throw new TypeError("Super expression must either be null or a function");
8173
+ }
8174
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
8175
+ constructor: {
8176
+ value: subClass,
8177
+ writable: true,
8178
+ configurable: true
8179
+ }
8180
+ });
8181
+ if (superClass) _set_prototype_of$b(subClass, superClass);
8182
+ }
8183
+ function _set_prototype_of$b(o, p) {
8184
+ _set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
8185
+ o.__proto__ = p;
8186
+ return o;
8187
+ };
8188
+ return _set_prototype_of$b(o, p);
8189
+ }
8190
+ function _ts_generator$3(thisArg, body) {
8191
+ var f, y, t, _ = {
8192
+ label: 0,
8193
+ sent: function() {
8194
+ if (t[0] & 1) throw t[1];
8195
+ return t[1];
8196
+ },
8197
+ trys: [],
8198
+ ops: []
8199
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
8200
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
8201
+ return this;
8202
+ }), g;
8203
+ function verb(n) {
8204
+ return function(v) {
8205
+ return step([
8206
+ n,
8207
+ v
8208
+ ]);
8209
+ };
8210
+ }
8211
+ function step(op) {
8212
+ if (f) throw new TypeError("Generator is already executing.");
8213
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
8214
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8215
+ if (y = 0, t) op = [
8216
+ op[0] & 2,
8217
+ t.value
8218
+ ];
8219
+ switch(op[0]){
8220
+ case 0:
8221
+ case 1:
8222
+ t = op;
8223
+ break;
8224
+ case 4:
8225
+ _.label++;
8226
+ return {
8227
+ value: op[1],
8228
+ done: false
8229
+ };
8230
+ case 5:
8231
+ _.label++;
8232
+ y = op[1];
8233
+ op = [
8234
+ 0
8235
+ ];
8236
+ continue;
8237
+ case 7:
8238
+ op = _.ops.pop();
8239
+ _.trys.pop();
8240
+ continue;
8241
+ default:
8242
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
8243
+ _ = 0;
8244
+ continue;
8245
+ }
8246
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
8247
+ _.label = op[1];
8248
+ break;
8249
+ }
8250
+ if (op[0] === 6 && _.label < t[1]) {
8251
+ _.label = t[1];
8252
+ t = op;
8253
+ break;
8254
+ }
8255
+ if (t && _.label < t[2]) {
8256
+ _.label = t[2];
8257
+ _.ops.push(op);
8258
+ break;
8259
+ }
8260
+ if (t[2]) _.ops.pop();
8261
+ _.trys.pop();
8262
+ continue;
8263
+ }
8264
+ op = body.call(thisArg, _);
8265
+ } catch (e) {
8266
+ op = [
8267
+ 6,
8268
+ e
8269
+ ];
8270
+ y = 0;
8271
+ } finally{
8272
+ f = t = 0;
8273
+ }
8274
+ if (op[0] & 5) throw op[1];
8275
+ return {
8276
+ value: op[0] ? op[1] : void 0,
8277
+ done: true
8278
+ };
8279
+ }
7639
8280
  }
7640
- var RECORD_DEFAULT_OPTIONS = {
7641
- maxDuration: 3600
7642
- };
7643
8281
  /**
7644
- * 录制控件,点击开始录制,再次点击停止录制,
7645
- * 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
8282
+ * 语音广播控件
8283
+ *
8284
+ * 用于触发语音广播功能的按钮控件
7646
8285
  *
7647
- * 注意:
7648
- * 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
7649
- * 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
7650
8286
  * @category Control
7651
- */ var Record = /*#__PURE__*/ function(Control) {
7652
- _inherits$b(Record, Control);
7653
- function Record(options) {
8287
+ */ var Broadcast = /*#__PURE__*/ function(Control) {
8288
+ _inherits$b(Broadcast, Control);
8289
+ function Broadcast(options) {
7654
8290
  var _this;
7655
8291
  _this = Control.call(this, _extends$a({}, options, {
7656
8292
  tagName: 'span',
7657
8293
  controlType: 'button',
7658
- classNameSuffix: 'record'
7659
- })) || this, /** 计时秒 */ _this._seconds = 0;
7660
- _this._options = Object.assign({}, RECORD_DEFAULT_OPTIONS, options);
8294
+ classNameSuffix: 'broadcast'
8295
+ })) || this;
8296
+ _this._options = options;
7661
8297
  _this._render();
8298
+ _this.on(EVENTS.broadcastChange, function(active) {
8299
+ if (_this.active !== active) {
8300
+ _this.active = active;
8301
+ _this._render();
8302
+ }
8303
+ });
7662
8304
  return _this;
7663
8305
  }
7664
- var _proto = Record.prototype;
7665
- /**
7666
- * 渲染图标
7667
- */ _proto._render = function _render() {
8306
+ var _proto = Broadcast.prototype;
8307
+ _proto._render = function _render() {
7668
8308
  var _this_locale;
7669
- this.$container.innerHTML = IconComponents.record({
7670
- title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
8309
+ this.$container.innerHTML = IconComponents.broadcast({
8310
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_BROADCAST
7671
8311
  });
7672
8312
  };
7673
- /**
7674
- * 渲染计时器
7675
- */ _proto._renderTimer = function _renderTimer() {
7676
- var _this = this;
7677
- var _this__options_rootContainer, _this__options;
7678
- this._timerNode = document.createElement('span');
7679
- this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
7680
- (_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
7681
- this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
7682
- var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
7683
- this._timer = setInterval(function() {
7684
- _this._seconds++;
7685
- if (_this._seconds >= _this._options.maxDuration) {
7686
- // 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
7687
- _this._destroyTimer();
7688
- return;
7689
- }
7690
- if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
7691
- }, 1000);
7692
- };
7693
- _proto.reset = function reset() {
8313
+ _proto.reset = function reset(hide) {
7694
8314
  if (this.active) {
7695
8315
  this.active = false;
7696
- Control.prototype.reset.call(this);
8316
+ this._render();
8317
+ this.emit(EVENTS.control.broadcastChange, false);
8318
+ Control.prototype.reset.call(this, hide);
7697
8319
  }
7698
8320
  };
7699
- _proto.destroy = function destroy() {
7700
- this._destroyTimer();
7701
- Control.prototype.destroy.call(this);
7702
- };
7703
8321
  /**
7704
- * 销毁定时器和销毁节点
7705
- */ _proto._destroyTimer = function _destroyTimer() {
7706
- this._seconds = 0;
7707
- if (this._timer) {
7708
- clearInterval(this._timer);
7709
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7710
- this._timer = null;
7711
- }
7712
- if (this._timerNode) {
7713
- this._timerNode.remove();
7714
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7715
- this._timerNode = null;
8322
+ * 销毁语音广播控件
8323
+ */ _proto.destroy = function destroy() {
8324
+ if (this.active) {
8325
+ this.reset();
7716
8326
  }
7717
- this._active = false;
8327
+ Control.prototype.destroy.call(this);
7718
8328
  };
7719
8329
  /**
7720
- * 点击 Control 会触发
7721
- */ _proto._onControlClick = function _onControlClick(e) {
7722
- this.active = !this.active;
7723
- Control.prototype._onControlClick.call(this, e);
8330
+ * 点击 Control 会触发
8331
+ */ _proto._onControlClick = function _onControlClick(e) {
8332
+ var _this = this, _superprop_get__onControlClick = function() {
8333
+ return Control.prototype._onControlClick;
8334
+ };
8335
+ return _async_to_generator$3(function() {
8336
+ var _this__options_onChange, _this__options;
8337
+ return _ts_generator$3(this, function(_state) {
8338
+ _superprop_get__onControlClick().call(_this, e);
8339
+ this.active = !this.active;
8340
+ this.emit(EVENTS.control.broadcastChange, this.active);
8341
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
8342
+ this._render();
8343
+ return [
8344
+ 2
8345
+ ];
8346
+ });
8347
+ }).call(this);
7724
8348
  };
7725
- _create_class$3(Record, [
7726
- {
7727
- key: "active",
7728
- get: /**
7729
- * 是否激活
7730
- */ function get() {
7731
- return this._active;
7732
- },
7733
- set: function set(active) {
7734
- if (this._disabled && !this._active) {
7735
- // 不允许禁用情况下激活
7736
- return;
7737
- }
7738
- if (this._active !== active) {
7739
- this._active = active;
7740
- this._updateActiveState(active);
7741
- if (this.active) {
7742
- this._renderTimer();
7743
- } else {
7744
- this._destroyTimer();
7745
- }
7746
- this.emit(EVENTS.control.recordingChange, this._active);
7747
- }
7748
- }
7749
- }
7750
- ]);
7751
- return Record;
8349
+ return Broadcast;
7752
8350
  }(Control);
7753
8351
 
7754
8352
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -7780,19 +8378,6 @@ function _async_to_generator$2(fn) {
7780
8378
  });
7781
8379
  };
7782
8380
  }
7783
- function _defineProperties$2(target, props) {
7784
- for(var i = 0; i < props.length; i++){
7785
- var descriptor = props[i];
7786
- descriptor.enumerable = descriptor.enumerable || false;
7787
- descriptor.configurable = true;
7788
- if ("value" in descriptor) descriptor.writable = true;
7789
- Object.defineProperty(target, descriptor.key, descriptor);
7790
- }
7791
- }
7792
- function _create_class$2(Constructor, protoProps, staticProps) {
7793
- if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
7794
- return Constructor;
7795
- }
7796
8381
  function _extends$9() {
7797
8382
  _extends$9 = Object.assign || function(target) {
7798
8383
  for(var i = 1; i < arguments.length; i++){
@@ -7919,74 +8504,66 @@ function _ts_generator$2(thisArg, body) {
7919
8504
  }
7920
8505
  }
7921
8506
  /**
7922
- * 对讲控件
8507
+ * AI对话框控件
7923
8508
  *
7924
- * navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
7925
- * 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
7926
- * promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
8509
+ * 用于触发AI对话框功能的按钮控件
7927
8510
  *
7928
8511
  * @category Control
7929
- */ var Talk = /*#__PURE__*/ function(Control) {
7930
- _inherits$a(Talk, Control);
7931
- function Talk(options) {
8512
+ */ var AIChat = /*#__PURE__*/ function(Control) {
8513
+ _inherits$a(AIChat, Control);
8514
+ function AIChat(options) {
7932
8515
  var _this;
7933
8516
  _this = Control.call(this, _extends$9({}, options, {
7934
8517
  tagName: 'span',
7935
8518
  controlType: 'button',
7936
- classNameSuffix: 'talk'
7937
- })) || this, _this._value = 0;
8519
+ classNameSuffix: 'aichat'
8520
+ })) || this;
7938
8521
  _this._options = options;
7939
8522
  _this._render();
7940
- _this.on(EVENTS.talkingChange, function(talking) {
7941
- if (_this.active !== talking) {
7942
- _this.active = talking;
8523
+ _this.on(EVENTS.aichatChange, function(active) {
8524
+ if (_this.active !== active) {
8525
+ _this.active = active;
7943
8526
  _this._render();
7944
8527
  }
7945
8528
  });
7946
- _this.on(EVENTS.talkVolumeChange, function(value) {
7947
- var _this__options_onChange, _this__options;
7948
- _this.value = value;
7949
- (_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
7950
- });
7951
8529
  return _this;
7952
8530
  }
7953
- var _proto = Talk.prototype;
8531
+ var _proto = AIChat.prototype;
7954
8532
  _proto._render = function _render() {
7955
- var _this_locale, _this_locale1;
7956
- this.$container.innerHTML = this.active ? IconComponents.talkGrowth({
7957
- title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TALK
7958
- }) : IconComponents.talk({
7959
- title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_TALK
8533
+ var _this_locale;
8534
+ this.$container.innerHTML = IconComponents.aiChat({
8535
+ title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_AICHAT
7960
8536
  });
7961
8537
  };
7962
8538
  _proto.reset = function reset(hide) {
7963
8539
  if (this.active) {
7964
- this._value = 0;
7965
8540
  this.active = false;
7966
8541
  this._render();
7967
- this.emit(EVENTS.control.talkingChange, false);
8542
+ this.emit(EVENTS.control.aichatChange, false);
7968
8543
  Control.prototype.reset.call(this, hide);
7969
8544
  }
7970
8545
  };
7971
8546
  /**
7972
- * 销毁对讲
7973
- */ _proto.destroy = function destroy() {
8547
+ * 销毁AI对话框控件
8548
+ */ _proto.destroy = function destroy() {
7974
8549
  if (this.active) {
7975
8550
  this.reset();
7976
8551
  }
7977
8552
  Control.prototype.destroy.call(this);
7978
8553
  };
7979
8554
  /**
7980
- * 点击 Control 会触发
7981
- */ _proto._onControlClick = function _onControlClick(e) {
8555
+ * 点击 Control 会触发
8556
+ */ _proto._onControlClick = function _onControlClick(e) {
7982
8557
  var _this = this, _superprop_get__onControlClick = function() {
7983
8558
  return Control.prototype._onControlClick;
7984
8559
  };
7985
8560
  return _async_to_generator$2(function() {
8561
+ var _this__options_onChange, _this__options;
7986
8562
  return _ts_generator$2(this, function(_state) {
7987
8563
  _superprop_get__onControlClick().call(_this, e);
7988
8564
  this.active = !this.active;
7989
- this.emit(EVENTS.control.talkingChange, this.active);
8565
+ this.emit(EVENTS.control.aichatChange, this.active);
8566
+ (_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
7990
8567
  this._render();
7991
8568
  return [
7992
8569
  2
@@ -7994,44 +8571,7 @@ function _ts_generator$2(thisArg, body) {
7994
8571
  });
7995
8572
  }).call(this);
7996
8573
  };
7997
- _create_class$2(Talk, [
7998
- {
7999
- key: "value",
8000
- get: /**
8001
- * 获取当前值
8002
- */ function get() {
8003
- return this._value;
8004
- },
8005
- set: /**
8006
- * 设置当前值 [0-1]
8007
- */ function set(value) {
8008
- // 没有激活状态,则不处理
8009
- if (!this.active) {
8010
- return;
8011
- }
8012
- if (value < 0 || value > 1) {
8013
- return;
8014
- }
8015
- this._value = value;
8016
- var gainType = 'silent';
8017
- if (value > 0 && value < 0.25) {
8018
- gainType = 'low';
8019
- } else if (value >= 0.25 && value < 0.5) {
8020
- gainType = 'normal';
8021
- } else if (value >= 0.5 && value < 0.75) {
8022
- gainType = 'high';
8023
- } else if (value >= 0.75) {
8024
- gainType = 'deafening';
8025
- }
8026
- var className = Array.from(this.$container.classList).find(function(className) {
8027
- return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
8028
- });
8029
- if (className) this.$container.classList.remove(className);
8030
- this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
8031
- }
8032
- }
8033
- ]);
8034
- return Talk;
8574
+ return AIChat;
8035
8575
  }(Control);
8036
8576
 
8037
8577
  function _defineProperties$1(target, props) {
@@ -9024,6 +9564,8 @@ var Controls = {
9024
9564
  ptz: Ptz,
9025
9565
  record: Record,
9026
9566
  talk: Talk,
9567
+ broadcast: Broadcast,
9568
+ aiChat: AIChat,
9027
9569
  zoom: Zoom$1,
9028
9570
  definition: Definition,
9029
9571
  fullscreen: Fullscreen,
@@ -9634,9 +10176,7 @@ function _renderControls(theme, $container, btnList, props) {
9634
10176
  }
9635
10177
  function _renderTheme(theme, data) {
9636
10178
  return _async_to_generator$1(function() {
9637
- var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, // 重新计算画面渲染
9638
- _theme_contentControl_rerender, _theme_contentControl, themeData, // 重新计算画面渲染
9639
- _theme_contentControl_rerender1, _theme_contentControl1, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
10179
+ var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
9640
10180
  return _ts_generator$1(this, function(_state) {
9641
10181
  switch(_state.label){
9642
10182
  case 0:
@@ -9648,7 +10188,6 @@ function _renderTheme(theme, data) {
9648
10188
  themeData = _state.sent();
9649
10189
  _unmountedControls(theme);
9650
10190
  if (Object.prototype.toString.call(themeData) !== '[object Object]') {
9651
- (_theme_contentControl1 = theme.contentControl) == null ? void 0 : (_theme_contentControl_rerender1 = _theme_contentControl1.rerender) == null ? void 0 : _theme_contentControl_rerender1.call(_theme_contentControl1);
9652
10191
  // 主题空
9653
10192
  return [
9654
10193
  2
@@ -9819,7 +10358,6 @@ function _renderTheme(theme, data) {
9819
10358
  }
9820
10359
  }
9821
10360
  theme.emit(EVENTS.control.mountedControls);
9822
- (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_rerender = _theme_contentControl.rerender) == null ? void 0 : _theme_contentControl_rerender.call(_theme_contentControl);
9823
10361
  if (!theme.playing) theme._disabled(true);
9824
10362
  _controlEventemitter(theme);
9825
10363
  return [
@@ -10135,7 +10673,7 @@ var THEME_DEFAULT_OPTIONS = {
10135
10673
  _inherits(Theme, EventEmitter);
10136
10674
  function Theme(options) {
10137
10675
  var _this;
10138
- var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
10676
+ var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1, _this_options2, _this_options3;
10139
10677
  _this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
10140
10678
  * @since 0.0.1
10141
10679
  * @private
@@ -10186,7 +10724,7 @@ var THEME_DEFAULT_OPTIONS = {
10186
10724
  _this.playing = true;
10187
10725
  }
10188
10726
  _this._initClassName();
10189
- // 画布需要渲染在 this.contentControl.$container 内
10727
+ // 画布需要渲染在 this.contentControl.$content 内
10190
10728
  _this.contentControl = new Content({
10191
10729
  getContainer: function() {
10192
10730
  return _this.$container;
@@ -10221,7 +10759,8 @@ var THEME_DEFAULT_OPTIONS = {
10221
10759
  'flv',
10222
10760
  'hls',
10223
10761
  'mp4'
10224
- ].includes(options.type) ? LiveTemplate : (_ref3 = (_this_options_template = (_this_options = _this.options) == null ? void 0 : _this_options.template) != null ? _this_options_template : (_this_options1 = _this.options) == null ? void 0 : _this_options1.themeData) != null ? _ref3 : null);
10762
+ ].includes(options.type) ? ((_this_options = _this.options) == null ? void 0 : _this_options.themeData) !== undefined ? (_this_options1 = _this.options) == null ? void 0 : _this_options1.themeData : LiveTemplate // 标准流仅支持 null 和 LiveTemplate (支持自定义 2026-01-19)
10763
+ : (_ref3 = (_this_options_template = (_this_options2 = _this.options) == null ? void 0 : _this_options2.template) != null ? _this_options_template : (_this_options3 = _this.options) == null ? void 0 : _this_options3.themeData) != null ? _ref3 : null);
10225
10764
  _this._addEventListener();
10226
10765
  _themeEventemitter(_this);
10227
10766
  return _this;
@@ -10746,138 +11285,153 @@ var THEME_DEFAULT_OPTIONS = {
10746
11285
  * 尺寸变化结束时 进行判断,为了节省开销
10747
11286
  * @WARN:这里会闪一下, 原因:需要控件渲染后才知是否需要放置到 More 中,
10748
11287
  */ _proto._footerMoreControlShow = function _footerMoreControlShow() {
11288
+ this._displayMore();
11289
+ };
11290
+ _proto._displayMore = function _displayMore() {
10749
11291
  var _this = this;
10750
- var displayMore = function() {
10751
- if (_this._footer) {
10752
- var _this__footer_$left, _this__footer_$right;
10753
- // 判断 footer 的控件是否能放置的下, 否则隐藏暂时 more 按钮
10754
- var leftWidth = ((_this__footer_$left = _this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
10755
- var rightWidth = ((_this__footer_$right = _this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
10756
- // 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
10757
- var collapseControl = leftWidth + rightWidth + 26 > _this._width; // 收拢控件到 More 中
10758
- if (collapseControl) {
10759
- var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
10760
- if (!_this._footerMoreControl && ((_this__footer = _this._footer) == null ? void 0 : _this__footer.$right)) {
10761
- _this._footerMoreControl = new More({
10762
- language: _this.options.language,
10763
- locales: _this.i18n.translations,
10764
- rootContainer: _this.$container,
10765
- getPopupContainer: function() {
10766
- var _this__footer;
10767
- return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
10768
- },
10769
- placement: 'tr',
10770
- controls: _this.controls,
10771
- open: false,
10772
- offset: [
10773
- 0,
10774
- -8
10775
- ],
10776
- wrapClassName: "" + PREFIX_CLASS + "-footer-more",
10777
- onOpenChange: function(open) {
10778
- _this.emit(EVENTS.control.footerMorePanelOpenChange, open);
10779
- }
10780
- });
10781
- }
10782
- //
10783
- var list = (((_this__themeData = _this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
10784
- var _this__footerMoreControl;
10785
- var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
10786
- var _this_controls;
10787
- return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
10788
- });
10789
- return index === -1;
10790
- });
10791
- if (list.length <= 0) {
10792
- return;
10793
- }
10794
- if (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
10795
- // 为什么是两个, 因为More 也占用一个位置
10796
- var popList = [
10797
- list.pop(),
10798
- list.pop()
10799
- ];
10800
- for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
10801
- var item = _step.value;
10802
- if (item) {
10803
- var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
10804
- var key = "" + item.iconId + "Control";
10805
- (_this_controls = _this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key, _this._footerMoreControl.$panel, 'prepend');
10806
- (_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
10807
- }
11292
+ if (this._footer) {
11293
+ var _this__footer_$left, _this__footer_$right;
11294
+ // 判断 footer 的控件是否能放置的下, 否则隐藏暂时 more 按钮
11295
+ var leftWidth = ((_this__footer_$left = this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
11296
+ var rightWidth = ((_this__footer_$right = this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
11297
+ // 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
11298
+ var collapseControl = this._width - leftWidth - rightWidth < 16; // 收拢控件到 More 中
11299
+ if (collapseControl) {
11300
+ var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
11301
+ if (!this._footerMoreControl && ((_this__footer = this._footer) == null ? void 0 : _this__footer.$right)) {
11302
+ this._footerMoreControl = new More({
11303
+ language: this.options.language,
11304
+ locales: this.i18n.translations,
11305
+ rootContainer: this.$container,
11306
+ getPopupContainer: function() {
11307
+ var _this__footer;
11308
+ return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
11309
+ },
11310
+ placement: 'tr',
11311
+ controls: this.controls,
11312
+ open: false,
11313
+ offset: [
11314
+ 0,
11315
+ -8
11316
+ ],
11317
+ wrapClassName: "" + PREFIX_CLASS + "-footer-more",
11318
+ onOpenChange: function(open) {
11319
+ _this.emit(EVENTS.control.footerMorePanelOpenChange, open);
10808
11320
  }
10809
- } else if (_this._footerMoreControl) {
10810
- var item1 = list.pop();
10811
- if (item1) {
10812
- var _this_controls_key_resetPopupContainer1, _this_controls_key1, _this_controls2, _this_controls3, _this__footerMoreControl3;
10813
- var key1 = "" + item1.iconId + "Control";
10814
- (_this_controls2 = _this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls2[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key1.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key1, _this._footerMoreControl.$panel, 'prepend');
10815
- (_this__footerMoreControl3 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls3 = _this.controls) == null ? void 0 : _this_controls3[key1]);
10816
- } else {
10817
- return;
11321
+ });
11322
+ }
11323
+ //
11324
+ var list = (((_this__themeData = this._themeData) == null ? void 0 : (_this__themeData_footer = _this__themeData.footer) == null ? void 0 : _this__themeData_footer.btnList) || []).filter(function(item) {
11325
+ var _this__footerMoreControl;
11326
+ var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
11327
+ var _this_controls;
11328
+ return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
11329
+ });
11330
+ return index === -1;
11331
+ });
11332
+ if (list.length <= 0) return;
11333
+ if (((_this__footerMoreControl = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
11334
+ // 为什么是两个, 因为More 也占用一个位置
11335
+ var popList = [
11336
+ list.pop(),
11337
+ list.pop()
11338
+ ];
11339
+ for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
11340
+ var item = _step.value;
11341
+ if (item) {
11342
+ var _this_controls_key_$container, _this_controls_key, _this_controls, _this_controls_key_$container1, _this_controls_key1, _this_controls1, _this_controls_key_resetPopupContainer, _this_controls_key2, _this_controls2, _this_controls3, _this__footerMoreControl2;
11343
+ var key = "" + item.iconId + "Control";
11344
+ var width = ((_this_controls = this.controls) == null ? void 0 : (_this_controls_key = _this_controls[key]) == null ? void 0 : (_this_controls_key_$container = _this_controls_key.$container) == null ? void 0 : _this_controls_key_$container.clientWidth) || 0;
11345
+ var height = ((_this_controls1 = this.controls) == null ? void 0 : (_this_controls_key1 = _this_controls1[key]) == null ? void 0 : (_this_controls_key_$container1 = _this_controls_key1.$container) == null ? void 0 : _this_controls_key_$container1.clientHeight) || 0;
11346
+ (_this_controls2 = this.controls) == null ? void 0 : (_this_controls_key2 = _this_controls2[key]) == null ? void 0 : (_this_controls_key_resetPopupContainer = _this_controls_key2.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer.call(_this_controls_key2, this._footerMoreControl.$panel, 'prepend');
11347
+ (_this__footerMoreControl2 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls3 = this.controls) == null ? void 0 : _this_controls3[key], {
11348
+ width: width,
11349
+ height: height
11350
+ });
10818
11351
  }
10819
11352
  }
10820
- // prettier-ignore
10821
- _this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!_this._footerMoreControl, (_this__footerMoreControl1 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list1 = _this__footerMoreControl1.list) == null ? void 0 : _this__footerMoreControl_list1.map(function(item) {
10822
- return item.key;
10823
- }));
10824
- if (_this._footerMoreControl) {
10825
- // 防止 More 不存在导致死循环
10826
- displayMore();
11353
+ } else if (this._footerMoreControl) {
11354
+ var item1 = list.pop();
11355
+ if (item1) {
11356
+ var _this_controls_key_$container2, _this_controls_key3, _this_controls4, _this_controls_key_$container3, _this_controls_key4, _this_controls5, _this_controls_key_resetPopupContainer1, _this_controls_key5, _this_controls6, _this_controls7, _this__footerMoreControl3;
11357
+ var key1 = "" + item1.iconId + "Control";
11358
+ var width1 = ((_this_controls4 = this.controls) == null ? void 0 : (_this_controls_key3 = _this_controls4[key1]) == null ? void 0 : (_this_controls_key_$container2 = _this_controls_key3.$container) == null ? void 0 : _this_controls_key_$container2.clientWidth) || 0;
11359
+ var height1 = ((_this_controls5 = this.controls) == null ? void 0 : (_this_controls_key4 = _this_controls5[key1]) == null ? void 0 : (_this_controls_key_$container3 = _this_controls_key4.$container) == null ? void 0 : _this_controls_key_$container3.clientHeight) || 0;
11360
+ (_this_controls6 = this.controls) == null ? void 0 : (_this_controls_key5 = _this_controls6[key1]) == null ? void 0 : (_this_controls_key_resetPopupContainer1 = _this_controls_key5.resetPopupContainer) == null ? void 0 : _this_controls_key_resetPopupContainer1.call(_this_controls_key5, this._footerMoreControl.$panel, 'prepend');
11361
+ (_this__footerMoreControl3 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls7 = this.controls) == null ? void 0 : _this_controls7[key1], {
11362
+ width: width1,
11363
+ height: height1
11364
+ });
11365
+ } else {
11366
+ return;
10827
11367
  }
10828
- } else if (_this._width - leftWidth - rightWidth > 110) {
10829
- var _this__footerMoreControl_list2, _this__footerMoreControl4;
11368
+ }
11369
+ // prettier-ignore
11370
+ this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl1 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list1 = _this__footerMoreControl1.list) == null ? void 0 : _this__footerMoreControl_list1.map(function(item) {
11371
+ return item.key;
11372
+ }));
11373
+ if (this._footerMoreControl) {
11374
+ // 防止 More 不存在导致死循环
11375
+ this._displayMore();
11376
+ }
11377
+ } else {
11378
+ var _this__footerMoreControl_list2, _this__footerMoreControl5, _this__footerMoreControl_list3, _this__footerMoreControl6;
11379
+ var offset = 50;
11380
+ // if (this._footerMoreControl?.list?.length && this._footerMoreControl?.list?.length > 2) {
11381
+ // offset = 16;
11382
+ // }
11383
+ if ((_this__footerMoreControl5 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl5.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
11384
+ offset = offset + this._footerMoreControl.list[0].width || 0;
11385
+ }
11386
+ if (((_this__footerMoreControl6 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl6.list) == null ? void 0 : _this__footerMoreControl_list3.length) && this._width - leftWidth - rightWidth > offset) {
11387
+ var _this__footerMoreControl7, _this__footerMoreControl_list4, _this__footerMoreControl8, _this__footerMoreControl_list5, _this__footerMoreControl9;
10830
11388
  // 110 是为了保住个别控件的宽度超出已知的值, 如英文下 按钮的宽度
10831
11389
  // 从 More 中一次移除一个控件到 header/footer 中
10832
- if ((_this__footerMoreControl4 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl4.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
10833
- var _this__footerMoreControl5, _this__footerMoreControl_list3, _this__footerMoreControl6, _this__footerMoreControl_list4, _this__footerMoreControl7;
10834
- //
10835
- var item2 = (_this__footerMoreControl5 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl5.list.shift();
10836
- if (item2) {
10837
- var _this__footerMoreControl8;
10838
- if (item2.part === 'left') {
10839
- var _item_control_resetPopupContainer, _item_control;
10840
- (_item_control = item2.control) == null ? void 0 : (_item_control_resetPopupContainer = _item_control.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer.call(_item_control, _this._footer.$left, 'append');
10841
- } else if (item2.part === 'right') {
10842
- var _this__footerMoreControl_list5, _this__footerMoreControl9;
10843
- if (((_this__footerMoreControl9 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list5 = _this__footerMoreControl9.list) == null ? void 0 : _this__footerMoreControl_list5.length) === 0) {
10844
- var _item_control_resetPopupContainer1, _item_control1;
10845
- (_item_control1 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer1 = _item_control1.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer1.call(_item_control1, _this._footer.$right, 'append');
10846
- } else {
10847
- var _item_control_resetPopupContainer2, _item_control2;
10848
- (_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, _this._footer.$right, 'before', _this._footerMoreControl.$container);
10849
- }
11390
+ //
11391
+ var item2 = (_this__footerMoreControl7 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl7.list.shift();
11392
+ if (item2) {
11393
+ var _this__footerMoreControl10;
11394
+ if (item2.part === 'left') {
11395
+ var _item_control_resetPopupContainer, _item_control;
11396
+ (_item_control = item2.control) == null ? void 0 : (_item_control_resetPopupContainer = _item_control.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer.call(_item_control, this._footer.$left, 'append');
11397
+ } else if (item2.part === 'right') {
11398
+ var _this__footerMoreControl_list6, _this__footerMoreControl11;
11399
+ if (((_this__footerMoreControl11 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list6 = _this__footerMoreControl11.list) == null ? void 0 : _this__footerMoreControl_list6.length) === 0) {
11400
+ var _item_control_resetPopupContainer1, _item_control1;
11401
+ (_item_control1 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer1 = _item_control1.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer1.call(_item_control1, this._footer.$right, 'append');
11402
+ } else {
11403
+ var _item_control_resetPopupContainer2, _item_control2;
11404
+ (_item_control2 = item2.control) == null ? void 0 : (_item_control_resetPopupContainer2 = _item_control2.resetPopupContainer) == null ? void 0 : _item_control_resetPopupContainer2.call(_item_control2, this._footer.$right, 'before', this._footerMoreControl.$container);
10850
11405
  }
10851
- (_this__footerMoreControl8 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl8.remove(item2.control);
10852
11406
  }
10853
- if (((_this__footerMoreControl6 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list3 = _this__footerMoreControl6.list) == null ? void 0 : _this__footerMoreControl_list3.length) === 1) {
10854
- var _this__footerMoreControl10, _this__footerMoreControl_destroy, _this__footerMoreControl11;
10855
- // 最后一个, 移除 More
10856
- var item11 = (_this__footerMoreControl10 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl10.list.shift();
10857
- if (item11) {
10858
- var _this__footerMoreControl12;
10859
- if (item11.part === 'left') {
10860
- var _item1_control_resetPopupContainer, _item1_control;
10861
- (_item1_control = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer = _item1_control.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer.call(_item1_control, _this._footer.$left, 'append');
10862
- } else if (item11.part === 'right') {
10863
- var _item1_control_resetPopupContainer1, _item1_control1;
10864
- (_item1_control1 = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer1 = _item1_control1.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer1.call(_item1_control1, _this._footer.$right, 'append');
10865
- }
10866
- (_this__footerMoreControl12 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl12.remove(item11.control);
11407
+ (_this__footerMoreControl10 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl10.remove(item2.control);
11408
+ }
11409
+ if (((_this__footerMoreControl8 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl8.list) == null ? void 0 : _this__footerMoreControl_list4.length) === 1) {
11410
+ var _this__footerMoreControl12, _this__footerMoreControl_destroy, _this__footerMoreControl13;
11411
+ // 最后一个, 移除 More
11412
+ var item11 = (_this__footerMoreControl12 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl12.list.shift();
11413
+ if (item11) {
11414
+ var _this__footerMoreControl14;
11415
+ if (item11.part === 'left') {
11416
+ var _item1_control_resetPopupContainer, _item1_control;
11417
+ (_item1_control = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer = _item1_control.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer.call(_item1_control, this._footer.$left, 'append');
11418
+ } else if (item11.part === 'right') {
11419
+ var _item1_control_resetPopupContainer1, _item1_control1;
11420
+ (_item1_control1 = item11.control) == null ? void 0 : (_item1_control_resetPopupContainer1 = _item1_control1.resetPopupContainer) == null ? void 0 : _item1_control_resetPopupContainer1.call(_item1_control1, this._footer.$right, 'append');
10867
11421
  }
10868
- (_this__footerMoreControl11 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl11.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl11);
10869
- _this._footerMoreControl = null;
11422
+ (_this__footerMoreControl14 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl14.remove(item11.control);
10870
11423
  }
10871
- // prettier-ignore
10872
- _this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!_this._footerMoreControl, (_this__footerMoreControl7 = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl7.list) == null ? void 0 : _this__footerMoreControl_list4.map(function(item) {
10873
- return item.key;
10874
- }));
10875
- displayMore();
11424
+ (_this__footerMoreControl13 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl13.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl13);
11425
+ this._footerMoreControl = null;
10876
11426
  }
11427
+ // prettier-ignore
11428
+ this.emit(Theme.EVENTS.control.footerMoreShowControlsChange, !!this._footerMoreControl, (_this__footerMoreControl9 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list5 = _this__footerMoreControl9.list) == null ? void 0 : _this__footerMoreControl_list5.map(function(item) {
11429
+ return item.key;
11430
+ }));
11431
+ this._displayMore();
10877
11432
  }
10878
11433
  }
10879
- };
10880
- displayMore();
11434
+ }
10881
11435
  };
10882
11436
  /**
10883
11437
  * 移除事件
@@ -10955,6 +11509,7 @@ var THEME_DEFAULT_OPTIONS = {
10955
11509
  [
10956
11510
  'ptz',
10957
11511
  'talk',
11512
+ 'broadcast',
10958
11513
  'record',
10959
11514
  'speed'
10960
11515
  ].forEach(function(key) {
@@ -11032,6 +11587,7 @@ var THEME_DEFAULT_OPTIONS = {
11032
11587
  [
11033
11588
  'ptz',
11034
11589
  'talk',
11590
+ 'broadcast',
11035
11591
  'record'
11036
11592
  ].forEach(function(key) {
11037
11593
  var _this_controls;
@@ -11392,7 +11948,7 @@ var THEME_DEFAULT_OPTIONS = {
11392
11948
  zh: zh,
11393
11949
  en: en
11394
11950
  };
11395
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.0-beta.8';
11951
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.1-beta.1';
11396
11952
 
11397
11953
  exports.Control = Control;
11398
11954
  exports.EVENTS = EVENTS;