@ezuikit/player-theme 2.1.4-beta.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.4-beta.1
3
- * Copyright (c) 2026-03-30 Ezviz-OpenBiz
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
- */ var REC_GROUP = [
47
- 'rec',
48
- 'cloudRec',
49
- 'cloudRecord'
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.4-beta.1
3
- * Copyright (c) 2026-03-30 Ezviz-OpenBiz
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
- */ var REC_GROUP = [
60
- 'rec',
61
- 'cloudRec',
62
- 'cloudRecord'
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-03-18 Ezviz-OpenBiz
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-03-18 Ezviz-OpenBiz
6592
+ * Copyright (c) 2026-04-02 Ezviz-OpenBiz
6586
6593
  * Released under the MIT License.
6587
6594
  */
6588
6595
 
@@ -8331,14 +8338,14 @@ function _ts_generator$3(thisArg, body) {
8331
8338
  classNameSuffix: 'broadcast'
8332
8339
  })) || this;
8333
8340
  _this._options = options;
8334
- _this._render();
8335
- _this.on(EVENTS.broadcastChange, function(active) {
8336
- if (_this.active !== active) {
8337
- _this.active = active;
8338
- _this._render();
8339
- }
8340
- });
8341
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
+ });
8342
8349
  _this.$container.style.removeProperty("display");
8343
8350
  } else {
8344
8351
  _this.$container.style.display = "none";
@@ -8561,14 +8568,14 @@ function _ts_generator$2(thisArg, body) {
8561
8568
  classNameSuffix: 'aichat'
8562
8569
  })) || this;
8563
8570
  _this._options = options;
8564
- _this._render();
8565
- _this.on(EVENTS.aichatChange, function(active) {
8566
- if (_this.active !== active) {
8567
- _this.active = active;
8568
- _this._render();
8569
- }
8570
- });
8571
8571
  if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
8572
+ _this._render();
8573
+ _this.on(EVENTS.aichatChange, function(active) {
8574
+ if (_this.active !== active) {
8575
+ _this.active = active;
8576
+ _this._render();
8577
+ }
8578
+ });
8572
8579
  _this.$container.style.removeProperty("display");
8573
8580
  } else {
8574
8581
  _this.$container.style.display = "none";
@@ -10159,12 +10166,12 @@ function _renderControls(theme, $container, btnList, props) {
10159
10166
  for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
10160
10167
  var item = _step.value;
10161
10168
  var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
10162
- _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
10163
- 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中
10164
10171
  ) && Utils.isMobile) {
10165
10172
  continue;
10166
10173
  }
10167
- 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) {
10168
10175
  _renderRecType(theme, theme._header.$right, item.iconId, props);
10169
10176
  continue;
10170
10177
  }
@@ -10172,7 +10179,7 @@ function _renderControls(theme, $container, btnList, props) {
10172
10179
  if (theme.options.deviceOptions !== null) {
10173
10180
  var _theme_controls;
10174
10181
  if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
10175
- var _theme_options;
10182
+ var _theme_options2;
10176
10183
  // eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
10177
10184
  theme.controls["deviceControl"] = new Controls["device"](_extends$1({
10178
10185
  rootContainer: theme.$container,
@@ -10185,7 +10192,7 @@ function _renderControls(theme, $container, btnList, props) {
10185
10192
  type: theme.options.type,
10186
10193
  deviceSerial: theme.urlInfo.deviceSerial,
10187
10194
  channelNo: theme.urlInfo.channelNo
10188
- }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
10195
+ }, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
10189
10196
  props: props
10190
10197
  }));
10191
10198
  }
@@ -10195,7 +10202,7 @@ function _renderControls(theme, $container, btnList, props) {
10195
10202
  // footer
10196
10203
  if (Controls[item.iconId]) {
10197
10204
  if (theme.options["" + item.iconId + "Options"] !== null) {
10198
- var _theme_options1;
10205
+ var _theme_options3;
10199
10206
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
10200
10207
  theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
10201
10208
  rootContainer: theme.$container,
@@ -10214,7 +10221,7 @@ function _renderControls(theme, $container, btnList, props) {
10214
10221
  } : {}, {
10215
10222
  PLAY_TYPE: theme.options.type,
10216
10223
  sdkType: theme.options.sdkType
10217
- }, ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["" + item.iconId + "Options"]) || {}, {
10224
+ }, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
10218
10225
  props: props
10219
10226
  }));
