@ezuikit/player-theme 1.0.0 → 1.0.1-alpha.0
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.js +159 -27
- package/dist/index.mjs +159 -27
- package/dist/index.umd.js +2197 -1732
- package/dist/style.css +3 -3
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +75 -70
- package/package.json +7 -9
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v1.0.0
|
|
3
|
-
* Copyright (c) 2025-11-
|
|
2
|
+
* @ezuikit/player-theme v1.0.1-alpha.0
|
|
3
|
+
* Copyright (c) 2025-11-11 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -20,7 +20,12 @@ var controlTimeLine = require('@ezuikit/control-time-line');
|
|
|
20
20
|
/**
|
|
21
21
|
* 播放器的类名前缀
|
|
22
22
|
*/ const PREFIX_CLASS = 'ezplayer';
|
|
23
|
-
const DATE_PICKER_ICON_WIDTH = 36;
|
|
23
|
+
/** */ const DATE_PICKER_ICON_WIDTH = 36;
|
|
24
|
+
/** 填充模式 */ const THEME_SCALE_MODE_TYPE = {
|
|
25
|
+
/** 画面完全填充canvas区域,画面会被拉伸 */ full: 0,
|
|
26
|
+
/** 画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边 */ auto: 1,
|
|
27
|
+
/** 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 */ fullAuto: 2
|
|
28
|
+
};
|
|
24
29
|
// 切换主题时把当前的状态传给控件, 而不是传 theme 对象, 为了解耦
|
|
25
30
|
// 不要添加方法,只添加状态
|
|
26
31
|
const THEME_PROPS = [
|
|
@@ -3210,8 +3215,68 @@ var en = {
|
|
|
3210
3215
|
* 截图控件
|
|
3211
3216
|
* @category Content
|
|
3212
3217
|
*/ class Content extends EventEmitter {
|
|
3218
|
+
/**
|
|
3219
|
+
* 重新画面区域
|
|
3220
|
+
* @param {number} originWidth 画面宽度
|
|
3221
|
+
* @param {number} originHeight 画面高度
|
|
3222
|
+
* @returns {void}
|
|
3223
|
+
*/ _rerender(originWidth = 0, originHeight = 0) {
|
|
3224
|
+
const width = this.$wrapper.clientWidth;
|
|
3225
|
+
const height = this.$wrapper.clientHeight;
|
|
3226
|
+
if (originWidth > 0 && originHeight > 0) {
|
|
3227
|
+
this._originWidth = originWidth;
|
|
3228
|
+
this._originHeight = originHeight;
|
|
3229
|
+
}
|
|
3230
|
+
// 默认是1
|
|
3231
|
+
// 视频画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边
|
|
3232
|
+
let objectFill = 'contain';
|
|
3233
|
+
// 视频画面完全填充canvas区域,画面会被拉伸
|
|
3234
|
+
if (this._scaleMode === THEME_SCALE_MODE_TYPE.full) {
|
|
3235
|
+
objectFill = 'fill';
|
|
3236
|
+
}
|
|
3237
|
+
// 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全
|
|
3238
|
+
if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
|
|
3239
|
+
objectFill = 'cover';
|
|
3240
|
+
}
|
|
3241
|
+
if (width > 0 && height > 0 && this._originWidth > 0 && this._originHeight > 0 && this.$video) {
|
|
3242
|
+
const left = (width - this._originWidth) / 2;
|
|
3243
|
+
const top = (height - this._originHeight) / 2;
|
|
3244
|
+
const wScale = width / this._originWidth;
|
|
3245
|
+
const hScale = height / this._originHeight;
|
|
3246
|
+
let scale = wScale > hScale ? hScale : wScale;
|
|
3247
|
+
//
|
|
3248
|
+
if (!(this._scaleMode === THEME_SCALE_MODE_TYPE.auto)) {
|
|
3249
|
+
if (wScale !== hScale) {
|
|
3250
|
+
scale = wScale + ',' + hScale;
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
//
|
|
3254
|
+
if (this._scaleMode === THEME_SCALE_MODE_TYPE.fullAuto) {
|
|
3255
|
+
scale = wScale > hScale ? wScale : hScale;
|
|
3256
|
+
}
|
|
3257
|
+
this.$video.style.cssText += `
|
|
3258
|
+
width: ${this._originWidth}px;
|
|
3259
|
+
height: ${this._originHeight}px;
|
|
3260
|
+
position: absolute;
|
|
3261
|
+
object-fit:${objectFill};
|
|
3262
|
+
left: ${left}px;
|
|
3263
|
+
top: ${top}px;
|
|
3264
|
+
transform-origin: 50% 50%;
|
|
3265
|
+
transform: scale(${scale});
|
|
3266
|
+
`;
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
setScaleMode(scaleMode = 0) {
|
|
3270
|
+
this._scaleMode = scaleMode;
|
|
3271
|
+
this._rerender();
|
|
3272
|
+
}
|
|
3213
3273
|
destroy() {
|
|
3214
3274
|
var _this_$wrapper;
|
|
3275
|
+
if (this.$video) {
|
|
3276
|
+
this.$video.remove();
|
|
3277
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3278
|
+
this.$video = null;
|
|
3279
|
+
}
|
|
3215
3280
|
if (this.$content) {
|
|
3216
3281
|
this.$content.remove();
|
|
3217
3282
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -3224,17 +3289,27 @@ var en = {
|
|
|
3224
3289
|
this.removeAllListeners();
|
|
3225
3290
|
}
|
|
3226
3291
|
constructor(options){
|
|
3227
|
-
super();
|
|
3292
|
+
super(), this._scaleMode = 0, this._originWidth = 0, this._originHeight = 0;
|
|
3228
3293
|
this.options = options;
|
|
3294
|
+
this._scaleMode = options.scaleMode || 0;
|
|
3229
3295
|
this.$wrapper = document.createElement('div');
|
|
3230
3296
|
this.$wrapper.className = `${PREFIX_CLASS}-content-wrapper`;
|
|
3231
3297
|
this.$content = document.createElement('div');
|
|
3232
3298
|
this.$content.className = `${PREFIX_CLASS}-content`;
|
|
3299
|
+
this.$video = document.createElement('div');
|
|
3300
|
+
this.$video.className = `${PREFIX_CLASS}-content-video`;
|
|
3301
|
+
this.$content.appendChild(this.$video);
|
|
3233
3302
|
this.$wrapper.appendChild(this.$content);
|
|
3234
3303
|
if (typeof options.getContainer === 'function') {
|
|
3235
3304
|
const $popupContainer = options.getContainer();
|
|
3236
3305
|
$popupContainer.appendChild(this.$wrapper);
|
|
3237
3306
|
}
|
|
3307
|
+
this.on(EVENTS.videoInfo, (originWidth, originHeight)=>{
|
|
3308
|
+
this._rerender(originWidth, originHeight);
|
|
3309
|
+
});
|
|
3310
|
+
this.on(EVENTS.resize, ()=>{
|
|
3311
|
+
this._rerender();
|
|
3312
|
+
});
|
|
3238
3313
|
}
|
|
3239
3314
|
}
|
|
3240
3315
|
|
|
@@ -3390,6 +3465,17 @@ function debounce(func, wait) {
|
|
|
3390
3465
|
}
|
|
3391
3466
|
});
|
|
3392
3467
|
theme == null ? void 0 : theme.on(EVENTS.videoInfo, (info)=>{
|
|
3468
|
+
// 排除流信息回调触发的事件
|
|
3469
|
+
if (!!info && info.from !== "setStreamInfoCallBack") {
|
|
3470
|
+
var // rerender 画面
|
|
3471
|
+
_theme_contentControl_emit, _theme_contentControl;
|
|
3472
|
+
(_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);
|
|
3473
|
+
}
|
|
3474
|
+
});
|
|
3475
|
+
theme == null ? void 0 : theme.on(EVENTS.resize, ()=>{
|
|
3476
|
+
var // rerender 画面
|
|
3477
|
+
_theme_contentControl_emit, _theme_contentControl;
|
|
3478
|
+
(_theme_contentControl = theme.contentControl) == null ? void 0 : (_theme_contentControl_emit = _theme_contentControl.emit) == null ? void 0 : _theme_contentControl_emit.call(_theme_contentControl, EVENTS.resize);
|
|
3393
3479
|
});
|
|
3394
3480
|
theme == null ? void 0 : theme.on('getDeviceInfo', (info)=>{
|
|
3395
3481
|
});
|
|
@@ -3779,12 +3865,12 @@ const ignoreList = [
|
|
|
3779
3865
|
* @returns {void}
|
|
3780
3866
|
*/ function _resize(theme, width, height) {
|
|
3781
3867
|
let cssText = '';
|
|
3782
|
-
if (
|
|
3868
|
+
if (/^\d+(\.\d+)?$/.test(width + '')) {
|
|
3783
3869
|
cssText += `width: ${width}px;`;
|
|
3784
3870
|
} else if (width) {
|
|
3785
3871
|
cssText += `width: ${width};`;
|
|
3786
3872
|
}
|
|
3787
|
-
if (
|
|
3873
|
+
if (/^\d+(\.\d+)?$/.test(height + '')) {
|
|
3788
3874
|
cssText += `height: ${height}px;`;
|
|
3789
3875
|
} else if (height) {
|
|
3790
3876
|
cssText += `height: ${height};`;
|
|
@@ -3930,7 +4016,7 @@ const ZOOM_DEFAULT_OPTIONS = {
|
|
|
3930
4016
|
|
|
3931
4017
|
/*
|
|
3932
4018
|
* @ezuikit/control-zoom v0.0.2
|
|
3933
|
-
* Copyright (c) 2025-
|
|
4019
|
+
* Copyright (c) 2025-11-11 Ezviz-OpenBiz
|
|
3934
4020
|
* Released under the MIT License.
|
|
3935
4021
|
*/
|
|
3936
4022
|
/**
|
|
@@ -5310,7 +5396,7 @@ function _extends$c() {
|
|
|
5310
5396
|
|
|
5311
5397
|
/*
|
|
5312
5398
|
* @ezuikit/control-ptz v0.0.1
|
|
5313
|
-
* Copyright (c) 2025-
|
|
5399
|
+
* Copyright (c) 2025-11-11 Ezviz-OpenBiz
|
|
5314
5400
|
* Released under the MIT License.
|
|
5315
5401
|
*/
|
|
5316
5402
|
|
|
@@ -5479,11 +5565,11 @@ class MobilePtz extends BasePtz {
|
|
|
5479
5565
|
$icons[0].className = $icons[0].className.replace(`${PTZ_MOBILE_PREFIX}-default`, `${PTZ_MOBILE_PREFIX}-active`);
|
|
5480
5566
|
}
|
|
5481
5567
|
}
|
|
5482
|
-
$warp.style
|
|
5568
|
+
$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%)`;
|
|
5483
5569
|
if (type === 'stop') {
|
|
5484
5570
|
var _this_options_env1;
|
|
5485
5571
|
url = ((_this_options_env1 = this.options.env) == null ? void 0 : _this_options_env1.domain) + '/api/lapp/device/ptz/stop';
|
|
5486
|
-
$warp.style
|
|
5572
|
+
$warp.style = '';
|
|
5487
5573
|
$icons[3].className = $icons[3].className.replace(`${PTZ_MOBILE_PREFIX}-active`, `${PTZ_MOBILE_PREFIX}-default`);
|
|
5488
5574
|
$icons[1].className = $icons[1].className.replace(`${PTZ_MOBILE_PREFIX}-active`, `${PTZ_MOBILE_PREFIX}-default`);
|
|
5489
5575
|
$icons[2].className = $icons[2].className.replace(`${PTZ_MOBILE_PREFIX}-active`, `${PTZ_MOBILE_PREFIX}-default`);
|
|
@@ -5527,14 +5613,11 @@ class MobilePtz extends BasePtz {
|
|
|
5527
5613
|
60003,
|
|
5528
5614
|
60004
|
|
5529
5615
|
].includes(+rt.code)) {
|
|
5530
|
-
$warp.style
|
|
5616
|
+
$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%)`;
|
|
5531
5617
|
}
|
|
5532
5618
|
}
|
|
5533
5619
|
operationResultCb == null ? void 0 : operationResultCb(rt);
|
|
5534
5620
|
}).catch((err)=>{
|
|
5535
|
-
}).finally(()=>{
|
|
5536
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
5537
|
-
operationResultCb = null;
|
|
5538
5621
|
});
|
|
5539
5622
|
}
|
|
5540
5623
|
constructor(container, options){
|
|
@@ -6806,12 +6889,14 @@ function __filter(list, locale = {}) {
|
|
|
6806
6889
|
controlType: 'button',
|
|
6807
6890
|
classNameSuffix: 'definition',
|
|
6808
6891
|
renderLabel: (label, item, list)=>{
|
|
6892
|
+
var _list_;
|
|
6809
6893
|
if ((item == null ? void 0 : item.level) === 'auto') {
|
|
6810
6894
|
var _options_locales_options_language;
|
|
6811
|
-
const
|
|
6812
|
-
return `<span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(
|
|
6895
|
+
const realItem = list.find((it)=>it.level === this._level);
|
|
6896
|
+
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>`;
|
|
6813
6897
|
}
|
|
6814
|
-
|
|
6898
|
+
// 如果 label 不存在,则不显示label,直接显示list的第一个label, 一般自定义清晰度列表可能会出现
|
|
6899
|
+
return `<span>${label || ((_list_ = list[0]) == null ? void 0 : _list_.name) || ''}</span>`;
|
|
6815
6900
|
},
|
|
6816
6901
|
onChange: (value, item)=>{
|
|
6817
6902
|
var _options_onChange;
|
|
@@ -6838,9 +6923,9 @@ function __filter(list, locale = {}) {
|
|
|
6838
6923
|
this._level = realLevel + '';
|
|
6839
6924
|
if (l === 'auto') {
|
|
6840
6925
|
var _options_locales_options_language;
|
|
6841
|
-
const
|
|
6926
|
+
const realItem = this.list.find((it)=>it.level === this._level);
|
|
6842
6927
|
this.$container.querySelector(`.${PREFIX_CLASS}-select-btn`).innerHTML = `
|
|
6843
|
-
<span>${options == null ? void 0 : (_options_locales_options_language = options.locales[options.language]) == null ? void 0 : _options_locales_options_language.VIDEO_LEVEL_AUTO}(${(
|
|
6928
|
+
<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>
|
|
6844
6929
|
`;
|
|
6845
6930
|
} else {
|
|
6846
6931
|
if (this.value !== this._level + '') this.value = this._level + '';
|
|
@@ -6923,7 +7008,7 @@ const SPEED_DEFAULT_OPTIONS = {
|
|
|
6923
7008
|
|
|
6924
7009
|
/*
|
|
6925
7010
|
* @ezuikit/control-date-picker v0.0.1
|
|
6926
|
-
* Copyright (c) 2025-
|
|
7011
|
+
* Copyright (c) 2025-11-11 Ezviz-OpenBiz
|
|
6927
7012
|
* Released under the MIT License.
|
|
6928
7013
|
*/
|
|
6929
7014
|
function asyncGeneratorStep$2(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -8014,7 +8099,7 @@ function _renderTheme(theme, data) {
|
|
|
8014
8099
|
}
|
|
8015
8100
|
if (theme.options.posterOptions !== null) {
|
|
8016
8101
|
theme.posterControl = new Poster(_extends$1({}, theme.options.posterOptions || {}, {
|
|
8017
|
-
getPopupContainer: ()=>theme.contentControl.$
|
|
8102
|
+
getPopupContainer: ()=>theme.contentControl.$video
|
|
8018
8103
|
}));
|
|
8019
8104
|
}
|
|
8020
8105
|
theme.controls = {}; // 防止为 null
|
|
@@ -8245,6 +8330,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
8245
8330
|
dblClickFullscreen: true,
|
|
8246
8331
|
language: 'zh',
|
|
8247
8332
|
autoPlay: true,
|
|
8333
|
+
scaleMode: THEME_SCALE_MODE_TYPE.full,
|
|
8248
8334
|
loggerOptions: {
|
|
8249
8335
|
level: 'INFO',
|
|
8250
8336
|
showTime: true
|
|
@@ -8734,6 +8820,37 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
8734
8820
|
(_this = this) == null ? void 0 : _this.emit(EVENTS.setLoggerOptions, options);
|
|
8735
8821
|
}
|
|
8736
8822
|
/**
|
|
8823
|
+
* 设置视频画面缩放模式
|
|
8824
|
+
* @since 1.0.1
|
|
8825
|
+
* @param {0 | 1 | 2} scaleMode - 缩放模式, 0: 窗口铺满, 1: 等比缩放大边铺满, 2: 等比缩放小边铺满
|
|
8826
|
+
*/ setScaleMode(scaleMode) {
|
|
8827
|
+
if ([
|
|
8828
|
+
0,
|
|
8829
|
+
1,
|
|
8830
|
+
2
|
|
8831
|
+
].includes(+scaleMode)) {
|
|
8832
|
+
var _this_contentControl_setScaleMode, _this_contentControl;
|
|
8833
|
+
this.scaleMode = +scaleMode;
|
|
8834
|
+
(_this_contentControl = this.contentControl) == null ? void 0 : (_this_contentControl_setScaleMode = _this_contentControl.setScaleMode) == null ? void 0 : _this_contentControl_setScaleMode.call(_this_contentControl, +scaleMode);
|
|
8835
|
+
const classList = this.$container.classList;
|
|
8836
|
+
for (const item of classList){
|
|
8837
|
+
if (item.startsWith(`${PREFIX_CLASS}-scale-mode-`)) {
|
|
8838
|
+
classList.remove(item);
|
|
8839
|
+
}
|
|
8840
|
+
}
|
|
8841
|
+
if (this.scaleMode === 0) {
|
|
8842
|
+
this.$container.classList.add(`${PREFIX_CLASS}-scale-mode-full`);
|
|
8843
|
+
} else if (this.scaleMode === 1) {
|
|
8844
|
+
this.$container.classList.add(`${PREFIX_CLASS}-scale-mode-auto`);
|
|
8845
|
+
} else if (this.scaleMode === 2) {
|
|
8846
|
+
this.$container.classList.add(`${PREFIX_CLASS}-scale-mode-full-auto`);
|
|
8847
|
+
}
|
|
8848
|
+
} else {
|
|
8849
|
+
var _this_logger;
|
|
8850
|
+
(_this_logger = this.logger) == null ? void 0 : _this_logger.warn('scaleMode must be 0 | 1 | 2');
|
|
8851
|
+
}
|
|
8852
|
+
}
|
|
8853
|
+
/**
|
|
8737
8854
|
* 销毁包括事件、控件 ...
|
|
8738
8855
|
*
|
|
8739
8856
|
* Destroy (including events, controls...)
|
|
@@ -8782,7 +8899,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
8782
8899
|
// 私有方法
|
|
8783
8900
|
// ==============================================================================================
|
|
8784
8901
|
/** 初始化配置项 */ _initOptions(options = {}) {
|
|
8785
|
-
var _this_options_loggerOptions;
|
|
8902
|
+
var _this_options_loggerOptions, _this_options_definitionOptions_list, _this_options_definitionOptions, _this_options_videoLevelList;
|
|
8786
8903
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
8787
8904
|
clone: false
|
|
8788
8905
|
});
|
|
@@ -8796,7 +8913,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
8796
8913
|
}
|
|
8797
8914
|
if (!this.$container) throw new Error('container option is required!');
|
|
8798
8915
|
if ([
|
|
8799
|
-
'
|
|
8916
|
+
'VIDEO',
|
|
8800
8917
|
'CANVAS'
|
|
8801
8918
|
].includes(this.$container.tagName)) {
|
|
8802
8919
|
throw new Error('container node cannot be video or canvas!');
|
|
@@ -8807,7 +8924,15 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
8807
8924
|
}));
|
|
8808
8925
|
this.logger.log(navigator.userAgent || 'unknown');
|
|
8809
8926
|
this.logger.log('[Theme Version] ', Theme.THEME_VERSION);
|
|
8810
|
-
|
|
8927
|
+
if ('container' in this.options) {
|
|
8928
|
+
// JSON 不能序列化dom节点, 不要使用 this.options.container, 请使用 this.container
|
|
8929
|
+
delete this.options.container;
|
|
8930
|
+
}
|
|
8931
|
+
try {
|
|
8932
|
+
this.logger.log('[options] \n', JSON.stringify(this.options));
|
|
8933
|
+
} catch (error) {
|
|
8934
|
+
this.logger.log('[options] \n', this.options);
|
|
8935
|
+
}
|
|
8811
8936
|
const language = this.options.language || 'zh';
|
|
8812
8937
|
const locales = deepmerge({
|
|
8813
8938
|
zh,
|
|
@@ -8819,6 +8944,12 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
8819
8944
|
this.i18n = new I18n(locales, {
|
|
8820
8945
|
defaultLocale: language
|
|
8821
8946
|
});
|
|
8947
|
+
// 默认清晰度列表
|
|
8948
|
+
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) {
|
|
8949
|
+
var _this_options_definitionOptions1;
|
|
8950
|
+
this.videoLevelList = ((_this_options_definitionOptions1 = this.options.definitionOptions) == null ? void 0 : _this_options_definitionOptions1.list) || this.options.videoLevelList;
|
|
8951
|
+
}
|
|
8952
|
+
this.setScaleMode(this.options.scaleMode);
|
|
8822
8953
|
}
|
|
8823
8954
|
/**
|
|
8824
8955
|
* 初始化设置类名和设置宽高
|
|
@@ -9308,7 +9439,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
9308
9439
|
*/ 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, /**
|
|
9309
9440
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
9310
9441
|
* @private
|
|
9311
|
-
*/ 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;
|
|
9442
|
+
*/ 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;
|
|
9312
9443
|
this._initOptions(options);
|
|
9313
9444
|
if (this.options.type === 'ezopen') {
|
|
9314
9445
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
@@ -9330,7 +9461,8 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
9330
9461
|
this._initClassName();
|
|
9331
9462
|
// 画布需要渲染在 this.contentControl.$container 内
|
|
9332
9463
|
this.contentControl = new Content({
|
|
9333
|
-
getContainer: ()=>this.$container
|
|
9464
|
+
getContainer: ()=>this.$container,
|
|
9465
|
+
scaleMode: this.scaleMode
|
|
9334
9466
|
});
|
|
9335
9467
|
// zoom utils
|
|
9336
9468
|
__zoom(this, this.contentControl.$content, _extends({}, this.options.zoomOptions || {}, {
|
|
@@ -9368,7 +9500,7 @@ const THEME_DEFAULT_OPTIONS = {
|
|
|
9368
9500
|
zh,
|
|
9369
9501
|
en
|
|
9370
9502
|
};
|
|
9371
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '1.0.0';
|
|
9503
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '1.0.1-alpha.0';
|
|
9372
9504
|
|
|
9373
9505
|
exports.Control = Control;
|
|
9374
9506
|
exports.Fullscreen = Fullscreen;
|