@ezuikit/player-theme 1.0.0 → 1.0.1-alpha.2

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @ezuikit/player-theme v1.0.0
3
- * Copyright (c) 2025-11-03 Ezviz-OpenBiz
2
+ * @ezuikit/player-theme v1.0.1-alpha.2
3
+ * Copyright (c) 2025-11-14 Ezviz-OpenBiz
4
4
  * Released under the MIT License.
5
5
  */
6
6
  import EventEmitter from 'eventemitter3';
@@ -16,7 +16,12 @@ import { MobileTimeLine, TimeLine } from '@ezuikit/control-time-line';
16
16
  /**
17
17
  * 播放器的类名前缀
18
18
  */ const PREFIX_CLASS = 'ezplayer';
19
- const DATE_PICKER_ICON_WIDTH = 36;
19
+ /** */ const DATE_PICKER_ICON_WIDTH = 36;
20
+ /** 填充模式 */ const THEME_SCALE_MODE_TYPE = {
21
+ /** 画面完全填充canvas区域,画面会被拉伸 */ full: 0,
22
+ /** 画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边 */ auto: 1,
23
+ /** 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 */ fullAuto: 2
24
+ };
20
25
  // 切换主题时把当前的状态传给控件, 而不是传 theme 对象, 为了解耦
21
26
  // 不要添加方法,只添加状态
22
27
  const THEME_PROPS = [
@@ -3206,8 +3211,68 @@ var en = {
3206
3211
  * 截图控件
3207
3212
  * @category Content
3208
3213
  */ class Content extends EventEmitter {
3214
+ /**
3215
+ * 重新画面区域
3216
+ * @param {number} originWidth 画面宽度
3217
+ * @param {number} originHeight 画面高度
3218
+ * @returns {void}
3219
+ */ _rerender(originWidth = 0, originHeight = 0) {
3220
+ const width = this.$wrapper.clientWidth;
3221
+ const height = this.$wrapper.clientHeight;
3222
+ if (originWidth > 0 && originHeight > 0) {
3223
+ this._originWidth = originWidth;
3224
+ this._originHeight = originHeight;
3225
+ }
3226
+ // 默认是1
3227
+ // 视频画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边
3228
+ let objectFill = 'contain';
3229
+ // 视频画面完全填充canvas区域,画面会被拉伸
3230
+ if (this._scaleMode === THEME_SCALE_MODE_TYPE.full) {
3231
+ objectFill = 'fill';
3232
+ }
3233
+ // 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全
3234
+ if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
3235
+ objectFill = 'cover';
3236
+ }
3237
+ if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
3238
+ const left = (width - this._originWidth) / 2;
3239
+ const top = (height - this._originHeight) / 2;
3240
+ const wScale = width / this._originWidth;
3241
+ const hScale = height / this._originHeight;
3242
+ let scale = wScale > hScale ? hScale : wScale;
3243
+ //
3244
+ if (!(this._scaleMode === THEME_SCALE_MODE_TYPE.auto)) {
3245
+ if (wScale !== hScale) {
3246
+ scale = wScale + ',' + hScale;
3247
+ }
3248
+ }
3249
+ //
3250
+ if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
3251
+ scale = wScale > hScale ? wScale : hScale;
3252
+ }
3253
+ this.$video.style.cssText += `
3254
+ width: ${this._originWidth}px;
3255
+ height: ${this._originHeight}px;
3256
+ position: absolute;
3257
+ object-fit:${objectFill};
3258
+ left: ${left}px;
3259
+ top: ${top}px;
3260
+ transform-origin: 50% 50%;
3261
+ transform: scale(${scale});
3262
+ `;
3263
+ }
3264
+ }
3265
+ setScaleMode(scaleMode = 0) {
3266
+ this._scaleMode = scaleMode;
3267
+ this._rerender();
3268
+ }
3209
3269
  destroy() {
3210
3270
  var _this_$wrapper;
3271
+ if (this.$video) {
3272
+ this.$video.remove();
3273
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3274
+ this.$video = null;
3275
+ }
3211
3276
  if (this.$content) {
3212
3277
  this.$content.remove();
3213
3278
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@@ -3220,17 +3285,27 @@ var en = {
3220
3285
  this.removeAllListeners();
3221
3286
  }
3222
3287
  constructor(options){
3223
- super();
3288
+ super(), this._scaleMode = 0, this._originWidth = 0, this._originHeight = 0;
3224
3289
  this.options = options;
3290
+ this._scaleMode = options.scaleMode || 0;
3225
3291
  this.$wrapper = document.createElement('div');
3226
3292
  this.$wrapper.className = `${PREFIX_CLASS}-content-wrapper`;
3227
3293
  this.$content = document.createElement('div');
3228
3294
  this.$content.className = `${PREFIX_CLASS}-content`;
3295
+ this.$video = document.createElement('div');
3296
+ this.$video.className = `${PREFIX_CLASS}-content-video`;
3297
+ this.$content.appendChild(this.$video);
3229
3298
  this.$wrapper.appendChild(this.$content);
3230
3299
  if (typeof options.getContainer === 'function') {
3231
3300
  const $popupContainer = options.getContainer();
3232
3301
  $popupContainer.appendChild(this.$wrapper);
3233
3302
  }
3303
+ this.on(EVENTS.videoInfo, (originWidth, originHeight)=>{
3304
+ this._rerender(originWidth, originHeight);
3305
+ });
3306
+ this.on(EVENTS.resize, ()=>{
3307
+ this._rerender();
3308
+ });
3234
3309
  }
3235
3310
  }
3236
3311
 
@@ -3386,6 +3461,17 @@ function debounce(func, wait) {
3386
3461
  }
3387
3462
  });
