@ezuikit/player-theme 2.1.3-beta.2 → 2.1.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constant.js +14 -7
- package/dist/index.js +68 -51
- package/dist/index.mjs +68 -51
- package/dist/index.umd.js +68 -51
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +4 -11
- package/package.json +8 -1
package/dist/constant.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.1.
|
|
3
|
-
* Copyright (c) 2026-
|
|
2
|
+
* @ezuikit/player-theme v2.1.4-beta.3
|
|
3
|
+
* Copyright (c) 2026-04-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
@@ -43,11 +43,18 @@ var THEME_PROPS = [
|
|
|
43
43
|
* | rec | cloudRec | cloudRecord |
|
|
44
44
|
* |:---------------------:|:------------:|:---------------:|
|
|
45
45
|
* | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
|
|
46
|
+
*/ // export const REC_GROUP: string[] = ['rec', 'cloudRec', 'cloudRecord'] as const;
|
|
47
|
+
var REC_GROUP = function(sdkType) {
|
|
48
|
+
if (sdkType === void 0) sdkType = 'base';
|
|
49
|
+
return sdkType === 'base' ? [
|
|
50
|
+
'rec',
|
|
51
|
+
'cloudRec',
|
|
52
|
+
'cloudRecord'
|
|
53
|
+
] : [
|
|
54
|
+
'rec',
|
|
55
|
+
'cloudRec'
|
|
56
|
+
];
|
|
57
|
+
};
|
|
51
58
|
/**
|
|
52
59
|
* 设备信息
|
|
53
60
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.1.
|
|
3
|
-
* Copyright (c) 2026-
|
|
2
|
+
* @ezuikit/player-theme v2.1.4-beta.3
|
|
3
|
+
* Copyright (c) 2026-04-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -56,11 +56,18 @@ var THEME_PROPS = [
|
|
|
56
56
|
* | rec | cloudRec | cloudRecord |
|
|
57
57
|
* |:---------------------:|:------------:|:---------------:|
|
|
58
58
|
* | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
|
|
59
|
+
*/ // export const REC_GROUP: string[] = ['rec', 'cloudRec', 'cloudRecord'] as const;
|
|
60
|
+
var REC_GROUP = function(sdkType) {
|
|
61
|
+
if (sdkType === void 0) sdkType = 'base';
|
|
62
|
+
return sdkType === 'base' ? [
|
|
63
|
+
'rec',
|
|
64
|
+
'cloudRec',
|
|
65
|
+
'cloudRecord'
|
|
66
|
+
] : [
|
|
67
|
+
'rec',
|
|
68
|
+
'cloudRec'
|
|
69
|
+
];
|
|
70
|
+
};
|
|
64
71
|
/**
|
|
65
72
|
* 设备信息
|
|
66
73
|
*
|
|
@@ -4786,7 +4793,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
4786
4793
|
|
|
4787
4794
|
/*
|
|
4788
4795
|
* @ezuikit/control-zoom v0.0.2
|
|
4789
|
-
* Copyright (c) 2026-
|
|
4796
|
+
* Copyright (c) 2026-04-02 Ezviz-OpenBiz
|
|
4790
4797
|
* Released under the MIT License.
|
|
4791
4798
|
*/
|
|
4792
4799
|
|
|
@@ -5887,7 +5894,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5887
5894
|
deviceControls.push(item);
|
|
5888
5895
|
return false;
|
|
5889
5896
|
}
|
|
5890
|
-
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
5897
|
+
if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
|
|
5891
5898
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5892
5899
|
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5893
5900
|
part: recControls[0].part
|
|
@@ -5910,7 +5917,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5910
5917
|
deviceControls.push(item);
|
|
5911
5918
|
return false;
|
|
5912
5919
|
}
|
|
5913
|
-
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
5920
|
+
if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
|
|
5914
5921
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5915
5922
|
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5916
5923
|
part: recControls[0].part
|
|
@@ -6582,7 +6589,7 @@ var dist = {};
|
|
|
6582
6589
|
|
|
6583
6590
|
/*
|
|
6584
6591
|
* @ezuikit/control-ptz v0.0.1
|
|
6585
|
-
* Copyright (c) 2026-
|
|
6592
|
+
* Copyright (c) 2026-04-02 Ezviz-OpenBiz
|
|
6586
6593
|
* Released under the MIT License.
|
|
6587
6594
|
*/
|
|
6588
6595
|
|
|
@@ -8315,12 +8322,12 @@ function _ts_generator$3(thisArg, body) {
|
|
|
8315
8322
|
};
|
|
8316
8323
|
}
|
|
8317
8324
|
}
|
|
8318
|
-
/**
|
|
8319
|
-
* 语音广播控件
|
|
8320
|
-
*
|
|
8321
|
-
* 用于触发语音广播功能的按钮控件
|
|
8322
|
-
*
|
|
8323
|
-
* @category Control
|
|
8325
|
+
/**
|
|
8326
|
+
* 语音广播控件
|
|
8327
|
+
*
|
|
8328
|
+
* 用于触发语音广播功能的按钮控件
|
|
8329
|
+
*
|
|
8330
|
+
* @category Control
|
|
8324
8331
|
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
8325
8332
|
_inherits$b(Broadcast, Control);
|
|
8326
8333
|
function Broadcast(options) {
|
|
@@ -8331,13 +8338,18 @@ function _ts_generator$3(thisArg, body) {
|
|
|
8331
8338
|
classNameSuffix: 'broadcast'
|
|
8332
8339
|
})) || this;
|
|
8333
8340
|
_this._options = options;
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
_this.active
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
+
if (options.sdkType === "base") {
|
|
8342
|
+
_this._render();
|
|
8343
|
+
_this.on(EVENTS.broadcastChange, function(active) {
|
|
8344
|
+
if (_this.active !== active) {
|
|
8345
|
+
_this.active = active;
|
|
8346
|
+
_this._render();
|
|
8347
|
+
}
|
|
8348
|
+
});
|
|
8349
|
+
_this.$container.style.removeProperty("display");
|
|
8350
|
+
} else {
|
|
8351
|
+
_this.$container.style.display = "none";
|
|
8352
|
+
}
|
|
8341
8353
|
return _this;
|
|
8342
8354
|
}
|
|
8343
8355
|
var _proto = Broadcast.prototype;
|
|
@@ -8355,16 +8367,16 @@ function _ts_generator$3(thisArg, body) {
|
|
|
8355
8367
|
Control.prototype.reset.call(this, hide);
|
|
8356
8368
|
}
|
|
8357
8369
|
};
|
|
8358
|
-
/**
|
|
8359
|
-
* 销毁语音广播控件
|
|
8370
|
+
/**
|
|
8371
|
+
* 销毁语音广播控件
|
|
8360
8372
|
*/ _proto.destroy = function destroy() {
|
|
8361
8373
|
if (this.active) {
|
|
8362
8374
|
this.reset();
|
|
8363
8375
|
}
|
|
8364
8376
|
Control.prototype.destroy.call(this);
|
|
8365
8377
|
};
|
|
8366
|
-
/**
|
|
8367
|
-
* 点击 Control 会触发
|
|
8378
|
+
/**
|
|
8379
|
+
* 点击 Control 会触发
|
|
8368
8380
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
8369
8381
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
8370
8382
|
return Control.prototype._onControlClick;
|
|
@@ -8540,12 +8552,12 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8540
8552
|
};
|
|
8541
8553
|
}
|
|
8542
8554
|
}
|
|
8543
|
-
/**
|
|
8544
|
-
* AI对话框控件
|
|
8545
|
-
*
|
|
8546
|
-
* 用于触发AI对话框功能的按钮控件
|
|
8547
|
-
*
|
|
8548
|
-
* @category Control
|
|
8555
|
+
/**
|
|
8556
|
+
* AI对话框控件
|
|
8557
|
+
*
|
|
8558
|
+
* 用于触发AI对话框功能的按钮控件
|
|
8559
|
+
*
|
|
8560
|
+
* @category Control
|
|
8549
8561
|
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
8550
8562
|
_inherits$a(AIChat, Control);
|
|
8551
8563
|
function AIChat(options) {
|
|
@@ -8556,7 +8568,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8556
8568
|
classNameSuffix: 'aichat'
|
|
8557
8569
|
})) || this;
|
|
8558
8570
|
_this._options = options;
|
|
8559
|
-
if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud") {
|
|
8571
|
+
if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
|
|
8560
8572
|
_this._render();
|
|
8561
8573
|
_this.on(EVENTS.aichatChange, function(active) {
|
|
8562
8574
|
if (_this.active !== active) {
|
|
@@ -8564,6 +8576,9 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8564
8576
|
_this._render();
|
|
8565
8577
|
}
|
|
8566
8578
|
});
|
|
8579
|
+
_this.$container.style.removeProperty("display");
|
|
8580
|
+
} else {
|
|
8581
|
+
_this.$container.style.display = "none";
|
|
8567
8582
|
}
|
|
8568
8583
|
return _this;
|
|
8569
8584
|
}
|
|
@@ -8582,16 +8597,16 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8582
8597
|
Control.prototype.reset.call(this, hide);
|
|
8583
8598
|
}
|
|
8584
8599
|
};
|
|
8585
|
-
/**
|
|
8586
|
-
* 销毁AI对话框控件
|
|
8600
|
+
/**
|
|
8601
|
+
* 销毁AI对话框控件
|
|
8587
8602
|
*/ _proto.destroy = function destroy() {
|
|
8588
8603
|
if (this.active) {
|
|
8589
8604
|
this.reset();
|
|
8590
8605
|
}
|
|
8591
8606
|
Control.prototype.destroy.call(this);
|
|
8592
8607
|
};
|
|
8593
|
-
/**
|
|
8594
|
-
* 点击 Control 会触发
|
|
8608
|
+
/**
|
|
8609
|
+
* 点击 Control 会触发
|
|
8595
8610
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
8596
8611
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
8597
8612
|
return Control.prototype._onControlClick;
|
|
@@ -10151,12 +10166,12 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10151
10166
|
for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
|
|
10152
10167
|
var item = _step.value;
|
|
10153
10168
|
var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
|
|
10154
|
-
_theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
|
|
10155
|
-
if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP.includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
|
|
10169
|
+
_theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1, _theme_options, _theme_options1;
|
|
10170
|
+
if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
|
|
10156
10171
|
) && Utils.isMobile) {
|
|
10157
10172
|
continue;
|
|
10158
10173
|
}
|
|
10159
|
-
if (REC_GROUP.includes(item.iconId) && theme._header) {
|
|
10174
|
+
if (REC_GROUP((_theme_options1 = theme.options) == null ? void 0 : _theme_options1.sdkType).includes(item.iconId) && theme._header) {
|
|
10160
10175
|
_renderRecType(theme, theme._header.$right, item.iconId, props);
|
|
10161
10176
|
continue;
|
|
10162
10177
|
}
|
|
@@ -10164,7 +10179,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10164
10179
|
if (theme.options.deviceOptions !== null) {
|
|
10165
10180
|
var _theme_controls;
|
|
10166
10181
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
|
|
10167
|
-
var
|
|
10182
|
+
var _theme_options2;
|
|
10168
10183
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
10169
10184
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
10170
10185
|
rootContainer: theme.$container,
|
|
@@ -10177,7 +10192,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10177
10192
|
type: theme.options.type,
|
|
10178
10193
|
deviceSerial: theme.urlInfo.deviceSerial,
|
|
10179
10194
|
channelNo: theme.urlInfo.channelNo
|
|
10180
|
-
}, ((
|
|
10195
|
+
}, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
|
|
10181
10196
|
props: props
|
|
10182
10197
|
}));
|
|
10183
10198
|
}
|
|
@@ -10187,7 +10202,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10187
10202
|
// footer
|
|
10188
10203
|
if (Controls[item.iconId]) {
|
|
10189
10204
|
if (theme.options["" + item.iconId + "Options"] !== null) {
|
|
10190
|
-
var
|
|
10205
|
+
var _theme_options3;
|
|
10191
10206
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
10192
10207
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
10193
10208
|
rootContainer: theme.$container,
|
|
@@ -10204,8 +10219,9 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10204
10219
|
channelNo: theme.urlInfo.channelNo,
|
|
10205
10220
|
urlInfo: theme.urlInfo
|
|
10206
10221
|
} : {}, {
|
|
10207
|
-
PLAY_TYPE: theme.options.type
|
|
10208
|
-
|
|
10222
|
+
PLAY_TYPE: theme.options.type,
|
|
10223
|
+
sdkType: theme.options.sdkType
|
|
10224
|
+
}, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
|
|
10209
10225
|
props: props
|
|
10210
10226
|
}));
|
|
10211
10227
|
}
|
|
@@ -10358,7 +10374,8 @@ function _renderTheme(theme, data) {
|
|
|
10358
10374
|
list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
|
|
10359
10375
|
// FIXME: 这个逻辑实际上是有问题的
|
|
10360
10376
|
_needTimeLine = list.some(function(item) {
|
|
10361
|
-
|
|
10377
|
+
var _theme_options;
|
|
10378
|
+
return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
|
|
10362
10379
|
});
|
|
10363
10380
|
// PC 单独渲染timeLine
|
|
10364
10381
|
if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
|
|
@@ -10386,8 +10403,8 @@ function _renderTheme(theme, data) {
|
|
|
10386
10403
|
}
|
|
10387
10404
|
if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
|
|
10388
10405
|
[].concat(((_filterThemeData_header1 = filterThemeData.header) == null ? void 0 : _filterThemeData_header1.btnList) || [], (_filterThemeData_footer_btnList1 = (_filterThemeData_footer1 = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer1.btnList) != null ? _filterThemeData_footer_btnList1 : []).forEach(function(item) {
|
|
10389
|
-
var _theme__mobileExtend;
|
|
10390
|
-
if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
10406
|
+
var _theme_options, _theme__mobileExtend;
|
|
10407
|
+
if (REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
10391
10408
|
});
|
|
10392
10409
|
}
|
|
10393
10410
|
if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
|
|
@@ -11995,7 +12012,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11995
12012
|
zh: zh,
|
|
11996
12013
|
en: en
|
|
11997
12014
|
};
|
|
11998
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.
|
|
12015
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
|
|
11999
12016
|
|
|
12000
12017
|
exports.Control = Control;
|
|
12001
12018
|
exports.EVENTS = EVENTS;
|
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.4-beta.3
|
|
3
|
+
* Copyright (c) 2026-04-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -54,11 +54,18 @@ var THEME_PROPS = [
|
|
|
54
54
|
* | rec | cloudRec | cloudRecord |
|
|
55
55
|
* |:---------------------:|:------------:|:---------------:|
|
|
56
56
|
* | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
|
|
57
|
+
*/ // export const REC_GROUP: string[] = ['rec', 'cloudRec', 'cloudRecord'] as const;
|
|
58
|
+
var REC_GROUP = function(sdkType) {
|
|
59
|
+
if (sdkType === void 0) sdkType = 'base';
|
|
60
|
+
return sdkType === 'base' ? [
|
|
61
|
+
'rec',
|
|
62
|
+
'cloudRec',
|
|
63
|
+
'cloudRecord'
|
|
64
|
+
] : [
|
|
65
|
+
'rec',
|
|
66
|
+
'cloudRec'
|
|
67
|
+
];
|
|
68
|
+
};
|
|
62
69
|
/**
|
|
63
70
|
* 设备信息
|
|
64
71
|
*
|
|
@@ -4784,7 +4791,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
4784
4791
|
|
|
4785
4792
|
/*
|
|
4786
4793
|
* @ezuikit/control-zoom v0.0.2
|
|
4787
|
-
* Copyright (c) 2026-
|
|
4794
|
+
* Copyright (c) 2026-04-02 Ezviz-OpenBiz
|
|
4788
4795
|
* Released under the MIT License.
|
|
4789
4796
|
*/
|
|
4790
4797
|
|
|
@@ -5885,7 +5892,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5885
5892
|
deviceControls.push(item);
|
|
5886
5893
|
return false;
|
|
5887
5894
|
}
|
|
5888
|
-
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
5895
|
+
if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
|
|
5889
5896
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5890
5897
|
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5891
5898
|
part: recControls[0].part
|
|
@@ -5908,7 +5915,7 @@ function _ts_generator$5(thisArg, body) {
|
|
|
5908
5915
|
deviceControls.push(item);
|
|
5909
5916
|
return false;
|
|
5910
5917
|
}
|
|
5911
|
-
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
5918
|
+
if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
|
|
5912
5919
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
5913
5920
|
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
5914
5921
|
part: recControls[0].part
|
|
@@ -6580,7 +6587,7 @@ var dist = {};
|
|
|
6580
6587
|
|
|
6581
6588
|
/*
|
|
6582
6589
|
* @ezuikit/control-ptz v0.0.1
|
|
6583
|
-
* Copyright (c) 2026-
|
|
6590
|
+
* Copyright (c) 2026-04-02 Ezviz-OpenBiz
|
|
6584
6591
|
* Released under the MIT License.
|
|
6585
6592
|
*/
|
|
6586
6593
|
|
|
@@ -8313,12 +8320,12 @@ function _ts_generator$3(thisArg, body) {
|
|
|
8313
8320
|
};
|
|
8314
8321
|
}
|
|
8315
8322
|
}
|
|
8316
|
-
/**
|
|
8317
|
-
* 语音广播控件
|
|
8318
|
-
*
|
|
8319
|
-
* 用于触发语音广播功能的按钮控件
|
|
8320
|
-
*
|
|
8321
|
-
* @category Control
|
|
8323
|
+
/**
|
|
8324
|
+
* 语音广播控件
|
|
8325
|
+
*
|
|
8326
|
+
* 用于触发语音广播功能的按钮控件
|
|
8327
|
+
*
|
|
8328
|
+
* @category Control
|
|
8322
8329
|
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
8323
8330
|
_inherits$b(Broadcast, Control);
|
|
8324
8331
|
function Broadcast(options) {
|
|
@@ -8329,13 +8336,18 @@ function _ts_generator$3(thisArg, body) {
|
|
|
8329
8336
|
classNameSuffix: 'broadcast'
|
|
8330
8337
|
})) || this;
|
|
8331
8338
|
_this._options = options;
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
_this.active
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
+
if (options.sdkType === "base") {
|
|
8340
|
+
_this._render();
|
|
8341
|
+
_this.on(EVENTS.broadcastChange, function(active) {
|
|
8342
|
+
if (_this.active !== active) {
|
|
8343
|
+
_this.active = active;
|
|
8344
|
+
_this._render();
|
|
8345
|
+
}
|
|
8346
|
+
});
|
|
8347
|
+
_this.$container.style.removeProperty("display");
|
|
8348
|
+
} else {
|
|
8349
|
+
_this.$container.style.display = "none";
|
|
8350
|
+
}
|
|
8339
8351
|
return _this;
|
|
8340
8352
|
}
|
|
8341
8353
|
var _proto = Broadcast.prototype;
|
|
@@ -8353,16 +8365,16 @@ function _ts_generator$3(thisArg, body) {
|
|
|
8353
8365
|
Control.prototype.reset.call(this, hide);
|
|
8354
8366
|
}
|
|
8355
8367
|
};
|
|
8356
|
-
/**
|
|
8357
|
-
* 销毁语音广播控件
|
|
8368
|
+
/**
|
|
8369
|
+
* 销毁语音广播控件
|
|
8358
8370
|
*/ _proto.destroy = function destroy() {
|
|
8359
8371
|
if (this.active) {
|
|
8360
8372
|
this.reset();
|
|
8361
8373
|
}
|
|
8362
8374
|
Control.prototype.destroy.call(this);
|
|
8363
8375
|
};
|
|
8364
|
-
/**
|
|
8365
|
-
* 点击 Control 会触发
|
|
8376
|
+
/**
|
|
8377
|
+
* 点击 Control 会触发
|
|
8366
8378
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
8367
8379
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
8368
8380
|
return Control.prototype._onControlClick;
|
|
@@ -8538,12 +8550,12 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8538
8550
|
};
|
|
8539
8551
|
}
|
|
8540
8552
|
}
|
|
8541
|
-
/**
|
|
8542
|
-
* AI对话框控件
|
|
8543
|
-
*
|
|
8544
|
-
* 用于触发AI对话框功能的按钮控件
|
|
8545
|
-
*
|
|
8546
|
-
* @category Control
|
|
8553
|
+
/**
|
|
8554
|
+
* AI对话框控件
|
|
8555
|
+
*
|
|
8556
|
+
* 用于触发AI对话框功能的按钮控件
|
|
8557
|
+
*
|
|
8558
|
+
* @category Control
|
|
8547
8559
|
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
8548
8560
|
_inherits$a(AIChat, Control);
|
|
8549
8561
|
function AIChat(options) {
|
|
@@ -8554,7 +8566,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8554
8566
|
classNameSuffix: 'aichat'
|
|
8555
8567
|
})) || this;
|
|
8556
8568
|
_this._options = options;
|
|
8557
|
-
if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud") {
|
|
8569
|
+
if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
|
|
8558
8570
|
_this._render();
|
|
8559
8571
|
_this.on(EVENTS.aichatChange, function(active) {
|
|
8560
8572
|
if (_this.active !== active) {
|
|
@@ -8562,6 +8574,9 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8562
8574
|
_this._render();
|
|
8563
8575
|
}
|
|
8564
8576
|
});
|
|
8577
|
+
_this.$container.style.removeProperty("display");
|
|
8578
|
+
} else {
|
|
8579
|
+
_this.$container.style.display = "none";
|
|
8565
8580
|
}
|
|
8566
8581
|
return _this;
|
|
8567
8582
|
}
|
|
@@ -8580,16 +8595,16 @@ function _ts_generator$2(thisArg, body) {
|
|
|
8580
8595
|
Control.prototype.reset.call(this, hide);
|
|
8581
8596
|
}
|
|
8582
8597
|
};
|
|
8583
|
-
/**
|
|
8584
|
-
* 销毁AI对话框控件
|
|
8598
|
+
/**
|
|
8599
|
+
* 销毁AI对话框控件
|
|
8585
8600
|
*/ _proto.destroy = function destroy() {
|
|
8586
8601
|
if (this.active) {
|
|
8587
8602
|
this.reset();
|
|
8588
8603
|
}
|
|
8589
8604
|
Control.prototype.destroy.call(this);
|
|
8590
8605
|
};
|
|
8591
|
-
/**
|
|
8592
|
-
* 点击 Control 会触发
|
|
8606
|
+
/**
|
|
8607
|
+
* 点击 Control 会触发
|
|
8593
8608
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
8594
8609
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
8595
8610
|
return Control.prototype._onControlClick;
|
|
@@ -10149,12 +10164,12 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10149
10164
|
for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
|
|
10150
10165
|
var item = _step.value;
|
|
10151
10166
|
var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
|
|
10152
|
-
_theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
|
|
10153
|
-
if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP.includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
|
|
10167
|
+
_theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1, _theme_options, _theme_options1;
|
|
10168
|
+
if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
|
|
10154
10169
|
) && Utils.isMobile) {
|
|
10155
10170
|
continue;
|
|
10156
10171
|
}
|
|
10157
|
-
if (REC_GROUP.includes(item.iconId) && theme._header) {
|
|
10172
|
+
if (REC_GROUP((_theme_options1 = theme.options) == null ? void 0 : _theme_options1.sdkType).includes(item.iconId) && theme._header) {
|
|
10158
10173
|
_renderRecType(theme, theme._header.$right, item.iconId, props);
|
|
10159
10174
|
continue;
|
|
10160
10175
|
}
|
|
@@ -10162,7 +10177,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10162
10177
|
if (theme.options.deviceOptions !== null) {
|
|
10163
10178
|
var _theme_controls;
|
|
10164
10179
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
|
|
10165
|
-
var
|
|
10180
|
+
var _theme_options2;
|
|
10166
10181
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
10167
10182
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
10168
10183
|
rootContainer: theme.$container,
|
|
@@ -10175,7 +10190,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10175
10190
|
type: theme.options.type,
|
|
10176
10191
|
deviceSerial: theme.urlInfo.deviceSerial,
|
|
10177
10192
|
channelNo: theme.urlInfo.channelNo
|
|
10178
|
-
}, ((
|
|
10193
|
+
}, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
|
|
10179
10194
|
props: props
|
|
10180
10195
|
}));
|
|
10181
10196
|
}
|
|
@@ -10185,7 +10200,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10185
10200
|
// footer
|
|
10186
10201
|
if (Controls[item.iconId]) {
|
|
10187
10202
|
if (theme.options["" + item.iconId + "Options"] !== null) {
|
|
10188
|
-
var
|
|
10203
|
+
var _theme_options3;
|
|
10189
10204
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
10190
10205
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
10191
10206
|
rootContainer: theme.$container,
|
|
@@ -10202,8 +10217,9 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
10202
10217
|
channelNo: theme.urlInfo.channelNo,
|
|
10203
10218
|
urlInfo: theme.urlInfo
|
|
10204
10219
|
} : {}, {
|
|
10205
|
-
PLAY_TYPE: theme.options.type
|
|
10206
|
-
|
|
10220
|
+
PLAY_TYPE: theme.options.type,
|
|
10221
|
+
sdkType: theme.options.sdkType
|
|
10222
|
+
}, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
|
|
10207
10223
|
props: props
|
|
10208
10224
|
}));
|
|
10209
10225
|
}
|
|
@@ -10356,7 +10372,8 @@ function _renderTheme(theme, data) {
|
|
|
10356
10372
|
list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
|
|
10357
10373
|
// FIXME: 这个逻辑实际上是有问题的
|
|
10358
10374
|
_needTimeLine = list.some(function(item) {
|
|
10359
|
-
|
|
10375
|
+
var _theme_options;
|
|
10376
|
+
return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
|
|
10360
10377
|
});
|
|
10361
10378
|
// PC 单独渲染timeLine
|
|
10362
10379
|
if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
|
|
@@ -10384,8 +10401,8 @@ function _renderTheme(theme, data) {
|
|
|
10384
10401
|
}
|
|
10385
10402
|
if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
|
|
10386
10403
|
[].concat(((_filterThemeData_header1 = filterThemeData.header) == null ? void 0 : _filterThemeData_header1.btnList) || [], (_filterThemeData_footer_btnList1 = (_filterThemeData_footer1 = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer1.btnList) != null ? _filterThemeData_footer_btnList1 : []).forEach(function(item) {
|
|
10387
|
-
var _theme__mobileExtend;
|
|
10388
|
-
if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
10404
|
+
var _theme_options, _theme__mobileExtend;
|
|
10405
|
+
if (REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
10389
10406
|
});
|
|
10390
10407
|
}
|
|
10391
10408
|
if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
|
|
@@ -11993,6 +12010,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11993
12010
|
zh: zh,
|
|
11994
12011
|
en: en
|
|
11995
12012
|
};
|
|
11996
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.
|
|
12013
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
|
|
11997
12014
|
|
|
11998
12015
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v2.1.
|
|
3
|
-
* Copyright (c) 2026-
|
|
2
|
+
* @ezuikit/player-theme v2.1.4-beta.3
|
|
3
|
+
* Copyright (c) 2026-04-17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -403,11 +403,18 @@
|
|
|
403
403
|
* | rec | cloudRec | cloudRecord |
|
|
404
404
|
* |:---------------------:|:------------:|:---------------:|
|
|
405
405
|
* | 本地回放(SDK存储回放) | 云存储回放 | 云录制回放 |
|
|
406
|
-
*/
|
|
407
|
-
|
|
408
|
-
'
|
|
409
|
-
'
|
|
410
|
-
|
|
406
|
+
*/ // export const REC_GROUP: string[] = ['rec', 'cloudRec', 'cloudRecord'] as const;
|
|
407
|
+
var REC_GROUP = function(sdkType) {
|
|
408
|
+
if (sdkType === void 0) sdkType = 'base';
|
|
409
|
+
return sdkType === 'base' ? [
|
|
410
|
+
'rec',
|
|
411
|
+
'cloudRec',
|
|
412
|
+
'cloudRecord'
|
|
413
|
+
] : [
|
|
414
|
+
'rec',
|
|
415
|
+
'cloudRec'
|
|
416
|
+
];
|
|
417
|
+
};
|
|
411
418
|
/**
|
|
412
419
|
* 设备信息
|
|
413
420
|
*
|
|
@@ -6410,7 +6417,7 @@
|
|
|
6410
6417
|
|
|
6411
6418
|
/*
|
|
6412
6419
|
* @ezuikit/control-zoom v0.0.2
|
|
6413
|
-
* Copyright (c) 2026-
|
|
6420
|
+
* Copyright (c) 2026-04-02 Ezviz-OpenBiz
|
|
6414
6421
|
* Released under the MIT License.
|
|
6415
6422
|
*/
|
|
6416
6423
|
|
|
@@ -7511,7 +7518,7 @@
|
|
|
7511
7518
|
deviceControls.push(item);
|
|
7512
7519
|
return false;
|
|
7513
7520
|
}
|
|
7514
|
-
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
7521
|
+
if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
|
|
7515
7522
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
7516
7523
|
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
7517
7524
|
part: recControls[0].part
|
|
@@ -7534,7 +7541,7 @@
|
|
|
7534
7541
|
deviceControls.push(item);
|
|
7535
7542
|
return false;
|
|
7536
7543
|
}
|
|
7537
|
-
if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
|
|
7544
|
+
if (item.isrender !== 0 && REC_GROUP().includes(item.iconId)) {
|
|
7538
7545
|
// TODO: 因为回放是一组, 位置以第一个位置为准
|
|
7539
7546
|
recControls.push(recControls[0] ? _extends$i({}, item, {
|
|
7540
7547
|
part: recControls[0].part
|
|
@@ -8224,7 +8231,7 @@
|
|
|
8224
8231
|
|
|
8225
8232
|
/*
|
|
8226
8233
|
* @ezuikit/control-ptz v0.0.1
|
|
8227
|
-
* Copyright (c) 2026-
|
|
8234
|
+
* Copyright (c) 2026-04-02 Ezviz-OpenBiz
|
|
8228
8235
|
* Released under the MIT License.
|
|
8229
8236
|
*/
|
|
8230
8237
|
|
|
@@ -9957,12 +9964,12 @@
|
|
|
9957
9964
|
};
|
|
9958
9965
|
}
|
|
9959
9966
|
}
|
|
9960
|
-
/**
|
|
9961
|
-
* 语音广播控件
|
|
9962
|
-
*
|
|
9963
|
-
* 用于触发语音广播功能的按钮控件
|
|
9964
|
-
*
|
|
9965
|
-
* @category Control
|
|
9967
|
+
/**
|
|
9968
|
+
* 语音广播控件
|
|
9969
|
+
*
|
|
9970
|
+
* 用于触发语音广播功能的按钮控件
|
|
9971
|
+
*
|
|
9972
|
+
* @category Control
|
|
9966
9973
|
*/ var Broadcast = /*#__PURE__*/ function(Control) {
|
|
9967
9974
|
_inherits$b(Broadcast, Control);
|
|
9968
9975
|
function Broadcast(options) {
|
|
@@ -9973,13 +9980,18 @@
|
|
|
9973
9980
|
classNameSuffix: 'broadcast'
|
|
9974
9981
|
})) || this;
|
|
9975
9982
|
_this._options = options;
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
_this.active
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
+
if (options.sdkType === "base") {
|
|
9984
|
+
_this._render();
|
|
9985
|
+
_this.on(EVENTS.broadcastChange, function(active) {
|
|
9986
|
+
if (_this.active !== active) {
|
|
9987
|
+
_this.active = active;
|
|
9988
|
+
_this._render();
|
|
9989
|
+
}
|
|
9990
|
+
});
|
|
9991
|
+
_this.$container.style.removeProperty("display");
|
|
9992
|
+
} else {
|
|
9993
|
+
_this.$container.style.display = "none";
|
|
9994
|
+
}
|
|
9983
9995
|
return _this;
|
|
9984
9996
|
}
|
|
9985
9997
|
var _proto = Broadcast.prototype;
|
|
@@ -9997,16 +10009,16 @@
|
|
|
9997
10009
|
Control.prototype.reset.call(this, hide);
|
|
9998
10010
|
}
|
|
9999
10011
|
};
|
|
10000
|
-
/**
|
|
10001
|
-
* 销毁语音广播控件
|
|
10012
|
+
/**
|
|
10013
|
+
* 销毁语音广播控件
|
|
10002
10014
|
*/ _proto.destroy = function destroy() {
|
|
10003
10015
|
if (this.active) {
|
|
10004
10016
|
this.reset();
|
|
10005
10017
|
}
|
|
10006
10018
|
Control.prototype.destroy.call(this);
|
|
10007
10019
|
};
|
|
10008
|
-
/**
|
|
10009
|
-
* 点击 Control 会触发
|
|
10020
|
+
/**
|
|
10021
|
+
* 点击 Control 会触发
|
|
10010
10022
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
10011
10023
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
10012
10024
|
return Control.prototype._onControlClick;
|
|
@@ -10182,12 +10194,12 @@
|
|
|
10182
10194
|
};
|
|
10183
10195
|
}
|
|
10184
10196
|
}
|
|
10185
|
-
/**
|
|
10186
|
-
* AI对话框控件
|
|
10187
|
-
*
|
|
10188
|
-
* 用于触发AI对话框功能的按钮控件
|
|
10189
|
-
*
|
|
10190
|
-
* @category Control
|
|
10197
|
+
/**
|
|
10198
|
+
* AI对话框控件
|
|
10199
|
+
*
|
|
10200
|
+
* 用于触发AI对话框功能的按钮控件
|
|
10201
|
+
*
|
|
10202
|
+
* @category Control
|
|
10191
10203
|
*/ var AIChat = /*#__PURE__*/ function(Control) {
|
|
10192
10204
|
_inherits$a(AIChat, Control);
|
|
10193
10205
|
function AIChat(options) {
|
|
@@ -10198,7 +10210,7 @@
|
|
|
10198
10210
|
classNameSuffix: 'aichat'
|
|
10199
10211
|
})) || this;
|
|
10200
10212
|
_this._options = options;
|
|
10201
|
-
if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud") {
|
|
10213
|
+
if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
|
|
10202
10214
|
_this._render();
|
|
10203
10215
|
_this.on(EVENTS.aichatChange, function(active) {
|
|
10204
10216
|
if (_this.active !== active) {
|
|
@@ -10206,6 +10218,9 @@
|
|
|
10206
10218
|
_this._render();
|
|
10207
10219
|
}
|
|
10208
10220
|
});
|
|
10221
|
+
_this.$container.style.removeProperty("display");
|
|
10222
|
+
} else {
|
|
10223
|
+
_this.$container.style.display = "none";
|
|
10209
10224
|
}
|
|
10210
10225
|
return _this;
|
|
10211
10226
|
}
|
|
@@ -10224,16 +10239,16 @@
|
|
|
10224
10239
|
Control.prototype.reset.call(this, hide);
|
|
10225
10240
|
}
|
|
10226
10241
|
};
|
|
10227
|
-
/**
|
|
10228
|
-
* 销毁AI对话框控件
|
|
10242
|
+
/**
|
|
10243
|
+
* 销毁AI对话框控件
|
|
10229
10244
|
*/ _proto.destroy = function destroy() {
|
|
10230
10245
|
if (this.active) {
|
|
10231
10246
|
this.reset();
|
|
10232
10247
|
}
|
|
10233
10248
|
Control.prototype.destroy.call(this);
|
|
10234
10249
|
};
|
|
10235
|
-
/**
|
|
10236
|
-
* 点击 Control 会触发
|
|
10250
|
+
/**
|
|
10251
|
+
* 点击 Control 会触发
|
|
10237
10252
|
*/ _proto._onControlClick = function _onControlClick(e) {
|
|
10238
10253
|
var _this = this, _superprop_get__onControlClick = function() {
|
|
10239
10254
|
return Control.prototype._onControlClick;
|
|
@@ -12303,12 +12318,12 @@
|
|
|
12303
12318
|
for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
|
|
12304
12319
|
var item = _step.value;
|
|
12305
12320
|
var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
|
|
12306
|
-
_theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
|
|
12307
|
-
if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP.includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
|
|
12321
|
+
_theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1, _theme_options, _theme_options1;
|
|
12322
|
+
if (((((_theme_options_mobileExtendOptions = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions.controls) || []).includes(item.iconId) && item.iconId !== "ptz" || ((_theme_options_mobileExtendOptions1 = theme.options.mobileExtendOptions) == null ? void 0 : (_theme_options_mobileExtendOptions_controls = _theme_options_mobileExtendOptions1.controls) == null ? void 0 : _theme_options_mobileExtendOptions_controls.includes('rec')) && REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId) // 移动端模式下,不渲染在header 中控件, 需要移动到mobileExtend中
|
|
12308
12323
|
) && Utils.isMobile) {
|
|
12309
12324
|
continue;
|
|
12310
12325
|
}
|
|
12311
|
-
if (REC_GROUP.includes(item.iconId) && theme._header) {
|
|
12326
|
+
if (REC_GROUP((_theme_options1 = theme.options) == null ? void 0 : _theme_options1.sdkType).includes(item.iconId) && theme._header) {
|
|
12312
12327
|
_renderRecType(theme, theme._header.$right, item.iconId, props);
|
|
12313
12328
|
continue;
|
|
12314
12329
|
}
|
|
@@ -12316,7 +12331,7 @@
|
|
|
12316
12331
|
if (theme.options.deviceOptions !== null) {
|
|
12317
12332
|
var _theme_controls;
|
|
12318
12333
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
|
|
12319
|
-
var
|
|
12334
|
+
var _theme_options2;
|
|
12320
12335
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
12321
12336
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
12322
12337
|
rootContainer: theme.$container,
|
|
@@ -12329,7 +12344,7 @@
|
|
|
12329
12344
|
type: theme.options.type,
|
|
12330
12345
|
deviceSerial: theme.urlInfo.deviceSerial,
|
|
12331
12346
|
channelNo: theme.urlInfo.channelNo
|
|
12332
|
-
}, ((
|
|
12347
|
+
}, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
|
|
12333
12348
|
props: props
|
|
12334
12349
|
}));
|
|
12335
12350
|
}
|
|
@@ -12339,7 +12354,7 @@
|
|
|
12339
12354
|
// footer
|
|
12340
12355
|
if (Controls[item.iconId]) {
|
|
12341
12356
|
if (theme.options["" + item.iconId + "Options"] !== null) {
|
|
12342
|
-
var
|
|
12357
|
+
var _theme_options3;
|
|
12343
12358
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
12344
12359
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
12345
12360
|
rootContainer: theme.$container,
|
|
@@ -12356,8 +12371,9 @@
|
|
|
12356
12371
|
channelNo: theme.urlInfo.channelNo,
|
|
12357
12372
|
urlInfo: theme.urlInfo
|
|
12358
12373
|
} : {}, {
|
|
12359
|
-
PLAY_TYPE: theme.options.type
|
|
12360
|
-
|
|
12374
|
+
PLAY_TYPE: theme.options.type,
|
|
12375
|
+
sdkType: theme.options.sdkType
|
|
12376
|
+
}, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
|
|
12361
12377
|
props: props
|
|
12362
12378
|
}));
|
|
12363
12379
|
}
|
|
@@ -12510,7 +12526,8 @@
|
|
|
12510
12526
|
list = [].concat(((_filterThemeData_header = filterThemeData.header) == null ? void 0 : _filterThemeData_header.btnList) || [], (_filterThemeData_footer_btnList = (_filterThemeData_footer = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer.btnList) != null ? _filterThemeData_footer_btnList : []);
|
|
12511
12527
|
// FIXME: 这个逻辑实际上是有问题的
|
|
12512
12528
|
_needTimeLine = list.some(function(item) {
|
|
12513
|
-
|
|
12529
|
+
var _theme_options;
|
|
12530
|
+
return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
|
|
12514
12531
|
});
|
|
12515
12532
|
// PC 单独渲染timeLine
|
|
12516
12533
|
if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
|
|
@@ -12538,8 +12555,8 @@
|
|
|
12538
12555
|
}
|
|
12539
12556
|
if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
|
|
12540
12557
|
[].concat(((_filterThemeData_header1 = filterThemeData.header) == null ? void 0 : _filterThemeData_header1.btnList) || [], (_filterThemeData_footer_btnList1 = (_filterThemeData_footer1 = filterThemeData.footer) == null ? void 0 : _filterThemeData_footer1.btnList) != null ? _filterThemeData_footer_btnList1 : []).forEach(function(item) {
|
|
12541
|
-
var _theme__mobileExtend;
|
|
12542
|
-
if (REC_GROUP.includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
12558
|
+
var _theme_options, _theme__mobileExtend;
|
|
12559
|
+
if (REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId)) _renderRecType(theme, (_theme__mobileExtend = theme._mobileExtend) == null ? void 0 : _theme__mobileExtend.$topRight, item.iconId, props);
|
|
12543
12560
|
});
|
|
12544
12561
|
}
|
|
12545
12562
|
if ((theme.options.timeLineOptions !== null || !theme.options.disabledTimeLine) && ((_theme_options_mobileExtendOptions3 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions3.controls.includes('timeLine')) && _needTimeLine) {
|
|
@@ -14147,7 +14164,7 @@
|
|
|
14147
14164
|
zh: zh,
|
|
14148
14165
|
en: en
|
|
14149
14166
|
};
|
|
14150
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.
|
|
14167
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
|
|
14151
14168
|
|
|
14152
14169
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
14153
14170
|
|
package/dist/style.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1433,10 +1433,7 @@ declare class Theme extends EventEmitter {
|
|
|
1433
1433
|
readonly changeTheme: "changeTheme";
|
|
1434
1434
|
readonly recTypeChange: "recTypeChange";
|
|
1435
1435
|
readonly definitionChange: "definitionChange";
|
|
1436
|
-
readonly speedChange: "speedChange";
|
|
1437
|
-
* @since 0.0.1
|
|
1438
|
-
* @private
|
|
1439
|
-
*/
|
|
1436
|
+
readonly speedChange: "speedChange";
|
|
1440
1437
|
readonly recordingChange: "recordingChange";
|
|
1441
1438
|
readonly talkingChange: "talkingChange";
|
|
1442
1439
|
readonly talkVolumeChange: "talkVolumeChange";
|
|
@@ -1458,24 +1455,20 @@ declare class Theme extends EventEmitter {
|
|
|
1458
1455
|
readonly capturePictureDestroy: "Control.capturePictureDestroy";
|
|
1459
1456
|
readonly volumechange: "Control.volumechange";
|
|
1460
1457
|
readonly volumePanelOpenChange: "Control.volumePanelOpenChange";
|
|
1461
|
-
/** resizeObserver 监听销毁 */
|
|
1462
1458
|
readonly volumeDestroy: "Control.volumeDestroy";
|
|
1463
1459
|
readonly controlsBarOpenChange: "Control.controlsBarOpenChange";
|
|
1464
|
-
readonly headerMoreShowControlsChange: "Control.headerMoreShowControlsChange";
|
|
1460
|
+
readonly headerMoreShowControlsChange: "Control.headerMoreShowControlsChange"; /** 加载中 */
|
|
1465
1461
|
readonly headerMorePanelOpenChange: "Control.headerMorePanelOpenChange";
|
|
1466
1462
|
readonly footerMoreShowControlsChange: "Control.footerMoreShowControlsChange";
|
|
1467
1463
|
readonly footerMorePanelOpenChange: "Control.footerMorePanelOpenChange";
|
|
1468
1464
|
readonly deviceDestroy: "Control.deviceDestroy";
|
|
1469
1465
|
readonly recTypeChange: "Control.recTypeChange";
|
|
1470
1466
|
readonly recDestroy: "Control.recDestroy";
|
|
1471
|
-
readonly definitionChange: "Control.definitionChange";
|
|
1467
|
+
readonly definitionChange: "Control.definitionChange";
|
|
1472
1468
|
readonly definitionList: "Control.definitionList";
|
|
1473
1469
|
readonly definitionPanelOpenChange: "Control.definitionPanelOpenChange";
|
|
1474
1470
|
readonly definitionDestroy: "Control.definitionDestroy";
|
|
1475
1471
|
readonly speedChange: "Control.speedChange";
|
|
1476
|
-
/**
|
|
1477
|
-
* 录像回放的月份列表 @private
|
|
1478
|
-
*/
|
|
1479
1472
|
readonly speedPanelOpenChange: "Control.speedPanelOpenChange";
|
|
1480
1473
|
readonly speedDestroy: "Control.speedDestroy";
|
|
1481
1474
|
readonly ptzPanelOpenChange: "Control.ptzPanelOpenChange";
|
|
@@ -2529,7 +2522,7 @@ declare class Theme extends EventEmitter {
|
|
|
2529
2522
|
* @param url 录像 url
|
|
2530
2523
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
2531
2524
|
*/
|
|
2532
|
-
protected _getRecType(url: string): "" | "
|
|
2525
|
+
protected _getRecType(url: string): "" | "rec" | "cloudRec" | "cloudRecord";
|
|
2533
2526
|
private resetControl;
|
|
2534
2527
|
/**
|
|
2535
2528
|
* 窗口全屏后旋转 90度判断, 然后设置控件已经旋转 90度, 为了解决控件交互问题
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/player-theme",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4-beta.3",
|
|
4
4
|
"description": "player theme",
|
|
5
5
|
"title": "theme",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"dev": "cross-env NODE_ENV=development rollup --config rollup.config.mjs --watch",
|
|
10
|
+
"build": "npm run clean && cross-env NODE_ENV=production rollup --config rollup.config.mjs",
|
|
11
|
+
"clean": "rimraf docs dist coverage",
|
|
12
|
+
"types": "tsc src/index.ts --emitDeclarationOnly --declaration --declarationDir dist/types --esModuleInterop",
|
|
13
|
+
"docs": "typedoc --tsconfig typedoc.config.js"
|
|
14
|
+
},
|
|
8
15
|
"files": [
|
|
9
16
|
"dist"
|
|
10
17
|
],
|