@ezuikit/player-theme 2.1.2-beta.8 → 2.1.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/constant.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.2-beta.8
3
- * Copyright (c) 2026-03-12 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.3-beta.1
3
+ * Copyright (c) 2026-03-20 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  /**
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.2-beta.8
3
- * Copyright (c) 2026-03-12 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.3-beta.1
3
+ * Copyright (c) 2026-03-20 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
@@ -1762,7 +1762,7 @@ var VOLUME_DEFAULT_OPTIONS = {
1762
1762
  _this._lastVolume = _this._volume;
1763
1763
  _this._muted = !!((_this__options_props3 = _this._options.props) == null ? void 0 : _this__options_props3.muted) || false;
1764
1764
  // 轻应用私有暂时不支持调节音量
1765
- if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen')) {
1765
+ if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'hls')) {
1766
1766
  var _this__options_props4, _this__options_props5;
1767
1767
  _this.picker = new Picker(_this.$container, {
1768
1768
  getPopupContainer: function() {
@@ -3235,6 +3235,47 @@ var en = {
3235
3235
  }
3236
3236
  };
3237
3237
 
3238
+ /**
3239
+ * flv 预览
3240
+ */ var hlsLiveTemplate = {
3241
+ autoFocus: 3,
3242
+ // poster:
3243
+ // "https://img2.baidu.com/it/u=3209353042,356122753&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500",
3244
+ footer: {
3245
+ btnList: [
3246
+ {
3247
+ iconId: 'play',
3248
+ part: 'left',
3249
+ isrender: 1
3250
+ },
3251
+ {
3252
+ iconId: 'capturePicture',
3253
+ part: 'left',
3254
+ defaultActive: 0,
3255
+ isrender: 1
3256
+ },
3257
+ {
3258
+ iconId: 'volume',
3259
+ part: 'left',
3260
+ defaultActive: 0,
3261
+ isrender: 1
3262
+ },
3263
+ {
3264
+ iconId: 'fullscreen',
3265
+ part: 'right',
3266
+ defaultActive: 0,
3267
+ isrender: 1
3268
+ },
3269
+ {
3270
+ iconId: 'globalFullscreen',
3271
+ part: 'right',
3272
+ defaultActive: 0,
3273
+ isrender: 1
3274
+ }
3275
+ ]
3276
+ }
3277
+ };
3278
+
3238
3279
  /**
3239
3280
  * pc 预览
3240
3281
  */ var pcLive = {
@@ -4745,7 +4786,7 @@ function getDefaultExportFromCjs (x) {
4745
4786
 
4746
4787
  /*
4747
4788
  * @ezuikit/control-zoom v0.0.2
4748
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
4789
+ * Copyright (c) 2026-03-18 Ezviz-OpenBiz
4749
4790
  * Released under the MIT License.
4750
4791
  */
4751
4792
 
@@ -5846,14 +5887,14 @@ function _ts_generator$5(thisArg, body) {
5846
5887
  deviceControls.push(item);
5847
5888
  return false;
5848
5889
  }
5849
- if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
5890
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
5850
5891
  // TODO: 因为回放是一组, 位置以第一个位置为准
5851
5892
  recControls.push(recControls[0] ? _extends$i({}, item, {
5852
5893
  part: recControls[0].part
5853
5894
  }) : item);
5854
5895
  return false;
5855
5896
  }
5856
- return item.isrender === 1;
5897
+ return item.isrender !== 0;
5857
5898
  }).map(function(item) {
5858
5899
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5859
5900
  if (replaceKey[item.iconId]) {
@@ -5865,18 +5906,18 @@ function _ts_generator$5(thisArg, body) {
5865
5906
  var footerBtnList = ((themeData == null ? void 0 : (_themeData_footer = themeData.footer) == null ? void 0 : _themeData_footer.btnList) || []).filter(function(item) {
5866
5907
  // TODO: 因为 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 是两个组, 并且要在头部(移动端特殊处理)
5867
5908
  // prettier-ignore
5868
- if (item.isrender === 1 && DEVICE_INFO_GROUP.includes(item.iconId)) {
5909
+ if (item.isrender !== 0 && DEVICE_INFO_GROUP.includes(item.iconId)) {
5869
5910
  deviceControls.push(item);
5870
5911
  return false;
5871
5912
  }
5872
- if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
5913
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
5873
5914
  // TODO: 因为回放是一组, 位置以第一个位置为准
5874
5915
  recControls.push(recControls[0] ? _extends$i({}, item, {
5875
5916
  part: recControls[0].part
5876
5917
  }) : item);
5877
5918
  return false;
5878
5919
  }
5879
- return item.isrender === 1;
5920
+ return item.isrender !== 0;
5880
5921
  }).map(function(item) {
5881
5922
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5882
5923
  if (replaceKey[item.iconId]) {
@@ -5943,12 +5984,10 @@ function _filterLeftRightControls(btnList) {
5943
5984
  3,
5944
5985
  1
5945
5986
  ];
5946
- if (data === 'simple') {
5947
- return [
5948
- 2,
5949
- null
5950
- ];
5951
- }
5987
+ if (data === 'simple') return [
5988
+ 2,
5989
+ null
5990
+ ];
5952
5991
  // 渲染主题模板
5953
5992
  themeData = TEMPLATES[data];
5954
5993
  if (!data) {
@@ -5978,23 +6017,21 @@ function _filterLeftRightControls(btnList) {
5978
6017
  ];
5979
6018
  case 3:
5980
6019
  template = _state.sent();
5981
- if (template) {
5982
- return [
5983
- 2,
5984
- template
5985
- ];
5986
- }
6020
+ if (template) return [
6021
+ 2,
6022
+ template
6023
+ ];
5987
6024
  theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
5988
6025
  return [
5989
- 3,
5990
- 5
6026
+ 2,
6027
+ null
5991
6028
  ];
5992
6029
  case 4:
5993
6030
  _state.sent();
5994
6031
  theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
5995
6032
  return [
5996
- 3,
5997
- 5
6033
+ 2,
6034
+ null
5998
6035
  ];
5999
6036
  case 5:
6000
6037
  return [
@@ -6545,7 +6582,7 @@ var dist = {};
6545
6582
 
6546
6583
  /*
6547
6584
  * @ezuikit/control-ptz v0.0.1
6548
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
6585
+ * Copyright (c) 2026-03-18 Ezviz-OpenBiz
6549
6586
  * Released under the MIT License.
6550
6587
  */
6551
6588
 
@@ -8278,12 +8315,12 @@ function _ts_generator$3(thisArg, body) {
8278
8315
  };
8279
8316
  }
8280
8317
  }
8281
- /**
8282
- * 语音广播控件
8283
- *
8284
- * 用于触发语音广播功能的按钮控件
8285
- *
8286
- * @category Control
8318
+ /**
8319
+ * 语音广播控件
8320
+ *
8321
+ * 用于触发语音广播功能的按钮控件
8322
+ *
8323
+ * @category Control
8287
8324
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8288
8325
  _inherits$b(Broadcast, Control);
8289
8326
  function Broadcast(options) {
@@ -8318,16 +8355,16 @@ function _ts_generator$3(thisArg, body) {
8318
8355
  Control.prototype.reset.call(this, hide);
8319
8356
  }
8320
8357
  };
8321
- /**
8322
- * 销毁语音广播控件
8358
+ /**
8359
+ * 销毁语音广播控件
8323
8360
  */ _proto.destroy = function destroy() {
8324
8361
  if (this.active) {
8325
8362
  this.reset();
8326
8363
  }
8327
8364
  Control.prototype.destroy.call(this);
8328
8365
  };
8329
- /**
8330
- * 点击 Control 会触发
8366
+ /**
8367
+ * 点击 Control 会触发
8331
8368
  */ _proto._onControlClick = function _onControlClick(e) {
8332
8369
  var _this = this, _superprop_get__onControlClick = function() {
8333
8370
  return Control.prototype._onControlClick;
@@ -8503,12 +8540,12 @@ function _ts_generator$2(thisArg, body) {
8503
8540
  };
8504
8541
  }
8505
8542
  }
8506
- /**
8507
- * AI对话框控件
8508
- *
8509
- * 用于触发AI对话框功能的按钮控件
8510
- *
8511
- * @category Control
8543
+ /**
8544
+ * AI对话框控件
8545
+ *
8546
+ * 用于触发AI对话框功能的按钮控件
8547
+ *
8548
+ * @category Control
8512
8549
  */ var AIChat = /*#__PURE__*/ function(Control) {
8513
8550
  _inherits$a(AIChat, Control);
8514
8551
  function AIChat(options) {
@@ -8519,13 +8556,15 @@ function _ts_generator$2(thisArg, body) {
8519
8556
  classNameSuffix: 'aichat'
8520
8557
  })) || this;
8521
8558
  _this._options = options;
8522
- _this._render();
8523
- _this.on(EVENTS.aichatChange, function(active) {
8524
- if (_this.active !== active) {
8525
- _this.active = active;
8526
- _this._render();
8527
- }
8528
- });
8559
+ if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud") {
8560
+ _this._render();
8561
+ _this.on(EVENTS.aichatChange, function(active) {
8562
+ if (_this.active !== active) {
8563
+ _this.active = active;
8564
+ _this._render();
8565
+ }
8566
+ });
8567
+ }
8529
8568
  return _this;
8530
8569
  }
8531
8570
  var _proto = AIChat.prototype;
@@ -8534,9 +8573,6 @@ function _ts_generator$2(thisArg, body) {
8534
8573
  this.$container.innerHTML = IconComponents.aiChat({
8535
8574
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_AICHAT
8536
8575
  });
8537
- if (this._options.urlInfo.searchParams.busType !== '7' && this._options.urlInfo.recType === "cloud") ; else {
8538
- this.$container.style.display = 'none';
8539
- }
8540
8576
  };
8541
8577
  _proto.reset = function reset(hide) {
8542
8578
  if (this.active) {
@@ -8546,19 +8582,16 @@ function _ts_generator$2(thisArg, body) {
8546
8582
  Control.prototype.reset.call(this, hide);
8547
8583
  }
8548
8584
  };
8549
- /**
8550
- * 销毁AI对话框控件
8585
+ /**
8586
+ * 销毁AI对话框控件
8551
8587
  */ _proto.destroy = function destroy() {
8552
8588
  if (this.active) {
8553
8589
  this.reset();
8554
8590
  }
8555
8591
  Control.prototype.destroy.call(this);
8556
8592
  };
8557
- _proto.updateOptions = function updateOptions(options) {
8558
- this._options = _extends$9({}, this._options, options);
8559
- };
8560
- /**
8561
- * 点击 Control 会触发
8593
+ /**
8594
+ * 点击 Control 会触发
8562
8595
  */ _proto._onControlClick = function _onControlClick(e) {
8563
8596
  var _this = this, _superprop_get__onControlClick = function() {
8564
8597
  return Control.prototype._onControlClick;
@@ -10763,9 +10796,11 @@ var THEME_DEFAULT_OPTIONS = {
10763
10796
  _this.destroyed = false;
10764
10797
  var _this_options_template, _ref3;
10765
10798
  // 标准流暂时仅支持 TEMPLATES 中的配置, 多余的的展示不生效(如电子放大是不支持的等等), 待版本更新才能支持
10766
- _this._renderTheme([
10799
+ // prettier-ignore
10800
+ _this._renderTheme(// hls 不支持自定义
10801
+ options.type === 'hls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
10802
+ [
10767
10803
  'flv',
10768
- 'hls',
10769
10804
  'mp4'
10770
10805
  ].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)
10771
10806
  : (_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);
@@ -11489,7 +11524,11 @@ var THEME_DEFAULT_OPTIONS = {
11489
11524
  this.fullscreen();
11490
11525
  }
11491
11526
  };
11492
- _proto._getRecType = function _getRecType(url) {
11527
+ /**
11528
+ * 获取录像类型, 仅 ezopen 支持
11529
+ * @param url 录像 url
11530
+ * @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
11531
+ */ _proto._getRecType = function _getRecType(url) {
11493
11532
  if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
11494
11533
  var urlInfo = require$$1.parseEzopenUrl(url);
11495
11534
  if (urlInfo.type === 'rec') {
@@ -11956,7 +11995,7 @@ var THEME_DEFAULT_OPTIONS = {
11956
11995
  zh: zh,
11957
11996
  en: en
11958
11997
  };
11959
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.2-beta.8';
11998
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.3-beta.1';
11960
11999
 
11961
12000
  exports.Control = Control;
11962
12001
  exports.EVENTS = EVENTS;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.2-beta.8
3
- * Copyright (c) 2026-03-12 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.3-beta.1
3
+ * Copyright (c) 2026-03-20 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import EventEmitter from 'eventemitter3';
@@ -1760,7 +1760,7 @@ var VOLUME_DEFAULT_OPTIONS = {
1760
1760
  _this._lastVolume = _this._volume;
1761
1761
  _this._muted = !!((_this__options_props3 = _this._options.props) == null ? void 0 : _this__options_props3.muted) || false;
1762
1762
  // 轻应用私有暂时不支持调节音量
1763
- if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen')) {
1763
+ if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'hls')) {
1764
1764
  var _this__options_props4, _this__options_props5;
1765
1765
  _this.picker = new Picker(_this.$container, {
1766
1766
  getPopupContainer: function() {
@@ -3233,6 +3233,47 @@ var en = {
3233
3233
  }
3234
3234
  };
3235
3235
 
3236
+ /**
3237
+ * flv 预览
3238
+ */ var hlsLiveTemplate = {
3239
+ autoFocus: 3,
3240
+ // poster:
3241
+ // "https://img2.baidu.com/it/u=3209353042,356122753&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500",
3242
+ footer: {
3243
+ btnList: [
3244
+ {
3245
+ iconId: 'play',
3246
+ part: 'left',
3247
+ isrender: 1
3248
+ },
3249
+ {
3250
+ iconId: 'capturePicture',
3251
+ part: 'left',
3252
+ defaultActive: 0,
3253
+ isrender: 1
3254
+ },
3255
+ {
3256
+ iconId: 'volume',
3257
+ part: 'left',
3258
+ defaultActive: 0,
3259
+ isrender: 1
3260
+ },
3261
+ {
3262
+ iconId: 'fullscreen',
3263
+ part: 'right',
3264
+ defaultActive: 0,
3265
+ isrender: 1
3266
+ },
3267
+ {
3268
+ iconId: 'globalFullscreen',
3269
+ part: 'right',
3270
+ defaultActive: 0,
3271
+ isrender: 1
3272
+ }
3273
+ ]
3274
+ }
3275
+ };
3276
+
3236
3277
  /**
3237
3278
  * pc 预览
3238
3279
  */ var pcLive = {
@@ -4743,7 +4784,7 @@ function getDefaultExportFromCjs (x) {
4743
4784
 
4744
4785
  /*
4745
4786
  * @ezuikit/control-zoom v0.0.2
4746
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
4787
+ * Copyright (c) 2026-03-18 Ezviz-OpenBiz
4747
4788
  * Released under the MIT License.
4748
4789
  */
4749
4790
 
@@ -5844,14 +5885,14 @@ function _ts_generator$5(thisArg, body) {
5844
5885
  deviceControls.push(item);
5845
5886
  return false;
5846
5887
  }
5847
- if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
5888
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
5848
5889
  // TODO: 因为回放是一组, 位置以第一个位置为准
5849
5890
  recControls.push(recControls[0] ? _extends$i({}, item, {
5850
5891
  part: recControls[0].part
5851
5892
  }) : item);
5852
5893
  return false;
5853
5894
  }
5854
- return item.isrender === 1;
5895
+ return item.isrender !== 0;
5855
5896
  }).map(function(item) {
5856
5897
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5857
5898
  if (replaceKey[item.iconId]) {
@@ -5863,18 +5904,18 @@ function _ts_generator$5(thisArg, body) {
5863
5904
  var footerBtnList = ((themeData == null ? void 0 : (_themeData_footer = themeData.footer) == null ? void 0 : _themeData_footer.btnList) || []).filter(function(item) {
5864
5905
  // TODO: 因为 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 是两个组, 并且要在头部(移动端特殊处理)
5865
5906
  // prettier-ignore
5866
- if (item.isrender === 1 && DEVICE_INFO_GROUP.includes(item.iconId)) {
5907
+ if (item.isrender !== 0 && DEVICE_INFO_GROUP.includes(item.iconId)) {
5867
5908
  deviceControls.push(item);
5868
5909
  return false;
5869
5910
  }
5870
- if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
5911
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
5871
5912
  // TODO: 因为回放是一组, 位置以第一个位置为准
5872
5913
  recControls.push(recControls[0] ? _extends$i({}, item, {
5873
5914
  part: recControls[0].part
5874
5915
  }) : item);
5875
5916
  return false;
5876
5917
  }
5877
- return item.isrender === 1;
5918
+ return item.isrender !== 0;
5878
5919
  }).map(function(item) {
5879
5920
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
5880
5921
  if (replaceKey[item.iconId]) {
@@ -5941,12 +5982,10 @@ function _filterLeftRightControls(btnList) {
5941
5982
  3,
5942
5983
  1
5943
5984
  ];
5944
- if (data === 'simple') {
5945
- return [
5946
- 2,
5947
- null
5948
- ];
5949
- }
5985
+ if (data === 'simple') return [
5986
+ 2,
5987
+ null
5988
+ ];
5950
5989
  // 渲染主题模板
5951
5990
  themeData = TEMPLATES[data];
5952
5991
  if (!data) {
@@ -5976,23 +6015,21 @@ function _filterLeftRightControls(btnList) {
5976
6015
  ];
5977
6016
  case 3:
5978
6017
  template = _state.sent();
5979
- if (template) {
5980
- return [
5981
- 2,
5982
- template
5983
- ];
5984
- }
6018
+ if (template) return [
6019
+ 2,
6020
+ template
6021
+ ];
5985
6022
  theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
5986
6023
  return [
5987
- 3,
5988
- 5
6024
+ 2,
6025
+ null
5989
6026
  ];
5990
6027
  case 4:
5991
6028
  _state.sent();
5992
6029
  theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
5993
6030
  return [
5994
- 3,
5995
- 5
6031
+ 2,
6032
+ null
5996
6033
  ];
5997
6034
  case 5:
5998
6035
  return [
@@ -6543,7 +6580,7 @@ var dist = {};
6543
6580
 
6544
6581
  /*
6545
6582
  * @ezuikit/control-ptz v0.0.1
6546
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
6583
+ * Copyright (c) 2026-03-18 Ezviz-OpenBiz
6547
6584
  * Released under the MIT License.
6548
6585
  */
6549
6586
 
@@ -8276,12 +8313,12 @@ function _ts_generator$3(thisArg, body) {
8276
8313
  };
8277
8314
  }
8278
8315
  }
8279
- /**
8280
- * 语音广播控件
8281
- *
8282
- * 用于触发语音广播功能的按钮控件
8283
- *
8284
- * @category Control
8316
+ /**
8317
+ * 语音广播控件
8318
+ *
8319
+ * 用于触发语音广播功能的按钮控件
8320
+ *
8321
+ * @category Control
8285
8322
  */ var Broadcast = /*#__PURE__*/ function(Control) {
8286
8323
  _inherits$b(Broadcast, Control);
8287
8324
  function Broadcast(options) {
@@ -8316,16 +8353,16 @@ function _ts_generator$3(thisArg, body) {
8316
8353
  Control.prototype.reset.call(this, hide);
8317
8354
  }
8318
8355
  };
8319
- /**
8320
- * 销毁语音广播控件
8356
+ /**
8357
+ * 销毁语音广播控件
8321
8358
  */ _proto.destroy = function destroy() {
8322
8359
  if (this.active) {
8323
8360
  this.reset();
8324
8361
  }
8325
8362
  Control.prototype.destroy.call(this);
8326
8363
  };
8327
- /**
8328
- * 点击 Control 会触发
8364
+ /**
8365
+ * 点击 Control 会触发
8329
8366
  */ _proto._onControlClick = function _onControlClick(e) {
8330
8367
  var _this = this, _superprop_get__onControlClick = function() {
8331
8368
  return Control.prototype._onControlClick;
@@ -8501,12 +8538,12 @@ function _ts_generator$2(thisArg, body) {
8501
8538
  };
8502
8539
  }
8503
8540
  }
8504
- /**
8505
- * AI对话框控件
8506
- *
8507
- * 用于触发AI对话框功能的按钮控件
8508
- *
8509
- * @category Control
8541
+ /**
8542
+ * AI对话框控件
8543
+ *
8544
+ * 用于触发AI对话框功能的按钮控件
8545
+ *
8546
+ * @category Control
8510
8547
  */ var AIChat = /*#__PURE__*/ function(Control) {
8511
8548
  _inherits$a(AIChat, Control);
8512
8549
  function AIChat(options) {
@@ -8517,13 +8554,15 @@ function _ts_generator$2(thisArg, body) {
8517
8554
  classNameSuffix: 'aichat'
8518
8555
  })) || this;
8519
8556
  _this._options = options;
8520
- _this._render();
8521
- _this.on(EVENTS.aichatChange, function(active) {
8522
- if (_this.active !== active) {
8523
- _this.active = active;
8524
- _this._render();
8525
- }
8526
- });
8557
+ if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud") {
8558
+ _this._render();
8559
+ _this.on(EVENTS.aichatChange, function(active) {
8560
+ if (_this.active !== active) {
8561
+ _this.active = active;
8562
+ _this._render();
8563
+ }
8564
+ });
8565
+ }
8527
8566
  return _this;
8528
8567
  }
8529
8568
  var _proto = AIChat.prototype;
@@ -8532,9 +8571,6 @@ function _ts_generator$2(thisArg, body) {
8532
8571
  this.$container.innerHTML = IconComponents.aiChat({
8533
8572
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_AICHAT
8534
8573
  });
8535
- if (this._options.urlInfo.searchParams.busType !== '7' && this._options.urlInfo.recType === "cloud") ; else {
8536
- this.$container.style.display = 'none';
8537
- }
8538
8574
  };
8539
8575
  _proto.reset = function reset(hide) {
8540
8576
  if (this.active) {
@@ -8544,19 +8580,16 @@ function _ts_generator$2(thisArg, body) {
8544
8580
  Control.prototype.reset.call(this, hide);
8545
8581
  }
8546
8582
  };
8547
- /**
8548
- * 销毁AI对话框控件
8583
+ /**
8584
+ * 销毁AI对话框控件
8549
8585
  */ _proto.destroy = function destroy() {
8550
8586
  if (this.active) {
8551
8587
  this.reset();
8552
8588
  }
8553
8589
  Control.prototype.destroy.call(this);
8554
8590
  };
8555
- _proto.updateOptions = function updateOptions(options) {
8556
- this._options = _extends$9({}, this._options, options);
8557
- };
8558
- /**
8559
- * 点击 Control 会触发
8591
+ /**
8592
+ * 点击 Control 会触发
8560
8593
  */ _proto._onControlClick = function _onControlClick(e) {
8561
8594
  var _this = this, _superprop_get__onControlClick = function() {
8562
8595
  return Control.prototype._onControlClick;
@@ -10761,9 +10794,11 @@ var THEME_DEFAULT_OPTIONS = {
10761
10794
  _this.destroyed = false;
10762
10795
  var _this_options_template, _ref3;
10763
10796
  // 标准流暂时仅支持 TEMPLATES 中的配置, 多余的的展示不生效(如电子放大是不支持的等等), 待版本更新才能支持
10764
- _this._renderTheme([
10797
+ // prettier-ignore
10798
+ _this._renderTheme(// hls 不支持自定义
10799
+ options.type === 'hls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
10800
+ [
10765
10801
  'flv',
10766
- 'hls',
10767
10802
  'mp4'
10768
10803
  ].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)
10769
10804
  : (_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);
@@ -11487,7 +11522,11 @@ var THEME_DEFAULT_OPTIONS = {
11487
11522
  this.fullscreen();
11488
11523
  }
11489
11524
  };
11490
- _proto._getRecType = function _getRecType(url) {
11525
+ /**
11526
+ * 获取录像类型, 仅 ezopen 支持
11527
+ * @param url 录像 url
11528
+ * @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
11529
+ */ _proto._getRecType = function _getRecType(url) {
11491
11530
  if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
11492
11531
  var urlInfo = parseEzopenUrl(url);
11493
11532
  if (urlInfo.type === 'rec') {
@@ -11954,6 +11993,6 @@ var THEME_DEFAULT_OPTIONS = {
11954
11993
  zh: zh,
11955
11994
  en: en
11956
11995
  };
11957
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.2-beta.8';
11996
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.3-beta.1';
11958
11997
 
11959
11998
  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.2-beta.8
3
- * Copyright (c) 2026-03-12 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.3-beta.1
3
+ * Copyright (c) 2026-03-20 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  (function (global, factory) {
@@ -3011,7 +3011,7 @@
3011
3011
  _this._lastVolume = _this._volume;
3012
3012
  _this._muted = !!((_this__options_props3 = _this._options.props) == null ? void 0 : _this__options_props3.muted) || false;
3013
3013
  // 轻应用私有暂时不支持调节音量
3014
- if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen')) {
3014
+ if (!(Utils.isMobile || _this._options.PLAY_TYPE === 'ezopen' || _this._options.PLAY_TYPE === 'hls')) {
3015
3015
  var _this__options_props4, _this__options_props5;
3016
3016
  _this.picker = new Picker(_this.$container, {
3017
3017
  getPopupContainer: function() {
@@ -4863,6 +4863,47 @@
4863
4863
  }
4864
4864
  };
4865
4865
 
4866
+ /**
4867
+ * flv 预览
4868
+ */ var hlsLiveTemplate = {
4869
+ autoFocus: 3,
4870
+ // poster:
4871
+ // "https://img2.baidu.com/it/u=3209353042,356122753&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500",
4872
+ footer: {
4873
+ btnList: [
4874
+ {
4875
+ iconId: 'play',
4876
+ part: 'left',
4877
+ isrender: 1
4878
+ },
4879
+ {
4880
+ iconId: 'capturePicture',
4881
+ part: 'left',
4882
+ defaultActive: 0,
4883
+ isrender: 1
4884
+ },
4885
+ {
4886
+ iconId: 'volume',
4887
+ part: 'left',
4888
+ defaultActive: 0,
4889
+ isrender: 1
4890
+ },
4891
+ {
4892
+ iconId: 'fullscreen',
4893
+ part: 'right',
4894
+ defaultActive: 0,
4895
+ isrender: 1
4896
+ },
4897
+ {
4898
+ iconId: 'globalFullscreen',
4899
+ part: 'right',
4900
+ defaultActive: 0,
4901
+ isrender: 1
4902
+ }
4903
+ ]
4904
+ }
4905
+ };
4906
+
4866
4907
  /**
4867
4908
  * pc 预览
4868
4909
  */ var pcLive = {
@@ -6369,7 +6410,7 @@
6369
6410
 
6370
6411
  /*
6371
6412
  * @ezuikit/control-zoom v0.0.2
6372
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
6413
+ * Copyright (c) 2026-03-18 Ezviz-OpenBiz
6373
6414
  * Released under the MIT License.
6374
6415
  */
6375
6416
 
@@ -7470,14 +7511,14 @@
7470
7511
  deviceControls.push(item);
7471
7512
  return false;
7472
7513
  }
7473
- if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
7514
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
7474
7515
  // TODO: 因为回放是一组, 位置以第一个位置为准
7475
7516
  recControls.push(recControls[0] ? _extends$i({}, item, {
7476
7517
  part: recControls[0].part
7477
7518
  }) : item);
7478
7519
  return false;
7479
7520
  }
7480
- return item.isrender === 1;
7521
+ return item.isrender !== 0;
7481
7522
  }).map(function(item) {
7482
7523
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7483
7524
  if (replaceKey[item.iconId]) {
@@ -7489,18 +7530,18 @@
7489
7530
  var footerBtnList = ((themeData == null ? void 0 : (_themeData_footer = themeData.footer) == null ? void 0 : _themeData_footer.btnList) || []).filter(function(item) {
7490
7531
  // TODO: 因为 'deviceID', 'deviceName', 'rec', 'cloudRec', 'cloudRecord' 是两个组, 并且要在头部(移动端特殊处理)
7491
7532
  // prettier-ignore
7492
- if (item.isrender === 1 && DEVICE_INFO_GROUP.includes(item.iconId)) {
7533
+ if (item.isrender !== 0 && DEVICE_INFO_GROUP.includes(item.iconId)) {
7493
7534
  deviceControls.push(item);
7494
7535
  return false;
7495
7536
  }
7496
- if (item.isrender === 1 && REC_GROUP.includes(item.iconId)) {
7537
+ if (item.isrender !== 0 && REC_GROUP.includes(item.iconId)) {
7497
7538
  // TODO: 因为回放是一组, 位置以第一个位置为准
7498
7539
  recControls.push(recControls[0] ? _extends$i({}, item, {
7499
7540
  part: recControls[0].part
7500
7541
  }) : item);
7501
7542
  return false;
7502
7543
  }
7503
- return item.isrender === 1;
7544
+ return item.isrender !== 0;
7504
7545
  }).map(function(item) {
7505
7546
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
7506
7547
  if (replaceKey[item.iconId]) {
@@ -7567,12 +7608,10 @@
7567
7608
  3,
7568
7609
  1
7569
7610
  ];
7570
- if (data === 'simple') {
7571
- return [
7572
- 2,
7573
- null
7574
- ];
7575
- }
7611
+ if (data === 'simple') return [
7612
+ 2,
7613
+ null
7614
+ ];
7576
7615
  // 渲染主题模板
7577
7616
  themeData = TEMPLATES[data];
7578
7617
  if (!data) {
@@ -7602,23 +7641,21 @@
7602
7641
  ];
7603
7642
  case 3:
7604
7643
  template = _state.sent();
7605
- if (template) {
7606
- return [
7607
- 2,
7608
- template
7609
- ];
7610
- }
7644
+ if (template) return [
7645
+ 2,
7646
+ template
7647
+ ];
7611
7648
  theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
7612
7649
  return [
7613
- 3,
7614
- 5
7650
+ 2,
7651
+ null
7615
7652
  ];
7616
7653
  case 4:
7617
7654
  _state.sent();
7618
7655
  theme.emit(EVENTS.message, theme.i18n.t('FETCH_THEME_FAILED'), 'themeError');
7619
7656
  return [
7620
- 3,
7621
- 5
7657
+ 2,
7658
+ null
7622
7659
  ];
7623
7660
  case 5:
7624
7661
  return [
@@ -8187,7 +8224,7 @@
8187
8224
 
8188
8225
  /*
8189
8226
  * @ezuikit/control-ptz v0.0.1
8190
- * Copyright (c) 2025-11-12 Ezviz-OpenBiz
8227
+ * Copyright (c) 2026-03-18 Ezviz-OpenBiz
8191
8228
  * Released under the MIT License.
8192
8229
  */
8193
8230
 
@@ -9920,12 +9957,12 @@
9920
9957
  };
9921
9958
  }
9922
9959
  }
9923
- /**
9924
- * 语音广播控件
9925
- *
9926
- * 用于触发语音广播功能的按钮控件
9927
- *
9928
- * @category Control
9960
+ /**
9961
+ * 语音广播控件
9962
+ *
9963
+ * 用于触发语音广播功能的按钮控件
9964
+ *
9965
+ * @category Control
9929
9966
  */ var Broadcast = /*#__PURE__*/ function(Control) {
9930
9967
  _inherits$b(Broadcast, Control);
9931
9968
  function Broadcast(options) {
@@ -9960,16 +9997,16 @@
9960
9997
  Control.prototype.reset.call(this, hide);
9961
9998
  }
9962
9999
  };
9963
- /**
9964
- * 销毁语音广播控件
10000
+ /**
10001
+ * 销毁语音广播控件
9965
10002
  */ _proto.destroy = function destroy() {
9966
10003
  if (this.active) {
9967
10004
  this.reset();
9968
10005
  }
9969
10006
  Control.prototype.destroy.call(this);
9970
10007
  };
9971
- /**
9972
- * 点击 Control 会触发
10008
+ /**
10009
+ * 点击 Control 会触发
9973
10010
  */ _proto._onControlClick = function _onControlClick(e) {
9974
10011
  var _this = this, _superprop_get__onControlClick = function() {
9975
10012
  return Control.prototype._onControlClick;
@@ -10145,12 +10182,12 @@
10145
10182
  };
10146
10183
  }
10147
10184
  }
10148
- /**
10149
- * AI对话框控件
10150
- *
10151
- * 用于触发AI对话框功能的按钮控件
10152
- *
10153
- * @category Control
10185
+ /**
10186
+ * AI对话框控件
10187
+ *
10188
+ * 用于触发AI对话框功能的按钮控件
10189
+ *
10190
+ * @category Control
10154
10191
  */ var AIChat = /*#__PURE__*/ function(Control) {
10155
10192
  _inherits$a(AIChat, Control);
10156
10193
  function AIChat(options) {
@@ -10161,13 +10198,15 @@
10161
10198
  classNameSuffix: 'aichat'
10162
10199
  })) || this;
10163
10200
  _this._options = options;
10164
- _this._render();
10165
- _this.on(EVENTS.aichatChange, function(active) {
10166
- if (_this.active !== active) {
10167
- _this.active = active;
10168
- _this._render();
10169
- }
10170
- });
10201
+ if (options.urlInfo.search === "" && options.urlInfo.recType === "cloud") {
10202
+ _this._render();
10203
+ _this.on(EVENTS.aichatChange, function(active) {
10204
+ if (_this.active !== active) {
10205
+ _this.active = active;
10206
+ _this._render();
10207
+ }
10208
+ });
10209
+ }
10171
10210
  return _this;
10172
10211
  }
10173
10212
  var _proto = AIChat.prototype;
@@ -10176,9 +10215,6 @@
10176
10215
  this.$container.innerHTML = IconComponents.aiChat({
10177
10216
  title: (_this_locale = this.locale) == null ? void 0 : _this_locale.BTN_AICHAT
10178
10217
  });
10179
- if (this._options.urlInfo.searchParams.busType !== '7' && this._options.urlInfo.recType === "cloud") ; else {
10180
- this.$container.style.display = 'none';
10181
- }
10182
10218
  };
10183
10219
  _proto.reset = function reset(hide) {
10184
10220
  if (this.active) {
@@ -10188,19 +10224,16 @@
10188
10224
  Control.prototype.reset.call(this, hide);
10189
10225
  }
10190
10226
  };
10191
- /**
10192
- * 销毁AI对话框控件
10227
+ /**
10228
+ * 销毁AI对话框控件
10193
10229
  */ _proto.destroy = function destroy() {
10194
10230
  if (this.active) {
10195
10231
  this.reset();
10196
10232
  }
10197
10233
  Control.prototype.destroy.call(this);
10198
10234
  };
10199
- _proto.updateOptions = function updateOptions(options) {
10200
- this._options = _extends$9({}, this._options, options);
10201
- };
10202
- /**
10203
- * 点击 Control 会触发
10235
+ /**
10236
+ * 点击 Control 会触发
10204
10237
  */ _proto._onControlClick = function _onControlClick(e) {
10205
10238
  var _this = this, _superprop_get__onControlClick = function() {
10206
10239
  return Control.prototype._onControlClick;
@@ -12915,9 +12948,11 @@
12915
12948
  _this.destroyed = false;
12916
12949
  var _this_options_template, _ref3;
12917
12950
  // 标准流暂时仅支持 TEMPLATES 中的配置, 多余的的展示不生效(如电子放大是不支持的等等), 待版本更新才能支持
12918
- _this._renderTheme([
12951
+ // prettier-ignore
12952
+ _this._renderTheme(// hls 不支持自定义
12953
+ options.type === 'hls' ? hlsLiveTemplate : // flv mp4 支持自定义 themeData
12954
+ [
12919
12955
  'flv',
12920
- 'hls',
12921
12956
  'mp4'
12922
12957
  ].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)
12923
12958
  : (_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);
@@ -13641,7 +13676,11 @@
13641
13676
  this.fullscreen();
13642
13677
  }
13643
13678
  };
13644
- _proto._getRecType = function _getRecType(url) {
13679
+ /**
13680
+ * 获取录像类型, 仅 ezopen 支持
13681
+ * @param url 录像 url
13682
+ * @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
13683
+ */ _proto._getRecType = function _getRecType(url) {
13645
13684
  if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
13646
13685
  var urlInfo = distExports$6.parseEzopenUrl(url);
13647
13686
  if (urlInfo.type === 'rec') {
@@ -14108,7 +14147,7 @@
14108
14147
  zh: zh,
14109
14148
  en: en
14110
14149
  };
14111
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.2-beta.8';
14150
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '2.1.3-beta.1';
14112
14151
 
14113
14152
  // 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
14114
14153
 
package/dist/style.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v2.1.2-beta.8
3
- * Copyright (c) 2026-03-12 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v2.1.3-beta.1
3
+ * Copyright (c) 2026-03-20 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  require("./style.css");
@@ -992,9 +992,9 @@ interface ControlItem {
992
992
  part: 'left' | 'right';
993
993
  /** 是否激活 0 否 1 是 默认是 0 */
994
994
  /**
995
- * 是否渲染 0 否 1 是 默认是 0
995
+ * 是否渲染 0 否 1 是 默认是 undefined, 0 不渲染, 非 0 渲染
996
996
  */
997
- isrender: 0 | 1;
997
+ isrender?: 0 | 1;
998
998
  }
999
999
  interface IThemeDataItem {
1000
1000
  /**
@@ -1422,7 +1422,7 @@ declare class Theme extends EventEmitter {
1422
1422
  readonly zoomingChange: "zoomingChange";
1423
1423
  readonly zoomTranslateChange: "zoomTranslateChange";
1424
1424
  readonly audioInfo: "audioInfo";
1425
- readonly videoInfo: "videoInfo"; /** 版本号 @since 0.0.1 */
1425
+ readonly videoInfo: "videoInfo";
1426
1426
  readonly firstFrameDisplay: "firstFrameDisplay";
1427
1427
  readonly fullscreen: "fullscreen";
1428
1428
  readonly exitFullscreen: "exitFullscreen";
@@ -1433,7 +1433,10 @@ declare class Theme extends EventEmitter {
1433
1433
  readonly changeTheme: "changeTheme";
1434
1434
  readonly recTypeChange: "recTypeChange";
1435
1435
  readonly definitionChange: "definitionChange";
1436
- readonly speedChange: "speedChange";
1436
+ readonly speedChange: "speedChange"; /**
1437
+ * @since 0.0.1
1438
+ * @private
1439
+ */
1437
1440
  readonly recordingChange: "recordingChange";
1438
1441
  readonly talkingChange: "talkingChange";
1439
1442
  readonly talkVolumeChange: "talkVolumeChange";
@@ -1441,7 +1444,7 @@ declare class Theme extends EventEmitter {
1441
1444
  readonly aichatChange: "aichatChange";
1442
1445
  readonly setLoggerOptions: "setLoggerOptions";
1443
1446
  readonly records: "records";
1444
- readonly ptzSpeedChange: "ptzSpeedChange"; /** 头部控件 @since 0.0.1 @private */
1447
+ readonly ptzSpeedChange: "ptzSpeedChange";
1445
1448
  readonly setVideoLevelList: "setVideoLevelList";
1446
1449
  readonly currentVideoLevel: "currentVideoLevel";
1447
1450
  readonly currentVideoLevelAuto: "currentVideoLevelAuto";
@@ -1455,6 +1458,7 @@ declare class Theme extends EventEmitter {
1455
1458
  readonly capturePictureDestroy: "Control.capturePictureDestroy";
1456
1459
  readonly volumechange: "Control.volumechange";
1457
1460
  readonly volumePanelOpenChange: "Control.volumePanelOpenChange";
1461
+ /** resizeObserver 监听销毁 */
1458
1462
  readonly volumeDestroy: "Control.volumeDestroy";
1459
1463
  readonly controlsBarOpenChange: "Control.controlsBarOpenChange";
1460
1464
  readonly headerMoreShowControlsChange: "Control.headerMoreShowControlsChange";
@@ -1464,14 +1468,14 @@ declare class Theme extends EventEmitter {
1464
1468
  readonly deviceDestroy: "Control.deviceDestroy";
1465
1469
  readonly recTypeChange: "Control.recTypeChange";
1466
1470
  readonly recDestroy: "Control.recDestroy";
1467
- readonly definitionChange: "Control.definitionChange";
1471
+ readonly definitionChange: "Control.definitionChange"; /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */
1468
1472
  readonly definitionList: "Control.definitionList";
1469
1473
  readonly definitionPanelOpenChange: "Control.definitionPanelOpenChange";
1470
1474
  readonly definitionDestroy: "Control.definitionDestroy";
1475
+ readonly speedChange: "Control.speedChange";
1471
1476
  /**
1472
1477
  * 录像回放的月份列表 @private
1473
1478
  */
1474
- readonly speedChange: "Control.speedChange";
1475
1479
  readonly speedPanelOpenChange: "Control.speedPanelOpenChange";
1476
1480
  readonly speedDestroy: "Control.speedDestroy";
1477
1481
  readonly ptzPanelOpenChange: "Control.ptzPanelOpenChange";
@@ -1608,7 +1612,7 @@ declare class Theme extends EventEmitter {
1608
1612
  396517: string;
1609
1613
  396518: string;
1610
1614
  396519: string;
1611
- 396520: string; /** 移动端竖屏, 全屏情况下不展示扩张,放置在 footer 中 */
1615
+ 396520: string;
1612
1616
  396700: string;
1613
1617
  396701: string;
1614
1618
  397001: string;
@@ -1651,7 +1655,7 @@ declare class Theme extends EventEmitter {
1651
1655
  USE_MULTITHREADING_WARING: string;
1652
1656
  OPEN_INSTRUCTIONS: string;
1653
1657
  INIT_FINSHED: string;
1654
- INIT_SUCCESS: string; /** 版本号 @since 0.0.1 */
1658
+ INIT_SUCCESS: string;
1655
1659
  GET_PLAYURL_FAILED: string;
1656
1660
  VIDEO_LOADING: string;
1657
1661
  DISCONNECT: string;
@@ -1672,9 +1676,9 @@ declare class Theme extends EventEmitter {
1672
1676
  GET_SPEED: string;
1673
1677
  MAX_SPEED_LIMIT: string;
1674
1678
  MIN_SPEED_LIMIT: string;
1675
- SEEK_CANNOT_CROSS_DAYS: string; /** 暂停控件 @since 0.0.1 @private */
1679
+ SEEK_CANNOT_CROSS_DAYS: string;
1676
1680
  SEEK_TIMEFORMAT_ERROR: string;
1677
- PAUSE: string;
1681
+ PAUSE: string; /** 暂停控件 @since 0.0.1 @private */
1678
1682
  PAUSE_FAILED: string;
1679
1683
  RESUME: string;
1680
1684
  RESUME_FAILED: string;
@@ -1689,11 +1693,6 @@ declare class Theme extends EventEmitter {
1689
1693
  VIDEO_LEVEL_AUTO: string;
1690
1694
  VIDEO_LEVEL_FLUENT: string;
1691
1695
  VIDEO_LEVEL_STANDARD: string;
1692
- /**
1693
- * 更多控件(footer more)
1694
- * @since 0.0.1
1695
- * @private
1696
- */
1697
1696
  VIDEO_LEVEL_HEIGH: string;
1698
1697
  VIDEO_LEVEL_SUPER: string;
1699
1698
  VIDEO_LEVEL_EXTREME: string;
@@ -1718,7 +1717,7 @@ declare class Theme extends EventEmitter {
1718
1717
  BTN_EXIR_FULLSCREEN: string;
1719
1718
  BTN_HD: string;
1720
1719
  BTN_SPEED: string;
1721
- BTN_CLOUDREC: string;
1720
+ BTN_CLOUDREC: string; /** @since 0.0.1 @private */
1722
1721
  BTN_CLOUDRECORD: string;
1723
1722
  BTN_REC: string;
1724
1723
  BTN_CALENDAR: string;
@@ -1727,7 +1726,6 @@ declare class Theme extends EventEmitter {
1727
1726
  DEVICE_ID: string;
1728
1727
  CAPTURE_SUCCESS: string;
1729
1728
  CAPTURE_FAILED: string;
1730
- /** resizeObserver 监听销毁 */
1731
1729
  START_RECORD_SUCCESS: string;
1732
1730
  START_RECORD_FAILED: string;
1733
1731
  STOP_RECORD_SUCCESS: string;
@@ -1749,12 +1747,12 @@ declare class Theme extends EventEmitter {
1749
1747
  ZOOM_NOT_ENABLED: string;
1750
1748
  '3D_ZOOM': string;
1751
1749
  '3D_ZOOM_DISABLE': string;
1752
- '3D_ZOOM_FAILED': string; /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */
1750
+ '3D_ZOOM_FAILED': string;
1753
1751
  START_3D_ZOOM: string;
1754
1752
  CLOSE_3D_ZOOM: string;
1755
1753
  DEVICE_NOT_SUPPORT_3D_ZOOM: string;
1756
1754
  '3D_ZOOM_ACTIVED': string;
1757
- '3D_ZOOM_NOT_ACTIVED': string;
1755
+ '3D_ZOOM_NOT_ACTIVED': string; /** 对讲中 @private */
1758
1756
  '3D_ZOOM_CLOSED': string;
1759
1757
  CHANGE_ZOOM_TYPE: string;
1760
1758
  FULLSCREEN: string;
@@ -1765,20 +1763,17 @@ declare class Theme extends EventEmitter {
1765
1763
  DESTROY: string;
1766
1764
  GET_CAPACITY: string;
1767
1765
  GET_PTZ_STATUS: string;
1768
- /**
1769
- * 录像回放的月份列表 @private
1770
- */
1771
1766
  GET_PTZ_STATUS_FAILED: string;
1772
1767
  MOBILE_HIDE_PTZ: string;
1773
1768
  OPTION_PTZ_FAILED: string;
1774
1769
  MOBILE_PTZ_TIPS: string;
1775
1770
  PTZ_FAST: string;
1776
- /**
1777
- * 录像回放的月份列表 @private
1778
- */
1779
1771
  PTZ_MID: string;
1780
1772
  PTZ_SLOW: string;
1781
1773
  PTZ_SPEED: string;
1774
+ /**
1775
+ * 录像回放的月份列表 @private
1776
+ */
1782
1777
  DEVICE_ZOOM: string;
1783
1778
  DEVICE_FOCUS: string;
1784
1779
  NOT_SUPPORT_DEVICE_ZOOM: string;
@@ -1862,30 +1857,28 @@ declare class Theme extends EventEmitter {
1862
1857
  395703: string;
1863
1858
  396001: string;
1864
1859
  396099: string;
1865
- 396101: string;
1860
+ 396101: string; /** 回放底部时间轴 @since 0.0.1 @private */
1866
1861
  396102: string;
1867
1862
  396103: string;
1868
1863
  396104: string;
1869
1864
  396105: string;
1870
1865
  396106: string;
1871
- 396107: string; /** resizeObserver 监听销毁 */
1866
+ 396107: string;
1872
1867
  396108: string;
1873
1868
  396109: string;
1874
1869
  396110: string;
1875
1870
  396501: string;
1876
1871
  396502: string;
1877
1872
  396503: string;
1873
+ /** 是否播放中 @private */
1878
1874
  396504: string;
1879
1875
  396505: string;
1880
1876
  396506: string;
1881
- 396508: string; /** 倍速 @private */
1877
+ 396508: string;
1882
1878
  396509: string;
1883
1879
  396510: string;
1884
1880
  396511: string;
1885
1881
  396512: string;
1886
- /**
1887
- * 录像回放的月份列表 @private
1888
- */
1889
1882
  396513: string;
1890
1883
  396514: string;
1891
1884
  396515: string;
@@ -1935,7 +1928,12 @@ declare class Theme extends EventEmitter {
1935
1928
  TIMEFORMAT_ERROR: string;
1936
1929
  USE_MULTITHREADING_WARING: string;
1937
1930
  OPEN_INSTRUCTIONS: string;
1938
- INIT_FINSHED: string;
1931
+ INIT_FINSHED: string; /**
1932
+ * 当前播放状态
1933
+ * ```ts
1934
+ * theme.playing // boolean
1935
+ * ```
1936
+ */
1939
1937
  INIT_SUCCESS: string;
1940
1938
  GET_PLAYURL_FAILED: string;
1941
1939
  VIDEO_LOADING: string;
@@ -1964,11 +1962,16 @@ declare class Theme extends EventEmitter {
1964
1962
  RESUME: string;
1965
1963
  RESUME_FAILED: string;
1966
1964
  CALL_END: string;
1965
+ /**
1966
+ * 加载状态
1967
+ * ```ts
1968
+ * // 事件监听
1969
+ * theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
1970
+ * ```
1971
+ */
1967
1972
  USER_DO_NOT_OWN_DEVICE: string;
1968
1973
  NO_CLOUD_RECORD: string;
1969
- CHANGE_VIDEO_LEVEL: string; /**
1970
- * 音量值
1971
- */
1974
+ CHANGE_VIDEO_LEVEL: string;
1972
1975
  CHANGE_VIDEO_LEVEL_FAIL: string;
1973
1976
  GET_VIDEO_LEVEL_LIST: string;
1974
1977
  PLEASE_INPUT_RIGHT_VIDEO_LEVEL: string;
@@ -1987,10 +1990,7 @@ declare class Theme extends EventEmitter {
1987
1990
  BTN_VOLUME: string;
1988
1991
  BTN_MUTED: string;
1989
1992
  BTN_RECORDVIDEO: string;
1990
- BTN_CAPTURE: string; /**
1991
- * 静音
1992
- *
1993
- */
1993
+ BTN_CAPTURE: string;
1994
1994
  BTN_TALK: string;
1995
1995
  BTN_BROADCAST: string;
1996
1996
  BTN_AICHAT: string;
@@ -2015,7 +2015,9 @@ declare class Theme extends EventEmitter {
2015
2015
  CAPTURE_SUCCESS: string;
2016
2016
  CAPTURE_FAILED: string;
2017
2017
  START_RECORD_SUCCESS: string;
2018
- START_RECORD_FAILED: string;
2018
+ START_RECORD_FAILED: string; /**
2019
+ * 是否在缩放中
2020
+ */
2019
2021
  STOP_RECORD_SUCCESS: string;
2020
2022
  STOP_RECORD_FAILED: string;
2021
2023
  RECORD_TIPS: string;
@@ -2522,6 +2524,11 @@ declare class Theme extends EventEmitter {
2522
2524
  */
2523
2525
  _disabled(disabled?: boolean): void;
2524
2526
  private _onDblClickFullscreen;
2527
+ /**
2528
+ * 获取录像类型, 仅 ezopen 支持
2529
+ * @param url 录像 url
2530
+ * @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
2531
+ */
2525
2532
  protected _getRecType(url: string): "" | "rec" | "cloudRec" | "cloudRecord";
2526
2533
  private resetControl;
2527
2534
  /**
package/package.json CHANGED
@@ -1,48 +1,41 @@
1
- {
2
- "name": "@ezuikit/player-theme",
3
- "version": "2.1.2-beta.8",
4
- "description": "player theme",
5
- "title": "theme",
6
- "main": "dist/index.js",
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
- },
15
- "files": [
16
- "dist"
17
- ],
18
- "keywords": [
19
- "player",
20
- "theme",
21
- "ezuikit",
22
- "ezviz",
23
- "ui"
24
- ],
25
- "author": "Ezviz-OpenBiz",
26
- "license": "MIT",
27
- "dependencies": {
28
- "@ezuikit/utils-i18n": "2.0.0",
29
- "@ezuikit/utils-logger": "2.0.0",
30
- "@ezuikit/utils-tools": "2.0.3",
31
- "@ezuikit/control-date-picker": "1.0.5",
32
- "@ezuikit/control-time-line": "1.0.7",
33
- "@juggle/resize-observer": "^3.4.0",
34
- "@skax/delegate": "4.0.2",
35
- "@skax/picker": "1.1.7",
36
- "deepmerge": "^4.3.1",
37
- "eventemitter3": "^5.0.1",
38
- "screenfull": "5.2.0"
39
- },
40
- "repository": {
41
- "type": "git",
42
- "url": "git+https://github.com/Ezviz-OpenBiz/EZUIKit-player-theme.git"
43
- },
44
- "bugs": {
45
- "url": "https://github.com/Ezviz-OpenBiz/EZUIKit-player-theme/issues"
46
- },
47
- "homepage": "https://github.com/Ezviz-OpenBiz/EZUIKit-player-theme#readme"
48
- }
1
+ {
2
+ "name": "@ezuikit/player-theme",
3
+ "version": "2.1.3-beta.1",
4
+ "description": "player theme",
5
+ "title": "theme",
6
+ "main": "dist/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "keywords": [
12
+ "player",
13
+ "theme",
14
+ "ezuikit",
15
+ "ezviz",
16
+ "ui"
17
+ ],
18
+ "author": "Ezviz-OpenBiz",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@ezuikit/utils-i18n": "2.0.0",
22
+ "@ezuikit/utils-logger": "2.0.0",
23
+ "@ezuikit/utils-tools": "2.0.3",
24
+ "@ezuikit/control-date-picker": "1.0.5",
25
+ "@ezuikit/control-time-line": "1.0.7",
26
+ "@juggle/resize-observer": "^3.4.0",
27
+ "@skax/delegate": "4.0.2",
28
+ "@skax/picker": "1.1.7",
29
+ "deepmerge": "^4.3.1",
30
+ "eventemitter3": "^5.0.1",
31
+ "screenfull": "5.2.0"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/Ezviz-OpenBiz/EZUIKit-player-theme.git"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/Ezviz-OpenBiz/EZUIKit-player-theme/issues"
39
+ },
40
+ "homepage": "https://github.com/Ezviz-OpenBiz/EZUIKit-player-theme#readme"
41
+ }