3388
3463
  theme == null ? void 0 : theme.on(EVENTS.videoInfo, (info)=>{
3464
+ // 排除流信息回调触发的事件
3465
+ if (!!info && info.from !== "setStreamInfoCallBack") {
3466
+ var // rerender 画面
3467
+ _theme_contentControl_emit, _theme_contentControl;
3468
+ (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.videoInfo, info.width, info.height);
3469
+ }
3470
+ });
3471
+ theme == null ? void 0 : theme.on(EVENTS.resize, ()=>{
3472
+ var // rerender 画面
3473
+ _theme_contentControl_emit, _theme_contentControl;
3474
+ (_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.resize);
3389
3475
  });
3390
3476
  theme == null ? void 0 : theme.on('getDeviceInfo', (info)=>{
3391
3477
  });
@@ -3775,12 +3861,12 @@ const ignoreList = [
3775
3861
  * @returns {void}
3776
3862
  */ function _resize(theme, width, height) {
3777
3863
  let cssText = '';
3778
- if (/\d/.test(width + '')) {
3864
+ if (/^\d+(\.\d+)?$/.test(width + '')) {
3779
3865
  cssText += `width: ${width}px;`;
3780
3866
  } else if (width) {
3781
3867
  cssText += `width: ${width};`;
3782
3868
  }
3783
- if (/\d/.test(height + '')) {
3869
+ if (/^\d+(\.\d+)?$/.test(height + '')) {
3784
3870
  cssText += `height: ${height}px;`;
3785
3871
  } else if (height) {
3786
3872
  cssText += `height: ${height};`;
@@ -3926,7 +4012,7 @@ const ZOOM_DEFAULT_OPTIONS = {
3926
4012
 
3927
4013
  /*
3928
4014
  * @ezuikit/control-zoom v0.0.2
3929
- * Copyright (c) 2025-09-21 Ezviz-OpenBiz
4015
+ * Copyright (c) 2025-11-11 Ezviz-OpenBiz
3930
4016
  * Released under the MIT License.
3931
4017
  */
3932
4018
  /**
@@ -5306,7 +5392,7 @@ function _extends$c() {
5306
5392
 
5307
5393
  /*
5308
5394
  * @ezuikit/control-ptz v0.0.1
5309
- * Copyright (c) 2025-09-21 Ezviz-OpenBiz
5395
+ * Copyright (c) 2025-11-11 Ezviz-OpenBiz
5310
5396
  * Released under the MIT License.
5311
5397
  */
5312
5398
 
@@ -5475,11 +5561,11 @@ class MobilePtz extends BasePtz {
5475
5561
  $icons[0].className = $icons[0].className.replace(`${PTZ_MOBILE_PREFIX}-default`, `${PTZ_MOBILE_PREFIX}-active`);
5476
5562
  }
5477
5563
  }
5478
- $warp.style.cssText = `background-image:linear-gradient(${direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270}deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)`;
5564
+ $warp.style = `background-image:linear-gradient(${direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270}deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)`;
5479
5565
  if (type === 'stop') {
5480
5566
  var _this_options_env1;
5481
5567
  url = ((_this_options_env1 = this.options.env) == null ? void 0 : _this_options_env1.domain) + '/api/lapp/device/ptz/stop';
5482
- $warp.style.cssText = '';
5568
+ $warp.style = '';
5483
5569
  $icons[3].className = $icons[3].className.replace(`${PTZ_MOBILE_PREFIX}-active`, `${PTZ_MOBILE_PREFIX}-default`);
5484
5570
  $icons[1].className = $icons[1].className.replace(`${PTZ_MOBILE_PREFIX}-active`, `${PTZ_MOBILE_PREFIX}-default`);
5485
5571
  $icons[2].className = $icons[2].className.replace(`${PTZ_MOBILE_PREFIX}-active`, `${PTZ_MOBILE_PREFIX}-default`);
@@ -5523,14 +5609,11 @@ class MobilePtz extends BasePtz {
5523
5609
  60003,
5524
5610
  60004
5525
5611
  ].includes(+rt.code)) {
5526
- $warp.style.cssText = `background-image:linear-gradient(${direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270}deg, #f45656 0%, rgba(100,143,252,0.00) 50%)`;
5612
+ $warp.style = `background-image:linear-gradient(${direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270}deg, #f45656 0%, rgba(100,143,252,0.00) 50%)`;
5527
5613
  }
5528
5614
  }
5529
5615
  operationResultCb == null ? void 0 : operationResultCb(rt);
5530
5616
  }).catch((err)=>{
5531
- }).finally(()=>{
5532
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
5533
- operationResultCb = null;
5534
5617
  });
5535
5618
  }
5536
5619
  constructor(container, options){
@@ -6802,12 +6885,14 @@ function __filter(list, locale = {}) {
6802
6885
  controlType: 'button',
6803
6886
  classNameSuffix: 'definition',
6804
6887
  renderLabel: (label, item, list)=>{
6888
+ var _list_;
6805
6889
  if ((item == null ? void 0 : item.level) === 'auto') {
6806
6890
  var _options_locales_options_language;
6807
- const realIitem = list.find((it)=>it.level === this._level);
6808
- return `<span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(realIitem == null ? void 0 : realIitem.name) || ''})</span>`;
6891
+ const realItem = list.find((it)=>it.level === this._level);
6892
+ return `<span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(realItem == null ? void 0 : realItem.name) || ''})</span>`;
6809
6893
  }
6810
- return `<span>${label}</span>`;
6894
+ // 如果 label 不存在,则不显示label,直接显示list的第一个label, 一般自定义清晰度列表可能会出现
6895
+ return `<span>${label || ((_list_ = list[0]) == null ? void 0 : _list_.name) || ''}</span>`;
6811
6896
  },
6812
6897
  onChange: (value, item)=>{
6813
6898
  var _options_onChange;
@@ -6834,9 +6919,9 @@ function __filter(list, locale = {}) {
6834
6919
  this._level = realLevel + '';
6835
6920
  if (l === 'auto') {
6836
6921
  var _options_locales_options_language;
6837
- const realIitem = this.list.find((it)=>it.level === this._level);
6922
+ const realItem = this.list.find((it)=>it.level === this._level);
6838
6923
  this.$container.querySelector(`.${PREFIX_CLASS}-select-btn`).innerHTML = `
6839
- <span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(realIitem == null ? void 0 : realIitem.name) || ''})</span>
6924
+ <span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(realItem == null ? void 0 : realItem.name) || ''})</span>
6840
6925
  `;
6841
6926
  } else {
6842
6927
  if (this.value !== this._level + '') this.value = this._level + '';
@@ -6919,7 +7004,7 @@ const SPEED_DEFAULT_OPTIONS = {
6919
7004
 
6920
7005
  /*
6921
7006
  * @ezuikit/control-date-picker v0.0.1
6922
- * Copyright (c) 2025-09-21 Ezviz-OpenBiz
7007
+ * Copyright (c) 2025-11-11 Ezviz-OpenBiz
6923
7008
  * Released under the MIT License.
6924
7009
  */
6925
7010
  function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
@@ -8010,7 +8095,7 @@ function _renderTheme(theme, data) {
8010
8095
  }
8011
8096
  if (theme.options.posterOptions !== null) {
8012
8097
  theme.posterControl = new Poster(_extends$1({}, theme.options.posterOptions || {}, {
8013
- getPopupContainer: ()=>theme.contentControl.$content
8098
+ getPopupContainer: ()=>theme.contentControl.$video
8014
8099
  }));
8015
8100
  }
8016
8101
  theme.controls = {}; // 防止为 null
@@ -8241,6 +8326,7 @@ const THEME_DEFAULT_OPTIONS = {
8241
8326
  dblClickFullscreen: true,
8242
8327
  language: 'zh',
8243
8328
  autoPlay: true,
8329
+ scaleMode: THEME_SCALE_MODE_TYPE.full,
8244
8330
  loggerOptions: {
8245
8331
  level: 'INFO',
8246
8332
  showTime: true
@@ -8730,6 +8816,37 @@ const THEME_DEFAULT_OPTIONS = {
8730
8816
  (_this = this) == null ? void 0 : _this.emit(EVENTS.setLoggerOptions, options);
8731
8817
  }
8732
8818
  /**
8819
+ * 设置视频画面缩放模式
8820
+ * @since 1.0.1
8821
+ * @param {0 | 1 | 2} scaleMode - 缩放模式, 0: 窗口铺满, 1: 等比缩放大边铺满, 2: 等比缩放小边铺满
8822
+ */ setScaleMode(scaleMode) {
8823
+ if ([
8824
+ 0,
8825
+ 1,
8826
+ 2
8827
+ ].includes(+scaleMode)) {
8828
+ var _this_contentControl_setScaleMode, _this_contentControl;
8829
+ this.scaleMode = +scaleMode;
8830
+ (_this_contentControl = this.contentControl) == null ? void 0 : (_this_contentControl_setScaleMode = _this_contentControl.setScaleMode) == null ? void 0 : _this_contentControl_setScaleMode.call(_this_contentControl, +scaleMode);
8831
+ const classList = this.$container.classList;
8832
+ for (const item of classList){
8833
+ if (item.startsWith(`${PREFIX_CLASS}-scale-mode-`)) {
8834
+ classList.remove(item);
8835
+ }
8836
+ }
8837
+ if (this.scaleMode === 0) {
8838
+ this.$container.classList.add(`${PREFIX_CLASS}-scale-mode-full`);
8839
+ } else if (this.scaleMode === 1) {
8840
+ this.$container.classList.add(`${PREFIX_CLASS}-scale-mode-auto`);
8841
+ } else if (this.scaleMode === 2) {
8842
+ this.$container.classList.add(`${PREFIX_CLASS}-scale-mode-full-auto`);
8843
+ }
8844
+ } else {
8845
+ var _this_logger;
8846
+ (_this_logger = this.logger) == null ? void 0 : _this_logger.warn('scaleMode must be 0 | 1 | 2');
8847
+ }
8848
+ }
8849
+ /**
8733
8850
  * 销毁包括事件、控件 ...
8734
8851
  *
8735
8852
  * Destroy (including events, controls...)
@@ -8778,7 +8895,7 @@ const THEME_DEFAULT_OPTIONS = {
8778
8895
  // 私有方法
8779
8896
  // ==============================================================================================
8780
8897
  /** 初始化配置项 */ _initOptions(options = {}) {
8781
- var _this_options_loggerOptions;
8898
+ var _this_options_loggerOptions, _this_options_definitionOptions_list, _this_options_definitionOptions, _this_options_videoLevelList;
8782
8899
  this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
8783
8900
  clone: false
8784
8901
  });
@@ -8792,7 +8909,7 @@ const THEME_DEFAULT_OPTIONS = {
8792
8909
  }
8793
8910
  if (!this.$container) throw new Error('container option is required!');
8794
8911
  if ([
8795
- 'VIDOE',
8912
+ 'VIDEO',
8796
8913
  'CANVAS'
8797
8914
  ].includes(this.$container.tagName)) {
8798
8915
  throw new Error('container node cannot be video or canvas!');
@@ -8803,7 +8920,15 @@ const THEME_DEFAULT_OPTIONS = {
8803
8920
  }));
8804
8921
  this.logger.log(navigator.userAgent || 'unknown');
8805
8922
  this.logger.log('[Theme Version] ', Theme.THEME_VERSION);
8806
- this.logger.log(JSON.stringify(this.options));
8923
+ if ('container' in this.options) {
8924
+ // JSON 不能序列化dom节点, 不要使用 this.options.container, 请使用 this.container
8925
+ delete this.options.container;
8926
+ }
8927
+ try {
8928
+ this.logger.log('[options] \n', JSON.stringify(this.options));
8929
+ } catch (error) {
8930
+ this.logger.log('[options] \n', this.options);
8931
+ }
8807
8932
  const language = this.options.language || 'zh';
8808
8933
  const locales = deepmerge({
8809
8934
  zh,
@@ -8815,6 +8940,12 @@ const THEME_DEFAULT_OPTIONS = {
8815
8940
  this.i18n = new I18n(locales, {
8816
8941
  defaultLocale: language
8817
8942
  });
8943
+ // 默认清晰度列表
8944
+ if (((_this_options_definitionOptions = this.options.definitionOptions) == null ? void 0 : (_this_options_definitionOptions_list = _this_options_definitionOptions.list) == null ? void 0 : _this_options_definitionOptions_list.length) > 0 || ((_this_options_videoLevelList = this.options.videoLevelList) == null ? void 0 : _this_options_videoLevelList.length) > 0) {
8945
+ var _this_options_definitionOptions1;
8946
+ this.videoLevelList = ((_this_options_definitionOptions1 = this.options.definitionOptions) == null ? void 0 : _this_options_definitionOptions1.list) || this.options.videoLevelList;
8947
+ }
8948
+ this.setScaleMode(this.options.scaleMode);
8818
8949
  }
8819
8950
  /**
8820
8951
  * 初始化设置类名和设置宽高
@@ -9304,7 +9435,7 @@ const THEME_DEFAULT_OPTIONS = {
9304
9435
  */ this._footerMoreControl = null, /** 头部控件 @since 0.0.1 @private */ this._header = null, /** 低部控件 @since 0.0.1 @private */ this._footer = null, /** 回放底部时间轴 @since 0.0.1 @private */ this._recFooter = null, /**
9305
9436
  * 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
9306
9437
  * @private
9307
- */ this._mobileExtend = null, /** @since 0.0.1 @private */ this._interactiveResult = null, /** @since 0.0.1 @private */ this._themeData = null, this._fullscreen = null, this.zoomUtil = null, /** 清除屏幕旋转 */ this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ this._cleanUpResizeObserver = null, /** 容器的宽 */ this._width = 0, /** 容器的高 */ this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ this._orientationAngle = 0, /** 是否播放中 @private */ this._playing = false, /** 加载中 */ this._loading = false, /** 音量 */ this._volume = 0, /** 静音 */ this._muted = false, /** 电子放大倍数 @private */ this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ this._zooming = false, /** 录制中 @private */ this._recording = false, /** 对讲中 @private */ this._talking = false, /** 倍速 @private */ this._speed = 1, /** 自定清晰度 @private */ this._videoLevelAuto = false, /** 清晰度列表 */ this.videoLevelList = [], /** 回放片段列表 */ this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ this._resizeOverflowTimer = null, /** 清理 header/footer 动画 定时器 @private */ this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ this.destroyed = false, /** 播放地址信息 */ this.urlInfo = null;
9438
+ */ this._mobileExtend = null, /** @since 0.0.1 @private */ this._interactiveResult = null, /** @since 0.0.1 @private */ this._themeData = null, this._fullscreen = null, this.zoomUtil = null, /** 清除屏幕旋转 */ this._cleanupOrientation = null, /** resizeObserver 监听销毁 */ this._cleanUpResizeObserver = null, /** 容器的宽 */ this._width = 0, /** 容器的高 */ this._height = 0, /** 当前容器的全屏状态 true: 全屏, false: 非全屏 */ this._isCurrentFullscreen = false, /** 屏幕旋转角度 0 | 90 | 180 | 270 */ this._orientationAngle = 0, /** 是否播放中 @private */ this._playing = false, /** 加载中 */ this._loading = false, /** 音量 */ this._volume = 0, /** 静音 */ this._muted = false, /** 电子放大倍数 @private */ this._zoom = 1, /** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */ this._zooming = false, /** 录制中 @private */ this._recording = false, /** 对讲中 @private */ this._talking = false, /** 倍速 @private */ this._speed = 1, /** 自定清晰度 @private */ this._videoLevelAuto = false, /** 清晰度列表 */ this.videoLevelList = [], /** 回放片段列表 */ this.recordList = [], /** 窗口尺寸变化时,设置窗口超出隐藏,防止出现滚动条 */ this._resizeOverflowTimer = null, /** 清理 header/footer 动画 定时器 @private */ this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ this.destroyed = false, /** 播放地址信息 */ this.urlInfo = null, this.scaleMode = 0;
9308
9439
  this._initOptions(options);
9309
9440
  if (this.options.type === 'ezopen') {
9310
9441
  var _this_urlInfo_searchParams, _this_urlInfo;
@@ -9326,7 +9457,8 @@ const THEME_DEFAULT_OPTIONS = {
9326
9457
  this._initClassName();
9327
9458
  // 画布需要渲染在 this.contentControl.$container 内
9328
9459
  this.contentControl = new Content({
9329
- getContainer: ()=>this.$container
9460
+ getContainer: ()=>this.$container,
9461
+ scaleMode: this.scaleMode
9330
9462
  });
9331
9463
  // zoom utils
9332
9464
  __zoom(this, this.contentControl.$content, _extends({}, this.options.zoomOptions || {}, {
@@ -9364,6 +9496,6 @@ const THEME_DEFAULT_OPTIONS = {
9364
9496
  zh,
9365
9497
  en
9366
9498
  };
9367
- /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '1.0.0';
9499
+ /** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '1.0.1-alpha.2';
9368
9500
 
9369
- export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume, Theme as default };
9501
+ export { Control, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };