@ezuikit/player-theme 2.1.0-beta.9 → 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/README.md +1 -40
- package/dist/constant.js +8 -2
- package/dist/index.js +1062 -508
- package/dist/index.mjs +1062 -508
- package/dist/index.umd.js +1143 -553
- package/dist/style.css +3 -1
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +59 -20
- package/package.json +2 -11
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.1.
|
|
3
|
-
* Copyright (c) 2026-
|
|
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
|
import EventEmitter from 'eventemitter3';
|
|
@@ -139,6 +139,8 @@ var EVENTS = {
|
|
|
139
139
|
/** 控件开始录制 */ recordingChange: 'recordingChange',
|
|
140
140
|
/** 对讲状态变化 */ talkingChange: 'talkingChange',
|
|
141
141
|
/** 麦克风音量变化 */ talkVolumeChange: 'talkVolumeChange',
|
|
142
|
+
/** 语音广播状态变化 */ broadcastChange: 'broadcastChange',
|
|
143
|
+
/** AI对话框状态变化 */ aichatChange: 'aichatChange',
|
|
142
144
|
/** 动态切换日志配置 */ setLoggerOptions: 'setLoggerOptions',
|
|
143
145
|
records: 'records',
|
|
144
146
|
ptzSpeedChange: 'ptzSpeedChange',
|
|
@@ -182,6 +184,10 @@ var EVENTS = {
|
|
|
182
184
|
/** 开始对讲 */ talkingChange: 'Control.talkingChange',
|
|
183
185
|
/** 对讲错误, 一般是麦克风权限被拒绝 */ talkError: 'Control.talkError',
|
|
184
186
|
/** 对讲控件销毁 */ talkDestroy: 'Control.talkDestroy',
|
|
187
|
+
/** 语音广播状态变化 */ broadcastChange: 'Control.broadcastChange',
|
|
188
|
+
/** 语音广播控件销毁 */ broadcastDestroy: 'Control.broadcastDestroy',
|
|
189
|
+
/** AI对话框状态变化 */ aichatChange: 'Control.aichatChange',
|
|
190
|
+
/** AI对话框控件销毁 */ aichatDestroy: 'Control.aichatDestroy',
|
|
185
191
|
/** 缩放比例改变 */ zoomChange: 'Control.zoomChange',
|
|
186
192
|
/** 音量调节面板 展示隐藏变换 */ zoomPanelOpenChange: 'Control.zoomPanelOpenChange',
|
|
187
193
|
/** 缩放控件销毁 */ zoomDestroy: 'Control.zoomDestroy',
|
|
@@ -233,7 +239,7 @@ function _create_class$9(Constructor, protoProps, staticProps) {
|
|
|
233
239
|
if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
|
|
234
240
|
return Constructor;
|
|
235
241
|
}
|
|
236
|
-
function _inherits$
|
|
242
|
+
function _inherits$t(subClass, superClass) {
|
|
237
243
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
238
244
|
throw new TypeError("Super expression must either be null or a function");
|
|
239
245
|
}
|
|
@@ -244,14 +250,14 @@ function _inherits$r(subClass, superClass) {
|
|
|
244
250
|
configurable: true
|
|
245
251
|
}
|
|
246
252
|
});
|
|
247
|
-
if (superClass) _set_prototype_of$
|
|
253
|
+
if (superClass) _set_prototype_of$t(subClass, superClass);
|
|
248
254
|
}
|
|
249
|
-
function _set_prototype_of$
|
|
250
|
-
_set_prototype_of$
|
|
255
|
+
function _set_prototype_of$t(o, p) {
|
|
256
|
+
_set_prototype_of$t = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
251
257
|
o.__proto__ = p;
|
|
252
258
|
return o;
|
|
253
259
|
};
|
|
254
|
-
return _set_prototype_of$
|
|
260
|
+
return _set_prototype_of$t(o, p);
|
|
255
261
|
}
|
|
256
262
|
/**
|
|
257
263
|
* 控件基类
|
|
@@ -265,7 +271,7 @@ function _set_prototype_of$r(o, p) {
|
|
|
265
271
|
* const myControl = new MyControl({})
|
|
266
272
|
* ```
|
|
267
273
|
*/ var Control = /*#__PURE__*/ function(EventEmitter) {
|
|
268
|
-
_inherits$
|
|
274
|
+
_inherits$t(Control, EventEmitter);
|
|
269
275
|
function Control(options) {
|
|
270
276
|
var _this;
|
|
271
277
|
var _this___options;
|
|
@@ -440,8 +446,8 @@ function _set_prototype_of$r(o, p) {
|
|
|
440
446
|
return Control;
|
|
441
447
|
}(EventEmitter);
|
|
442
448
|
|
|
443
|
-
function _extends$
|
|
444
|
-
_extends$
|
|
449
|
+
function _extends$s() {
|
|
450
|
+
_extends$s = Object.assign || function(target) {
|
|
445
451
|
for(var i = 1; i < arguments.length; i++){
|
|
446
452
|
var source = arguments[i];
|
|
447
453
|
for(var key in source){
|
|
@@ -452,9 +458,9 @@ function _extends$q() {
|
|
|
452
458
|
}
|
|
453
459
|
return target;
|
|
454
460
|
};
|
|
455
|
-
return _extends$
|
|
461
|
+
return _extends$s.apply(this, arguments);
|
|
456
462
|
}
|
|
457
|
-
function _inherits$
|
|
463
|
+
function _inherits$s(subClass, superClass) {
|
|
458
464
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
459
465
|
throw new TypeError("Super expression must either be null or a function");
|
|
460
466
|
}
|
|
@@ -465,25 +471,25 @@ function _inherits$q(subClass, superClass) {
|
|
|
465
471
|
configurable: true
|
|
466
472
|
}
|
|
467
473
|
});
|
|
468
|
-
if (superClass) _set_prototype_of$
|
|
474
|
+
if (superClass) _set_prototype_of$s(subClass, superClass);
|
|
469
475
|
}
|
|
470
|
-
function _set_prototype_of$
|
|
471
|
-
_set_prototype_of$
|
|
476
|
+
function _set_prototype_of$s(o, p) {
|
|
477
|
+
_set_prototype_of$s = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
472
478
|
o.__proto__ = p;
|
|
473
479
|
return o;
|
|
474
480
|
};
|
|
475
|
-
return _set_prototype_of$
|
|
481
|
+
return _set_prototype_of$s(o, p);
|
|
476
482
|
}
|
|
477
483
|
var LOADING_DEFAULT_OPTIONS = {};
|
|
478
484
|
/**
|
|
479
485
|
* 加载动画控件
|
|
480
486
|
* @category Control
|
|
481
487
|
*/ var Loading = /*#__PURE__*/ function(Control) {
|
|
482
|
-
_inherits$
|
|
488
|
+
_inherits$s(Loading, Control);
|
|
483
489
|
function Loading(options) {
|
|
484
490
|
if (options === void 0) options = {};
|
|
485
491
|
var _this;
|
|
486
|
-
_this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$
|
|
492
|
+
_this = Control.call(this, Object.assign({}, LOADING_DEFAULT_OPTIONS, _extends$s({}, options, {
|
|
487
493
|
tagName: 'div',
|
|
488
494
|
controlType: 'block',
|
|
489
495
|
classNameSuffix: 'loading'
|
|
@@ -521,8 +527,8 @@ var LOADING_DEFAULT_OPTIONS = {};
|
|
|
521
527
|
return Loading;
|
|
522
528
|
}(Control);
|
|
523
529
|
|
|
524
|
-
function _extends$
|
|
525
|
-
_extends$
|
|
530
|
+
function _extends$r() {
|
|
531
|
+
_extends$r = Object.assign || function(target) {
|
|
526
532
|
for(var i = 1; i < arguments.length; i++){
|
|
527
533
|
var source = arguments[i];
|
|
528
534
|
for(var key in source){
|
|
@@ -533,9 +539,9 @@ function _extends$p() {
|
|
|
533
539
|
}
|
|
534
540
|
return target;
|
|
535
541
|
};
|
|
536
|
-
return _extends$
|
|
542
|
+
return _extends$r.apply(this, arguments);
|
|
537
543
|
}
|
|
538
|
-
function _inherits$
|
|
544
|
+
function _inherits$r(subClass, superClass) {
|
|
539
545
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
540
546
|
throw new TypeError("Super expression must either be null or a function");
|
|
541
547
|
}
|
|
@@ -546,14 +552,14 @@ function _inherits$p(subClass, superClass) {
|
|
|
546
552
|
configurable: true
|
|
547
553
|
}
|
|
548
554
|
});
|
|
549
|
-
if (superClass) _set_prototype_of$
|
|
555
|
+
if (superClass) _set_prototype_of$r(subClass, superClass);
|
|
550
556
|
}
|
|
551
|
-
function _set_prototype_of$
|
|
552
|
-
_set_prototype_of$
|
|
557
|
+
function _set_prototype_of$r(o, p) {
|
|
558
|
+
_set_prototype_of$r = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
553
559
|
o.__proto__ = p;
|
|
554
560
|
return o;
|
|
555
561
|
};
|
|
556
|
-
return _set_prototype_of$
|
|
562
|
+
return _set_prototype_of$r(o, p);
|
|
557
563
|
}
|
|
558
564
|
// 不放在服务器上 是因为有可能http加载失败
|
|
559
565
|
// prettier-ignore
|
|
@@ -565,11 +571,11 @@ var POSTER_OPTIONS = {
|
|
|
565
571
|
* 封面控件
|
|
566
572
|
* @category Control
|
|
567
573
|
*/ var Poster = /*#__PURE__*/ function(Control) {
|
|
568
|
-
_inherits$
|
|
574
|
+
_inherits$r(Poster, Control);
|
|
569
575
|
function Poster(options) {
|
|
570
576
|
if (options === void 0) options = {};
|
|
571
577
|
var _this;
|
|
572
|
-
_this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$
|
|
578
|
+
_this = Control.call(this, Object.assign({}, POSTER_OPTIONS, _extends$r({}, options, {
|
|
573
579
|
tagName: 'div',
|
|
574
580
|
controlType: 'block',
|
|
575
581
|
classNameSuffix: 'poster'
|
|
@@ -664,6 +670,8 @@ var Icons = {
|
|
|
664
670
|
talkGrowth: function(prefix) {
|
|
665
671
|
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>';
|
|
666
672
|
},
|
|
673
|
+
/** 语音广播 */ 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>',
|
|
674
|
+
/** 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 ',
|
|
667
675
|
/** 相机/截图 */ 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>',
|
|
668
676
|
/** 电子放大 */ 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>',
|
|
669
677
|
/** 隐私遮蔽 */ 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>',
|
|
@@ -748,6 +756,14 @@ var IconComponents = {
|
|
|
748
756
|
if (attr === void 0) attr = {};
|
|
749
757
|
return createIcon(Icons.talk, 'talk', attr);
|
|
750
758
|
},
|
|
759
|
+
broadcast: function(attr) {
|
|
760
|
+
if (attr === void 0) attr = {};
|
|
761
|
+
return createIcon(Icons.broadcast, 'broadcast', attr);
|
|
762
|
+
},
|
|
763
|
+
aiChat: function(attr) {
|
|
764
|
+
if (attr === void 0) attr = {};
|
|
765
|
+
return createIcon(Icons.aiChat, 'aiChat', attr);
|
|
766
|
+
},
|
|
751
767
|
talkGrowth: function(attr) {
|
|
752
768
|
if (attr === void 0) attr = {};
|
|
753
769
|
return createIcon(Icons.talkGrowth(PREFIX_CLASS), 'talk-growth', attr);
|
|
@@ -826,8 +842,8 @@ var IconComponents = {
|
|
|
826
842
|
}
|
|
827
843
|
};
|
|
828
844
|
|
|
829
|
-
function _extends$
|
|
830
|
-
_extends$
|
|
845
|
+
function _extends$q() {
|
|
846
|
+
_extends$q = Object.assign || function(target) {
|
|
831
847
|
for(var i = 1; i < arguments.length; i++){
|
|
832
848
|
var source = arguments[i];
|
|
833
849
|
for(var key in source){
|
|
@@ -838,9 +854,9 @@ function _extends$o() {
|
|
|
838
854
|
}
|
|
839
855
|
return target;
|
|
840
856
|
};
|
|
841
|
-
return _extends$
|
|
857
|
+
return _extends$q.apply(this, arguments);
|
|
842
858
|
}
|
|
843
|
-
function _inherits$
|
|
859
|
+
function _inherits$q(subClass, superClass) {
|
|
844
860
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
845
861
|
throw new TypeError("Super expression must either be null or a function");
|
|
846
862
|
}
|
|
@@ -851,25 +867,25 @@ function _inherits$o(subClass, superClass) {
|
|
|
851
867
|
configurable: true
|
|
852
868
|
}
|
|
853
869
|
});
|
|
854
|
-
if (superClass) _set_prototype_of$
|
|
870
|
+
if (superClass) _set_prototype_of$q(subClass, superClass);
|
|
855
871
|
}
|
|
856
|
-
function _set_prototype_of$
|
|
857
|
-
_set_prototype_of$
|
|
872
|
+
function _set_prototype_of$q(o, p) {
|
|
873
|
+
_set_prototype_of$q = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
858
874
|
o.__proto__ = p;
|
|
859
875
|
return o;
|
|
860
876
|
};
|
|
861
|
-
return _set_prototype_of$
|
|
877
|
+
return _set_prototype_of$q(o, p);
|
|
862
878
|
}
|
|
863
879
|
var MESSAGE_DEFAULT_OPTIONS = {};
|
|
864
880
|
/**
|
|
865
881
|
* 消息控件
|
|
866
882
|
* @category Control
|
|
867
883
|
*/ var Message = /*#__PURE__*/ function(Control) {
|
|
868
|
-
_inherits$
|
|
884
|
+
_inherits$q(Message, Control);
|
|
869
885
|
function Message(options) {
|
|
870
886
|
if (options === void 0) options = {};
|
|
871
887
|
var _this;
|
|
872
|
-
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$
|
|
888
|
+
_this = Control.call(this, Object.assign({}, MESSAGE_DEFAULT_OPTIONS, _extends$q({}, options, {
|
|
873
889
|
tagName: 'div',
|
|
874
890
|
controlType: 'block'
|
|
875
891
|
}))) || this;
|
|
@@ -1022,8 +1038,8 @@ function _create_class$8(Constructor, protoProps, staticProps) {
|
|
|
1022
1038
|
if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
|
|
1023
1039
|
return Constructor;
|
|
1024
1040
|
}
|
|
1025
|
-
function _extends$
|
|
1026
|
-
_extends$
|
|
1041
|
+
function _extends$p() {
|
|
1042
|
+
_extends$p = Object.assign || function(target) {
|
|
1027
1043
|
for(var i = 1; i < arguments.length; i++){
|
|
1028
1044
|
var source = arguments[i];
|
|
1029
1045
|
for(var key in source){
|
|
@@ -1034,9 +1050,9 @@ function _extends$n() {
|
|
|
1034
1050
|
}
|
|
1035
1051
|
return target;
|
|
1036
1052
|
};
|
|
1037
|
-
return _extends$
|
|
1053
|
+
return _extends$p.apply(this, arguments);
|
|
1038
1054
|
}
|
|
1039
|
-
function _inherits$
|
|
1055
|
+
function _inherits$p(subClass, superClass) {
|
|
1040
1056
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
1041
1057
|
throw new TypeError("Super expression must either be null or a function");
|
|
1042
1058
|
}
|
|
@@ -1047,23 +1063,23 @@ function _inherits$n(subClass, superClass) {
|
|
|
1047
1063
|
configurable: true
|
|
1048
1064
|
}
|
|
1049
1065
|
});
|
|
1050
|
-
if (superClass) _set_prototype_of$
|
|
1066
|
+
if (superClass) _set_prototype_of$p(subClass, superClass);
|
|
1051
1067
|
}
|
|
1052
|
-
function _set_prototype_of$
|
|
1053
|
-
_set_prototype_of$
|
|
1068
|
+
function _set_prototype_of$p(o, p) {
|
|
1069
|
+
_set_prototype_of$p = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
1054
1070
|
o.__proto__ = p;
|
|
1055
1071
|
return o;
|
|
1056
1072
|
};
|
|
1057
|
-
return _set_prototype_of$
|
|
1073
|
+
return _set_prototype_of$p(o, p);
|
|
1058
1074
|
}
|
|
1059
1075
|
/**
|
|
1060
1076
|
* 播放/暂停控件
|
|
1061
1077
|
* @category Control
|
|
1062
1078
|
*/ var Play = /*#__PURE__*/ function(Control) {
|
|
1063
|
-
_inherits$
|
|
1079
|
+
_inherits$p(Play, Control);
|
|
1064
1080
|
function Play(options) {
|
|
1065
1081
|
var _this;
|
|
1066
|
-
_this = Control.call(this, _extends$
|
|
1082
|
+
_this = Control.call(this, _extends$p({}, options, {
|
|
1067
1083
|
tagName: 'span',
|
|
1068
1084
|
controlType: 'button',
|
|
1069
1085
|
classNameSuffix: 'play'
|
|
@@ -1679,8 +1695,8 @@ function _create_class$6(Constructor, protoProps, staticProps) {
|
|
|
1679
1695
|
if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
|
|
1680
1696
|
return Constructor;
|
|
1681
1697
|
}
|
|
1682
|
-
function _extends$
|
|
1683
|
-
_extends$
|
|
1698
|
+
function _extends$o() {
|
|
1699
|
+
_extends$o = Object.assign || function(target) {
|
|
1684
1700
|
for(var i = 1; i < arguments.length; i++){
|
|
1685
1701
|
var source = arguments[i];
|
|
1686
1702
|
for(var key in source){
|
|
@@ -1691,9 +1707,9 @@ function _extends$m() {
|
|
|
1691
1707
|
}
|
|
1692
1708
|
return target;
|
|
1693
1709
|
};
|
|
1694
|
-
return _extends$
|
|
1710
|
+
return _extends$o.apply(this, arguments);
|
|
1695
1711
|
}
|
|
1696
|
-
function _inherits$
|
|
1712
|
+
function _inherits$o(subClass, superClass) {
|
|
1697
1713
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
1698
1714
|
throw new TypeError("Super expression must either be null or a function");
|
|
1699
1715
|
}
|
|
@@ -1704,14 +1720,14 @@ function _inherits$m(subClass, superClass) {
|
|
|
1704
1720
|
configurable: true
|
|
1705
1721
|
}
|
|
1706
1722
|
});
|
|
1707
|
-
if (superClass) _set_prototype_of$
|
|
1723
|
+
if (superClass) _set_prototype_of$o(subClass, superClass);
|
|
1708
1724
|
}
|
|
1709
|
-
function _set_prototype_of$
|
|
1710
|
-
_set_prototype_of$
|
|
1725
|
+
function _set_prototype_of$o(o, p) {
|
|
1726
|
+
_set_prototype_of$o = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
1711
1727
|
o.__proto__ = p;
|
|
1712
1728
|
return o;
|
|
1713
1729
|
};
|
|
1714
|
-
return _set_prototype_of$
|
|
1730
|
+
return _set_prototype_of$o(o, p);
|
|
1715
1731
|
}
|
|
1716
1732
|
var VOLUME_DEFAULT_OPTIONS = {
|
|
1717
1733
|
volume: 0.8,
|
|
@@ -1725,12 +1741,12 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1725
1741
|
* 音量调节控件
|
|
1726
1742
|
* @category Control
|
|
1727
1743
|
*/ var Volume = /*#__PURE__*/ function(Control) {
|
|
1728
|
-
_inherits$
|
|
1744
|
+
_inherits$o(Volume, Control);
|
|
1729
1745
|
function Volume(options) {
|
|
1730
1746
|
if (options === void 0) options = {};
|
|
1731
1747
|
var _this;
|
|
1732
1748
|
var _this__options_props, _this__options_props1, _this__options_props2, _this__options_props3;
|
|
1733
|
-
_this = Control.call(this, _extends$
|
|
1749
|
+
_this = Control.call(this, _extends$o({}, options, {
|
|
1734
1750
|
tagName: 'span',
|
|
1735
1751
|
classNameSuffix: 'volume',
|
|
1736
1752
|
controlType: 'button'
|
|
@@ -1946,7 +1962,7 @@ var VOLUME_DEFAULT_OPTIONS = {
|
|
|
1946
1962
|
return Volume;
|
|
1947
1963
|
}(Control);
|
|
1948
1964
|
|
|
1949
|
-
function asyncGeneratorStep$
|
|
1965
|
+
function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
|
|
1950
1966
|
try {
|
|
1951
1967
|
var info = gen[key](arg);
|
|
1952
1968
|
var value = info.value;
|
|
@@ -1960,22 +1976,22 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
1960
1976
|
Promise.resolve(value).then(_next, _throw);
|
|
1961
1977
|
}
|
|
1962
1978
|
}
|
|
1963
|
-
function _async_to_generator$
|
|
1979
|
+
function _async_to_generator$7(fn) {
|
|
1964
1980
|
return function() {
|
|
1965
1981
|
var self = this, args = arguments;
|
|
1966
1982
|
return new Promise(function(resolve, reject) {
|
|
1967
1983
|
var gen = fn.apply(self, args);
|
|
1968
1984
|
function _next(value) {
|
|
1969
|
-
asyncGeneratorStep$
|
|
1985
|
+
asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
|
|
1970
1986
|
}
|
|
1971
1987
|
function _throw(err) {
|
|
1972
|
-
asyncGeneratorStep$
|
|
1988
|
+
asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
|
|
1973
1989
|
}
|
|
1974
1990
|
_next(undefined);
|
|
1975
1991
|
});
|
|
1976
1992
|
};
|
|
1977
1993
|
}
|
|
1978
|
-
function _ts_generator$
|
|
1994
|
+
function _ts_generator$7(thisArg, body) {
|
|
1979
1995
|
var f, y, t, _ = {
|
|
1980
1996
|
label: 0,
|
|
1981
1997
|
sent: function() {
|
|
@@ -2189,8 +2205,8 @@ var __fullscreenProvider__ = Provider.getInstance();
|
|
|
2189
2205
|
* 全屏
|
|
2190
2206
|
* @returns Promise<void>
|
|
2191
2207
|
*/ _proto.fullscreen = function fullscreen() {
|
|
2192
|
-
return _async_to_generator$
|
|
2193
|
-
return _ts_generator$
|
|
2208
|
+
return _async_to_generator$7(function() {
|
|
2209
|
+
return _ts_generator$7(this, function(_state) {
|
|
2194
2210
|
switch(_state.label){
|
|
2195
2211
|
case 0:
|
|
2196
2212
|
if (!Utils.isMobile) return [
|
|
@@ -2225,8 +2241,8 @@ var __fullscreenProvider__ = Provider.getInstance();
|
|
|
2225
2241
|
* 退出全屏
|
|
2226
2242
|
* @returns Promise<void>
|
|
2227
2243
|
*/ _proto.exitFullscreen = function exitFullscreen() {
|
|
2228
|
-
return _async_to_generator$
|
|
2229
|
-
return _ts_generator$
|
|
2244
|
+
return _async_to_generator$7(function() {
|
|
2245
|
+
return _ts_generator$7(this, function(_state) {
|
|
2230
2246
|
switch(_state.label){
|
|
2231
2247
|
case 0:
|
|
2232
2248
|
if (!Utils.isMobile) return [
|
|
@@ -2265,8 +2281,8 @@ var __fullscreenProvider__ = Provider.getInstance();
|
|
|
2265
2281
|
* 全屏切换
|
|
2266
2282
|
* @returns Promise<void>
|
|
2267
2283
|
*/ _proto.toggle = function toggle() {
|
|
2268
|
-
return _async_to_generator$
|
|
2269
|
-
return _ts_generator$
|
|
2284
|
+
return _async_to_generator$7(function() {
|
|
2285
|
+
return _ts_generator$7(this, function(_state) {
|
|
2270
2286
|
switch(_state.label){
|
|
2271
2287
|
case 0:
|
|
2272
2288
|
if (!Utils.isMobile) return [
|
|
@@ -2389,8 +2405,8 @@ var __fullscreenProvider__ = Provider.getInstance();
|
|
|
2389
2405
|
return Fullscreen;
|
|
2390
2406
|
}();
|
|
2391
2407
|
|
|
2392
|
-
function _extends$
|
|
2393
|
-
_extends$
|
|
2408
|
+
function _extends$n() {
|
|
2409
|
+
_extends$n = Object.assign || function(target) {
|
|
2394
2410
|
for(var i = 1; i < arguments.length; i++){
|
|
2395
2411
|
var source = arguments[i];
|
|
2396
2412
|
for(var key in source){
|
|
@@ -2401,9 +2417,9 @@ function _extends$l() {
|
|
|
2401
2417
|
}
|
|
2402
2418
|
return target;
|
|
2403
2419
|
};
|
|
2404
|
-
return _extends$
|
|
2420
|
+
return _extends$n.apply(this, arguments);
|
|
2405
2421
|
}
|
|
2406
|
-
function _inherits$
|
|
2422
|
+
function _inherits$n(subClass, superClass) {
|
|
2407
2423
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
2408
2424
|
throw new TypeError("Super expression must either be null or a function");
|
|
2409
2425
|
}
|
|
@@ -2414,24 +2430,24 @@ function _inherits$l(subClass, superClass) {
|
|
|
2414
2430
|
configurable: true
|
|
2415
2431
|
}
|
|
2416
2432
|
});
|
|
2417
|
-
if (superClass) _set_prototype_of$
|
|
2433
|
+
if (superClass) _set_prototype_of$n(subClass, superClass);
|
|
2418
2434
|
}
|
|
2419
|
-
function _set_prototype_of$
|
|
2420
|
-
_set_prototype_of$
|
|
2435
|
+
function _set_prototype_of$n(o, p) {
|
|
2436
|
+
_set_prototype_of$n = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
2421
2437
|
o.__proto__ = p;
|
|
2422
2438
|
return o;
|
|
2423
2439
|
};
|
|
2424
|
-
return _set_prototype_of$
|
|
2440
|
+
return _set_prototype_of$n(o, p);
|
|
2425
2441
|
}
|
|
2426
2442
|
/**
|
|
2427
2443
|
* 全屏控件
|
|
2428
2444
|
* @category Control
|
|
2429
2445
|
*/ var Fullscreen = /*#__PURE__*/ function(Control) {
|
|
2430
|
-
_inherits$
|
|
2446
|
+
_inherits$n(Fullscreen, Control);
|
|
2431
2447
|
function Fullscreen(options) {
|
|
2432
2448
|
var _this;
|
|
2433
2449
|
var _options_props, _this_options;
|
|
2434
|
-
_this = Control.call(this, _extends$
|
|
2450
|
+
_this = Control.call(this, _extends$n({
|
|
2435
2451
|
tagName: 'span',
|
|
2436
2452
|
classNameSuffix: 'fullscreen',
|
|
2437
2453
|
controlType: 'button'
|
|
@@ -2496,8 +2512,8 @@ function _set_prototype_of$l(o, p) {
|
|
|
2496
2512
|
return Fullscreen;
|
|
2497
2513
|
}(Control);
|
|
2498
2514
|
|
|
2499
|
-
function _extends$
|
|
2500
|
-
_extends$
|
|
2515
|
+
function _extends$m() {
|
|
2516
|
+
_extends$m = Object.assign || function(target) {
|
|
2501
2517
|
for(var i = 1; i < arguments.length; i++){
|
|
2502
2518
|
var source = arguments[i];
|
|
2503
2519
|
for(var key in source){
|
|
@@ -2508,9 +2524,9 @@ function _extends$k() {
|
|
|
2508
2524
|
}
|
|
2509
2525
|
return target;
|
|
2510
2526
|
};
|
|
2511
|
-
return _extends$
|
|
2527
|
+
return _extends$m.apply(this, arguments);
|
|
2512
2528
|
}
|
|
2513
|
-
function _inherits$
|
|
2529
|
+
function _inherits$m(subClass, superClass) {
|
|
2514
2530
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
2515
2531
|
throw new TypeError("Super expression must either be null or a function");
|
|
2516
2532
|
}
|
|
@@ -2521,24 +2537,24 @@ function _inherits$k(subClass, superClass) {
|
|
|
2521
2537
|
configurable: true
|
|
2522
2538
|
}
|
|
2523
2539
|
});
|
|
2524
|
-
if (superClass) _set_prototype_of$
|
|
2540
|
+
if (superClass) _set_prototype_of$m(subClass, superClass);
|
|
2525
2541
|
}
|
|
2526
|
-
function _set_prototype_of$
|
|
2527
|
-
_set_prototype_of$
|
|
2542
|
+
function _set_prototype_of$m(o, p) {
|
|
2543
|
+
_set_prototype_of$m = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
2528
2544
|
o.__proto__ = p;
|
|
2529
2545
|
return o;
|
|
2530
2546
|
};
|
|
2531
|
-
return _set_prototype_of$
|
|
2547
|
+
return _set_prototype_of$m(o, p);
|
|
2532
2548
|
}
|
|
2533
2549
|
/**
|
|
2534
2550
|
* 回放类型切换(本地回放(sdk 卡), 云存储回放, 云录制回放)控件
|
|
2535
2551
|
* @category Control
|
|
2536
2552
|
*/ var Rec = /*#__PURE__*/ function(Control) {
|
|
2537
|
-
_inherits$
|
|
2553
|
+
_inherits$m(Rec, Control);
|
|
2538
2554
|
function Rec(options) {
|
|
2539
2555
|
var _this;
|
|
2540
2556
|
var _options_props;
|
|
2541
|
-
_this = Control.call(this, _extends$
|
|
2557
|
+
_this = Control.call(this, _extends$m({}, options, {
|
|
2542
2558
|
tagName: 'div',
|
|
2543
2559
|
controlType: 'block',
|
|
2544
2560
|
classNameSuffix: 'rec'
|
|
@@ -2813,6 +2829,8 @@ var zh = {
|
|
|
2813
2829
|
BTN_RECORDVIDEO: '录屏',
|
|
2814
2830
|
BTN_CAPTURE: '截图',
|
|
2815
2831
|
BTN_TALK: '对讲',
|
|
2832
|
+
BTN_BROADCAST: '语音广播',
|
|
2833
|
+
BTN_AICHAT: 'AI对话',
|
|
2816
2834
|
BTN_ZOOM: '电子放大',
|
|
2817
2835
|
BTN_3D_ZOOM: '3D定位',
|
|
2818
2836
|
BTN_PTZ: '云台控制',
|
|
@@ -3083,6 +3101,8 @@ var en = {
|
|
|
3083
3101
|
BTN_RECORDVIDEO: 'Screen recording',
|
|
3084
3102
|
BTN_CAPTURE: 'Screenshot',
|
|
3085
3103
|
BTN_TALK: 'Intercom',
|
|
3104
|
+
BTN_BROADCAST: 'Voice broadcast',
|
|
3105
|
+
BTN_AICHAT: 'AI Chat',
|
|
3086
3106
|
BTN_ZOOM: 'Electronic zoom',
|
|
3087
3107
|
BTN_3D_ZOOM: '3D positioning',
|
|
3088
3108
|
BTN_PTZ: 'PTZ control',
|
|
@@ -3269,6 +3289,11 @@ var en = {
|
|
|
3269
3289
|
part: 'left',
|
|
3270
3290
|
isrender: 1
|
|
3271
3291
|
},
|
|
3292
|
+
{
|
|
3293
|
+
iconId: 'broadcast',
|
|
3294
|
+
part: 'left',
|
|
3295
|
+
isrender: 1
|
|
3296
|
+
},
|
|
3272
3297
|
{
|
|
3273
3298
|
iconId: 'zoom',
|
|
3274
3299
|
part: 'left',
|
|
@@ -3372,6 +3397,12 @@ var en = {
|
|
|
3372
3397
|
defaultActive: 0,
|
|
3373
3398
|
isrender: 1
|
|
3374
3399
|
},
|
|
3400
|
+
{
|
|
3401
|
+
iconId: 'aiChat',
|
|
3402
|
+
part: 'left',
|
|
3403
|
+
defaultActive: 0,
|
|
3404
|
+
isrender: 1
|
|
3405
|
+
},
|
|
3375
3406
|
{
|
|
3376
3407
|
iconId: 'speed',
|
|
3377
3408
|
part: 'right',
|
|
@@ -3455,6 +3486,12 @@ var en = {
|
|
|
3455
3486
|
defaultActive: 0,
|
|
3456
3487
|
isrender: 1
|
|
3457
3488
|
},
|
|
3489
|
+
{
|
|
3490
|
+
iconId: 'broadcast',
|
|
3491
|
+
part: 'left',
|
|
3492
|
+
defaultActive: 0,
|
|
3493
|
+
isrender: 1
|
|
3494
|
+
},
|
|
3458
3495
|
{
|
|
3459
3496
|
iconId: 'zoom',
|
|
3460
3497
|
part: 'left',
|
|
@@ -3550,6 +3587,12 @@ var en = {
|
|
|
3550
3587
|
defaultActive: 0,
|
|
3551
3588
|
isrender: 1
|
|
3552
3589
|
},
|
|
3590
|
+
{
|
|
3591
|
+
iconId: 'aiChat',
|
|
3592
|
+
part: 'left',
|
|
3593
|
+
defaultActive: 0,
|
|
3594
|
+
isrender: 1
|
|
3595
|
+
},
|
|
3553
3596
|
{
|
|
3554
3597
|
iconId: 'speed',
|
|
3555
3598
|
part: 'right',
|
|
@@ -3710,7 +3753,7 @@ var en = {
|
|
|
3710
3753
|
voice: voice
|
|
3711
3754
|
};
|
|
3712
3755
|
|
|
3713
|
-
function _inherits$
|
|
3756
|
+
function _inherits$l(subClass, superClass) {
|
|
3714
3757
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3715
3758
|
throw new TypeError("Super expression must either be null or a function");
|
|
3716
3759
|
}
|
|
@@ -3721,20 +3764,20 @@ function _inherits$j(subClass, superClass) {
|
|
|
3721
3764
|
configurable: true
|
|
3722
3765
|
}
|
|
3723
3766
|
});
|
|
3724
|
-
if (superClass) _set_prototype_of$
|
|
3767
|
+
if (superClass) _set_prototype_of$l(subClass, superClass);
|
|
3725
3768
|
}
|
|
3726
|
-
function _set_prototype_of$
|
|
3727
|
-
_set_prototype_of$
|
|
3769
|
+
function _set_prototype_of$l(o, p) {
|
|
3770
|
+
_set_prototype_of$l = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
3728
3771
|
o.__proto__ = p;
|
|
3729
3772
|
return o;
|
|
3730
3773
|
};
|
|
3731
|
-
return _set_prototype_of$
|
|
3774
|
+
return _set_prototype_of$l(o, p);
|
|
3732
3775
|
}
|
|
3733
3776
|
/**
|
|
3734
3777
|
* 截图控件
|
|
3735
3778
|
* @category Content
|
|
3736
3779
|
*/ var Content = /*#__PURE__*/ function(EventEmitter) {
|
|
3737
|
-
_inherits$
|
|
3780
|
+
_inherits$l(Content, EventEmitter);
|
|
3738
3781
|
function Content(options) {
|
|
3739
3782
|
var _this;
|
|
3740
3783
|
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
@@ -3791,7 +3834,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3791
3834
|
if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
|
|
3792
3835
|
objectFill = 'cover';
|
|
3793
3836
|
}
|
|
3794
|
-
//
|
|
3837
|
+
//
|
|
3795
3838
|
if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
|
|
3796
3839
|
var left = (width - this._originWidth) / 2;
|
|
3797
3840
|
var top = (height - this._originHeight) / 2;
|
|
@@ -3826,7 +3869,8 @@ function _set_prototype_of$j(o, p) {
|
|
|
3826
3869
|
_proto.destroy = function destroy() {
|
|
3827
3870
|
var _this_$wrapper;
|
|
3828
3871
|
if (this._cleanUpResizeObserver) {
|
|
3829
|
-
this._cleanUpResizeObserver.unobserve
|
|
3872
|
+
this._cleanUpResizeObserver.unobserve();
|
|
3873
|
+
// this._cleanUpResizeObserver.disconnect();
|
|
3830
3874
|
this._cleanUpResizeObserver = null;
|
|
3831
3875
|
}
|
|
3832
3876
|
if (this.$video) {
|
|
@@ -3848,8 +3892,8 @@ function _set_prototype_of$j(o, p) {
|
|
|
3848
3892
|
return Content;
|
|
3849
3893
|
}(EventEmitter);
|
|
3850
3894
|
|
|
3851
|
-
function _extends$
|
|
3852
|
-
_extends$
|
|
3895
|
+
function _extends$l() {
|
|
3896
|
+
_extends$l = Object.assign || function(target) {
|
|
3853
3897
|
for(var i = 1; i < arguments.length; i++){
|
|
3854
3898
|
var source = arguments[i];
|
|
3855
3899
|
for(var key in source){
|
|
@@ -3860,9 +3904,9 @@ function _extends$j() {
|
|
|
3860
3904
|
}
|
|
3861
3905
|
return target;
|
|
3862
3906
|
};
|
|
3863
|
-
return _extends$
|
|
3907
|
+
return _extends$l.apply(this, arguments);
|
|
3864
3908
|
}
|
|
3865
|
-
function _inherits$
|
|
3909
|
+
function _inherits$k(subClass, superClass) {
|
|
3866
3910
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3867
3911
|
throw new TypeError("Super expression must either be null or a function");
|
|
3868
3912
|
}
|
|
@@ -3873,23 +3917,23 @@ function _inherits$i(subClass, superClass) {
|
|
|
3873
3917
|
configurable: true
|
|
3874
3918
|
}
|
|
3875
3919
|
});
|
|
3876
|
-
if (superClass) _set_prototype_of$
|
|
3920
|
+
if (superClass) _set_prototype_of$k(subClass, superClass);
|
|
3877
3921
|
}
|
|
3878
|
-
function _set_prototype_of$
|
|
3879
|
-
_set_prototype_of$
|
|
3922
|
+
function _set_prototype_of$k(o, p) {
|
|
3923
|
+
_set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
3880
3924
|
o.__proto__ = p;
|
|
3881
3925
|
return o;
|
|
3882
3926
|
};
|
|
3883
|
-
return _set_prototype_of$
|
|
3927
|
+
return _set_prototype_of$k(o, p);
|
|
3884
3928
|
}
|
|
3885
3929
|
/**
|
|
3886
3930
|
* 更多控件
|
|
3887
3931
|
* @category Control
|
|
3888
3932
|
*/ var More = /*#__PURE__*/ function(Control) {
|
|
3889
|
-
_inherits$
|
|
3933
|
+
_inherits$k(More, Control);
|
|
3890
3934
|
function More(options) {
|
|
3891
3935
|
var _this;
|
|
3892
|
-
_this = Control.call(this, _extends$
|
|
3936
|
+
_this = Control.call(this, _extends$l({}, options, {
|
|
3893
3937
|
tagName: 'span',
|
|
3894
3938
|
controlType: 'button',
|
|
3895
3939
|
classNameSuffix: 'more'
|
|
@@ -3933,11 +3977,13 @@ function _set_prototype_of$i(o, p) {
|
|
|
3933
3977
|
/**
|
|
3934
3978
|
* 添加
|
|
3935
3979
|
* @param control
|
|
3936
|
-
*/ _proto.add = function add(key, part, control) {
|
|
3980
|
+
*/ _proto.add = function add(key, part, control, props) {
|
|
3937
3981
|
this.list.unshift({
|
|
3938
3982
|
part: part,
|
|
3939
3983
|
key: key,
|
|
3940
|
-
control: control
|
|
3984
|
+
control: control,
|
|
3985
|
+
width: props.width,
|
|
3986
|
+
height: props.height
|
|
3941
3987
|
});
|
|
3942
3988
|
};
|
|
3943
3989
|
/**
|
|
@@ -4083,6 +4129,26 @@ function debounce(func, wait) {
|
|
|
4083
4129
|
(_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);
|
|
4084
4130
|
});
|
|
4085
4131
|
// =======================================================
|
|
4132
|
+
// 语音广播
|
|
4133
|
+
// =======================================================
|
|
4134
|
+
theme.on(EVENTS.broadcastChange, function(active) {
|
|
4135
|
+
var _theme_controls, _theme_controls_broadcastControl, _theme_controls1;
|
|
4136
|
+
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)) {
|
|
4137
|
+
var _theme_controls_broadcastControl1, _theme_controls2;
|
|
4138
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_broadcastControl1 = _theme_controls2.broadcastControl) == null ? void 0 : _theme_controls_broadcastControl1.emit(EVENTS.broadcastChange, active);
|
|
4139
|
+
}
|
|
4140
|
+
});
|
|
4141
|
+
// =======================================================
|
|
4142
|
+
// AI对话框
|
|
4143
|
+
// =======================================================
|
|
4144
|
+
theme.on(EVENTS.aichatChange, function(active) {
|
|
4145
|
+
var _theme_controls, _theme_controls_aiChatControl, _theme_controls1;
|
|
4146
|
+
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)) {
|
|
4147
|
+
var _theme_controls_aiChatControl1, _theme_controls2;
|
|
4148
|
+
(_theme_controls2 = theme.controls) == null ? void 0 : (_theme_controls_aiChatControl1 = _theme_controls2.aiChatControl) == null ? void 0 : _theme_controls_aiChatControl1.emit(EVENTS.aichatChange, active);
|
|
4149
|
+
}
|
|
4150
|
+
});
|
|
4151
|
+
// =======================================================
|
|
4086
4152
|
// 录制
|
|
4087
4153
|
// =======================================================
|
|
4088
4154
|
theme.on(EVENTS.recordingChange, function(recording) {
|
|
@@ -4178,7 +4244,7 @@ function debounce(func, wait) {
|
|
|
4178
4244
|
*
|
|
4179
4245
|
* @param theme - Theme
|
|
4180
4246
|
*/ function _controlEventemitter(theme) {
|
|
4181
|
-
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;
|
|
4247
|
+
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;
|
|
4182
4248
|
// Controls
|
|
4183
4249
|
if (theme._recFooter) {
|
|
4184
4250
|
theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
|
|
@@ -4271,8 +4337,26 @@ function debounce(func, wait) {
|
|
|
4271
4337
|
theme.emit(EVENTS.control.talkDestroy);
|
|
4272
4338
|
});
|
|
4273
4339
|
}
|
|
4340
|
+
// 语音广播控件
|
|
4341
|
+
if ((_theme_controls5 = theme.controls) == null ? void 0 : _theme_controls5.broadcastControl) {
|
|
4342
|
+
theme.controls.broadcastControl.on(EVENTS.control.broadcastChange, function(active) {
|
|
4343
|
+
theme.emit(EVENTS.control.broadcastChange, active);
|
|
4344
|
+
});
|
|
4345
|
+
theme.controls.broadcastControl.on(EVENTS.control.broadcastDestroy, function() {
|
|
4346
|
+
theme.emit(EVENTS.control.broadcastDestroy);
|
|
4347
|
+
});
|
|
4348
|
+
}
|
|
4349
|
+
// AI对话框
|
|
4350
|
+
if ((_theme_controls6 = theme.controls) == null ? void 0 : _theme_controls6.aiChatControl) {
|
|
4351
|
+
theme.controls.aiChatControl.on(EVENTS.control.aichatChange, function(active) {
|
|
4352
|
+
theme.emit(EVENTS.control.aichatChange, active);
|
|
4353
|
+
});
|
|
4354
|
+
theme.controls.aiChatControl.on(EVENTS.control.aichatDestroy, function() {
|
|
4355
|
+
theme.emit(EVENTS.control.aichatDestroy);
|
|
4356
|
+
});
|
|
4357
|
+
}
|
|
4274
4358
|
// 缩放控件
|
|
4275
|
-
if ((
|
|
4359
|
+
if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
|
|
4276
4360
|
theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
|
|
4277
4361
|
if (theme.zoom !== value) {
|
|
4278
4362
|
theme.zoom = value;
|
|
@@ -4294,7 +4378,7 @@ function debounce(func, wait) {
|
|
|
4294
4378
|
});
|
|
4295
4379
|
}
|
|
4296
4380
|
// 清晰度控件
|
|
4297
|
-
if ((
|
|
4381
|
+
if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
|
|
4298
4382
|
theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
|
|
4299
4383
|
theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
|
|
4300
4384
|
theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
|
|
@@ -4307,7 +4391,7 @@ function debounce(func, wait) {
|
|
|
4307
4391
|
});
|
|
4308
4392
|
}
|
|
4309
4393
|
// 倍速控件
|
|
4310
|
-
if ((
|
|
4394
|
+
if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
|
|
4311
4395
|
theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
|
|
4312
4396
|
theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
|
|
4313
4397
|
theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
|
|
@@ -4320,7 +4404,7 @@ function debounce(func, wait) {
|
|
|
4320
4404
|
});
|
|
4321
4405
|
}
|
|
4322
4406
|
// 截图控件
|
|
4323
|
-
if ((
|
|
4407
|
+
if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
|
|
4324
4408
|
theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
|
|
4325
4409
|
theme.emit(EVENTS.control.capturePicture, options);
|
|
4326
4410
|
});
|
|
@@ -4329,25 +4413,25 @@ function debounce(func, wait) {
|
|
|
4329
4413
|
});
|
|
4330
4414
|
}
|
|
4331
4415
|
// 全屏控件
|
|
4332
|
-
if ((
|
|
4416
|
+
if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
|
|
4333
4417
|
theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
|
|
4334
4418
|
theme.emit(EVENTS.control.fullscreenDestroy);
|
|
4335
4419
|
});
|
|
4336
4420
|
}
|
|
4337
4421
|
// 全局全屏控件
|
|
4338
|
-
if ((
|
|
4422
|
+
if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
|
|
4339
4423
|
theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
|
|
4340
4424
|
theme.emit(EVENTS.control.globalFullscreenDestroy);
|
|
4341
4425
|
});
|
|
4342
4426
|
}
|
|
4343
4427
|
// 设备信息控件
|
|
4344
|
-
if ((
|
|
4428
|
+
if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
|
|
4345
4429
|
theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
|
|
4346
4430
|
theme.emit(EVENTS.control.deviceDestroy);
|
|
4347
4431
|
});
|
|
4348
4432
|
}
|
|
4349
4433
|
// 回放类型切换控件
|
|
4350
|
-
if ((
|
|
4434
|
+
if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
|
|
4351
4435
|
// prettier-ignore
|
|
4352
4436
|
theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
|
|
4353
4437
|
if (theme.recType !== type) {
|
|
@@ -4368,7 +4452,7 @@ function debounce(func, wait) {
|
|
|
4368
4452
|
});
|
|
4369
4453
|
}
|
|
4370
4454
|
// 时间轴控件
|
|
4371
|
-
if ((
|
|
4455
|
+
if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
|
|
4372
4456
|
theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
|
|
4373
4457
|
theme.emit(EVENTS.control.timeLineChange, date);
|
|
4374
4458
|
});
|
|
@@ -4385,7 +4469,7 @@ function debounce(func, wait) {
|
|
|
4385
4469
|
});
|
|
4386
4470
|
}
|
|
4387
4471
|
// 日历控件
|
|
4388
|
-
if ((
|
|
4472
|
+
if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
|
|
4389
4473
|
theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
|
|
4390
4474
|
theme.emit(EVENTS.control.datePanelOpenChange, open, date);
|
|
4391
4475
|
});
|
|
@@ -4480,8 +4564,8 @@ function _create_class$5(Constructor, protoProps, staticProps) {
|
|
|
4480
4564
|
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
4481
4565
|
return Constructor;
|
|
4482
4566
|
}
|
|
4483
|
-
function _extends$
|
|
4484
|
-
_extends$
|
|
4567
|
+
function _extends$k() {
|
|
4568
|
+
_extends$k = Object.assign || function(target) {
|
|
4485
4569
|
for(var i = 1; i < arguments.length; i++){
|
|
4486
4570
|
var source = arguments[i];
|
|
4487
4571
|
for(var key in source){
|
|
@@ -4492,9 +4576,9 @@ function _extends$i() {
|
|
|
4492
4576
|
}
|
|
4493
4577
|
return target;
|
|
4494
4578
|
};
|
|
4495
|
-
return _extends$
|
|
4579
|
+
return _extends$k.apply(this, arguments);
|
|
4496
4580
|
}
|
|
4497
|
-
function _inherits$
|
|
4581
|
+
function _inherits$j(subClass, superClass) {
|
|
4498
4582
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
4499
4583
|
throw new TypeError("Super expression must either be null or a function");
|
|
4500
4584
|
}
|
|
@@ -4505,14 +4589,14 @@ function _inherits$h(subClass, superClass) {
|
|
|
4505
4589
|
configurable: true
|
|
4506
4590
|
}
|
|
4507
4591
|
});
|
|
4508
|
-
if (superClass) _set_prototype_of$
|
|
4592
|
+
if (superClass) _set_prototype_of$j(subClass, superClass);
|
|
4509
4593
|
}
|
|
4510
|
-
function _set_prototype_of$
|
|
4511
|
-
_set_prototype_of$
|
|
4594
|
+
function _set_prototype_of$j(o, p) {
|
|
4595
|
+
_set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
4512
4596
|
o.__proto__ = p;
|
|
4513
4597
|
return o;
|
|
4514
4598
|
};
|
|
4515
|
-
return _set_prototype_of$
|
|
4599
|
+
return _set_prototype_of$j(o, p);
|
|
4516
4600
|
}
|
|
4517
4601
|
var ZOOM_DEFAULT_OPTIONS = {
|
|
4518
4602
|
open: false,
|
|
@@ -4522,10 +4606,10 @@ var ZOOM_DEFAULT_OPTIONS = {
|
|
|
4522
4606
|
* 电子放大控件
|
|
4523
4607
|
* @category Control
|
|
4524
4608
|
*/ var Zoom$1 = /*#__PURE__*/ function(Control) {
|
|
4525
|
-
_inherits$
|
|
4609
|
+
_inherits$j(Zoom, Control);
|
|
4526
4610
|
function Zoom(options) {
|
|
4527
4611
|
var _this;
|
|
4528
|
-
_this = Control.call(this, _extends$
|
|
4612
|
+
_this = Control.call(this, _extends$k({}, options, {
|
|
4529
4613
|
tagName: 'span',
|
|
4530
4614
|
controlType: 'button',
|
|
4531
4615
|
classNameSuffix: 'zoom'
|
|
@@ -5382,8 +5466,8 @@ function requireDist$1 () {
|
|
|
5382
5466
|
var distExports$1 = requireDist$1();
|
|
5383
5467
|
var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
|
|
5384
5468
|
|
|
5385
|
-
function _extends$
|
|
5386
|
-
_extends$
|
|
5469
|
+
function _extends$j() {
|
|
5470
|
+
_extends$j = Object.assign || function(target) {
|
|
5387
5471
|
for(var i = 1; i < arguments.length; i++){
|
|
5388
5472
|
var source = arguments[i];
|
|
5389
5473
|
for(var key in source){
|
|
@@ -5394,10 +5478,10 @@ function _extends$h() {
|
|
|
5394
5478
|
}
|
|
5395
5479
|
return target;
|
|
5396
5480
|
};
|
|
5397
|
-
return _extends$
|
|
5481
|
+
return _extends$j.apply(this, arguments);
|
|
5398
5482
|
}
|
|
5399
5483
|
function __zoom(theme, container, options) {
|
|
5400
|
-
theme.zoomUtil = new Zoom(container, _extends$
|
|
5484
|
+
theme.zoomUtil = new Zoom(container, _extends$j({}, options || {}, {
|
|
5401
5485
|
min: 1,
|
|
5402
5486
|
onChange: function(zoom, reset) {
|
|
5403
5487
|
if (zoom !== theme._zoom) {
|
|
@@ -5415,7 +5499,7 @@ function __zoom(theme, container, options) {
|
|
|
5415
5499
|
}));
|
|
5416
5500
|
}
|
|
5417
5501
|
|
|
5418
|
-
function asyncGeneratorStep$
|
|
5502
|
+
function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5419
5503
|
try {
|
|
5420
5504
|
var info = gen[key](arg);
|
|
5421
5505
|
var value = info.value;
|
|
@@ -5429,22 +5513,22 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5429
5513
|
Promise.resolve(value).then(_next, _throw);
|
|
5430
5514
|
}
|
|
5431
5515
|
}
|
|
5432
|
-
function _async_to_generator$
|
|
5516
|
+
function _async_to_generator$6(fn) {
|
|
5433
5517
|
return function() {
|
|
5434
5518
|
var self = this, args = arguments;
|
|
5435
5519
|
return new Promise(function(resolve, reject) {
|
|
5436
5520
|
var gen = fn.apply(self, args);
|
|
5437
5521
|
function _next(value) {
|
|
5438
|
-
asyncGeneratorStep$
|
|
5522
|
+
asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
|
|
5439
5523
|
}
|
|
5440
5524
|
function _throw(err) {
|
|
5441
|
-
asyncGeneratorStep$
|
|
5525
|
+
asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5442
5526
|
}
|
|
5443
5527
|
_next(undefined);
|
|
5444
5528
|
});
|
|
5445
5529
|
};
|
|
5446
5530
|
}
|
|
5447
|
-
function _ts_generator$
|
|
5531
|
+
function _ts_generator$6(thisArg, body) {
|
|
5448
5532
|
var f, y, t, _ = {
|
|
5449
5533
|
label: 0,
|
|
5450
5534
|
sent: function() {
|
|
@@ -5536,9 +5620,9 @@ function _ts_generator$4(thisArg, body) {
|
|
|
5536
5620
|
}
|
|
5537
5621
|
}
|
|
5538
5622
|
function getThemeDataByTemplate(theme, id) {
|
|
5539
|
-
return _async_to_generator$
|
|
5623
|
+
return _async_to_generator$6(function() {
|
|
5540
5624
|
var _theme_options_token_httpToken, _theme_options_token, url;
|
|
5541
|
-
return _ts_generator$
|
|
5625
|
+
return _ts_generator$6(this, function(_state) {
|
|
5542
5626
|
switch(_state.label){
|
|
5543
5627
|
case 0:
|
|
5544
5628
|
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;
|
|
@@ -5547,8 +5631,8 @@ function getThemeDataByTemplate(theme, id) {
|
|
|
5547
5631
|
fetch(url, {
|
|
5548
5632
|
method: 'GET'
|
|
5549
5633
|
}).then(function(response) {
|
|
5550
|
-
return _async_to_generator$
|
|
5551
|
-
return _ts_generator$
|
|
5634
|
+
return _async_to_generator$6(function() {
|
|
5635
|
+
return _ts_generator$6(this, function(_state) {
|
|
5552
5636
|
switch(_state.label){
|
|
5553
5637
|
case 0:
|
|
5554
5638
|
return [
|
|
@@ -5593,7 +5677,7 @@ function getThemeDataByTemplate(theme, id) {
|
|
|
5593
5677
|
})();
|
|
5594
5678
|
}
|
|
5595
5679
|
|
|
5596
|
-
function asyncGeneratorStep$
|
|
5680
|
+
function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5597
5681
|
try {
|
|
5598
5682
|
var info = gen[key](arg);
|
|
5599
5683
|
var value = info.value;
|
|
@@ -5607,23 +5691,23 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5607
5691
|
Promise.resolve(value).then(_next, _throw);
|
|
5608
5692
|
}
|
|
5609
5693
|
}
|
|
5610
|
-
function _async_to_generator$
|
|
5694
|
+
function _async_to_generator$5(fn) {
|
|
5611
5695
|
return function() {
|
|
5612
5696
|
var self = this, args = arguments;
|
|
5613
5697
|
return new Promise(function(resolve, reject) {
|
|
5614
5698
|
var gen = fn.apply(self, args);
|
|
5615
5699
|
function _next(value) {
|
|
5616
|
-
asyncGeneratorStep$
|
|
5700
|
+
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
|
|
5617
5701
|
}
|
|
5618
5702
|
function _throw(err) {
|
|
5619
|
-
asyncGeneratorStep$
|
|
5703
|
+
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5620
5704
|
}
|
|
5621
5705
|
_next(undefined);
|
|
5622
5706
|
});
|
|
5623
5707
|
};
|
|
5624
5708
|
}
|
|
5625
|
-
function _extends$
|
|
5626
|
-
_extends$
|
|
5709
|
+
function _extends$i() {
|
|
5710
|
+
_extends$i = Object.assign || function(target) {
|
|
5627
5711
|
for(var i = 1; i < arguments.length; i++){
|
|
5628
5712
|
var source = arguments[i];
|
|
5629
5713
|
for(var key in source){
|
|
@@ -5634,9 +5718,9 @@ function _extends$g() {
|
|
|
5634
5718
|
}
|
|
5635
5719
|
return target;
|
|
5636
5720
|
};
|
|
5637
|
-
return _extends$
|
|
5721
|
+
return _extends$i.apply(this, arguments);
|
|
5638
5722
|
}
|
|
5639
|
-
function _ts_generator$
|
|
5723
|
+
function _ts_generator$5(thisArg, body) {
|
|
5640
5724
|
var f, y, t, _ = {
|
|
5641
5725
|
label: 0,
|
|
5642
5726
|
sent: function() {
|
|
@@ -5762,7 +5846,7 @@ function _ts_generator$3(thisArg, body) {
|
|
|
5762
5846
|
}
|
|
5763
5847
|
if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
|
|
5764
5848
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5765
|
-
recControls.push(recControls[0] ? _extends$
|
|
5849
|
+
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5766
5850
|
part: recControls[0].part
|
|
5767
5851
|
}) : item);
|
|
5768
5852
|
return false;
|
|
@@ -5785,7 +5869,7 @@ function _ts_generator$3(thisArg, body) {
|
|
|
5785
5869
|
}
|
|
5786
5870
|
if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
|
|
5787
5871
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5788
|
-
recControls.push(recControls[0] ? _extends$
|
|
5872
|
+
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5789
5873
|
part: recControls[0].part
|
|
5790
5874
|
}) : item);
|
|
5791
5875
|
return false;
|
|
@@ -5847,9 +5931,9 @@ function _filterLeftRightControls(btnList) {
|
|
|
5847
5931
|
* @param data
|
|
5848
5932
|
* @returns
|
|
5849
5933
|
*/ function getThemeData(theme, data) {
|
|
5850
|
-
return _async_to_generator$
|
|
5934
|
+
return _async_to_generator$5(function() {
|
|
5851
5935
|
var themeData, _theme_logger, template;
|
|
5852
|
-
return _ts_generator$
|
|
5936
|
+
return _ts_generator$5(this, function(_state) {
|
|
5853
5937
|
switch(_state.label){
|
|
5854
5938
|
case 0:
|
|
5855
5939
|
themeData = data;
|
|
@@ -6040,8 +6124,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
|
|
|
6040
6124
|
return Component;
|
|
6041
6125
|
}();
|
|
6042
6126
|
|
|
6043
|
-
function _extends$
|
|
6044
|
-
_extends$
|
|
6127
|
+
function _extends$h() {
|
|
6128
|
+
_extends$h = Object.assign || function(target) {
|
|
6045
6129
|
for(var i = 1; i < arguments.length; i++){
|
|
6046
6130
|
var source = arguments[i];
|
|
6047
6131
|
for(var key in source){
|
|
@@ -6052,9 +6136,9 @@ function _extends$f() {
|
|
|
6052
6136
|
}
|
|
6053
6137
|
return target;
|
|
6054
6138
|
};
|
|
6055
|
-
return _extends$
|
|
6139
|
+
return _extends$h.apply(this, arguments);
|
|
6056
6140
|
}
|
|
6057
|
-
function _inherits$
|
|
6141
|
+
function _inherits$i(subClass, superClass) {
|
|
6058
6142
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6059
6143
|
throw new TypeError("Super expression must either be null or a function");
|
|
6060
6144
|
}
|
|
@@ -6065,28 +6149,28 @@ function _inherits$g(subClass, superClass) {
|
|
|
6065
6149
|
configurable: true
|
|
6066
6150
|
}
|
|
6067
6151
|
});
|
|
6068
|
-
if (superClass) _set_prototype_of$
|
|
6152
|
+
if (superClass) _set_prototype_of$i(subClass, superClass);
|
|
6069
6153
|
}
|
|
6070
|
-
function _set_prototype_of$
|
|
6071
|
-
_set_prototype_of$
|
|
6154
|
+
function _set_prototype_of$i(o, p) {
|
|
6155
|
+
_set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6072
6156
|
o.__proto__ = p;
|
|
6073
6157
|
return o;
|
|
6074
6158
|
};
|
|
6075
|
-
return _set_prototype_of$
|
|
6159
|
+
return _set_prototype_of$i(o, p);
|
|
6076
6160
|
}
|
|
6077
6161
|
var Footer = /*#__PURE__*/ function(Component) {
|
|
6078
|
-
_inherits$
|
|
6162
|
+
_inherits$i(Footer, Component);
|
|
6079
6163
|
function Footer(options) {
|
|
6080
6164
|
if (options === void 0) options = {};
|
|
6081
|
-
return Component.call(this, _extends$
|
|
6165
|
+
return Component.call(this, _extends$h({}, options, {
|
|
6082
6166
|
cType: 'footer'
|
|
6083
6167
|
})) || this;
|
|
6084
6168
|
}
|
|
6085
6169
|
return Footer;
|
|
6086
6170
|
}(Component);
|
|
6087
6171
|
|
|
6088
|
-
function _extends$
|
|
6089
|
-
_extends$
|
|
6172
|
+
function _extends$g() {
|
|
6173
|
+
_extends$g = Object.assign || function(target) {
|
|
6090
6174
|
for(var i = 1; i < arguments.length; i++){
|
|
6091
6175
|
var source = arguments[i];
|
|
6092
6176
|
for(var key in source){
|
|
@@ -6097,9 +6181,9 @@ function _extends$e() {
|
|
|
6097
6181
|
}
|
|
6098
6182
|
return target;
|
|
6099
6183
|
};
|
|
6100
|
-
return _extends$
|
|
6184
|
+
return _extends$g.apply(this, arguments);
|
|
6101
6185
|
}
|
|
6102
|
-
function _inherits$
|
|
6186
|
+
function _inherits$h(subClass, superClass) {
|
|
6103
6187
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6104
6188
|
throw new TypeError("Super expression must either be null or a function");
|
|
6105
6189
|
}
|
|
@@ -6110,20 +6194,20 @@ function _inherits$f(subClass, superClass) {
|
|
|
6110
6194
|
configurable: true
|
|
6111
6195
|
}
|
|
6112
6196
|
});
|
|
6113
|
-
if (superClass) _set_prototype_of$
|
|
6197
|
+
if (superClass) _set_prototype_of$h(subClass, superClass);
|
|
6114
6198
|
}
|
|
6115
|
-
function _set_prototype_of$
|
|
6116
|
-
_set_prototype_of$
|
|
6199
|
+
function _set_prototype_of$h(o, p) {
|
|
6200
|
+
_set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6117
6201
|
o.__proto__ = p;
|
|
6118
6202
|
return o;
|
|
6119
6203
|
};
|
|
6120
|
-
return _set_prototype_of$
|
|
6204
|
+
return _set_prototype_of$h(o, p);
|
|
6121
6205
|
}
|
|
6122
6206
|
var Header = /*#__PURE__*/ function(Component) {
|
|
6123
|
-
_inherits$
|
|
6207
|
+
_inherits$h(Header, Component);
|
|
6124
6208
|
function Header(options) {
|
|
6125
6209
|
if (options === void 0) options = {};
|
|
6126
|
-
return Component.call(this, _extends$
|
|
6210
|
+
return Component.call(this, _extends$g({}, options, {
|
|
6127
6211
|
cType: 'header'
|
|
6128
6212
|
})) || this;
|
|
6129
6213
|
}
|
|
@@ -6289,8 +6373,8 @@ function interactiveHF($container, second, callback) {
|
|
|
6289
6373
|
};
|
|
6290
6374
|
}
|
|
6291
6375
|
|
|
6292
|
-
function _extends$
|
|
6293
|
-
_extends$
|
|
6376
|
+
function _extends$f() {
|
|
6377
|
+
_extends$f = Object.assign || function(target) {
|
|
6294
6378
|
for(var i = 1; i < arguments.length; i++){
|
|
6295
6379
|
var source = arguments[i];
|
|
6296
6380
|
for(var key in source){
|
|
@@ -6301,9 +6385,9 @@ function _extends$d() {
|
|
|
6301
6385
|
}
|
|
6302
6386
|
return target;
|
|
6303
6387
|
};
|
|
6304
|
-
return _extends$
|
|
6388
|
+
return _extends$f.apply(this, arguments);
|
|
6305
6389
|
}
|
|
6306
|
-
function _inherits$
|
|
6390
|
+
function _inherits$g(subClass, superClass) {
|
|
6307
6391
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6308
6392
|
throw new TypeError("Super expression must either be null or a function");
|
|
6309
6393
|
}
|
|
@@ -6314,23 +6398,23 @@ function _inherits$e(subClass, superClass) {
|
|
|
6314
6398
|
configurable: true
|
|
6315
6399
|
}
|
|
6316
6400
|
});
|
|
6317
|
-
if (superClass) _set_prototype_of$
|
|
6401
|
+
if (superClass) _set_prototype_of$g(subClass, superClass);
|
|
6318
6402
|
}
|
|
6319
|
-
function _set_prototype_of$
|
|
6320
|
-
_set_prototype_of$
|
|
6403
|
+
function _set_prototype_of$g(o, p) {
|
|
6404
|
+
_set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6321
6405
|
o.__proto__ = p;
|
|
6322
6406
|
return o;
|
|
6323
6407
|
};
|
|
6324
|
-
return _set_prototype_of$
|
|
6408
|
+
return _set_prototype_of$g(o, p);
|
|
6325
6409
|
}
|
|
6326
6410
|
/**
|
|
6327
6411
|
* 全局全屏
|
|
6328
6412
|
* 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
|
|
6329
6413
|
* @category Control
|
|
6330
6414
|
*/ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
|
|
6331
|
-
_inherits$
|
|
6415
|
+
_inherits$g(GlobalFullscreen, Fullscreen);
|
|
6332
6416
|
function GlobalFullscreen(options) {
|
|
6333
|
-
return Fullscreen.call(this, _extends$
|
|
6417
|
+
return Fullscreen.call(this, _extends$f({}, options, {
|
|
6334
6418
|
controlType: 'button',
|
|
6335
6419
|
classNameSuffix: 'global-fullscreen'
|
|
6336
6420
|
})) || this;
|
|
@@ -6361,8 +6445,8 @@ function _set_prototype_of$e(o, p) {
|
|
|
6361
6445
|
return GlobalFullscreen;
|
|
6362
6446
|
}(Fullscreen);
|
|
6363
6447
|
|
|
6364
|
-
function _extends$
|
|
6365
|
-
_extends$
|
|
6448
|
+
function _extends$e() {
|
|
6449
|
+
_extends$e = Object.assign || function(target) {
|
|
6366
6450
|
for(var i = 1; i < arguments.length; i++){
|
|
6367
6451
|
var source = arguments[i];
|
|
6368
6452
|
for(var key in source){
|
|
@@ -6373,9 +6457,9 @@ function _extends$c() {
|
|
|
6373
6457
|
}
|
|
6374
6458
|
return target;
|
|
6375
6459
|
};
|
|
6376
|
-
return _extends$
|
|
6460
|
+
return _extends$e.apply(this, arguments);
|
|
6377
6461
|
}
|
|
6378
|
-
function _inherits$
|
|
6462
|
+
function _inherits$f(subClass, superClass) {
|
|
6379
6463
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6380
6464
|
throw new TypeError("Super expression must either be null or a function");
|
|
6381
6465
|
}
|
|
@@ -6386,23 +6470,23 @@ function _inherits$d(subClass, superClass) {
|
|
|
6386
6470
|
configurable: true
|
|
6387
6471
|
}
|
|
6388
6472
|
});
|
|
6389
|
-
if (superClass) _set_prototype_of$
|
|
6473
|
+
if (superClass) _set_prototype_of$f(subClass, superClass);
|
|
6390
6474
|
}
|
|
6391
|
-
function _set_prototype_of$
|
|
6392
|
-
_set_prototype_of$
|
|
6475
|
+
function _set_prototype_of$f(o, p) {
|
|
6476
|
+
_set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6393
6477
|
o.__proto__ = p;
|
|
6394
6478
|
return o;
|
|
6395
6479
|
};
|
|
6396
|
-
return _set_prototype_of$
|
|
6480
|
+
return _set_prototype_of$f(o, p);
|
|
6397
6481
|
}
|
|
6398
6482
|
/**
|
|
6399
6483
|
* 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
|
|
6400
6484
|
* @category Control
|
|
6401
6485
|
*/ var CapturePicture = /*#__PURE__*/ function(Control) {
|
|
6402
|
-
_inherits$
|
|
6486
|
+
_inherits$f(CapturePicture, Control);
|
|
6403
6487
|
function CapturePicture(options) {
|
|
6404
6488
|
var _this;
|
|
6405
|
-
_this = Control.call(this, _extends$
|
|
6489
|
+
_this = Control.call(this, _extends$e({}, options, {
|
|
6406
6490
|
tagName: 'span',
|
|
6407
6491
|
classNameSuffix: 'capture-picture'
|
|
6408
6492
|
})) || this, _this._timer = null;
|
|
@@ -7411,8 +7495,8 @@ function _create_class$4(Constructor, protoProps, staticProps) {
|
|
|
7411
7495
|
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
7412
7496
|
return Constructor;
|
|
7413
7497
|
}
|
|
7414
|
-
function _extends$
|
|
7415
|
-
_extends$
|
|
7498
|
+
function _extends$d() {
|
|
7499
|
+
_extends$d = Object.assign || function(target) {
|
|
7416
7500
|
for(var i = 1; i < arguments.length; i++){
|
|
7417
7501
|
var source = arguments[i];
|
|
7418
7502
|
for(var key in source){
|
|
@@ -7423,9 +7507,9 @@ function _extends$b() {
|
|
|
7423
7507
|
}
|
|
7424
7508
|
return target;
|
|
7425
7509
|
};
|
|
7426
|
-
return _extends$
|
|
7510
|
+
return _extends$d.apply(this, arguments);
|
|
7427
7511
|
}
|
|
7428
|
-
function _inherits$
|
|
7512
|
+
function _inherits$e(subClass, superClass) {
|
|
7429
7513
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7430
7514
|
throw new TypeError("Super expression must either be null or a function");
|
|
7431
7515
|
}
|
|
@@ -7436,23 +7520,23 @@ function _inherits$c(subClass, superClass) {
|
|
|
7436
7520
|
configurable: true
|
|
7437
7521
|
}
|
|
7438
7522
|
});
|
|
7439
|
-
if (superClass) _set_prototype_of$
|
|
7523
|
+
if (superClass) _set_prototype_of$e(subClass, superClass);
|
|
7440
7524
|
}
|
|
7441
|
-
function _set_prototype_of$
|
|
7442
|
-
_set_prototype_of$
|
|
7525
|
+
function _set_prototype_of$e(o, p) {
|
|
7526
|
+
_set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7443
7527
|
o.__proto__ = p;
|
|
7444
7528
|
return o;
|
|
7445
7529
|
};
|
|
7446
|
-
return _set_prototype_of$
|
|
7530
|
+
return _set_prototype_of$e(o, p);
|
|
7447
7531
|
}
|
|
7448
7532
|
/**
|
|
7449
7533
|
* 云台控件
|
|
7450
7534
|
* @category Control
|
|
7451
7535
|
*/ var Ptz = /*#__PURE__*/ function(Control) {
|
|
7452
|
-
_inherits$
|
|
7536
|
+
_inherits$e(Ptz, Control);
|
|
7453
7537
|
function Ptz(options) {
|
|
7454
7538
|
var _this;
|
|
7455
|
-
_this = Control.call(this, _extends$
|
|
7539
|
+
_this = Control.call(this, _extends$d({}, options, {
|
|
7456
7540
|
tagName: 'span',
|
|
7457
7541
|
controlType: 'button',
|
|
7458
7542
|
classNameSuffix: 'ptz'
|
|
@@ -7495,7 +7579,7 @@ function _set_prototype_of$c(o, p) {
|
|
|
7495
7579
|
this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
|
|
7496
7580
|
this.$panel.appendChild(this.$turntable);
|
|
7497
7581
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
7498
|
-
this._ptzControl = new distExports.Ptz(this.$turntable, _extends$
|
|
7582
|
+
this._ptzControl = new distExports.Ptz(this.$turntable, _extends$d({}, this._options, {
|
|
7499
7583
|
onSpeedChange: this._onSpeedChange.bind(this),
|
|
7500
7584
|
onDirection: this._onDirection.bind(this)
|
|
7501
7585
|
}));
|
|
@@ -7504,7 +7588,7 @@ function _set_prototype_of$c(o, p) {
|
|
|
7504
7588
|
};
|
|
7505
7589
|
_proto.renderMobileExtend = function renderMobileExtend($container) {
|
|
7506
7590
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
7507
|
-
if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$
|
|
7591
|
+
if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$d({}, this._options, {
|
|
7508
7592
|
onSpeedChange: this._onSpeedChange.bind(this),
|
|
7509
7593
|
onDirection: this._onDirection.bind(this)
|
|
7510
7594
|
}));
|
|
@@ -7607,8 +7691,8 @@ function _create_class$3(Constructor, protoProps, staticProps) {
|
|
|
7607
7691
|
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
7608
7692
|
return Constructor;
|
|
7609
7693
|
}
|
|
7610
|
-
function _extends$
|
|
7611
|
-
_extends$
|
|
7694
|
+
function _extends$c() {
|
|
7695
|
+
_extends$c = Object.assign || function(target) {
|
|
7612
7696
|
for(var i = 1; i < arguments.length; i++){
|
|
7613
7697
|
var source = arguments[i];
|
|
7614
7698
|
for(var key in source){
|
|
@@ -7619,9 +7703,9 @@ function _extends$a() {
|
|
|
7619
7703
|
}
|
|
7620
7704
|
return target;
|
|
7621
7705
|
};
|
|
7622
|
-
return _extends$
|
|
7706
|
+
return _extends$c.apply(this, arguments);
|
|
7623
7707
|
}
|
|
7624
|
-
function _inherits$
|
|
7708
|
+
function _inherits$d(subClass, superClass) {
|
|
7625
7709
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7626
7710
|
throw new TypeError("Super expression must either be null or a function");
|
|
7627
7711
|
}
|
|
@@ -7632,127 +7716,635 @@ function _inherits$b(subClass, superClass) {
|
|
|
7632
7716
|
configurable: true
|
|
7633
7717
|
}
|
|
7634
7718
|
});
|
|
7635
|
-
if (superClass) _set_prototype_of$
|
|
7719
|
+
if (superClass) _set_prototype_of$d(subClass, superClass);
|
|
7636
7720
|
}
|
|
7637
|
-
function _set_prototype_of$
|
|
7638
|
-
_set_prototype_of$
|
|
7721
|
+
function _set_prototype_of$d(o, p) {
|
|
7722
|
+
_set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7639
7723
|
o.__proto__ = p;
|
|
7640
7724
|
return o;
|
|
7641
7725
|
};
|
|
7642
|
-
return _set_prototype_of$
|
|
7726
|
+
return _set_prototype_of$d(o, p);
|
|
7727
|
+
}
|
|
7728
|
+
var RECORD_DEFAULT_OPTIONS = {
|
|
7729
|
+
maxDuration: 3600
|
|
7730
|
+
};
|
|
7731
|
+
/**
|
|
7732
|
+
* 录制控件,点击开始录制,再次点击停止录制,
|
|
7733
|
+
* 录制开始到结束会依次触发 `startRecord` 和 `stopRecord` 事件
|
|
7734
|
+
*
|
|
7735
|
+
* 注意:
|
|
7736
|
+
* 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
|
|
7737
|
+
* 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
|
|
7738
|
+
* @category Control
|
|
7739
|
+
*/ var Record = /*#__PURE__*/ function(Control) {
|
|
7740
|
+
_inherits$d(Record, Control);
|
|
7741
|
+
function Record(options) {
|
|
7742
|
+
var _this;
|
|
7743
|
+
_this = Control.call(this, _extends$c({}, options, {
|
|
7744
|
+
tagName: 'span',
|
|
7745
|
+
controlType: 'button',
|
|
7746
|
+
classNameSuffix: 'record'
|
|
7747
|
+
})) || this, /** 计时秒 */ _this._seconds = 0;
|
|
7748
|
+
_this._options = Object.assign({}, RECORD_DEFAULT_OPTIONS, options);
|
|
7749
|
+
_this._render();
|
|
7750
|
+
return _this;
|
|
7751
|
+
}
|
|
7752
|
+
var _proto = Record.prototype;
|
|
7753
|
+
/**
|
|
7754
|
+
* 渲染图标
|
|
7755
|
+
*/ _proto._render = function _render() {
|
|
7756
|
+
var _this_locale;
|
|
7757
|
+
this.$container.innerHTML = IconComponents.record({
|
|
7758
|
+
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_RECORDVIDEO
|
|
7759
|
+
});
|
|
7760
|
+
};
|
|
7761
|
+
/**
|
|
7762
|
+
* 渲染计时器
|
|
7763
|
+
*/ _proto._renderTimer = function _renderTimer() {
|
|
7764
|
+
var _this = this;
|
|
7765
|
+
var _this__options_rootContainer, _this__options;
|
|
7766
|
+
this._timerNode = document.createElement('span');
|
|
7767
|
+
this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
|
|
7768
|
+
(_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
|
|
7769
|
+
this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
|
|
7770
|
+
var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
|
|
7771
|
+
this._timer = setInterval(function() {
|
|
7772
|
+
_this._seconds++;
|
|
7773
|
+
if (_this._seconds >= _this._options.maxDuration) {
|
|
7774
|
+
// 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
|
|
7775
|
+
_this._destroyTimer();
|
|
7776
|
+
return;
|
|
7777
|
+
}
|
|
7778
|
+
if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
|
|
7779
|
+
}, 1000);
|
|
7780
|
+
};
|
|
7781
|
+
_proto.reset = function reset() {
|
|
7782
|
+
if (this.active) {
|
|
7783
|
+
this.active = false;
|
|
7784
|
+
Control.prototype.reset.call(this);
|
|
7785
|
+
}
|
|
7786
|
+
};
|
|
7787
|
+
_proto.destroy = function destroy() {
|
|
7788
|
+
this._destroyTimer();
|
|
7789
|
+
Control.prototype.destroy.call(this);
|
|
7790
|
+
};
|
|
7791
|
+
/**
|
|
7792
|
+
* 销毁定时器和销毁节点
|
|
7793
|
+
*/ _proto._destroyTimer = function _destroyTimer() {
|
|
7794
|
+
this._seconds = 0;
|
|
7795
|
+
if (this._timer) {
|
|
7796
|
+
clearInterval(this._timer);
|
|
7797
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7798
|
+
this._timer = null;
|
|
7799
|
+
}
|
|
7800
|
+
if (this._timerNode) {
|
|
7801
|
+
this._timerNode.remove();
|
|
7802
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7803
|
+
this._timerNode = null;
|
|
7804
|
+
}
|
|
7805
|
+
this._active = false;
|
|
7806
|
+
};
|
|
7807
|
+
/**
|
|
7808
|
+
* 点击 Control 会触发
|
|
7809
|
+
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
7810
|
+
this.active = !this.active;
|
|
7811
|
+
Control.prototype._onControlClick.call(this, e);
|
|
7812
|
+
};
|
|
7813
|
+
_create_class$3(Record, [
|
|
7814
|
+
{
|
|
7815
|
+
key: "active",
|
|
7816
|
+
get: /**
|
|
7817
|
+
* 是否激活
|
|
7818
|
+
*/ function get() {
|
|
7819
|
+
return this._active;
|
|
7820
|
+
},
|
|
7821
|
+
set: function set(active) {
|
|
7822
|
+
if (this._disabled && !this._active) {
|
|
7823
|
+
// 不允许禁用情况下激活
|
|
7824
|
+
return;
|
|
7825
|
+
}
|
|
7826
|
+
if (this._active !== active) {
|
|
7827
|
+
this._active = active;
|
|
7828
|
+
this._updateActiveState(active);
|
|
7829
|
+
if (this.active) {
|
|
7830
|
+
this._renderTimer();
|
|
7831
|
+
} else {
|
|
7832
|
+
this._destroyTimer();
|
|
7833
|
+
}
|
|
7834
|
+
this.emit(EVENTS.control.recordingChange, this._active);
|
|
7835
|
+
}
|
|
7836
|
+
}
|
|
7837
|
+
}
|
|
7838
|
+
]);
|
|
7839
|
+
return Record;
|
|
7840
|
+
}(Control);
|
|
7841
|
+
|
|
7842
|
+
function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
7843
|
+
try {
|
|
7844
|
+
var info = gen[key](arg);
|
|
7845
|
+
var value = info.value;
|
|
7846
|
+
} catch (error) {
|
|
7847
|
+
reject(error);
|
|
7848
|
+
return;
|
|
7849
|
+
}
|
|
7850
|
+
if (info.done) {
|
|
7851
|
+
resolve(value);
|
|
7852
|
+
} else {
|
|
7853
|
+
Promise.resolve(value).then(_next, _throw);
|
|
7854
|
+
}
|
|
7855
|
+
}
|
|
7856
|
+
function _async_to_generator$4(fn) {
|
|
7857
|
+
return function() {
|
|
7858
|
+
var self = this, args = arguments;
|
|
7859
|
+
return new Promise(function(resolve, reject) {
|
|
7860
|
+
var gen = fn.apply(self, args);
|
|
7861
|
+
function _next(value) {
|
|
7862
|
+
asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "next", value);
|
|
7863
|
+
}
|
|
7864
|
+
function _throw(err) {
|
|
7865
|
+
asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, "throw", err);
|
|
7866
|
+
}
|
|
7867
|
+
_next(undefined);
|
|
7868
|
+
});
|
|
7869
|
+
};
|
|
7870
|
+
}
|
|
7871
|
+
function _defineProperties$2(target, props) {
|
|
7872
|
+
for(var i = 0; i < props.length; i++){
|
|
7873
|
+
var descriptor = props[i];
|
|
7874
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
7875
|
+
descriptor.configurable = true;
|
|
7876
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
7877
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
7878
|
+
}
|
|
7879
|
+
}
|
|
7880
|
+
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
7881
|
+
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
7882
|
+
return Constructor;
|
|
7883
|
+
}
|
|
7884
|
+
function _extends$b() {
|
|
7885
|
+
_extends$b = Object.assign || function(target) {
|
|
7886
|
+
for(var i = 1; i < arguments.length; i++){
|
|
7887
|
+
var source = arguments[i];
|
|
7888
|
+
for(var key in source){
|
|
7889
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7890
|
+
target[key] = source[key];
|
|
7891
|
+
}
|
|
7892
|
+
}
|
|
7893
|
+
}
|
|
7894
|
+
return target;
|
|
7895
|
+
};
|
|
7896
|
+
return _extends$b.apply(this, arguments);
|
|
7897
|
+
}
|
|
7898
|
+
function _inherits$c(subClass, superClass) {
|
|
7899
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
7900
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
7901
|
+
}
|
|
7902
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
7903
|
+
constructor: {
|
|
7904
|
+
value: subClass,
|
|
7905
|
+
writable: true,
|
|
7906
|
+
configurable: true
|
|
7907
|
+
}
|
|
7908
|
+
});
|
|
7909
|
+
if (superClass) _set_prototype_of$c(subClass, superClass);
|
|
7910
|
+
}
|
|
7911
|
+
function _set_prototype_of$c(o, p) {
|
|
7912
|
+
_set_prototype_of$c = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7913
|
+
o.__proto__ = p;
|
|
7914
|
+
return o;
|
|
7915
|
+
};
|
|
7916
|
+
return _set_prototype_of$c(o, p);
|
|
7917
|
+
}
|
|
7918
|
+
function _ts_generator$4(thisArg, body) {
|
|
7919
|
+
var f, y, t, _ = {
|
|
7920
|
+
label: 0,
|
|
7921
|
+
sent: function() {
|
|
7922
|
+
if (t[0] & 1) throw t[1];
|
|
7923
|
+
return t[1];
|
|
7924
|
+
},
|
|
7925
|
+
trys: [],
|
|
7926
|
+
ops: []
|
|
7927
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
7928
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
7929
|
+
return this;
|
|
7930
|
+
}), g;
|
|
7931
|
+
function verb(n) {
|
|
7932
|
+
return function(v) {
|
|
7933
|
+
return step([
|
|
7934
|
+
n,
|
|
7935
|
+
v
|
|
7936
|
+
]);
|
|
7937
|
+
};
|
|
7938
|
+
}
|
|
7939
|
+
function step(op) {
|
|
7940
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
7941
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
7942
|
+
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;
|
|
7943
|
+
if (y = 0, t) op = [
|
|
7944
|
+
op[0] & 2,
|
|
7945
|
+
t.value
|
|
7946
|
+
];
|
|
7947
|
+
switch(op[0]){
|
|
7948
|
+
case 0:
|
|
7949
|
+
case 1:
|
|
7950
|
+
t = op;
|
|
7951
|
+
break;
|
|
7952
|
+
case 4:
|
|
7953
|
+
_.label++;
|
|
7954
|
+
return {
|
|
7955
|
+
value: op[1],
|
|
7956
|
+
done: false
|
|
7957
|
+
};
|
|
7958
|
+
case 5:
|
|
7959
|
+
_.label++;
|
|
7960
|
+
y = op[1];
|
|
7961
|
+
op = [
|
|
7962
|
+
0
|
|
7963
|
+
];
|
|
7964
|
+
continue;
|
|
7965
|
+
case 7:
|
|
7966
|
+
op = _.ops.pop();
|
|
7967
|
+
_.trys.pop();
|
|
7968
|
+
continue;
|
|
7969
|
+
default:
|
|
7970
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
7971
|
+
_ = 0;
|
|
7972
|
+
continue;
|
|
7973
|
+
}
|
|
7974
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
7975
|
+
_.label = op[1];
|
|
7976
|
+
break;
|
|
7977
|
+
}
|
|
7978
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
7979
|
+
_.label = t[1];
|
|
7980
|
+
t = op;
|
|
7981
|
+
break;
|
|
7982
|
+
}
|
|
7983
|
+
if (t && _.label < t[2]) {
|
|
7984
|
+
_.label = t[2];
|
|
7985
|
+
_.ops.push(op);
|
|
7986
|
+
break;
|
|
7987
|
+
}
|
|
7988
|
+
if (t[2]) _.ops.pop();
|
|
7989
|
+
_.trys.pop();
|
|
7990
|
+
continue;
|
|
7991
|
+
}
|
|
7992
|
+
op = body.call(thisArg, _);
|
|
7993
|
+
} catch (e) {
|
|
7994
|
+
op = [
|
|
7995
|
+
6,
|
|
7996
|
+
e
|
|
7997
|
+
];
|
|
7998
|
+
y = 0;
|
|
7999
|
+
} finally{
|
|
8000
|
+
f = t = 0;
|
|
8001
|
+
}
|
|
8002
|
+
if (op[0] & 5) throw op[1];
|
|
8003
|
+
return {
|
|
8004
|
+
value: op[0] ? op[1] : void 0,
|
|
8005
|
+
done: true
|
|
8006
|
+
};
|
|
8007
|
+
}
|
|
8008
|
+
}
|
|
8009
|
+
/**
|
|
8010
|
+
* 对讲控件
|
|
8011
|
+
*
|
|
8012
|
+
* navigator.mediaDevices.getUserMedia {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia} 返回一个 Promise 对象,
|
|
8013
|
+
* 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
|
|
8014
|
+
* promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
|
|
8015
|
+
*
|
|
8016
|
+
* @category Control
|
|
8017
|
+
*/ var Talk = /*#__PURE__*/ function(Control) {
|
|
8018
|
+
_inherits$c(Talk, Control);
|
|
8019
|
+
function Talk(options) {
|
|
8020
|
+
var _this;
|
|
8021
|
+
_this = Control.call(this, _extends$b({}, options, {
|
|
8022
|
+
tagName: 'span',
|
|
8023
|
+
controlType: 'button',
|
|
8024
|
+
classNameSuffix: 'talk'
|
|
8025
|
+
})) || this, _this._value = 0;
|
|
8026
|
+
_this._options = options;
|
|
8027
|
+
_this._render();
|
|
8028
|
+
_this.on(EVENTS.talkingChange, function(talking) {
|
|
8029
|
+
if (_this.active !== talking) {
|
|
8030
|
+
_this.active = talking;
|
|
8031
|
+
_this._render();
|
|
8032
|
+
}
|
|
8033
|
+
});
|
|
8034
|
+
_this.on(EVENTS.talkVolumeChange, function(value) {
|
|
8035
|
+
var _this__options_onChange, _this__options;
|
|
8036
|
+
_this.value = value;
|
|
8037
|
+
(_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
|
|
8038
|
+
});
|
|
8039
|
+
return _this;
|
|
8040
|
+
}
|
|
8041
|
+
var _proto = Talk.prototype;
|
|
8042
|
+
_proto._render = function _render() {
|
|
8043
|
+
var _this_locale, _this_locale1;
|
|
8044
|
+
this.$container.innerHTML = this.active ? IconComponents.talkGrowth({
|
|
8045
|
+
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_TALK
|
|
8046
|
+
}) : IconComponents.talk({
|
|
8047
|
+
title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_TALK
|
|
8048
|
+
});
|
|
8049
|
+
};
|
|
8050
|
+
_proto.reset = function reset(hide) {
|
|
8051
|
+
if (this.active) {
|
|
8052
|
+
this._value = 0;
|
|
8053
|
+
this.active = false;
|
|
8054
|
+
this._render();
|
|
8055
|
+
this.emit(EVENTS.control.talkingChange, false);
|
|
8056
|
+
Control.prototype.reset.call(this, hide);
|
|
8057
|
+
}
|
|
8058
|
+
};
|
|
8059
|
+
/**
|
|
8060
|
+
* 销毁对讲
|
|
8061
|
+
*/ _proto.destroy = function destroy() {
|
|
8062
|
+
if (this.active) {
|
|
8063
|
+
this.reset();
|
|
8064
|
+
}
|
|
8065
|
+
Control.prototype.destroy.call(this);
|
|
8066
|
+
};
|
|
8067
|
+
/**
|
|
8068
|
+
* 点击 Control 会触发
|
|
8069
|
+
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
8070
|
+
var _this = this, _superprop_get__onControlClick = function() {
|
|
8071
|
+
return Control.prototype._onControlClick;
|
|
8072
|
+
};
|
|
8073
|
+
return _async_to_generator$4(function() {
|
|
8074
|
+
return _ts_generator$4(this, function(_state) {
|
|
8075
|
+
_superprop_get__onControlClick().call(_this, e);
|
|
8076
|
+
this.active = !this.active;
|
|
8077
|
+
this.emit(EVENTS.control.talkingChange, this.active);
|
|
8078
|
+
this._render();
|
|
8079
|
+
return [
|
|
8080
|
+
2
|
|
8081
|
+
];
|
|
8082
|
+
});
|
|
8083
|
+
}).call(this);
|
|
8084
|
+
};
|
|
8085
|
+
_create_class$2(Talk, [
|
|
8086
|
+
{
|
|
8087
|
+
key: "value",
|
|
8088
|
+
get: /**
|
|
8089
|
+
* 获取当前值
|
|
8090
|
+
*/ function get() {
|
|
8091
|
+
return this._value;
|
|
8092
|
+
},
|
|
8093
|
+
set: /**
|
|
8094
|
+
* 设置当前值 [0-1]
|
|
8095
|
+
*/ function set(value) {
|
|
8096
|
+
// 没有激活状态,则不处理
|
|
8097
|
+
if (!this.active) {
|
|
8098
|
+
return;
|
|
8099
|
+
}
|
|
8100
|
+
if (value < 0 || value > 1) {
|
|
8101
|
+
return;
|
|
8102
|
+
}
|
|
8103
|
+
this._value = value;
|
|
8104
|
+
var gainType = 'silent';
|
|
8105
|
+
if (value > 0 && value < 0.25) {
|
|
8106
|
+
gainType = 'low';
|
|
8107
|
+
} else if (value >= 0.25 && value < 0.5) {
|
|
8108
|
+
gainType = 'normal';
|
|
8109
|
+
} else if (value >= 0.5 && value < 0.75) {
|
|
8110
|
+
gainType = 'high';
|
|
8111
|
+
} else if (value >= 0.75) {
|
|
8112
|
+
gainType = 'deafening';
|
|
8113
|
+
}
|
|
8114
|
+
var className = Array.from(this.$container.classList).find(function(className) {
|
|
8115
|
+
return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
|
|
8116
|
+
});
|
|
8117
|
+
if (className) this.$container.classList.remove(className);
|
|
8118
|
+
this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
|
|
8119
|
+
}
|
|
8120
|
+
}
|
|
8121
|
+
]);
|
|
8122
|
+
return Talk;
|
|
8123
|
+
}(Control);
|
|
8124
|
+
|
|
8125
|
+
function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
8126
|
+
try {
|
|
8127
|
+
var info = gen[key](arg);
|
|
8128
|
+
var value = info.value;
|
|
8129
|
+
} catch (error) {
|
|
8130
|
+
reject(error);
|
|
8131
|
+
return;
|
|
8132
|
+
}
|
|
8133
|
+
if (info.done) {
|
|
8134
|
+
resolve(value);
|
|
8135
|
+
} else {
|
|
8136
|
+
Promise.resolve(value).then(_next, _throw);
|
|
8137
|
+
}
|
|
8138
|
+
}
|
|
8139
|
+
function _async_to_generator$3(fn) {
|
|
8140
|
+
return function() {
|
|
8141
|
+
var self = this, args = arguments;
|
|
8142
|
+
return new Promise(function(resolve, reject) {
|
|
8143
|
+
var gen = fn.apply(self, args);
|
|
8144
|
+
function _next(value) {
|
|
8145
|
+
asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "next", value);
|
|
8146
|
+
}
|
|
8147
|
+
function _throw(err) {
|
|
8148
|
+
asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, "throw", err);
|
|
8149
|
+
}
|
|
8150
|
+
_next(undefined);
|
|
8151
|
+
});
|
|
8152
|
+
};
|
|
8153
|
+
}
|
|
8154
|
+
function _extends$a() {
|
|
8155
|
+
_extends$a = Object.assign || function(target) {
|
|
8156
|
+
for(var i = 1; i < arguments.length; i++){
|
|
8157
|
+
var source = arguments[i];
|
|
8158
|
+
for(var key in source){
|
|
8159
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8160
|
+
target[key] = source[key];
|
|
8161
|
+
}
|
|
8162
|
+
}
|
|
8163
|
+
}
|
|
8164
|
+
return target;
|
|
8165
|
+
};
|
|
8166
|
+
return _extends$a.apply(this, arguments);
|
|
8167
|
+
}
|
|
8168
|
+
function _inherits$b(subClass, superClass) {
|
|
8169
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
8170
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
8171
|
+
}
|
|
8172
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
8173
|
+
constructor: {
|
|
8174
|
+
value: subClass,
|
|
8175
|
+
writable: true,
|
|
8176
|
+
configurable: true
|
|
8177
|
+
}
|
|
8178
|
+
});
|
|
8179
|
+
if (superClass) _set_prototype_of$b(subClass, superClass);
|
|
8180
|
+
}
|
|
8181
|
+
function _set_prototype_of$b(o, p) {
|
|
8182
|
+
_set_prototype_of$b = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
8183
|
+
o.__proto__ = p;
|
|
8184
|
+
return o;
|
|
8185
|
+
};
|
|
8186
|
+
return _set_prototype_of$b(o, p);
|
|
8187
|
+
}
|
|
8188
|
+
function _ts_generator$3(thisArg, body) {
|
|
8189
|
+
var f, y, t, _ = {
|
|
8190
|
+
label: 0,
|
|
8191
|
+
sent: function() {
|
|
8192
|
+
if (t[0] & 1) throw t[1];
|
|
8193
|
+
return t[1];
|
|
8194
|
+
},
|
|
8195
|
+
trys: [],
|
|
8196
|
+
ops: []
|
|
8197
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
8198
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
8199
|
+
return this;
|
|
8200
|
+
}), g;
|
|
8201
|
+
function verb(n) {
|
|
8202
|
+
return function(v) {
|
|
8203
|
+
return step([
|
|
8204
|
+
n,
|
|
8205
|
+
v
|
|
8206
|
+
]);
|
|
8207
|
+
};
|
|
8208
|
+
}
|
|
8209
|
+
function step(op) {
|
|
8210
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
8211
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
8212
|
+
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;
|
|
8213
|
+
if (y = 0, t) op = [
|
|
8214
|
+
op[0] & 2,
|
|
8215
|
+
t.value
|
|
8216
|
+
];
|
|
8217
|
+
switch(op[0]){
|
|
8218
|
+
case 0:
|
|
8219
|
+
case 1:
|
|
8220
|
+
t = op;
|
|
8221
|
+
break;
|
|
8222
|
+
case 4:
|
|
8223
|
+
_.label++;
|
|
8224
|
+
return {
|
|
8225
|
+
value: op[1],
|
|
8226
|
+
done: false
|
|
8227
|
+
};
|
|
8228
|
+
case 5:
|
|
8229
|
+
_.label++;
|
|
8230
|
+
y = op[1];
|
|
8231
|
+
op = [
|
|
8232
|
+
0
|
|
8233
|
+
];
|
|
8234
|
+
continue;
|
|
8235
|
+
case 7:
|
|
8236
|
+
op = _.ops.pop();
|
|
8237
|
+
_.trys.pop();
|
|
8238
|
+
continue;
|
|
8239
|
+
default:
|
|
8240
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
8241
|
+
_ = 0;
|
|
8242
|
+
continue;
|
|
8243
|
+
}
|
|
8244
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
8245
|
+
_.label = op[1];
|
|
8246
|
+
break;
|
|
8247
|
+
}
|
|
8248
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
8249
|
+
_.label = t[1];
|
|
8250
|
+
t = op;
|
|
8251
|
+
break;
|
|
8252
|
+
}
|
|
8253
|
+
if (t && _.label < t[2]) {
|
|
8254
|
+
_.label = t[2];
|
|
8255
|
+
_.ops.push(op);
|
|
8256
|
+
break;
|
|
8257
|
+
}
|
|
8258
|
+
if (t[2]) _.ops.pop();
|
|
8259
|
+
_.trys.pop();
|
|
8260
|
+
continue;
|
|
8261
|
+
}
|
|
8262
|
+
op = body.call(thisArg, _);
|
|
8263
|
+
} catch (e) {
|
|
8264
|
+
op = [
|
|
8265
|
+
6,
|
|
8266
|
+
e
|
|
8267
|
+
];
|
|
8268
|
+
y = 0;
|
|
8269
|
+
} finally{
|
|
8270
|
+
f = t = 0;
|
|
8271
|
+
}
|
|
8272
|
+
if (op[0] & 5) throw op[1];
|
|
8273
|
+
return {
|
|
8274
|
+
value: op[0] ? op[1] : void 0,
|
|
8275
|
+
done: true
|
|
8276
|
+
};
|
|
8277
|
+
}
|
|
7643
8278
|
}
|
|
7644
|
-
var RECORD_DEFAULT_OPTIONS = {
|
|
7645
|
-
maxDuration: 3600
|
|
7646
|
-
};
|
|
7647
8279
|
/**
|
|
7648
|
-
*
|
|
7649
|
-
*
|
|
8280
|
+
* 语音广播控件
|
|
8281
|
+
*
|
|
8282
|
+
* 用于触发语音广播功能的按钮控件
|
|
7650
8283
|
*
|
|
7651
|
-
* 注意:
|
|
7652
|
-
* 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
|
|
7653
|
-
* 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
|
|
7654
8284
|
* @category Control
|
|
7655
|
-
*/ var
|
|
7656
|
-
_inherits$b(
|
|
7657
|
-
function
|
|
8285
|
+
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
8286
|
+
_inherits$b(Broadcast, Control);
|
|
8287
|
+
function Broadcast(options) {
|
|
7658
8288
|
var _this;
|
|
7659
8289
|
_this = Control.call(this, _extends$a({}, options, {
|
|
7660
8290
|
tagName: 'span',
|
|
7661
8291
|
controlType: 'button',
|
|
7662
|
-
classNameSuffix: '
|
|
7663
|
-
})) || this
|
|
7664
|
-
_this._options =
|
|
8292
|
+
classNameSuffix: 'broadcast'
|
|
8293
|
+
})) || this;
|
|
8294
|
+
_this._options = options;
|
|
7665
8295
|
_this._render();
|
|
8296
|
+
_this.on(EVENTS.broadcastChange, function(active) {
|
|
8297
|
+
if (_this.active !== active) {
|
|
8298
|
+
_this.active = active;
|
|
8299
|
+
_this._render();
|
|
8300
|
+
}
|
|
8301
|
+
});
|
|
7666
8302
|
return _this;
|
|
7667
8303
|
}
|
|
7668
|
-
var _proto =
|
|
7669
|
-
|
|
7670
|
-
* 渲染图标
|
|
7671
|
-
*/ _proto._render = function _render() {
|
|
8304
|
+
var _proto = Broadcast.prototype;
|
|
8305
|
+
_proto._render = function _render() {
|
|
7672
8306
|
var _this_locale;
|
|
7673
|
-
this.$container.innerHTML = IconComponents.
|
|
7674
|
-
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.
|
|
8307
|
+
this.$container.innerHTML = IconComponents.broadcast({
|
|
8308
|
+
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_BROADCAST
|
|
7675
8309
|
});
|
|
7676
8310
|
};
|
|
7677
|
-
|
|
7678
|
-
* 渲染计时器
|
|
7679
|
-
*/ _proto._renderTimer = function _renderTimer() {
|
|
7680
|
-
var _this = this;
|
|
7681
|
-
var _this__options_rootContainer, _this__options;
|
|
7682
|
-
this._timerNode = document.createElement('span');
|
|
7683
|
-
this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
|
|
7684
|
-
(_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
|
|
7685
|
-
this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
|
|
7686
|
-
var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
|
|
7687
|
-
this._timer = setInterval(function() {
|
|
7688
|
-
_this._seconds++;
|
|
7689
|
-
if (_this._seconds >= _this._options.maxDuration) {
|
|
7690
|
-
// 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
|
|
7691
|
-
_this._destroyTimer();
|
|
7692
|
-
return;
|
|
7693
|
-
}
|
|
7694
|
-
if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
|
|
7695
|
-
}, 1000);
|
|
7696
|
-
};
|
|
7697
|
-
_proto.reset = function reset() {
|
|
8311
|
+
_proto.reset = function reset(hide) {
|
|
7698
8312
|
if (this.active) {
|
|
7699
8313
|
this.active = false;
|
|
7700
|
-
|
|
8314
|
+
this._render();
|
|
8315
|
+
this.emit(EVENTS.control.broadcastChange, false);
|
|
8316
|
+
Control.prototype.reset.call(this, hide);
|
|
7701
8317
|
}
|
|
7702
8318
|
};
|
|
7703
|
-
_proto.destroy = function destroy() {
|
|
7704
|
-
this._destroyTimer();
|
|
7705
|
-
Control.prototype.destroy.call(this);
|
|
7706
|
-
};
|
|
7707
8319
|
/**
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
this.
|
|
7711
|
-
|
|
7712
|
-
clearInterval(this._timer);
|
|
7713
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7714
|
-
this._timer = null;
|
|
7715
|
-
}
|
|
7716
|
-
if (this._timerNode) {
|
|
7717
|
-
this._timerNode.remove();
|
|
7718
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7719
|
-
this._timerNode = null;
|
|
8320
|
+
* 销毁语音广播控件
|
|
8321
|
+
*/ _proto.destroy = function destroy() {
|
|
8322
|
+
if (this.active) {
|
|
8323
|
+
this.reset();
|
|
7720
8324
|
}
|
|
7721
|
-
this
|
|
8325
|
+
Control.prototype.destroy.call(this);
|
|
7722
8326
|
};
|
|
7723
8327
|
/**
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
this
|
|
7727
|
-
|
|
8328
|
+
* 点击 Control 会触发
|
|
8329
|
+
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
8330
|
+
var _this = this, _superprop_get__onControlClick = function() {
|
|
8331
|
+
return Control.prototype._onControlClick;
|
|
8332
|
+
};
|
|
8333
|
+
return _async_to_generator$3(function() {
|
|
8334
|
+
var _this__options_onChange, _this__options;
|
|
8335
|
+
return _ts_generator$3(this, function(_state) {
|
|
8336
|
+
_superprop_get__onControlClick().call(_this, e);
|
|
8337
|
+
this.active = !this.active;
|
|
8338
|
+
this.emit(EVENTS.control.broadcastChange, this.active);
|
|
8339
|
+
(_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
|
|
8340
|
+
this._render();
|
|
8341
|
+
return [
|
|
8342
|
+
2
|
|
8343
|
+
];
|
|
8344
|
+
});
|
|
8345
|
+
}).call(this);
|
|
7728
8346
|
};
|
|
7729
|
-
|
|
7730
|
-
{
|
|
7731
|
-
key: "active",
|
|
7732
|
-
get: /**
|
|
7733
|
-
* 是否激活
|
|
7734
|
-
*/ function get() {
|
|
7735
|
-
return this._active;
|
|
7736
|
-
},
|
|
7737
|
-
set: function set(active) {
|
|
7738
|
-
if (this._disabled && !this._active) {
|
|
7739
|
-
// 不允许禁用情况下激活
|
|
7740
|
-
return;
|
|
7741
|
-
}
|
|
7742
|
-
if (this._active !== active) {
|
|
7743
|
-
this._active = active;
|
|
7744
|
-
this._updateActiveState(active);
|
|
7745
|
-
if (this.active) {
|
|
7746
|
-
this._renderTimer();
|
|
7747
|
-
} else {
|
|
7748
|
-
this._destroyTimer();
|
|
7749
|
-
}
|
|
7750
|
-
this.emit(EVENTS.control.recordingChange, this._active);
|
|
7751
|
-
}
|
|
7752
|
-
}
|
|
7753
|
-
}
|
|
7754
|
-
]);
|
|
7755
|
-
return Record;
|
|
8347
|
+
return Broadcast;
|
|
7756
8348
|
}(Control);
|
|
7757
8349
|
|
|
7758
8350
|
function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -7784,19 +8376,6 @@ function _async_to_generator$2(fn) {
|
|
|
7784
8376
|
});
|
|
7785
8377
|
};
|
|
7786
8378
|
}
|
|
7787
|
-
function _defineProperties$2(target, props) {
|
|
7788
|
-
for(var i = 0; i < props.length; i++){
|
|
7789
|
-
var descriptor = props[i];
|
|
7790
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
7791
|
-
descriptor.configurable = true;
|
|
7792
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
7793
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
7794
|
-
}
|
|
7795
|
-
}
|
|
7796
|
-
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
7797
|
-
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
7798
|
-
return Constructor;
|
|
7799
|
-
}
|
|
7800
8379
|
function _extends$9() {
|
|
7801
8380
|
_extends$9 = Object.assign || function(target) {
|
|
7802
8381
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -7923,74 +8502,66 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7923
8502
|
}
|
|
7924
8503
|
}
|
|
7925
8504
|
/**
|
|
7926
|
-
*
|
|
8505
|
+
* AI对话框控件
|
|
7927
8506
|
*
|
|
7928
|
-
*
|
|
7929
|
-
* 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
|
|
7930
|
-
* promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
|
|
8507
|
+
* 用于触发AI对话框功能的按钮控件
|
|
7931
8508
|
*
|
|
7932
8509
|
* @category Control
|
|
7933
|
-
*/ var
|
|
7934
|
-
_inherits$a(
|
|
7935
|
-
function
|
|
8510
|
+
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
8511
|
+
_inherits$a(AIChat, Control);
|
|
8512
|
+
function AIChat(options) {
|
|
7936
8513
|
var _this;
|
|
7937
8514
|
_this = Control.call(this, _extends$9({}, options, {
|
|
7938
8515
|
tagName: 'span',
|
|
7939
8516
|
controlType: 'button',
|
|
7940
|
-
classNameSuffix: '
|
|
7941
|
-
})) || this
|
|
8517
|
+
classNameSuffix: 'aichat'
|
|
8518
|
+
})) || this;
|
|
7942
8519
|
_this._options = options;
|
|
7943
8520
|
_this._render();
|
|
7944
|
-
_this.on(EVENTS.
|
|
7945
|
-
if (_this.active !==
|
|
7946
|
-
_this.active =
|
|
8521
|
+
_this.on(EVENTS.aichatChange, function(active) {
|
|
8522
|
+
if (_this.active !== active) {
|
|
8523
|
+
_this.active = active;
|
|
7947
8524
|
_this._render();
|
|
7948
8525
|
}
|
|
7949
8526
|
});
|
|
7950
|
-
_this.on(EVENTS.talkVolumeChange, function(value) {
|
|
7951
|
-
var _this__options_onChange, _this__options;
|
|
7952
|
-
_this.value = value;
|
|
7953
|
-
(_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
|
|
7954
|
-
});
|
|
7955
8527
|
return _this;
|
|
7956
8528
|
}
|
|
7957
|
-
var _proto =
|
|
8529
|
+
var _proto = AIChat.prototype;
|
|
7958
8530
|
_proto._render = function _render() {
|
|
7959
|
-
var _this_locale
|
|
7960
|
-
this.$container.innerHTML =
|
|
7961
|
-
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.
|
|
7962
|
-
}) : IconComponents.talk({
|
|
7963
|
-
title: (_this_locale1 = this.locale) == null ? void 0 : _this_locale1.BTN_TALK
|
|
8531
|
+
var _this_locale;
|
|
8532
|
+
this.$container.innerHTML = IconComponents.aiChat({
|
|
8533
|
+
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_AICHAT
|
|
7964
8534
|
});
|
|
7965
8535
|
};
|
|
7966
8536
|
_proto.reset = function reset(hide) {
|
|
7967
8537
|
if (this.active) {
|
|
7968
|
-
this._value = 0;
|
|
7969
8538
|
this.active = false;
|
|
7970
8539
|
this._render();
|
|
7971
|
-
this.emit(EVENTS.control.
|
|
8540
|
+
this.emit(EVENTS.control.aichatChange, false);
|
|
7972
8541
|
Control.prototype.reset.call(this, hide);
|
|
7973
8542
|
}
|
|
7974
8543
|
};
|
|
7975
8544
|
/**
|
|
7976
|
-
|
|
7977
|
-
|
|
8545
|
+
* 销毁AI对话框控件
|
|
8546
|
+
*/ _proto.destroy = function destroy() {
|
|
7978
8547
|
if (this.active) {
|
|
7979
8548
|
this.reset();
|
|
7980
8549
|
}
|
|
7981
8550
|
Control.prototype.destroy.call(this);
|
|
7982
8551
|
};
|
|
7983
8552
|
/**
|
|
7984
|
-
|
|
7985
|
-
|
|
8553
|
+
* 点击 Control 会触发
|
|
8554
|
+
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
7986
8555
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
7987
8556
|
return Control.prototype._onControlClick;
|
|
7988
8557
|
};
|
|
7989
8558
|
return _async_to_generator$2(function() {
|
|
8559
|
+
var _this__options_onChange, _this__options;
|
|
7990
8560
|
return _ts_generator$2(this, function(_state) {
|
|
7991
8561
|
_superprop_get__onControlClick().call(_this, e);
|
|
7992
8562
|
this.active = !this.active;
|
|
7993
|
-
this.emit(EVENTS.control.
|
|
8563
|
+
this.emit(EVENTS.control.aichatChange, this.active);
|
|
8564
|
+
(_this__options = this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, this.active);
|
|
7994
8565
|
this._render();
|
|
7995
8566
|
return [
|
|
7996
8567
|
2
|
|
@@ -7998,44 +8569,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7998
8569
|
});
|
|
7999
8570
|
}).call(this);
|
|
8000
8571
|
};
|
|
8001
|
-
|
|
8002
|
-
{
|
|
8003
|
-
key: "value",
|
|
8004
|
-
get: /**
|
|
8005
|
-
* 获取当前值
|
|
8006
|
-
*/ function get() {
|
|
8007
|
-
return this._value;
|
|
8008
|
-
},
|
|
8009
|
-
set: /**
|
|
8010
|
-
* 设置当前值 [0-1]
|
|
8011
|
-
*/ function set(value) {
|
|
8012
|
-
// 没有激活状态,则不处理
|
|
8013
|
-
if (!this.active) {
|
|
8014
|
-
return;
|
|
8015
|
-
}
|
|
8016
|
-
if (value < 0 || value > 1) {
|
|
8017
|
-
return;
|
|
8018
|
-
}
|
|
8019
|
-
this._value = value;
|
|
8020
|
-
var gainType = 'silent';
|
|
8021
|
-
if (value > 0 && value < 0.25) {
|
|
8022
|
-
gainType = 'low';
|
|
8023
|
-
} else if (value >= 0.25 && value < 0.5) {
|
|
8024
|
-
gainType = 'normal';
|
|
8025
|
-
} else if (value >= 0.5 && value < 0.75) {
|
|
8026
|
-
gainType = 'high';
|
|
8027
|
-
} else if (value >= 0.75) {
|
|
8028
|
-
gainType = 'deafening';
|
|
8029
|
-
}
|
|
8030
|
-
var className = Array.from(this.$container.classList).find(function(className) {
|
|
8031
|
-
return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
|
|
8032
|
-
});
|
|
8033
|
-
if (className) this.$container.classList.remove(className);
|
|
8034
|
-
this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
|
|
8035
|
-
}
|
|
8036
|
-
}
|
|
8037
|
-
]);
|
|
8038
|
-
return Talk;
|
|
8572
|
+
return AIChat;
|
|
8039
8573
|
}(Control);
|
|
8040
8574
|
|
|
8041
8575
|
function _defineProperties$1(target, props) {
|
|
@@ -9028,6 +9562,8 @@ var Controls = {
|
|
|
9028
9562
|
ptz: Ptz,
|
|
9029
9563
|
record: Record,
|
|
9030
9564
|
talk: Talk,
|
|
9565
|
+
broadcast: Broadcast,
|
|
9566
|
+
aiChat: AIChat,
|
|
9031
9567
|
zoom: Zoom$1,
|
|
9032
9568
|
definition: Definition,
|
|
9033
9569
|
fullscreen: Fullscreen,
|
|
@@ -10135,7 +10671,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10135
10671
|
_inherits(Theme, EventEmitter);
|
|
10136
10672
|
function Theme(options) {
|
|
10137
10673
|
var _this;
|
|
10138
|
-
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
|
|
10674
|
+
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1, _this_options2, _this_options3;
|
|
10139
10675
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
10140
10676
|
* @since 0.0.1
|
|
10141
10677
|
* @private
|
|
@@ -10186,7 +10722,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10186
10722
|
_this.playing = true;
|
|
10187
10723
|
}
|
|
10188
10724
|
_this._initClassName();
|
|
10189
|
-
// 画布需要渲染在 this.contentControl.$
|
|
10725
|
+
// 画布需要渲染在 this.contentControl.$content 内
|
|
10190
10726
|
_this.contentControl = new Content({
|
|
10191
10727
|
getContainer: function() {
|
|
10192
10728
|
return _this.$container;
|
|
@@ -10221,7 +10757,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10221
10757
|
'flv',
|
|
10222
10758
|
'hls',
|
|
10223
10759
|
'mp4'
|
|
10224
|
-
].includes(options.type) ?
|
|
10760
|
+
].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)
|
|
10761
|
+
: (_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
10762
|
_this._addEventListener();
|
|
10226
10763
|
_themeEventemitter(_this);
|
|
10227
10764
|
return _this;
|
|
@@ -10746,138 +11283,153 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10746
11283
|
* 尺寸变化结束时 进行判断,为了节省开销
|
|
10747
11284
|
* @WARN:这里会闪一下, 原因:需要控件渲染后才知是否需要放置到 More 中,
|
|
10748
11285
|
*/ _proto._footerMoreControlShow = function _footerMoreControlShow() {
|
|
11286
|
+
this._displayMore();
|
|
11287
|
+
};
|
|
11288
|
+
_proto._displayMore = function _displayMore() {
|
|
10749
11289
|
var _this = this;
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
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
|
-
}
|
|
11290
|
+
if (this._footer) {
|
|
11291
|
+
var _this__footer_$left, _this__footer_$right;
|
|
11292
|
+
// 判断 footer 的控件是否能放置的下, 否则隐藏暂时 more 按钮
|
|
11293
|
+
var leftWidth = ((_this__footer_$left = this._footer.$left) == null ? void 0 : _this__footer_$left.clientWidth) || 0;
|
|
11294
|
+
var rightWidth = ((_this__footer_$right = this._footer.$right) == null ? void 0 : _this__footer_$right.clientWidth) || 0;
|
|
11295
|
+
// 当footer 中 left 和 right 宽度之和大于 footer 宽度,则 footer more 显示
|
|
11296
|
+
var collapseControl = this._width - leftWidth - rightWidth < 16; // 收拢控件到 More 中
|
|
11297
|
+
if (collapseControl) {
|
|
11298
|
+
var _this__footer, _this__themeData_footer, _this__themeData, _this__footerMoreControl_list, _this__footerMoreControl, _this__footerMoreControl_list1, _this__footerMoreControl1;
|
|
11299
|
+
if (!this._footerMoreControl && ((_this__footer = this._footer) == null ? void 0 : _this__footer.$right)) {
|
|
11300
|
+
this._footerMoreControl = new More({
|
|
11301
|
+
language: this.options.language,
|
|
11302
|
+
locales: this.i18n.translations,
|
|
11303
|
+
rootContainer: this.$container,
|
|
11304
|
+
getPopupContainer: function() {
|
|
11305
|
+
var _this__footer;
|
|
11306
|
+
return (_this__footer = _this._footer) == null ? void 0 : _this__footer.$right;
|
|
11307
|
+
},
|
|
11308
|
+
placement: 'tr',
|
|
11309
|
+
controls: this.controls,
|
|
11310
|
+
open: false,
|
|
11311
|
+
offset: [
|
|
11312
|
+
0,
|
|
11313
|
+
-8
|
|
11314
|
+
],
|
|
11315
|
+
wrapClassName: "" + PREFIX_CLASS + "-footer-more",
|
|
11316
|
+
onOpenChange: function(open) {
|
|
11317
|
+
_this.emit(EVENTS.control.footerMorePanelOpenChange, open);
|
|
10808
11318
|
}
|
|
10809
|
-
}
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
11319
|
+
});
|
|
11320
|
+
}
|
|
11321
|
+
//
|
|
11322
|
+
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) {
|
|
11323
|
+
var _this__footerMoreControl;
|
|
11324
|
+
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
11325
|
+
var _this_controls;
|
|
11326
|
+
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
11327
|
+
});
|
|
11328
|
+
return index === -1;
|
|
11329
|
+
});
|
|
11330
|
+
if (list.length <= 0) return;
|
|
11331
|
+
if (((_this__footerMoreControl = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
|
|
11332
|
+
// 为什么是两个, 因为More 也占用一个位置
|
|
11333
|
+
var popList = [
|
|
11334
|
+
list.pop(),
|
|
11335
|
+
list.pop()
|
|
11336
|
+
];
|
|
11337
|
+
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
11338
|
+
var item = _step.value;
|
|
11339
|
+
if (item) {
|
|
11340
|
+
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;
|
|
11341
|
+
var key = "" + item.iconId + "Control";
|
|
11342
|
+
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;
|
|
11343
|
+
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;
|
|
11344
|
+
(_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');
|
|
11345
|
+
(_this__footerMoreControl2 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls3 = this.controls) == null ? void 0 : _this_controls3[key], {
|
|
11346
|
+
width: width,
|
|
11347
|
+
height: height
|
|
11348
|
+
});
|
|
10818
11349
|
}
|
|
10819
11350
|
}
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
11351
|
+
} else if (this._footerMoreControl) {
|
|
11352
|
+
var item1 = list.pop();
|
|
11353
|
+
if (item1) {
|
|
11354
|
+
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;
|
|
11355
|
+
var key1 = "" + item1.iconId + "Control";
|
|
11356
|
+
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;
|
|
11357
|
+
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;
|
|
11358
|
+
(_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');
|
|
11359
|
+
(_this__footerMoreControl3 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl3.add(key1, item1.part, (_this_controls7 = this.controls) == null ? void 0 : _this_controls7[key1], {
|
|
11360
|
+
width: width1,
|
|
11361
|
+
height: height1
|
|
11362
|
+
});
|
|
11363
|
+
} else {
|
|
11364
|
+
return;
|
|
10827
11365
|
}
|
|
10828
|
-
}
|
|
10829
|
-
|
|
11366
|
+
}
|
|
11367
|
+
// prettier-ignore
|
|
11368
|
+
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) {
|
|
11369
|
+
return item.key;
|
|
11370
|
+
}));
|
|
11371
|
+
if (this._footerMoreControl) {
|
|
11372
|
+
// 防止 More 不存在导致死循环
|
|
11373
|
+
this._displayMore();
|
|
11374
|
+
}
|
|
11375
|
+
} else {
|
|
11376
|
+
var _this__footerMoreControl_list2, _this__footerMoreControl5, _this__footerMoreControl_list3, _this__footerMoreControl6;
|
|
11377
|
+
var offset = 50;
|
|
11378
|
+
// if (this._footerMoreControl?.list?.length && this._footerMoreControl?.list?.length > 2) {
|
|
11379
|
+
// offset = 16;
|
|
11380
|
+
// }
|
|
11381
|
+
if ((_this__footerMoreControl5 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list2 = _this__footerMoreControl5.list) == null ? void 0 : _this__footerMoreControl_list2.length) {
|
|
11382
|
+
offset = offset + this._footerMoreControl.list[0].width || 0;
|
|
11383
|
+
}
|
|
11384
|
+
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) {
|
|
11385
|
+
var _this__footerMoreControl7, _this__footerMoreControl_list4, _this__footerMoreControl8, _this__footerMoreControl_list5, _this__footerMoreControl9;
|
|
10830
11386
|
// 110 是为了保住个别控件的宽度超出已知的值, 如英文下 按钮的宽度
|
|
10831
11387
|
// 从 More 中一次移除一个控件到 header/footer 中
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
var
|
|
10836
|
-
if (item2) {
|
|
10837
|
-
var
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
var
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
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
|
-
}
|
|
11388
|
+
//
|
|
11389
|
+
var item2 = (_this__footerMoreControl7 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl7.list.shift();
|
|
11390
|
+
if (item2) {
|
|
11391
|
+
var _this__footerMoreControl10;
|
|
11392
|
+
if (item2.part === 'left') {
|
|
11393
|
+
var _item_control_resetPopupContainer, _item_control;
|
|
11394
|
+
(_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');
|
|
11395
|
+
} else if (item2.part === 'right') {
|
|
11396
|
+
var _this__footerMoreControl_list6, _this__footerMoreControl11;
|
|
11397
|
+
if (((_this__footerMoreControl11 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list6 = _this__footerMoreControl11.list) == null ? void 0 : _this__footerMoreControl_list6.length) === 0) {
|
|
11398
|
+
var _item_control_resetPopupContainer1, _item_control1;
|
|
11399
|
+
(_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');
|
|
11400
|
+
} else {
|
|
11401
|
+
var _item_control_resetPopupContainer2, _item_control2;
|
|
11402
|
+
(_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
11403
|
}
|
|
10851
|
-
(_this__footerMoreControl8 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl8.remove(item2.control);
|
|
10852
11404
|
}
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
(
|
|
11405
|
+
(_this__footerMoreControl10 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl10.remove(item2.control);
|
|
11406
|
+
}
|
|
11407
|
+
if (((_this__footerMoreControl8 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list4 = _this__footerMoreControl8.list) == null ? void 0 : _this__footerMoreControl_list4.length) === 1) {
|
|
11408
|
+
var _this__footerMoreControl12, _this__footerMoreControl_destroy, _this__footerMoreControl13;
|
|
11409
|
+
// 最后一个, 移除 More
|
|
11410
|
+
var item11 = (_this__footerMoreControl12 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl12.list.shift();
|
|
11411
|
+
if (item11) {
|
|
11412
|
+
var _this__footerMoreControl14;
|
|
11413
|
+
if (item11.part === 'left') {
|
|
11414
|
+
var _item1_control_resetPopupContainer, _item1_control;
|
|
11415
|
+
(_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');
|
|
11416
|
+
} else if (item11.part === 'right') {
|
|
11417
|
+
var _item1_control_resetPopupContainer1, _item1_control1;
|
|
11418
|
+
(_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
11419
|
}
|
|
10868
|
-
(
|
|
10869
|
-
_this._footerMoreControl = null;
|
|
11420
|
+
(_this__footerMoreControl14 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl14.remove(item11.control);
|
|
10870
11421
|
}
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
return item.key;
|
|
10874
|
-
}));
|
|
10875
|
-
displayMore();
|
|
11422
|
+
(_this__footerMoreControl13 = this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_destroy = _this__footerMoreControl13.destroy) == null ? void 0 : _this__footerMoreControl_destroy.call(_this__footerMoreControl13);
|
|
11423
|
+
this._footerMoreControl = null;
|
|
10876
11424
|
}
|
|
11425
|
+
// prettier-ignore
|
|
11426
|
+
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) {
|
|
11427
|
+
return item.key;
|
|
11428
|
+
}));
|
|
11429
|
+
this._displayMore();
|
|
10877
11430
|
}
|
|
10878
11431
|
}
|
|
10879
|
-
}
|
|
10880
|
-
displayMore();
|
|
11432
|
+
}
|
|
10881
11433
|
};
|
|
10882
11434
|
/**
|
|
10883
11435
|
* 移除事件
|
|
@@ -10955,6 +11507,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10955
11507
|
[
|
|
10956
11508
|
'ptz',
|
|
10957
11509
|
'talk',
|
|
11510
|
+
'broadcast',
|
|
10958
11511
|
'record',
|
|
10959
11512
|
'speed'
|
|
10960
11513
|
].forEach(function(key) {
|
|
@@ -11032,6 +11585,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11032
11585
|
[
|
|
11033
11586
|
'ptz',
|
|
11034
11587
|
'talk',
|
|
11588
|
+
'broadcast',
|
|
11035
11589
|
'record'
|
|
11036
11590
|
].forEach(function(key) {
|
|
11037
11591
|
var _this_controls;
|
|
@@ -11392,6 +11946,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11392
11946
|
zh: zh,
|
|
11393
11947
|
en: en
|
|
11394
11948
|
};
|
|
11395
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.
|
|
11949
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.1-beta.1';
|
|
11396
11950
|
|
|
11397
11951
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|