10220
10227
  }
@@ -10367,7 +10374,8 @@ function _renderTheme(theme, data) {
10367
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 : []);
10368
10375
  // FIXME: 这个逻辑实际上是有问题的
10369
10376
  _needTimeLine = list.some(function(item) {
10370
- return REC_GROUP.includes(item.iconId);
10377
+ var _theme_options;
10378
+ return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
10371
10379
  });
10372
10380
  // PC 单独渲染timeLine
10373
10381
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
@@ -10395,8 +10403,8 @@ function _renderTheme(theme, data) {
10395
10403
  }
10396
10404
  if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
10397
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) {
10398
- var _theme__mobileExtend;
10399
- 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);
10400
10408
  });
10401
10409
  }
10402
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) {
@@ -12004,7 +12012,7 @@ var THEME_DEFAULT_OPTIONS = {
12004
12012
  zh: zh,
12005
12013
  en: en
12006
12014
  };
12007
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.1';
12015
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
12008
12016
 
12009
12017
  exports.Control = Control;
12010
12018
  exports.EVENTS = EVENTS;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.4-beta.1
3
- * Copyright (c) 2026-03-30 Ezviz-OpenBiz
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
- */ var REC_GROUP = [
58
- 'rec',
59
- 'cloudRec',
60
- 'cloudRecord'
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-03-18 Ezviz-OpenBiz
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-03-18 Ezviz-OpenBiz
6590
+ * Copyright (c) 2026-04-02 Ezviz-OpenBiz
6584
6591
  * Released under the MIT License.
6585
6592
  */
6586
6593
 
@@ -8329,14 +8336,14 @@ function _ts_generator$3(thisArg, body) {
8329
8336
  classNameSuffix: 'broadcast'
8330
8337
  })) || this;
8331
8338
  _this._options = options;
8332
- _this._render();
8333
- _this.on(EVENTS.broadcastChange, function(active) {
8334
- if (_this.active !== active) {
8335
- _this.active = active;
8336
- _this._render();
8337
- }
8338
- });
8339
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
+ });
8340
8347
  _this.$container.style.removeProperty("display");
8341
8348
  } else {
8342
8349
  _this.$container.style.display = "none";
@@ -8559,14 +8566,14 @@ function _ts_generator$2(thisArg, body) {
8559
8566
  classNameSuffix: 'aichat'
8560
8567
  })) || this;
8561
8568
  _this._options = options;
8562
- _this._render();
8563
- _this.on(EVENTS.aichatChange, function(active) {
8564
- if (_this.active !== active) {
8565
- _this.active = active;
8566
- _this._render();
8567
- }
8568
- });
8569
8569
  if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
8570
+ _this._render();
8571
+ _this.on(EVENTS.aichatChange, function(active) {
8572
+ if (_this.active !== active) {
8573
+ _this.active = active;
8574
+ _this._render();
8575
+ }
8576
+ });
8570
8577
  _this.$container.style.removeProperty("display");
8571
8578
  } else {
8572
8579
  _this.$container.style.display = "none";
@@ -10157,12 +10164,12 @@ function _renderControls(theme, $container, btnList, props) {
10157
10164
  for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
10158
10165
  var item = _step.value;
10159
10166
  var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
10160
- _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
10161
- 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中
10162
10169
  ) && Utils.isMobile) {
10163
10170
  continue;
10164
10171
  }
10165
- 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) {
10166
10173
  _renderRecType(theme, theme._header.$right, item.iconId, props);
10167
10174
  continue;
10168
10175
  }
