@ezuikit/player-theme 2.1.0-beta.8 → 2.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -40
- package/dist/constant.js +8 -2
- package/dist/index.js +1070 -514
- package/dist/index.mjs +1070 -514
- package/dist/index.umd.js +1150 -558
- package/dist/style.css +3 -1
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +60 -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,23 +3764,23 @@ 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
|
-
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3783
|
+
_this = EventEmitter.call(this) || this, _this._scaleMode = 0, _this._cleanUpResizeObserver = null, _this._originWidth = 0, _this._originHeight = 0, _this._width = 0, _this._height = 0;
|
|
3741
3784
|
_this.options = options;
|
|
3742
3785
|
_this._scaleMode = options.scaleMode || 0;
|
|
3743
3786
|
_this.$wrapper = document.createElement('div');
|
|
@@ -3755,9 +3798,10 @@ function _set_prototype_of$j(o, p) {
|
|
|
3755
3798
|
_this.on(EVENTS.videoInfo, function(originWidth, originHeight) {
|
|
3756
3799
|
_this.rerender(originWidth, originHeight);
|
|
3757
3800
|
});
|
|
3758
|
-
|
|
3801
|
+
// prettier-ignore
|
|
3802
|
+
_this._cleanUpResizeObserver = Utils.resizeObserver(_this.$wrapper, throttle(function() {
|
|
3759
3803
|
_this.rerender();
|
|
3760
|
-
});
|
|
3804
|
+
}, 20));
|
|
3761
3805
|
return _this;
|
|
3762
3806
|
}
|
|
3763
3807
|
var _proto = Content.prototype;
|
|
@@ -3790,6 +3834,7 @@ function _set_prototype_of$j(o, p) {
|
|
|
3790
3834
|
if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
|
|
3791
3835
|
objectFill = 'cover';
|
|
3792
3836
|
}
|
|
3837
|
+
//
|
|
3793
3838
|
if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
|
|
3794
3839
|
var left = (width - this._originWidth) / 2;
|
|
3795
3840
|
var top = (height - this._originHeight) / 2;
|
|
@@ -3823,6 +3868,11 @@ function _set_prototype_of$j(o, p) {
|
|
|
3823
3868
|
};
|
|
3824
3869
|
_proto.destroy = function destroy() {
|
|
3825
3870
|
var _this_$wrapper;
|
|
3871
|
+
if (this._cleanUpResizeObserver) {
|
|
3872
|
+
this._cleanUpResizeObserver.unobserve();
|
|
3873
|
+
// this._cleanUpResizeObserver.disconnect();
|
|
3874
|
+
this._cleanUpResizeObserver = null;
|
|
3875
|
+
}
|
|
3826
3876
|
if (this.$video) {
|
|
3827
3877
|
this.$video.remove();
|
|
3828
3878
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -3842,8 +3892,8 @@ function _set_prototype_of$j(o, p) {
|
|
|
3842
3892
|
return Content;
|
|
3843
3893
|
}(EventEmitter);
|
|
3844
3894
|
|
|
3845
|
-
function _extends$
|
|
3846
|
-
_extends$
|
|
3895
|
+
function _extends$l() {
|
|
3896
|
+
_extends$l = Object.assign || function(target) {
|
|
3847
3897
|
for(var i = 1; i < arguments.length; i++){
|
|
3848
3898
|
var source = arguments[i];
|
|
3849
3899
|
for(var key in source){
|
|
@@ -3854,9 +3904,9 @@ function _extends$j() {
|
|
|
3854
3904
|
}
|
|
3855
3905
|
return target;
|
|
3856
3906
|
};
|
|
3857
|
-
return _extends$
|
|
3907
|
+
return _extends$l.apply(this, arguments);
|
|
3858
3908
|
}
|
|
3859
|
-
function _inherits$
|
|
3909
|
+
function _inherits$k(subClass, superClass) {
|
|
3860
3910
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
3861
3911
|
throw new TypeError("Super expression must either be null or a function");
|
|
3862
3912
|
}
|
|
@@ -3867,23 +3917,23 @@ function _inherits$i(subClass, superClass) {
|
|
|
3867
3917
|
configurable: true
|
|
3868
3918
|
}
|
|
3869
3919
|
});
|
|
3870
|
-
if (superClass) _set_prototype_of$
|
|
3920
|
+
if (superClass) _set_prototype_of$k(subClass, superClass);
|
|
3871
3921
|
}
|
|
3872
|
-
function _set_prototype_of$
|
|
3873
|
-
_set_prototype_of$
|
|
3922
|
+
function _set_prototype_of$k(o, p) {
|
|
3923
|
+
_set_prototype_of$k = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
3874
3924
|
o.__proto__ = p;
|
|
3875
3925
|
return o;
|
|
3876
3926
|
};
|
|
3877
|
-
return _set_prototype_of$
|
|
3927
|
+
return _set_prototype_of$k(o, p);
|
|
3878
3928
|
}
|
|
3879
3929
|
/**
|
|
3880
3930
|
* 更多控件
|
|
3881
3931
|
* @category Control
|
|
3882
3932
|
*/ var More = /*#__PURE__*/ function(Control) {
|
|
3883
|
-
_inherits$
|
|
3933
|
+
_inherits$k(More, Control);
|
|
3884
3934
|
function More(options) {
|
|
3885
3935
|
var _this;
|
|
3886
|
-
_this = Control.call(this, _extends$
|
|
3936
|
+
_this = Control.call(this, _extends$l({}, options, {
|
|
3887
3937
|
tagName: 'span',
|
|
3888
3938
|
controlType: 'button',
|
|
3889
3939
|
classNameSuffix: 'more'
|
|
@@ -3927,11 +3977,13 @@ function _set_prototype_of$i(o, p) {
|
|
|
3927
3977
|
/**
|
|
3928
3978
|
* 添加
|
|
3929
3979
|
* @param control
|
|
3930
|
-
*/ _proto.add = function add(key, part, control) {
|
|
3980
|
+
*/ _proto.add = function add(key, part, control, props) {
|
|
3931
3981
|
this.list.unshift({
|
|
3932
3982
|
part: part,
|
|
3933
3983
|
key: key,
|
|
3934
|
-
control: control
|
|
3984
|
+
control: control,
|
|
3985
|
+
width: props.width,
|
|
3986
|
+
height: props.height
|
|
3935
3987
|
});
|
|
3936
3988
|
};
|
|
3937
3989
|
/**
|
|
@@ -4077,6 +4129,26 @@ function debounce(func, wait) {
|
|
|
4077
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);
|
|
4078
4130
|
});
|
|
4079
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
|
+
// =======================================================
|
|
4080
4152
|
// 录制
|
|
4081
4153
|
// =======================================================
|
|
4082
4154
|
theme.on(EVENTS.recordingChange, function(recording) {
|
|
@@ -4172,7 +4244,7 @@ function debounce(func, wait) {
|
|
|
4172
4244
|
*
|
|
4173
4245
|
* @param theme - Theme
|
|
4174
4246
|
*/ function _controlEventemitter(theme) {
|
|
4175
|
-
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;
|
|
4176
4248
|
// Controls
|
|
4177
4249
|
if (theme._recFooter) {
|
|
4178
4250
|
theme._recFooter.on(EVENTS.theme.recFooterDestroy, function() {
|
|
@@ -4265,8 +4337,26 @@ function debounce(func, wait) {
|
|
|
4265
4337
|
theme.emit(EVENTS.control.talkDestroy);
|
|
4266
4338
|
});
|
|
4267
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
|
+
}
|
|
4268
4358
|
// 缩放控件
|
|
4269
|
-
if ((
|
|
4359
|
+
if ((_theme_controls7 = theme.controls) == null ? void 0 : _theme_controls7.zoomControl) {
|
|
4270
4360
|
theme.controls.zoomControl.on(EVENTS.control.zoomChange, function(value, _percent, _range) {
|
|
4271
4361
|
if (theme.zoom !== value) {
|
|
4272
4362
|
theme.zoom = value;
|
|
@@ -4288,7 +4378,7 @@ function debounce(func, wait) {
|
|
|
4288
4378
|
});
|
|
4289
4379
|
}
|
|
4290
4380
|
// 清晰度控件
|
|
4291
|
-
if ((
|
|
4381
|
+
if ((_theme_controls8 = theme.controls) == null ? void 0 : _theme_controls8.definitionControl) {
|
|
4292
4382
|
theme.controls.definitionControl.on(EVENTS.control.definitionPanelOpenChange, function(open, definition, item) {
|
|
4293
4383
|
theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, definition);
|
|
4294
4384
|
theme.emit(EVENTS.control.definitionPanelOpenChange, open, definition, item);
|
|
@@ -4301,7 +4391,7 @@ function debounce(func, wait) {
|
|
|
4301
4391
|
});
|
|
4302
4392
|
}
|
|
4303
4393
|
// 倍速控件
|
|
4304
|
-
if ((
|
|
4394
|
+
if ((_theme_controls9 = theme.controls) == null ? void 0 : _theme_controls9.speedControl) {
|
|
4305
4395
|
theme.controls.speedControl.on(EVENTS.control.speedPanelOpenChange, function(open, speed, item) {
|
|
4306
4396
|
theme.emit(CLEAR_TIMER_HEADER_FOOTER_ANIMATION, open, speed);
|
|
4307
4397
|
theme.emit(EVENTS.control.speedPanelOpenChange, open, speed, item);
|
|
@@ -4314,7 +4404,7 @@ function debounce(func, wait) {
|
|
|
4314
4404
|
});
|
|
4315
4405
|
}
|
|
4316
4406
|
// 截图控件
|
|
4317
|
-
if ((
|
|
4407
|
+
if ((_theme_controls10 = theme.controls) == null ? void 0 : _theme_controls10.capturePictureControl) {
|
|
4318
4408
|
theme.controls.capturePictureControl.on(EVENTS.control.capturePicture, function(options) {
|
|
4319
4409
|
theme.emit(EVENTS.control.capturePicture, options);
|
|
4320
4410
|
});
|
|
@@ -4323,25 +4413,25 @@ function debounce(func, wait) {
|
|
|
4323
4413
|
});
|
|
4324
4414
|
}
|
|
4325
4415
|
// 全屏控件
|
|
4326
|
-
if ((
|
|
4416
|
+
if ((_theme_controls11 = theme.controls) == null ? void 0 : _theme_controls11.fullscreenControl) {
|
|
4327
4417
|
theme.controls.fullscreenControl.on(EVENTS.control.fullscreenDestroy, function() {
|
|
4328
4418
|
theme.emit(EVENTS.control.fullscreenDestroy);
|
|
4329
4419
|
});
|
|
4330
4420
|
}
|
|
4331
4421
|
// 全局全屏控件
|
|
4332
|
-
if ((
|
|
4422
|
+
if ((_theme_controls12 = theme.controls) == null ? void 0 : _theme_controls12.globalFullscreenControl) {
|
|
4333
4423
|
theme.controls.globalFullscreenControl.on(EVENTS.control.globalFullscreenDestroy, function() {
|
|
4334
4424
|
theme.emit(EVENTS.control.globalFullscreenDestroy);
|
|
4335
4425
|
});
|
|
4336
4426
|
}
|
|
4337
4427
|
// 设备信息控件
|
|
4338
|
-
if ((
|
|
4428
|
+
if ((_theme_controls13 = theme.controls) == null ? void 0 : _theme_controls13.deviceControl) {
|
|
4339
4429
|
theme.controls.deviceControl.on(EVENTS.control.deviceDestroy, function() {
|
|
4340
4430
|
theme.emit(EVENTS.control.deviceDestroy);
|
|
4341
4431
|
});
|
|
4342
4432
|
}
|
|
4343
4433
|
// 回放类型切换控件
|
|
4344
|
-
if ((
|
|
4434
|
+
if ((_theme_controls14 = theme.controls) == null ? void 0 : _theme_controls14.recControl) {
|
|
4345
4435
|
// prettier-ignore
|
|
4346
4436
|
theme.controls.recControl.on(EVENTS.control.recTypeChange, function(type) {
|
|
4347
4437
|
if (theme.recType !== type) {
|
|
@@ -4362,7 +4452,7 @@ function debounce(func, wait) {
|
|
|
4362
4452
|
});
|
|
4363
4453
|
}
|
|
4364
4454
|
// 时间轴控件
|
|
4365
|
-
if ((
|
|
4455
|
+
if ((_theme_controls15 = theme.controls) == null ? void 0 : _theme_controls15.timeLineControl) {
|
|
4366
4456
|
theme.controls.timeLineControl.on(EVENTS.control.timeLineChange, function(date) {
|
|
4367
4457
|
theme.emit(EVENTS.control.timeLineChange, date);
|
|
4368
4458
|
});
|
|
@@ -4379,7 +4469,7 @@ function debounce(func, wait) {
|
|
|
4379
4469
|
});
|
|
4380
4470
|
}
|
|
4381
4471
|
// 日历控件
|
|
4382
|
-
if ((
|
|
4472
|
+
if ((_theme_controls16 = theme.controls) == null ? void 0 : _theme_controls16.dateControl) {
|
|
4383
4473
|
theme.controls.dateControl.on(EVENTS.control.datePanelOpenChange, function(open, date) {
|
|
4384
4474
|
theme.emit(EVENTS.control.datePanelOpenChange, open, date);
|
|
4385
4475
|
});
|
|
@@ -4474,8 +4564,8 @@ function _create_class$5(Constructor, protoProps, staticProps) {
|
|
|
4474
4564
|
if (protoProps) _defineProperties$5(Constructor.prototype, protoProps);
|
|
4475
4565
|
return Constructor;
|
|
4476
4566
|
}
|
|
4477
|
-
function _extends$
|
|
4478
|
-
_extends$
|
|
4567
|
+
function _extends$k() {
|
|
4568
|
+
_extends$k = Object.assign || function(target) {
|
|
4479
4569
|
for(var i = 1; i < arguments.length; i++){
|
|
4480
4570
|
var source = arguments[i];
|
|
4481
4571
|
for(var key in source){
|
|
@@ -4486,9 +4576,9 @@ function _extends$i() {
|
|
|
4486
4576
|
}
|
|
4487
4577
|
return target;
|
|
4488
4578
|
};
|
|
4489
|
-
return _extends$
|
|
4579
|
+
return _extends$k.apply(this, arguments);
|
|
4490
4580
|
}
|
|
4491
|
-
function _inherits$
|
|
4581
|
+
function _inherits$j(subClass, superClass) {
|
|
4492
4582
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
4493
4583
|
throw new TypeError("Super expression must either be null or a function");
|
|
4494
4584
|
}
|
|
@@ -4499,14 +4589,14 @@ function _inherits$h(subClass, superClass) {
|
|
|
4499
4589
|
configurable: true
|
|
4500
4590
|
}
|
|
4501
4591
|
});
|
|
4502
|
-
if (superClass) _set_prototype_of$
|
|
4592
|
+
if (superClass) _set_prototype_of$j(subClass, superClass);
|
|
4503
4593
|
}
|
|
4504
|
-
function _set_prototype_of$
|
|
4505
|
-
_set_prototype_of$
|
|
4594
|
+
function _set_prototype_of$j(o, p) {
|
|
4595
|
+
_set_prototype_of$j = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
4506
4596
|
o.__proto__ = p;
|
|
4507
4597
|
return o;
|
|
4508
4598
|
};
|
|
4509
|
-
return _set_prototype_of$
|
|
4599
|
+
return _set_prototype_of$j(o, p);
|
|
4510
4600
|
}
|
|
4511
4601
|
var ZOOM_DEFAULT_OPTIONS = {
|
|
4512
4602
|
open: false,
|
|
@@ -4516,10 +4606,10 @@ var ZOOM_DEFAULT_OPTIONS = {
|
|
|
4516
4606
|
* 电子放大控件
|
|
4517
4607
|
* @category Control
|
|
4518
4608
|
*/ var Zoom$1 = /*#__PURE__*/ function(Control) {
|
|
4519
|
-
_inherits$
|
|
4609
|
+
_inherits$j(Zoom, Control);
|
|
4520
4610
|
function Zoom(options) {
|
|
4521
4611
|
var _this;
|
|
4522
|
-
_this = Control.call(this, _extends$
|
|
4612
|
+
_this = Control.call(this, _extends$k({}, options, {
|
|
4523
4613
|
tagName: 'span',
|
|
4524
4614
|
controlType: 'button',
|
|
4525
4615
|
classNameSuffix: 'zoom'
|
|
@@ -5376,8 +5466,8 @@ function requireDist$1 () {
|
|
|
5376
5466
|
var distExports$1 = requireDist$1();
|
|
5377
5467
|
var Zoom = /*@__PURE__*/getDefaultExportFromCjs(distExports$1);
|
|
5378
5468
|
|
|
5379
|
-
function _extends$
|
|
5380
|
-
_extends$
|
|
5469
|
+
function _extends$j() {
|
|
5470
|
+
_extends$j = Object.assign || function(target) {
|
|
5381
5471
|
for(var i = 1; i < arguments.length; i++){
|
|
5382
5472
|
var source = arguments[i];
|
|
5383
5473
|
for(var key in source){
|
|
@@ -5388,10 +5478,10 @@ function _extends$h() {
|
|
|
5388
5478
|
}
|
|
5389
5479
|
return target;
|
|
5390
5480
|
};
|
|
5391
|
-
return _extends$
|
|
5481
|
+
return _extends$j.apply(this, arguments);
|
|
5392
5482
|
}
|
|
5393
5483
|
function __zoom(theme, container, options) {
|
|
5394
|
-
theme.zoomUtil = new Zoom(container, _extends$
|
|
5484
|
+
theme.zoomUtil = new Zoom(container, _extends$j({}, options || {}, {
|
|
5395
5485
|
min: 1,
|
|
5396
5486
|
onChange: function(zoom, reset) {
|
|
5397
5487
|
if (zoom !== theme._zoom) {
|
|
@@ -5409,7 +5499,7 @@ function __zoom(theme, container, options) {
|
|
|
5409
5499
|
}));
|
|
5410
5500
|
}
|
|
5411
5501
|
|
|
5412
|
-
function asyncGeneratorStep$
|
|
5502
|
+
function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5413
5503
|
try {
|
|
5414
5504
|
var info = gen[key](arg);
|
|
5415
5505
|
var value = info.value;
|
|
@@ -5423,22 +5513,22 @@ function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5423
5513
|
Promise.resolve(value).then(_next, _throw);
|
|
5424
5514
|
}
|
|
5425
5515
|
}
|
|
5426
|
-
function _async_to_generator$
|
|
5516
|
+
function _async_to_generator$6(fn) {
|
|
5427
5517
|
return function() {
|
|
5428
5518
|
var self = this, args = arguments;
|
|
5429
5519
|
return new Promise(function(resolve, reject) {
|
|
5430
5520
|
var gen = fn.apply(self, args);
|
|
5431
5521
|
function _next(value) {
|
|
5432
|
-
asyncGeneratorStep$
|
|
5522
|
+
asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
|
|
5433
5523
|
}
|
|
5434
5524
|
function _throw(err) {
|
|
5435
|
-
asyncGeneratorStep$
|
|
5525
|
+
asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5436
5526
|
}
|
|
5437
5527
|
_next(undefined);
|
|
5438
5528
|
});
|
|
5439
5529
|
};
|
|
5440
5530
|
}
|
|
5441
|
-
function _ts_generator$
|
|
5531
|
+
function _ts_generator$6(thisArg, body) {
|
|
5442
5532
|
var f, y, t, _ = {
|
|
5443
5533
|
label: 0,
|
|
5444
5534
|
sent: function() {
|
|
@@ -5530,9 +5620,9 @@ function _ts_generator$4(thisArg, body) {
|
|
|
5530
5620
|
}
|
|
5531
5621
|
}
|
|
5532
5622
|
function getThemeDataByTemplate(theme, id) {
|
|
5533
|
-
return _async_to_generator$
|
|
5623
|
+
return _async_to_generator$6(function() {
|
|
5534
5624
|
var _theme_options_token_httpToken, _theme_options_token, url;
|
|
5535
|
-
return _ts_generator$
|
|
5625
|
+
return _ts_generator$6(this, function(_state) {
|
|
5536
5626
|
switch(_state.label){
|
|
5537
5627
|
case 0:
|
|
5538
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;
|
|
@@ -5541,8 +5631,8 @@ function getThemeDataByTemplate(theme, id) {
|
|
|
5541
5631
|
fetch(url, {
|
|
5542
5632
|
method: 'GET'
|
|
5543
5633
|
}).then(function(response) {
|
|
5544
|
-
return _async_to_generator$
|
|
5545
|
-
return _ts_generator$
|
|
5634
|
+
return _async_to_generator$6(function() {
|
|
5635
|
+
return _ts_generator$6(this, function(_state) {
|
|
5546
5636
|
switch(_state.label){
|
|
5547
5637
|
case 0:
|
|
5548
5638
|
return [
|
|
@@ -5587,7 +5677,7 @@ function getThemeDataByTemplate(theme, id) {
|
|
|
5587
5677
|
})();
|
|
5588
5678
|
}
|
|
5589
5679
|
|
|
5590
|
-
function asyncGeneratorStep$
|
|
5680
|
+
function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5591
5681
|
try {
|
|
5592
5682
|
var info = gen[key](arg);
|
|
5593
5683
|
var value = info.value;
|
|
@@ -5601,23 +5691,23 @@ function asyncGeneratorStep$3(gen, resolve, reject, _next, _throw, key, arg) {
|
|
|
5601
5691
|
Promise.resolve(value).then(_next, _throw);
|
|
5602
5692
|
}
|
|
5603
5693
|
}
|
|
5604
|
-
function _async_to_generator$
|
|
5694
|
+
function _async_to_generator$5(fn) {
|
|
5605
5695
|
return function() {
|
|
5606
5696
|
var self = this, args = arguments;
|
|
5607
5697
|
return new Promise(function(resolve, reject) {
|
|
5608
5698
|
var gen = fn.apply(self, args);
|
|
5609
5699
|
function _next(value) {
|
|
5610
|
-
asyncGeneratorStep$
|
|
5700
|
+
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
|
|
5611
5701
|
}
|
|
5612
5702
|
function _throw(err) {
|
|
5613
|
-
asyncGeneratorStep$
|
|
5703
|
+
asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
|
|
5614
5704
|
}
|
|
5615
5705
|
_next(undefined);
|
|
5616
5706
|
});
|
|
5617
5707
|
};
|
|
5618
5708
|
}
|
|
5619
|
-
function _extends$
|
|
5620
|
-
_extends$
|
|
5709
|
+
function _extends$i() {
|
|
5710
|
+
_extends$i = Object.assign || function(target) {
|
|
5621
5711
|
for(var i = 1; i < arguments.length; i++){
|
|
5622
5712
|
var source = arguments[i];
|
|
5623
5713
|
for(var key in source){
|
|
@@ -5628,9 +5718,9 @@ function _extends$g() {
|
|
|
5628
5718
|
}
|
|
5629
5719
|
return target;
|
|
5630
5720
|
};
|
|
5631
|
-
return _extends$
|
|
5721
|
+
return _extends$i.apply(this, arguments);
|
|
5632
5722
|
}
|
|
5633
|
-
function _ts_generator$
|
|
5723
|
+
function _ts_generator$5(thisArg, body) {
|
|
5634
5724
|
var f, y, t, _ = {
|
|
5635
5725
|
label: 0,
|
|
5636
5726
|
sent: function() {
|
|
@@ -5756,7 +5846,7 @@ function _ts_generator$3(thisArg, body) {
|
|
|
5756
5846
|
}
|
|
5757
5847
|
if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
|
|
5758
5848
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5759
|
-
recControls.push(recControls[0] ? _extends$
|
|
5849
|
+
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5760
5850
|
part: recControls[0].part
|
|
5761
5851
|
}) : item);
|
|
5762
5852
|
return false;
|
|
@@ -5779,7 +5869,7 @@ function _ts_generator$3(thisArg, body) {
|
|
|
5779
5869
|
}
|
|
5780
5870
|
if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
|
|
5781
5871
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5782
|
-
recControls.push(recControls[0] ? _extends$
|
|
5872
|
+
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5783
5873
|
part: recControls[0].part
|
|
5784
5874
|
}) : item);
|
|
5785
5875
|
return false;
|
|
@@ -5841,9 +5931,9 @@ function _filterLeftRightControls(btnList) {
|
|
|
5841
5931
|
* @param data
|
|
5842
5932
|
* @returns
|
|
5843
5933
|
*/ function getThemeData(theme, data) {
|
|
5844
|
-
return _async_to_generator$
|
|
5934
|
+
return _async_to_generator$5(function() {
|
|
5845
5935
|
var themeData, _theme_logger, template;
|
|
5846
|
-
return _ts_generator$
|
|
5936
|
+
return _ts_generator$5(this, function(_state) {
|
|
5847
5937
|
switch(_state.label){
|
|
5848
5938
|
case 0:
|
|
5849
5939
|
themeData = data;
|
|
@@ -6034,8 +6124,8 @@ function rgbOrHexToRgbaWithOpacity(color, opacity) {
|
|
|
6034
6124
|
return Component;
|
|
6035
6125
|
}();
|
|
6036
6126
|
|
|
6037
|
-
function _extends$
|
|
6038
|
-
_extends$
|
|
6127
|
+
function _extends$h() {
|
|
6128
|
+
_extends$h = Object.assign || function(target) {
|
|
6039
6129
|
for(var i = 1; i < arguments.length; i++){
|
|
6040
6130
|
var source = arguments[i];
|
|
6041
6131
|
for(var key in source){
|
|
@@ -6046,9 +6136,9 @@ function _extends$f() {
|
|
|
6046
6136
|
}
|
|
6047
6137
|
return target;
|
|
6048
6138
|
};
|
|
6049
|
-
return _extends$
|
|
6139
|
+
return _extends$h.apply(this, arguments);
|
|
6050
6140
|
}
|
|
6051
|
-
function _inherits$
|
|
6141
|
+
function _inherits$i(subClass, superClass) {
|
|
6052
6142
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6053
6143
|
throw new TypeError("Super expression must either be null or a function");
|
|
6054
6144
|
}
|
|
@@ -6059,28 +6149,28 @@ function _inherits$g(subClass, superClass) {
|
|
|
6059
6149
|
configurable: true
|
|
6060
6150
|
}
|
|
6061
6151
|
});
|
|
6062
|
-
if (superClass) _set_prototype_of$
|
|
6152
|
+
if (superClass) _set_prototype_of$i(subClass, superClass);
|
|
6063
6153
|
}
|
|
6064
|
-
function _set_prototype_of$
|
|
6065
|
-
_set_prototype_of$
|
|
6154
|
+
function _set_prototype_of$i(o, p) {
|
|
6155
|
+
_set_prototype_of$i = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6066
6156
|
o.__proto__ = p;
|
|
6067
6157
|
return o;
|
|
6068
6158
|
};
|
|
6069
|
-
return _set_prototype_of$
|
|
6159
|
+
return _set_prototype_of$i(o, p);
|
|
6070
6160
|
}
|
|
6071
6161
|
var Footer = /*#__PURE__*/ function(Component) {
|
|
6072
|
-
_inherits$
|
|
6162
|
+
_inherits$i(Footer, Component);
|
|
6073
6163
|
function Footer(options) {
|
|
6074
6164
|
if (options === void 0) options = {};
|
|
6075
|
-
return Component.call(this, _extends$
|
|
6165
|
+
return Component.call(this, _extends$h({}, options, {
|
|
6076
6166
|
cType: 'footer'
|
|
6077
6167
|
})) || this;
|
|
6078
6168
|
}
|
|
6079
6169
|
return Footer;
|
|
6080
6170
|
}(Component);
|
|
6081
6171
|
|
|
6082
|
-
function _extends$
|
|
6083
|
-
_extends$
|
|
6172
|
+
function _extends$g() {
|
|
6173
|
+
_extends$g = Object.assign || function(target) {
|
|
6084
6174
|
for(var i = 1; i < arguments.length; i++){
|
|
6085
6175
|
var source = arguments[i];
|
|
6086
6176
|
for(var key in source){
|
|
@@ -6091,9 +6181,9 @@ function _extends$e() {
|
|
|
6091
6181
|
}
|
|
6092
6182
|
return target;
|
|
6093
6183
|
};
|
|
6094
|
-
return _extends$
|
|
6184
|
+
return _extends$g.apply(this, arguments);
|
|
6095
6185
|
}
|
|
6096
|
-
function _inherits$
|
|
6186
|
+
function _inherits$h(subClass, superClass) {
|
|
6097
6187
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6098
6188
|
throw new TypeError("Super expression must either be null or a function");
|
|
6099
6189
|
}
|
|
@@ -6104,20 +6194,20 @@ function _inherits$f(subClass, superClass) {
|
|
|
6104
6194
|
configurable: true
|
|
6105
6195
|
}
|
|
6106
6196
|
});
|
|
6107
|
-
if (superClass) _set_prototype_of$
|
|
6197
|
+
if (superClass) _set_prototype_of$h(subClass, superClass);
|
|
6108
6198
|
}
|
|
6109
|
-
function _set_prototype_of$
|
|
6110
|
-
_set_prototype_of$
|
|
6199
|
+
function _set_prototype_of$h(o, p) {
|
|
6200
|
+
_set_prototype_of$h = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6111
6201
|
o.__proto__ = p;
|
|
6112
6202
|
return o;
|
|
6113
6203
|
};
|
|
6114
|
-
return _set_prototype_of$
|
|
6204
|
+
return _set_prototype_of$h(o, p);
|
|
6115
6205
|
}
|
|
6116
6206
|
var Header = /*#__PURE__*/ function(Component) {
|
|
6117
|
-
_inherits$
|
|
6207
|
+
_inherits$h(Header, Component);
|
|
6118
6208
|
function Header(options) {
|
|
6119
6209
|
if (options === void 0) options = {};
|
|
6120
|
-
return Component.call(this, _extends$
|
|
6210
|
+
return Component.call(this, _extends$g({}, options, {
|
|
6121
6211
|
cType: 'header'
|
|
6122
6212
|
})) || this;
|
|
6123
6213
|
}
|
|
@@ -6283,8 +6373,8 @@ function interactiveHF($container, second, callback) {
|
|
|
6283
6373
|
};
|
|
6284
6374
|
}
|
|
6285
6375
|
|
|
6286
|
-
function _extends$
|
|
6287
|
-
_extends$
|
|
6376
|
+
function _extends$f() {
|
|
6377
|
+
_extends$f = Object.assign || function(target) {
|
|
6288
6378
|
for(var i = 1; i < arguments.length; i++){
|
|
6289
6379
|
var source = arguments[i];
|
|
6290
6380
|
for(var key in source){
|
|
@@ -6295,9 +6385,9 @@ function _extends$d() {
|
|
|
6295
6385
|
}
|
|
6296
6386
|
return target;
|
|
6297
6387
|
};
|
|
6298
|
-
return _extends$
|
|
6388
|
+
return _extends$f.apply(this, arguments);
|
|
6299
6389
|
}
|
|
6300
|
-
function _inherits$
|
|
6390
|
+
function _inherits$g(subClass, superClass) {
|
|
6301
6391
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6302
6392
|
throw new TypeError("Super expression must either be null or a function");
|
|
6303
6393
|
}
|
|
@@ -6308,23 +6398,23 @@ function _inherits$e(subClass, superClass) {
|
|
|
6308
6398
|
configurable: true
|
|
6309
6399
|
}
|
|
6310
6400
|
});
|
|
6311
|
-
if (superClass) _set_prototype_of$
|
|
6401
|
+
if (superClass) _set_prototype_of$g(subClass, superClass);
|
|
6312
6402
|
}
|
|
6313
|
-
function _set_prototype_of$
|
|
6314
|
-
_set_prototype_of$
|
|
6403
|
+
function _set_prototype_of$g(o, p) {
|
|
6404
|
+
_set_prototype_of$g = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6315
6405
|
o.__proto__ = p;
|
|
6316
6406
|
return o;
|
|
6317
6407
|
};
|
|
6318
|
-
return _set_prototype_of$
|
|
6408
|
+
return _set_prototype_of$g(o, p);
|
|
6319
6409
|
}
|
|
6320
6410
|
/**
|
|
6321
6411
|
* 全局全屏
|
|
6322
6412
|
* 主题和播放器不提供全局全屏的api, 如果开发者想要可以参考这个组件自己实现
|
|
6323
6413
|
* @category Control
|
|
6324
6414
|
*/ var GlobalFullscreen = /*#__PURE__*/ function(Fullscreen) {
|
|
6325
|
-
_inherits$
|
|
6415
|
+
_inherits$g(GlobalFullscreen, Fullscreen);
|
|
6326
6416
|
function GlobalFullscreen(options) {
|
|
6327
|
-
return Fullscreen.call(this, _extends$
|
|
6417
|
+
return Fullscreen.call(this, _extends$f({}, options, {
|
|
6328
6418
|
controlType: 'button',
|
|
6329
6419
|
classNameSuffix: 'global-fullscreen'
|
|
6330
6420
|
})) || this;
|
|
@@ -6355,8 +6445,8 @@ function _set_prototype_of$e(o, p) {
|
|
|
6355
6445
|
return GlobalFullscreen;
|
|
6356
6446
|
}(Fullscreen);
|
|
6357
6447
|
|
|
6358
|
-
function _extends$
|
|
6359
|
-
_extends$
|
|
6448
|
+
function _extends$e() {
|
|
6449
|
+
_extends$e = Object.assign || function(target) {
|
|
6360
6450
|
for(var i = 1; i < arguments.length; i++){
|
|
6361
6451
|
var source = arguments[i];
|
|
6362
6452
|
for(var key in source){
|
|
@@ -6367,9 +6457,9 @@ function _extends$c() {
|
|
|
6367
6457
|
}
|
|
6368
6458
|
return target;
|
|
6369
6459
|
};
|
|
6370
|
-
return _extends$
|
|
6460
|
+
return _extends$e.apply(this, arguments);
|
|
6371
6461
|
}
|
|
6372
|
-
function _inherits$
|
|
6462
|
+
function _inherits$f(subClass, superClass) {
|
|
6373
6463
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
6374
6464
|
throw new TypeError("Super expression must either be null or a function");
|
|
6375
6465
|
}
|
|
@@ -6380,23 +6470,23 @@ function _inherits$d(subClass, superClass) {
|
|
|
6380
6470
|
configurable: true
|
|
6381
6471
|
}
|
|
6382
6472
|
});
|
|
6383
|
-
if (superClass) _set_prototype_of$
|
|
6473
|
+
if (superClass) _set_prototype_of$f(subClass, superClass);
|
|
6384
6474
|
}
|
|
6385
|
-
function _set_prototype_of$
|
|
6386
|
-
_set_prototype_of$
|
|
6475
|
+
function _set_prototype_of$f(o, p) {
|
|
6476
|
+
_set_prototype_of$f = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
6387
6477
|
o.__proto__ = p;
|
|
6388
6478
|
return o;
|
|
6389
6479
|
};
|
|
6390
|
-
return _set_prototype_of$
|
|
6480
|
+
return _set_prototype_of$f(o, p);
|
|
6391
6481
|
}
|
|
6392
6482
|
/**
|
|
6393
6483
|
* 截图控件,点击后会触发截图事件, 截图数据会通过 onCapture 回调函数返回
|
|
6394
6484
|
* @category Control
|
|
6395
6485
|
*/ var CapturePicture = /*#__PURE__*/ function(Control) {
|
|
6396
|
-
_inherits$
|
|
6486
|
+
_inherits$f(CapturePicture, Control);
|
|
6397
6487
|
function CapturePicture(options) {
|
|
6398
6488
|
var _this;
|
|
6399
|
-
_this = Control.call(this, _extends$
|
|
6489
|
+
_this = Control.call(this, _extends$e({}, options, {
|
|
6400
6490
|
tagName: 'span',
|
|
6401
6491
|
classNameSuffix: 'capture-picture'
|
|
6402
6492
|
})) || this, _this._timer = null;
|
|
@@ -7405,8 +7495,8 @@ function _create_class$4(Constructor, protoProps, staticProps) {
|
|
|
7405
7495
|
if (protoProps) _defineProperties$4(Constructor.prototype, protoProps);
|
|
7406
7496
|
return Constructor;
|
|
7407
7497
|
}
|
|
7408
|
-
function _extends$
|
|
7409
|
-
_extends$
|
|
7498
|
+
function _extends$d() {
|
|
7499
|
+
_extends$d = Object.assign || function(target) {
|
|
7410
7500
|
for(var i = 1; i < arguments.length; i++){
|
|
7411
7501
|
var source = arguments[i];
|
|
7412
7502
|
for(var key in source){
|
|
@@ -7417,9 +7507,9 @@ function _extends$b() {
|
|
|
7417
7507
|
}
|
|
7418
7508
|
return target;
|
|
7419
7509
|
};
|
|
7420
|
-
return _extends$
|
|
7510
|
+
return _extends$d.apply(this, arguments);
|
|
7421
7511
|
}
|
|
7422
|
-
function _inherits$
|
|
7512
|
+
function _inherits$e(subClass, superClass) {
|
|
7423
7513
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7424
7514
|
throw new TypeError("Super expression must either be null or a function");
|
|
7425
7515
|
}
|
|
@@ -7430,23 +7520,23 @@ function _inherits$c(subClass, superClass) {
|
|
|
7430
7520
|
configurable: true
|
|
7431
7521
|
}
|
|
7432
7522
|
});
|
|
7433
|
-
if (superClass) _set_prototype_of$
|
|
7523
|
+
if (superClass) _set_prototype_of$e(subClass, superClass);
|
|
7434
7524
|
}
|
|
7435
|
-
function _set_prototype_of$
|
|
7436
|
-
_set_prototype_of$
|
|
7525
|
+
function _set_prototype_of$e(o, p) {
|
|
7526
|
+
_set_prototype_of$e = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7437
7527
|
o.__proto__ = p;
|
|
7438
7528
|
return o;
|
|
7439
7529
|
};
|
|
7440
|
-
return _set_prototype_of$
|
|
7530
|
+
return _set_prototype_of$e(o, p);
|
|
7441
7531
|
}
|
|
7442
7532
|
/**
|
|
7443
7533
|
* 云台控件
|
|
7444
7534
|
* @category Control
|
|
7445
7535
|
*/ var Ptz = /*#__PURE__*/ function(Control) {
|
|
7446
|
-
_inherits$
|
|
7536
|
+
_inherits$e(Ptz, Control);
|
|
7447
7537
|
function Ptz(options) {
|
|
7448
7538
|
var _this;
|
|
7449
|
-
_this = Control.call(this, _extends$
|
|
7539
|
+
_this = Control.call(this, _extends$d({}, options, {
|
|
7450
7540
|
tagName: 'span',
|
|
7451
7541
|
controlType: 'button',
|
|
7452
7542
|
classNameSuffix: 'ptz'
|
|
@@ -7489,7 +7579,7 @@ function _set_prototype_of$c(o, p) {
|
|
|
7489
7579
|
this.$turntable.classList.add("" + PREFIX_CLASS + "-ptz-turntable");
|
|
7490
7580
|
this.$panel.appendChild(this.$turntable);
|
|
7491
7581
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
7492
|
-
this._ptzControl = new distExports.Ptz(this.$turntable, _extends$
|
|
7582
|
+
this._ptzControl = new distExports.Ptz(this.$turntable, _extends$d({}, this._options, {
|
|
7493
7583
|
onSpeedChange: this._onSpeedChange.bind(this),
|
|
7494
7584
|
onDirection: this._onDirection.bind(this)
|
|
7495
7585
|
}));
|
|
@@ -7498,7 +7588,7 @@ function _set_prototype_of$c(o, p) {
|
|
|
7498
7588
|
};
|
|
7499
7589
|
_proto.renderMobileExtend = function renderMobileExtend($container) {
|
|
7500
7590
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
7501
|
-
if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$
|
|
7591
|
+
if (!this._ptzControl1) this._ptzControl1 = new distExports.MobilePtz($container, _extends$d({}, this._options, {
|
|
7502
7592
|
onSpeedChange: this._onSpeedChange.bind(this),
|
|
7503
7593
|
onDirection: this._onDirection.bind(this)
|
|
7504
7594
|
}));
|
|
@@ -7601,8 +7691,8 @@ function _create_class$3(Constructor, protoProps, staticProps) {
|
|
|
7601
7691
|
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
7602
7692
|
return Constructor;
|
|
7603
7693
|
}
|
|
7604
|
-
function _extends$
|
|
7605
|
-
_extends$
|
|
7694
|
+
function _extends$c() {
|
|
7695
|
+
_extends$c = Object.assign || function(target) {
|
|
7606
7696
|
for(var i = 1; i < arguments.length; i++){
|
|
7607
7697
|
var source = arguments[i];
|
|
7608
7698
|
for(var key in source){
|
|
@@ -7613,9 +7703,9 @@ function _extends$a() {
|
|
|
7613
7703
|
}
|
|
7614
7704
|
return target;
|
|
7615
7705
|
};
|
|
7616
|
-
return _extends$
|
|
7706
|
+
return _extends$c.apply(this, arguments);
|
|
7617
7707
|
}
|
|
7618
|
-
function _inherits$
|
|
7708
|
+
function _inherits$d(subClass, superClass) {
|
|
7619
7709
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
7620
7710
|
throw new TypeError("Super expression must either be null or a function");
|
|
7621
7711
|
}
|
|
@@ -7626,127 +7716,635 @@ function _inherits$b(subClass, superClass) {
|
|
|
7626
7716
|
configurable: true
|
|
7627
7717
|
}
|
|
7628
7718
|
});
|
|
7629
|
-
if (superClass) _set_prototype_of$
|
|
7719
|
+
if (superClass) _set_prototype_of$d(subClass, superClass);
|
|
7630
7720
|
}
|
|
7631
|
-
function _set_prototype_of$
|
|
7632
|
-
_set_prototype_of$
|
|
7721
|
+
function _set_prototype_of$d(o, p) {
|
|
7722
|
+
_set_prototype_of$d = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
7633
7723
|
o.__proto__ = p;
|
|
7634
7724
|
return o;
|
|
7635
7725
|
};
|
|
7636
|
-
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
|
+
}
|
|
7637
8278
|
}
|
|
7638
|
-
var RECORD_DEFAULT_OPTIONS = {
|
|
7639
|
-
maxDuration: 3600
|
|
7640
|
-
};
|
|
7641
8279
|
/**
|
|
7642
|
-
*
|
|
7643
|
-
*
|
|
8280
|
+
* 语音广播控件
|
|
8281
|
+
*
|
|
8282
|
+
* 用于触发语音广播功能的按钮控件
|
|
7644
8283
|
*
|
|
7645
|
-
* 注意:
|
|
7646
|
-
* 1. 录制过程中会占用浏览器内存, 请根据实际情况进行配置
|
|
7647
|
-
* 2. 录制时间很短可能会因为浏览器的限制或没有I帧而无法生成有效的视频文件
|
|
7648
8284
|
* @category Control
|
|
7649
|
-
*/ var
|
|
7650
|
-
_inherits$b(
|
|
7651
|
-
function
|
|
8285
|
+
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
8286
|
+
_inherits$b(Broadcast, Control);
|
|
8287
|
+
function Broadcast(options) {
|
|
7652
8288
|
var _this;
|
|
7653
8289
|
_this = Control.call(this, _extends$a({}, options, {
|
|
7654
8290
|
tagName: 'span',
|
|
7655
8291
|
controlType: 'button',
|
|
7656
|
-
classNameSuffix: '
|
|
7657
|
-
})) || this
|
|
7658
|
-
_this._options =
|
|
8292
|
+
classNameSuffix: 'broadcast'
|
|
8293
|
+
})) || this;
|
|
8294
|
+
_this._options = options;
|
|
7659
8295
|
_this._render();
|
|
8296
|
+
_this.on(EVENTS.broadcastChange, function(active) {
|
|
8297
|
+
if (_this.active !== active) {
|
|
8298
|
+
_this.active = active;
|
|
8299
|
+
_this._render();
|
|
8300
|
+
}
|
|
8301
|
+
});
|
|
7660
8302
|
return _this;
|
|
7661
8303
|
}
|
|
7662
|
-
var _proto =
|
|
7663
|
-
|
|
7664
|
-
* 渲染图标
|
|
7665
|
-
*/ _proto._render = function _render() {
|
|
8304
|
+
var _proto = Broadcast.prototype;
|
|
8305
|
+
_proto._render = function _render() {
|
|
7666
8306
|
var _this_locale;
|
|
7667
|
-
this.$container.innerHTML = IconComponents.
|
|
7668
|
-
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
|
|
7669
8309
|
});
|
|
7670
8310
|
};
|
|
7671
|
-
|
|
7672
|
-
* 渲染计时器
|
|
7673
|
-
*/ _proto._renderTimer = function _renderTimer() {
|
|
7674
|
-
var _this = this;
|
|
7675
|
-
var _this__options_rootContainer, _this__options;
|
|
7676
|
-
this._timerNode = document.createElement('span');
|
|
7677
|
-
this._timerNode.className = "" + PREFIX_CLASS + "-record-timer";
|
|
7678
|
-
(_this__options = this._options) == null ? void 0 : (_this__options_rootContainer = _this__options.rootContainer) == null ? void 0 : _this__options_rootContainer.appendChild(this._timerNode);
|
|
7679
|
-
this._timerNode.innerHTML = IconComponents.recordCircle() + '<span class="' + PREFIX_CLASS + '-record-timer-time">' + formatTime(this._seconds) + "<span>";
|
|
7680
|
-
var $time = this._timerNode.querySelector("." + PREFIX_CLASS + "-record-timer-time");
|
|
7681
|
-
this._timer = setInterval(function() {
|
|
7682
|
-
_this._seconds++;
|
|
7683
|
-
if (_this._seconds >= _this._options.maxDuration) {
|
|
7684
|
-
// 录制时长不能超过一个小时, 因为录制的数据需要占用浏览器内存
|
|
7685
|
-
_this._destroyTimer();
|
|
7686
|
-
return;
|
|
7687
|
-
}
|
|
7688
|
-
if ($time) $time.innerHTML = "" + formatTime(_this._seconds);
|
|
7689
|
-
}, 1000);
|
|
7690
|
-
};
|
|
7691
|
-
_proto.reset = function reset() {
|
|
8311
|
+
_proto.reset = function reset(hide) {
|
|
7692
8312
|
if (this.active) {
|
|
7693
8313
|
this.active = false;
|
|
7694
|
-
|
|
8314
|
+
this._render();
|
|
8315
|
+
this.emit(EVENTS.control.broadcastChange, false);
|
|
8316
|
+
Control.prototype.reset.call(this, hide);
|
|
7695
8317
|
}
|
|
7696
8318
|
};
|
|
7697
|
-
_proto.destroy = function destroy() {
|
|
7698
|
-
this._destroyTimer();
|
|
7699
|
-
Control.prototype.destroy.call(this);
|
|
7700
|
-
};
|
|
7701
8319
|
/**
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
this.
|
|
7705
|
-
|
|
7706
|
-
clearInterval(this._timer);
|
|
7707
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7708
|
-
this._timer = null;
|
|
7709
|
-
}
|
|
7710
|
-
if (this._timerNode) {
|
|
7711
|
-
this._timerNode.remove();
|
|
7712
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
7713
|
-
this._timerNode = null;
|
|
8320
|
+
* 销毁语音广播控件
|
|
8321
|
+
*/ _proto.destroy = function destroy() {
|
|
8322
|
+
if (this.active) {
|
|
8323
|
+
this.reset();
|
|
7714
8324
|
}
|
|
7715
|
-
this
|
|
8325
|
+
Control.prototype.destroy.call(this);
|
|
7716
8326
|
};
|
|
7717
8327
|
/**
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
this
|
|
7721
|
-
|
|
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);
|
|
7722
8346
|
};
|
|
7723
|
-
|
|
7724
|
-
{
|
|
7725
|
-
key: "active",
|
|
7726
|
-
get: /**
|
|
7727
|
-
* 是否激活
|
|
7728
|
-
*/ function get() {
|
|
7729
|
-
return this._active;
|
|
7730
|
-
},
|
|
7731
|
-
set: function set(active) {
|
|
7732
|
-
if (this._disabled && !this._active) {
|
|
7733
|
-
// 不允许禁用情况下激活
|
|
7734
|
-
return;
|
|
7735
|
-
}
|
|
7736
|
-
if (this._active !== active) {
|
|
7737
|
-
this._active = active;
|
|
7738
|
-
this._updateActiveState(active);
|
|
7739
|
-
if (this.active) {
|
|
7740
|
-
this._renderTimer();
|
|
7741
|
-
} else {
|
|
7742
|
-
this._destroyTimer();
|
|
7743
|
-
}
|
|
7744
|
-
this.emit(EVENTS.control.recordingChange, this._active);
|
|
7745
|
-
}
|
|
7746
|
-
}
|
|
7747
|
-
}
|
|
7748
|
-
]);
|
|
7749
|
-
return Record;
|
|
8347
|
+
return Broadcast;
|
|
7750
8348
|
}(Control);
|
|
7751
8349
|
|
|
7752
8350
|
function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -7778,19 +8376,6 @@ function _async_to_generator$2(fn) {
|
|
|
7778
8376
|
});
|
|
7779
8377
|
};
|
|
7780
8378
|
}
|
|
7781
|
-
function _defineProperties$2(target, props) {
|
|
7782
|
-
for(var i = 0; i < props.length; i++){
|
|
7783
|
-
var descriptor = props[i];
|
|
7784
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
7785
|
-
descriptor.configurable = true;
|
|
7786
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
7787
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
7788
|
-
}
|
|
7789
|
-
}
|
|
7790
|
-
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
7791
|
-
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
7792
|
-
return Constructor;
|
|
7793
|
-
}
|
|
7794
8379
|
function _extends$9() {
|
|
7795
8380
|
_extends$9 = Object.assign || function(target) {
|
|
7796
8381
|
for(var i = 1; i < arguments.length; i++){
|
|
@@ -7917,74 +8502,66 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7917
8502
|
}
|
|
7918
8503
|
}
|
|
7919
8504
|
/**
|
|
7920
|
-
*
|
|
8505
|
+
* AI对话框控件
|
|
7921
8506
|
*
|
|
7922
|
-
*
|
|
7923
|
-
* 成功后会resolve回调一个 MediaStream 对象。若用户拒绝了使用权限,或者需要的媒体源不可用,
|
|
7924
|
-
* promise会reject回调一个 PermissionDeniedError 或者 NotFoundError 。
|
|
8507
|
+
* 用于触发AI对话框功能的按钮控件
|
|
7925
8508
|
*
|
|
7926
8509
|
* @category Control
|
|
7927
|
-
*/ var
|
|
7928
|
-
_inherits$a(
|
|
7929
|
-
function
|
|
8510
|
+
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
8511
|
+
_inherits$a(AIChat, Control);
|
|
8512
|
+
function AIChat(options) {
|
|
7930
8513
|
var _this;
|
|
7931
8514
|
_this = Control.call(this, _extends$9({}, options, {
|
|
7932
8515
|
tagName: 'span',
|
|
7933
8516
|
controlType: 'button',
|
|
7934
|
-
classNameSuffix: '
|
|
7935
|
-
})) || this
|
|
8517
|
+
classNameSuffix: 'aichat'
|
|
8518
|
+
})) || this;
|
|
7936
8519
|
_this._options = options;
|
|
7937
8520
|
_this._render();
|
|
7938
|
-
_this.on(EVENTS.
|
|
7939
|
-
if (_this.active !==
|
|
7940
|
-
_this.active =
|
|
8521
|
+
_this.on(EVENTS.aichatChange, function(active) {
|
|
8522
|
+
if (_this.active !== active) {
|
|
8523
|
+
_this.active = active;
|
|
7941
8524
|
_this._render();
|
|
7942
8525
|
}
|
|
7943
8526
|
});
|
|
7944
|
-
_this.on(EVENTS.talkVolumeChange, function(value) {
|
|
7945
|
-
var _this__options_onChange, _this__options;
|
|
7946
|
-
_this.value = value;
|
|
7947
|
-
(_this__options = _this._options) == null ? void 0 : (_this__options_onChange = _this__options.onChange) == null ? void 0 : _this__options_onChange.call(_this__options, value);
|
|
7948
|
-
});
|
|
7949
8527
|
return _this;
|
|
7950
8528
|
}
|
|
7951
|
-
var _proto =
|
|
8529
|
+
var _proto = AIChat.prototype;
|
|
7952
8530
|
_proto._render = function _render() {
|
|
7953
|
-
var _this_locale
|
|
7954
|
-
this.$container.innerHTML =
|
|
7955
|
-
title: (_this_locale = this.locale) == null ? void 0 : _this_locale.
|
|
7956
|
-
}) : IconComponents.talk({
|
|
7957
|
-
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
|
|
7958
8534
|
});
|
|
7959
8535
|
};
|
|
7960
8536
|
_proto.reset = function reset(hide) {
|
|
7961
8537
|
if (this.active) {
|
|
7962
|
-
this._value = 0;
|
|
7963
8538
|
this.active = false;
|
|
7964
8539
|
this._render();
|
|
7965
|
-
this.emit(EVENTS.control.
|
|
8540
|
+
this.emit(EVENTS.control.aichatChange, false);
|
|
7966
8541
|
Control.prototype.reset.call(this, hide);
|
|
7967
8542
|
}
|
|
7968
8543
|
};
|
|
7969
8544
|
/**
|
|
7970
|
-
|
|
7971
|
-
|
|
8545
|
+
* 销毁AI对话框控件
|
|
8546
|
+
*/ _proto.destroy = function destroy() {
|
|
7972
8547
|
if (this.active) {
|
|
7973
8548
|
this.reset();
|
|
7974
8549
|
}
|
|
7975
8550
|
Control.prototype.destroy.call(this);
|
|
7976
8551
|
};
|
|
7977
8552
|
/**
|
|
7978
|
-
|
|
7979
|
-
|
|
8553
|
+
* 点击 Control 会触发
|
|
8554
|
+
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
7980
8555
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
7981
8556
|
return Control.prototype._onControlClick;
|
|
7982
8557
|
};
|
|
7983
8558
|
return _async_to_generator$2(function() {
|
|
8559
|
+
var _this__options_onChange, _this__options;
|
|
7984
8560
|
return _ts_generator$2(this, function(_state) {
|
|
7985
8561
|
_superprop_get__onControlClick().call(_this, e);
|
|
7986
8562
|
this.active = !this.active;
|
|
7987
|
-
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);
|
|
7988
8565
|
this._render();
|
|
7989
8566
|
return [
|
|
7990
8567
|
2
|
|
@@ -7992,44 +8569,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7992
8569
|
});
|
|
7993
8570
|
}).call(this);
|
|
7994
8571
|
};
|
|
7995
|
-
|
|
7996
|
-
{
|
|
7997
|
-
key: "value",
|
|
7998
|
-
get: /**
|
|
7999
|
-
* 获取当前值
|
|
8000
|
-
*/ function get() {
|
|
8001
|
-
return this._value;
|
|
8002
|
-
},
|
|
8003
|
-
set: /**
|
|
8004
|
-
* 设置当前值 [0-1]
|
|
8005
|
-
*/ function set(value) {
|
|
8006
|
-
// 没有激活状态,则不处理
|
|
8007
|
-
if (!this.active) {
|
|
8008
|
-
return;
|
|
8009
|
-
}
|
|
8010
|
-
if (value < 0 || value > 1) {
|
|
8011
|
-
return;
|
|
8012
|
-
}
|
|
8013
|
-
this._value = value;
|
|
8014
|
-
var gainType = 'silent';
|
|
8015
|
-
if (value > 0 && value < 0.25) {
|
|
8016
|
-
gainType = 'low';
|
|
8017
|
-
} else if (value >= 0.25 && value < 0.5) {
|
|
8018
|
-
gainType = 'normal';
|
|
8019
|
-
} else if (value >= 0.5 && value < 0.75) {
|
|
8020
|
-
gainType = 'high';
|
|
8021
|
-
} else if (value >= 0.75) {
|
|
8022
|
-
gainType = 'deafening';
|
|
8023
|
-
}
|
|
8024
|
-
var className = Array.from(this.$container.classList).find(function(className) {
|
|
8025
|
-
return className.startsWith("" + PREFIX_CLASS + "-talk-gain-");
|
|
8026
|
-
});
|
|
8027
|
-
if (className) this.$container.classList.remove(className);
|
|
8028
|
-
this.$container.classList.add(PREFIX_CLASS + "-talk-gain-" + gainType);
|
|
8029
|
-
}
|
|
8030
|
-
}
|
|
8031
|
-
]);
|
|
8032
|
-
return Talk;
|
|
8572
|
+
return AIChat;
|
|
8033
8573
|
}(Control);
|
|
8034
8574
|
|
|
8035
8575
|
function _defineProperties$1(target, props) {
|
|
@@ -9022,6 +9562,8 @@ var Controls = {
|
|
|
9022
9562
|
ptz: Ptz,
|
|
9023
9563
|
record: Record,
|
|
9024
9564
|
talk: Talk,
|
|
9565
|
+
broadcast: Broadcast,
|
|
9566
|
+
aiChat: AIChat,
|
|
9025
9567
|
zoom: Zoom$1,
|
|
9026
9568
|
definition: Definition,
|
|
9027
9569
|
fullscreen: Fullscreen,
|
|
@@ -9632,9 +10174,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9632
10174
|
}
|
|
9633
10175
|
function _renderTheme(theme, data) {
|
|
9634
10176
|
return _async_to_generator$1(function() {
|
|
9635
|
-
var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions,
|
|
9636
|
-
_theme_contentControl_rerender, _theme_contentControl, themeData, // 重新计算画面渲染
|
|
9637
|
-
_theme_contentControl_rerender1, _theme_contentControl1, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
|
|
10177
|
+
var _theme_posterControl, _filterThemeData_header, _filterThemeData_footer, _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions, themeData, filterThemeData, props, _$_filterLeftRightControls, leftBtns, rightBtns, _theme_controls, _theme_controls1, _$_filterLeftRightControls1, leftBtns1, rightBtns1, _filterThemeData_footer_btnList, list, _needTimeLine, hasPtz, _theme_options_mobileExtendOptions1, _theme_options_mobileExtendOptions2, _theme_options_mobileExtendOptions3, _theme_options_mobileExtendOptions_controls1, _theme_options_mobileExtendOptions4, _filterThemeData_header1, _filterThemeData_footer1, _filterThemeData_footer_btnList1;
|
|
9638
10178
|
return _ts_generator$1(this, function(_state) {
|
|
9639
10179
|
switch(_state.label){
|
|
9640
10180
|
case 0:
|
|
@@ -9646,7 +10186,6 @@ function _renderTheme(theme, data) {
|
|
|
9646
10186
|
themeData = _state.sent();
|
|
9647
10187
|
_unmountedControls(theme);
|
|
9648
10188
|
if (Object.prototype.toString.call(themeData) !== '[object Object]') {
|
|
9649
|
-
(_theme_contentControl1 = theme.contentControl) == null ? void 0 : (_theme_contentControl_rerender1 = _theme_contentControl1.rerender) == null ? void 0 : _theme_contentControl_rerender1.call(_theme_contentControl1);
|
|
9650
10189
|
// 主题空
|
|
9651
10190
|
return [
|
|
9652
10191
|
2
|
|
@@ -9817,7 +10356,6 @@ function _renderTheme(theme, data) {
|
|
|
9817
10356
|
}
|
|
9818
10357
|
}
|
|
9819
10358
|
theme.emit(EVENTS.control.mountedControls);
|
|
9820
|
-
(_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_rerender = _theme_contentControl.rerender) == null ? void 0 : _theme_contentControl_rerender.call(_theme_contentControl);
|
|
9821
10359
|
if (!theme.playing) theme._disabled(true);
|
|
9822
10360
|
_controlEventemitter(theme);
|
|
9823
10361
|
return [
|
|
@@ -10133,7 +10671,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10133
10671
|
_inherits(Theme, EventEmitter);
|
|
10134
10672
|
function Theme(options) {
|
|
10135
10673
|
var _this;
|
|
10136
|
-
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;
|
|
10137
10675
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
10138
10676
|
* @since 0.0.1
|
|
10139
10677
|
* @private
|
|
@@ -10184,7 +10722,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10184
10722
|
_this.playing = true;
|
|
10185
10723
|
}
|
|
10186
10724
|
_this._initClassName();
|
|
10187
|
-
// 画布需要渲染在 this.contentControl.$
|
|
10725
|
+
// 画布需要渲染在 this.contentControl.$content 内
|
|
10188
10726
|
_this.contentControl = new Content({
|
|
10189
10727
|
getContainer: function() {
|
|
10190
10728
|
return _this.$container;
|
|
@@ -10219,7 +10757,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10219
10757
|
'flv',
|
|
10220
10758
|
'hls',
|
|
10221
10759
|
'mp4'
|
|
10222
|
-
].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);
|
|
10223
10762
|
_this._addEventListener();
|
|
10224
10763
|
_themeEventemitter(_this);
|
|
10225
10764
|
return _this;
|
|
@@ -10744,138 +11283,153 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10744
11283
|
* 尺寸变化结束时 进行判断,为了节省开销
|
|
10745
11284
|
* @WARN:这里会闪一下, 原因:需要控件渲染后才知是否需要放置到 More 中,
|
|
10746
11285
|
*/ _proto._footerMoreControlShow = function _footerMoreControlShow() {
|
|
11286
|
+
this._displayMore();
|
|
11287
|
+
};
|
|
11288
|
+
_proto._displayMore = function _displayMore() {
|
|
10747
11289
|
var _this = this;
|
|
10748
|
-
|
|
10749
|
-
|
|
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
|
-
_this.emit(EVENTS.control.footerMorePanelOpenChange, open);
|
|
10777
|
-
}
|
|
10778
|
-
});
|
|
10779
|
-
}
|
|
10780
|
-
//
|
|
10781
|
-
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) {
|
|
10782
|
-
var _this__footerMoreControl;
|
|
10783
|
-
var index = (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl.list) || []).findIndex(function(item1) {
|
|
10784
|
-
var _this_controls;
|
|
10785
|
-
return item1.control === ((_this_controls = _this.controls) == null ? void 0 : _this_controls["" + item.iconId + "Control"]);
|
|
10786
|
-
});
|
|
10787
|
-
return index === -1;
|
|
10788
|
-
});
|
|
10789
|
-
if (list.length <= 0) {
|
|
10790
|
-
return;
|
|
10791
|
-
}
|
|
10792
|
-
if (((_this__footerMoreControl = _this._footerMoreControl) == null ? void 0 : (_this__footerMoreControl_list = _this__footerMoreControl.list) == null ? void 0 : _this__footerMoreControl_list.length) === 0) {
|
|
10793
|
-
// 为什么是两个, 因为More 也占用一个位置
|
|
10794
|
-
var popList = [
|
|
10795
|
-
list.pop(),
|
|
10796
|
-
list.pop()
|
|
10797
|
-
];
|
|
10798
|
-
for(var _iterator = _create_for_of_iterator_helper_loose(popList), _step; !(_step = _iterator()).done;){
|
|
10799
|
-
var item = _step.value;
|
|
10800
|
-
if (item) {
|
|
10801
|
-
var _this_controls_key_resetPopupContainer, _this_controls_key, _this_controls, _this_controls1, _this__footerMoreControl2;
|
|
10802
|
-
var key = "" + item.iconId + "Control";
|
|
10803
|
-
(_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');
|
|
10804
|
-
(_this__footerMoreControl2 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl2.add(key, item.part, (_this_controls1 = _this.controls) == null ? void 0 : _this_controls1[key]);
|
|
10805
|
-
}
|
|
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);
|
|
10806
11318
|
}
|
|
10807
|
-
}
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
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
|
+
});
|
|
10816
11349
|
}
|
|
10817
11350
|
}
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
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;
|
|
10825
11365
|
}
|
|
10826
|
-
}
|
|
10827
|
-
|
|
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;
|
|
10828
11386
|
// 110 是为了保住个别控件的宽度超出已知的值, 如英文下 按钮的宽度
|
|
10829
11387
|
// 从 More 中一次移除一个控件到 header/footer 中
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
var
|
|
10834
|
-
if (item2) {
|
|
10835
|
-
var
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
var
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
var _item_control_resetPopupContainer2, _item_control2;
|
|
10846
|
-
(_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);
|
|
10847
|
-
}
|
|
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);
|
|
10848
11403
|
}
|
|
10849
|
-
(_this__footerMoreControl8 = _this._footerMoreControl) == null ? void 0 : _this__footerMoreControl8.remove(item2.control);
|
|
10850
11404
|
}
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
(
|
|
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');
|
|
10865
11419
|
}
|
|
10866
|
-
(
|
|
10867
|
-
_this._footerMoreControl = null;
|
|
11420
|
+
(_this__footerMoreControl14 = this._footerMoreControl) == null ? void 0 : _this__footerMoreControl14.remove(item11.control);
|
|
10868
11421
|
}
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
return item.key;
|
|
10872
|
-
}));
|
|
10873
|
-
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;
|
|
10874
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();
|
|
10875
11430
|
}
|
|
10876
11431
|
}
|
|
10877
|
-
}
|
|
10878
|
-
displayMore();
|
|
11432
|
+
}
|
|
10879
11433
|
};
|
|
10880
11434
|
/**
|
|
10881
11435
|
* 移除事件
|
|
@@ -10953,6 +11507,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10953
11507
|
[
|
|
10954
11508
|
'ptz',
|
|
10955
11509
|
'talk',
|
|
11510
|
+
'broadcast',
|
|
10956
11511
|
'record',
|
|
10957
11512
|
'speed'
|
|
10958
11513
|
].forEach(function(key) {
|
|
@@ -11030,6 +11585,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11030
11585
|
[
|
|
11031
11586
|
'ptz',
|
|
11032
11587
|
'talk',
|
|
11588
|
+
'broadcast',
|
|
11033
11589
|
'record'
|
|
11034
11590
|
].forEach(function(key) {
|
|
11035
11591
|
var _this_controls;
|
|
@@ -11390,6 +11946,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11390
11946
|
zh: zh,
|
|
11391
11947
|
en: en
|
|
11392
11948
|
};
|
|
11393
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.
|
|
11949
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.1-beta.1';
|
|
11394
11950
|
|
|
11395
11951
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|