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