@@ -10170,7 +10177,7 @@ function _renderControls(theme, $container, btnList, props) {
10170
10177
  if (theme.options.deviceOptions !== null) {
10171
10178
  var _theme_controls;
10172
10179
  if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
10173
- var _theme_options;
10180
+ var _theme_options2;
10174
10181
  // eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
10175
10182
  theme.controls["deviceControl"] = new Controls["device"](_extends$1({
10176
10183
  rootContainer: theme.$container,
@@ -10183,7 +10190,7 @@ function _renderControls(theme, $container, btnList, props) {
10183
10190
  type: theme.options.type,
10184
10191
  deviceSerial: theme.urlInfo.deviceSerial,
10185
10192
  channelNo: theme.urlInfo.channelNo
10186
- }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
10193
+ }, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
10187
10194
  props: props
10188
10195
  }));
10189
10196
  }
@@ -10193,7 +10200,7 @@ function _renderControls(theme, $container, btnList, props) {
10193
10200
  // footer
10194
10201
  if (Controls[item.iconId]) {
10195
10202
  if (theme.options["" + item.iconId + "Options"] !== null) {
10196
- var _theme_options1;
10203
+ var _theme_options3;
10197
10204
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
10198
10205
  theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
10199
10206
  rootContainer: theme.$container,
@@ -10212,7 +10219,7 @@ function _renderControls(theme, $container, btnList, props) {
10212
10219
  } : {}, {
10213
10220
  PLAY_TYPE: theme.options.type,
10214
10221
  sdkType: theme.options.sdkType
10215
- }, ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["" + item.iconId + "Options"]) || {}, {
10222
+ }, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
10216
10223
  props: props
10217
10224
  }));
10218
10225
  }
@@ -10365,7 +10372,8 @@ function _renderTheme(theme, data) {
10365
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 : []);
10366
10373
  // FIXME: 这个逻辑实际上是有问题的
10367
10374
  _needTimeLine = list.some(function(item) {
10368
- return REC_GROUP.includes(item.iconId);
10375
+ var _theme_options;
10376
+ return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
10369
10377
  });
10370
10378
  // PC 单独渲染timeLine
10371
10379
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
@@ -10393,8 +10401,8 @@ function _renderTheme(theme, data) {
10393
10401
  }
10394
10402
  if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
10395
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) {
10396
- var _theme__mobileExtend;
10397
- 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);
10398
10406
  });
10399
10407
  }
10400
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) {
@@ -12002,6 +12010,6 @@ var THEME_DEFAULT_OPTIONS = {
12002
12010
  zh: zh,
12003
12011
  en: en
12004
12012
  };
12005
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.1';
12013
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
12006
12014
 
12007
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.4-beta.1
3
- * Copyright (c) 2026-03-30 Ezviz-OpenBiz
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
- */ var REC_GROUP = [
407
- 'rec',
408
- 'cloudRec',
409
- 'cloudRecord'
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-03-18 Ezviz-OpenBiz
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-03-18 Ezviz-OpenBiz
8234
+ * Copyright (c) 2026-04-02 Ezviz-OpenBiz
8228
8235
  * Released under the MIT License.
8229
8236
  */
8230
8237
 
@@ -9973,14 +9980,14 @@
9973
9980
  classNameSuffix: 'broadcast'
9974
9981
  })) || this;
9975
9982
  _this._options = options;
9976
- _this._render();
9977
- _this.on(EVENTS.broadcastChange, function(active) {
9978
- if (_this.active !== active) {
9979
- _this.active = active;
9980
- _this._render();
9981
- }
9982
- });
9983
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
+ });
9984
9991
  _this.$container.style.removeProperty("display");
9985
9992
  } else {
9986
9993
  _this.$container.style.display = "none";
@@ -10203,14 +10210,14 @@
10203
10210
  classNameSuffix: 'aichat'
10204
10211
  })) || this;
10205
10212
  _this._options = options;
10206
- _this._render();
10207
- _this.on(EVENTS.aichatChange, function(active) {
10208
- if (_this.active !== active) {
10209
- _this.active = active;
10210
- _this._render();
10211
- }
10212
- });
10213
10213
  if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud" && options.sdkType === "base") {
10214
+ _this._render();
10215
+ _this.on(EVENTS.aichatChange, function(active) {
10216
+ if (_this.active !== active) {
10217
+ _this.active = active;
10218
+ _this._render();
10219
+ }
10220
+ });
10214
10221
  _this.$container.style.removeProperty("display");
10215
10222
  } else {
10216
10223
  _this.$container.style.display = "none";
@@ -12311,12 +12318,12 @@
12311
12318
  for(var _iterator = _create_for_of_iterator_helper_loose$1(btnList), _step; !(_step = _iterator()).done;){
12312
12319
  var item = _step.value;
12313
12320
  var _theme_options_mobileExtendOptions, // 在移动端支持扩展和窗口区域渲染
12314
- _theme_options_mobileExtendOptions_controls, _theme_options_mobileExtendOptions1;
12315
- 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中
12316
12323
  ) && Utils.isMobile) {
12317
12324
  continue;
12318
12325
  }
12319
- 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) {
12320
12327
  _renderRecType(theme, theme._header.$right, item.iconId, props);
12321
12328
  continue;
12322
12329
  }
@@ -12324,7 +12331,7 @@
12324
12331
  if (theme.options.deviceOptions !== null) {
12325
12332
  var _theme_controls;
12326
12333
  if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
12327
- var _theme_options;
12334
+ var _theme_options2;
12328
12335
  // eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
12329
12336
  theme.controls["deviceControl"] = new Controls["device"](_extends$1({
12330
12337
  rootContainer: theme.$container,
@@ -12337,7 +12344,7 @@
12337
12344
  type: theme.options.type,
12338
12345
  deviceSerial: theme.urlInfo.deviceSerial,
12339
12346
  channelNo: theme.urlInfo.channelNo
12340
- }, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
12347
+ }, ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["deviceOptions"]) || {}, {
12341
12348
  props: props
12342
12349
  }));
12343
12350
  }
@@ -12347,7 +12354,7 @@
12347
12354
  // footer
12348
12355
  if (Controls[item.iconId]) {
12349
12356
  if (theme.options["" + item.iconId + "Options"] !== null) {
12350
- var _theme_options1;
12357
+ var _theme_options3;
12351
12358
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
12352
12359
  theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
12353
12360
  rootContainer: theme.$container,
@@ -12366,7 +12373,7 @@
12366
12373
  } : {}, {
12367
12374
  PLAY_TYPE: theme.options.type,
12368
12375
  sdkType: theme.options.sdkType
12369
- }, ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["" + item.iconId + "Options"]) || {}, {
12376
+ }, ((_theme_options3 = theme.options) == null ? void 0 : _theme_options3["" + item.iconId + "Options"]) || {}, {
12370
12377
  props: props
12371
12378
  }));
12372
12379
  }
@@ -12519,7 +12526,8 @@
12519
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 : []);
12520
12527
  // FIXME: 这个逻辑实际上是有问题的
12521
12528
  _needTimeLine = list.some(function(item) {
12522
- return REC_GROUP.includes(item.iconId);
12529
+ var _theme_options;
12530
+ return REC_GROUP((_theme_options = theme.options) == null ? void 0 : _theme_options.sdkType).includes(item.iconId);
12523
12531
  });
12524
12532
  // PC 单独渲染timeLine
12525
12533
  if (!Utils.isMobile && !(theme.options.timeLineOptions === null || theme.options.disabledTimeLine) && _needTimeLine) {
@@ -12547,8 +12555,8 @@
12547
12555
  }
12548
12556
  if (theme.options.recOptions !== null && ((_theme_options_mobileExtendOptions2 = theme.options.mobileExtendOptions) == null ? void 0 : _theme_options_mobileExtendOptions2.controls.includes('rec')) && _needTimeLine) {
12549
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) {
12550
- var _theme__mobileExtend;
12551
- 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);
12552
12560
  });
12553
12561
  }
12554
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) {
@@ -14156,7 +14164,7 @@
14156
14164
  zh: zh,
14157
14165
  en: en
14158
14166
  };
14159
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.1';
14167
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.4-beta.3';
14160
14168
 
14161
14169
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
14162
14170
 
package/dist/style.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.4-beta.1
3
- * Copyright (c) 2026-03-30 Ezviz-OpenBiz
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
  require("./style.css");
@@ -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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezuikit/player-theme",
3
- "version": "2.1.4-beta.1",
3
+ "version": "2.1.4-beta.3",
4
4
  "description": "player theme",
5
5
  "title": "theme",
6
6
  "main": "dist/index.js",