@ezuikit/player-theme 3.1.1 → 3.1.2-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 +4 -3
- package/dist/index.cjs +98 -24
- package/dist/index.esm.js +99 -25
- package/dist/index.umd.js +98 -24
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +50 -52
- package/package.json +2 -1
package/dist/constant.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.1
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.1
|
|
3
|
+
* Copyright (c) 2026-08-10 02:32:17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
@@ -32,7 +32,8 @@ var THEME_PROPS = [
|
|
|
32
32
|
'urlInfo',
|
|
33
33
|
'videoLevelList',
|
|
34
34
|
'videoLevel',
|
|
35
|
-
'recMonth'
|
|
35
|
+
'recMonth',
|
|
36
|
+
'url'
|
|
36
37
|
];
|
|
37
38
|
/**
|
|
38
39
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.1
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.1
|
|
3
|
+
* Copyright (c) 2026-08-10 02:32:17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -47,7 +47,8 @@ var THEME_PROPS = [
|
|
|
47
47
|
'urlInfo',
|
|
48
48
|
'videoLevelList',
|
|
49
49
|
'videoLevel',
|
|
50
|
-
'recMonth'
|
|
50
|
+
'recMonth',
|
|
51
|
+
'url'
|
|
51
52
|
];
|
|
52
53
|
/**
|
|
53
54
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
|
@@ -3350,6 +3351,59 @@ var en = {
|
|
|
3350
3351
|
}
|
|
3351
3352
|
};
|
|
3352
3353
|
|
|
3354
|
+
/**
|
|
3355
|
+
* flv 预览
|
|
3356
|
+
*/ var hlsRecTemplate = {
|
|
3357
|
+
autoFocus: 3,
|
|
3358
|
+
// poster:
|
|
3359
|
+
// "https://img2.baidu.com/it/u=3209353042,356122753&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500",
|
|
3360
|
+
footer: {
|
|
3361
|
+
btnList: [
|
|
3362
|
+
{
|
|
3363
|
+
iconId: 'play',
|
|
3364
|
+
part: 'left',
|
|
3365
|
+
isrender: 1
|
|
3366
|
+
},
|
|
3367
|
+
{
|
|
3368
|
+
iconId: 'capturePicture',
|
|
3369
|
+
part: 'left',
|
|
3370
|
+
defaultActive: 0,
|
|
3371
|
+
isrender: 1
|
|
3372
|
+
},
|
|
3373
|
+
{
|
|
3374
|
+
iconId: 'volume',
|
|
3375
|
+
part: 'left',
|
|
3376
|
+
defaultActive: 0,
|
|
3377
|
+
isrender: 1
|
|
3378
|
+
},
|
|
3379
|
+
{
|
|
3380
|
+
iconId: 'zoom',
|
|
3381
|
+
part: 'left',
|
|
3382
|
+
defaultActive: 0,
|
|
3383
|
+
isrender: 1
|
|
3384
|
+
},
|
|
3385
|
+
{
|
|
3386
|
+
iconId: 'speed',
|
|
3387
|
+
part: 'right',
|
|
3388
|
+
defaultActive: 0,
|
|
3389
|
+
isrender: 1
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
iconId: 'fullscreen',
|
|
3393
|
+
part: 'right',
|
|
3394
|
+
defaultActive: 0,
|
|
3395
|
+
isrender: 1
|
|
3396
|
+
},
|
|
3397
|
+
{
|
|
3398
|
+
iconId: 'globalFullscreen',
|
|
3399
|
+
part: 'right',
|
|
3400
|
+
defaultActive: 0,
|
|
3401
|
+
isrender: 1
|
|
3402
|
+
}
|
|
3403
|
+
]
|
|
3404
|
+
}
|
|
3405
|
+
};
|
|
3406
|
+
|
|
3353
3407
|
/**
|
|
3354
3408
|
* pc 预览
|
|
3355
3409
|
*/ var pcLive = {
|
|
@@ -8204,7 +8258,7 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8204
8258
|
_assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
|
|
8205
8259
|
}
|
|
8206
8260
|
})) || this;
|
|
8207
|
-
_this._filterSpeedList(options.list, options.props.recType);
|
|
8261
|
+
_this._filterSpeedList(options.list, options.props.recType, options.props.url);
|
|
8208
8262
|
_this.on(EVENTS.speedChange, function(speed) {
|
|
8209
8263
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
8210
8264
|
});
|
|
@@ -8218,18 +8272,24 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8218
8272
|
* 滤掉本地回放不支持的倍速
|
|
8219
8273
|
* @param optionsList 初始化配置倍速列表
|
|
8220
8274
|
* @param type 回放类型
|
|
8221
|
-
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
8275
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
|
|
8222
8276
|
if (!optionsList) {
|
|
8223
|
-
// 非用户自定义
|
|
8224
|
-
if (type === 'rec') {
|
|
8225
|
-
// 本地回放 不支持 8 16 32 倍速
|
|
8277
|
+
// 非用户自定义 /openpb/ 是标准流回放路径
|
|
8278
|
+
if (type === 'rec' || (url == null ? void 0 : url.includes('/openpb/'))) {
|
|
8279
|
+
// ezopen本地回放 或 hls 回放 不支持 8 16 32 倍速
|
|
8226
8280
|
var list = this.list.filter(function(item) {
|
|
8227
8281
|
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8228
8282
|
});
|
|
8229
8283
|
this.updateOptions(list);
|
|
8230
|
-
} else {
|
|
8284
|
+
} else if (type === 'cloudRec' || type === 'cloudRecord') {
|
|
8231
8285
|
// 云端回放 支持 8 16 32 倍速
|
|
8232
8286
|
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
8287
|
+
} else {
|
|
8288
|
+
// 三方默认回放倍速设置
|
|
8289
|
+
var list1 = this.list.filter(function(item) {
|
|
8290
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8291
|
+
});
|
|
8292
|
+
this.updateOptions(list1);
|
|
8233
8293
|
}
|
|
8234
8294
|
}
|
|
8235
8295
|
};
|
|
@@ -9509,7 +9569,11 @@ function _renderTheme(theme, data) {
|
|
|
9509
9569
|
}
|
|
9510
9570
|
if (!theme._playing) (_theme_posterControl = theme.posterControl) == null ? void 0 : _theme_posterControl.show();
|
|
9511
9571
|
props = THEME_PROPS.reduce(function(acc, cur) {
|
|
9512
|
-
|
|
9572
|
+
if (cur === 'url') {
|
|
9573
|
+
acc[cur] = theme.options.url;
|
|
9574
|
+
} else {
|
|
9575
|
+
acc[cur] = theme[cur];
|
|
9576
|
+
}
|
|
9513
9577
|
return acc;
|
|
9514
9578
|
}, {});
|
|
9515
9579
|
// 由于 resize 改变有延时(节流), 第一次渲染时, 宽度高度可能为 0, 需要手动设置一下
|
|
@@ -10112,11 +10176,10 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10112
10176
|
// _recMonthObj: Record<string, string[]> = {};
|
|
10113
10177
|
/**
|
|
10114
10178
|
* 录像回放的月份列表 @private
|
|
10115
|
-
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false,
|
|
10179
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0;
|
|
10116
10180
|
_this._initOptions(options);
|
|
10117
10181
|
if (_this.options.type === 'ezopen') {
|
|
10118
10182
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
10119
|
-
_this.urlInfo = utilsTools.parseEzopenUrl(_this.options.url);
|
|
10120
10183
|
if ((_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.spaceId) {
|
|
10121
10184
|
_this.options.spaceId = _this.urlInfo.searchParams.spaceId;
|
|
10122
10185
|
}
|
|
@@ -10171,9 +10234,10 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10171
10234
|
var template = (_this_options1 = _this.options) == null ? void 0 : _this_options1.template; // ThemeTemplateType | string | undefined
|
|
10172
10235
|
var initialThemeData;
|
|
10173
10236
|
if (options.type === 'hls' || options.type === 'ezhls') {
|
|
10237
|
+
var _options_url;
|
|
10174
10238
|
// hls / ezhls:@3.1.1 起支持自定义 themeData,但不支持标准提供的模板;未传时回退 hlsLiveTemplate
|
|
10175
|
-
// FIXME: 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
10176
|
-
initialThemeData = themeData !== undefined ? themeData : hlsLiveTemplate;
|
|
10239
|
+
// FIXME: themeData 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
10240
|
+
initialThemeData = themeData !== undefined ? themeData : ((_options_url = options.url) == null ? void 0 : _options_url.includes('/openpb/')) ? hlsRecTemplate : hlsLiveTemplate;
|
|
10177
10241
|
} else if ([
|
|
10178
10242
|
'flv',
|
|
10179
10243
|
'mp4'
|
|
@@ -10896,13 +10960,12 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10896
10960
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
10897
10961
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
10898
10962
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
if (urlInfo.recType === 'cloud' && (urlInfo == null ? void 0 : (_urlInfo_searchParams = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams.busType) === '7') {
|
|
10963
|
+
if (this.urlInfo.type === 'rec') {
|
|
10964
|
+
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
10965
|
+
if (this.urlInfo.recType === 'cloud' && ((_this_urlInfo = this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.busType) === '7') {
|
|
10903
10966
|
this.recType = 'cloudRecord';
|
|
10904
10967
|
return 'cloudRecord';
|
|
10905
|
-
} else if (urlInfo.recType === 'cloud') {
|
|
10968
|
+
} else if (this.urlInfo.recType === 'cloud') {
|
|
10906
10969
|
this.recType = 'cloudRec';
|
|
10907
10970
|
return 'cloudRec';
|
|
10908
10971
|
} else {
|
|
@@ -10910,13 +10973,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10910
10973
|
return 'rec';
|
|
10911
10974
|
}
|
|
10912
10975
|
}
|
|
10913
|
-
} else if (utilsTools.isHttp(url) && url.includes(
|
|
10914
|
-
// 萤石 ll-hls 回放
|
|
10915
|
-
if (url.includes(
|
|
10976
|
+
} else if (utilsTools.isHttp(url) && url.includes('/openpb/')) {
|
|
10977
|
+
// 萤石 ll-hls/flv 回放
|
|
10978
|
+
if (url.includes('rec=cloud')) {
|
|
10916
10979
|
// 云存储
|
|
10917
10980
|
this.recType = 'cloudRec';
|
|
10918
10981
|
return 'cloudRec';
|
|
10919
|
-
} else if (url.includes(
|
|
10982
|
+
} else if (url.includes('rec=local')) {
|
|
10920
10983
|
// 本地存储
|
|
10921
10984
|
this.recType = 'rec';
|
|
10922
10985
|
return 'rec';
|
|
@@ -10964,6 +11027,17 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10964
11027
|
}
|
|
10965
11028
|
};
|
|
10966
11029
|
_create_class(Theme, [
|
|
11030
|
+
{
|
|
11031
|
+
key: "urlInfo",
|
|
11032
|
+
get: /**
|
|
11033
|
+
* url 信息 播放地址信息
|
|
11034
|
+
*/ function get() {
|
|
11035
|
+
if (this.options.url) {
|
|
11036
|
+
return utilsTools.parseEzopenUrl(this.options.url);
|
|
11037
|
+
}
|
|
11038
|
+
return {};
|
|
11039
|
+
}
|
|
11040
|
+
},
|
|
10967
11041
|
{
|
|
10968
11042
|
key: "width",
|
|
10969
11043
|
get: /**
|
|
@@ -11373,7 +11447,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11373
11447
|
zh: zh,
|
|
11374
11448
|
en: en
|
|
11375
11449
|
};
|
|
11376
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.1';
|
|
11450
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.1';
|
|
11377
11451
|
|
|
11378
11452
|
exports.Control = Control;
|
|
11379
11453
|
exports.EVENTS = EVENTS;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.1
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.1
|
|
3
|
+
* Copyright (c) 2026-08-10 02:32:17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import Picker from '@skax/picker';
|
|
8
8
|
import delegate from '@skax/delegate';
|
|
9
9
|
import deepmerge from 'deepmerge';
|
|
10
|
-
import { isMobile, DateTime,
|
|
10
|
+
import { isMobile, DateTime, isHttp, parseEzopenUrl } from '@ezuikit/utils-tools';
|
|
11
11
|
import screenfull from 'screenfull';
|
|
12
12
|
import I18n from '@ezuikit/utils-i18n';
|
|
13
13
|
import Logger from '@ezuikit/utils-logger';
|
|
@@ -45,7 +45,8 @@ var THEME_PROPS = [
|
|
|
45
45
|
'urlInfo',
|
|
46
46
|
'videoLevelList',
|
|
47
47
|
'videoLevel',
|
|
48
|
-
'recMonth'
|
|
48
|
+
'recMonth',
|
|
49
|
+
'url'
|
|
49
50
|
];
|
|
50
51
|
/**
|
|
51
52
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
|
@@ -3348,6 +3349,59 @@ var en = {
|
|
|
3348
3349
|
}
|
|
3349
3350
|
};
|
|
3350
3351
|
|
|
3352
|
+
/**
|
|
3353
|
+
* flv 预览
|
|
3354
|
+
*/ var hlsRecTemplate = {
|
|
3355
|
+
autoFocus: 3,
|
|
3356
|
+
// poster:
|
|
3357
|
+
// "https://img2.baidu.com/it/u=3209353042,356122753&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500",
|
|
3358
|
+
footer: {
|
|
3359
|
+
btnList: [
|
|
3360
|
+
{
|
|
3361
|
+
iconId: 'play',
|
|
3362
|
+
part: 'left',
|
|
3363
|
+
isrender: 1
|
|
3364
|
+
},
|
|
3365
|
+
{
|
|
3366
|
+
iconId: 'capturePicture',
|
|
3367
|
+
part: 'left',
|
|
3368
|
+
defaultActive: 0,
|
|
3369
|
+
isrender: 1
|
|
3370
|
+
},
|
|
3371
|
+
{
|
|
3372
|
+
iconId: 'volume',
|
|
3373
|
+
part: 'left',
|
|
3374
|
+
defaultActive: 0,
|
|
3375
|
+
isrender: 1
|
|
3376
|
+
},
|
|
3377
|
+
{
|
|
3378
|
+
iconId: 'zoom',
|
|
3379
|
+
part: 'left',
|
|
3380
|
+
defaultActive: 0,
|
|
3381
|
+
isrender: 1
|
|
3382
|
+
},
|
|
3383
|
+
{
|
|
3384
|
+
iconId: 'speed',
|
|
3385
|
+
part: 'right',
|
|
3386
|
+
defaultActive: 0,
|
|
3387
|
+
isrender: 1
|
|
3388
|
+
},
|
|
3389
|
+
{
|
|
3390
|
+
iconId: 'fullscreen',
|
|
3391
|
+
part: 'right',
|
|
3392
|
+
defaultActive: 0,
|
|
3393
|
+
isrender: 1
|
|
3394
|
+
},
|
|
3395
|
+
{
|
|
3396
|
+
iconId: 'globalFullscreen',
|
|
3397
|
+
part: 'right',
|
|
3398
|
+
defaultActive: 0,
|
|
3399
|
+
isrender: 1
|
|
3400
|
+
}
|
|
3401
|
+
]
|
|
3402
|
+
}
|
|
3403
|
+
};
|
|
3404
|
+
|
|
3351
3405
|
/**
|
|
3352
3406
|
* pc 预览
|
|
3353
3407
|
*/ var pcLive = {
|
|
@@ -8202,7 +8256,7 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8202
8256
|
_assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
|
|
8203
8257
|
}
|
|
8204
8258
|
})) || this;
|
|
8205
|
-
_this._filterSpeedList(options.list, options.props.recType);
|
|
8259
|
+
_this._filterSpeedList(options.list, options.props.recType, options.props.url);
|
|
8206
8260
|
_this.on(EVENTS.speedChange, function(speed) {
|
|
8207
8261
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
8208
8262
|
});
|
|
@@ -8216,18 +8270,24 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8216
8270
|
* 滤掉本地回放不支持的倍速
|
|
8217
8271
|
* @param optionsList 初始化配置倍速列表
|
|
8218
8272
|
* @param type 回放类型
|
|
8219
|
-
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
8273
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
|
|
8220
8274
|
if (!optionsList) {
|
|
8221
|
-
// 非用户自定义
|
|
8222
|
-
if (type === 'rec') {
|
|
8223
|
-
// 本地回放 不支持 8 16 32 倍速
|
|
8275
|
+
// 非用户自定义 /openpb/ 是标准流回放路径
|
|
8276
|
+
if (type === 'rec' || (url == null ? void 0 : url.includes('/openpb/'))) {
|
|
8277
|
+
// ezopen本地回放 或 hls 回放 不支持 8 16 32 倍速
|
|
8224
8278
|
var list = this.list.filter(function(item) {
|
|
8225
8279
|
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8226
8280
|
});
|
|
8227
8281
|
this.updateOptions(list);
|
|
8228
|
-
} else {
|
|
8282
|
+
} else if (type === 'cloudRec' || type === 'cloudRecord') {
|
|
8229
8283
|
// 云端回放 支持 8 16 32 倍速
|
|
8230
8284
|
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
8285
|
+
} else {
|
|
8286
|
+
// 三方默认回放倍速设置
|
|
8287
|
+
var list1 = this.list.filter(function(item) {
|
|
8288
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8289
|
+
});
|
|
8290
|
+
this.updateOptions(list1);
|
|
8231
8291
|
}
|
|
8232
8292
|
}
|
|
8233
8293
|
};
|
|
@@ -9507,7 +9567,11 @@ function _renderTheme(theme, data) {
|
|
|
9507
9567
|
}
|
|
9508
9568
|
if (!theme._playing) (_theme_posterControl = theme.posterControl) == null ? void 0 : _theme_posterControl.show();
|
|
9509
9569
|
props = THEME_PROPS.reduce(function(acc, cur) {
|
|
9510
|
-
|
|
9570
|
+
if (cur === 'url') {
|
|
9571
|
+
acc[cur] = theme.options.url;
|
|
9572
|
+
} else {
|
|
9573
|
+
acc[cur] = theme[cur];
|
|
9574
|
+
}
|
|
9511
9575
|
return acc;
|
|
9512
9576
|
}, {});
|
|
9513
9577
|
// 由于 resize 改变有延时(节流), 第一次渲染时, 宽度高度可能为 0, 需要手动设置一下
|
|
@@ -10110,11 +10174,10 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10110
10174
|
// _recMonthObj: Record<string, string[]> = {};
|
|
10111
10175
|
/**
|
|
10112
10176
|
* 录像回放的月份列表 @private
|
|
10113
|
-
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false,
|
|
10177
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0;
|
|
10114
10178
|
_this._initOptions(options);
|
|
10115
10179
|
if (_this.options.type === 'ezopen') {
|
|
10116
10180
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
10117
|
-
_this.urlInfo = parseEzopenUrl(_this.options.url);
|
|
10118
10181
|
if ((_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.spaceId) {
|
|
10119
10182
|
_this.options.spaceId = _this.urlInfo.searchParams.spaceId;
|
|
10120
10183
|
}
|
|
@@ -10169,9 +10232,10 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10169
10232
|
var template = (_this_options1 = _this.options) == null ? void 0 : _this_options1.template; // ThemeTemplateType | string | undefined
|
|
10170
10233
|
var initialThemeData;
|
|
10171
10234
|
if (options.type === 'hls' || options.type === 'ezhls') {
|
|
10235
|
+
var _options_url;
|
|
10172
10236
|
// hls / ezhls:@3.1.1 起支持自定义 themeData,但不支持标准提供的模板;未传时回退 hlsLiveTemplate
|
|
10173
|
-
// FIXME: 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
10174
|
-
initialThemeData = themeData !== undefined ? themeData : hlsLiveTemplate;
|
|
10237
|
+
// FIXME: themeData 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
10238
|
+
initialThemeData = themeData !== undefined ? themeData : ((_options_url = options.url) == null ? void 0 : _options_url.includes('/openpb/')) ? hlsRecTemplate : hlsLiveTemplate;
|
|
10175
10239
|
} else if ([
|
|
10176
10240
|
'flv',
|
|
10177
10241
|
'mp4'
|
|
@@ -10894,13 +10958,12 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10894
10958
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
10895
10959
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
10896
10960
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
if (urlInfo.recType === 'cloud' && (urlInfo == null ? void 0 : (_urlInfo_searchParams = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams.busType) === '7') {
|
|
10961
|
+
if (this.urlInfo.type === 'rec') {
|
|
10962
|
+
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
10963
|
+
if (this.urlInfo.recType === 'cloud' && ((_this_urlInfo = this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.busType) === '7') {
|
|
10901
10964
|
this.recType = 'cloudRecord';
|
|
10902
10965
|
return 'cloudRecord';
|
|
10903
|
-
} else if (urlInfo.recType === 'cloud') {
|
|
10966
|
+
} else if (this.urlInfo.recType === 'cloud') {
|
|
10904
10967
|
this.recType = 'cloudRec';
|
|
10905
10968
|
return 'cloudRec';
|
|
10906
10969
|
} else {
|
|
@@ -10908,13 +10971,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10908
10971
|
return 'rec';
|
|
10909
10972
|
}
|
|
10910
10973
|
}
|
|
10911
|
-
} else if (isHttp(url) && url.includes(
|
|
10912
|
-
// 萤石 ll-hls 回放
|
|
10913
|
-
if (url.includes(
|
|
10974
|
+
} else if (isHttp(url) && url.includes('/openpb/')) {
|
|
10975
|
+
// 萤石 ll-hls/flv 回放
|
|
10976
|
+
if (url.includes('rec=cloud')) {
|
|
10914
10977
|
// 云存储
|
|
10915
10978
|
this.recType = 'cloudRec';
|
|
10916
10979
|
return 'cloudRec';
|
|
10917
|
-
} else if (url.includes(
|
|
10980
|
+
} else if (url.includes('rec=local')) {
|
|
10918
10981
|
// 本地存储
|
|
10919
10982
|
this.recType = 'rec';
|
|
10920
10983
|
return 'rec';
|
|
@@ -10962,6 +11025,17 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10962
11025
|
}
|
|
10963
11026
|
};
|
|
10964
11027
|
_create_class(Theme, [
|
|
11028
|
+
{
|
|
11029
|
+
key: "urlInfo",
|
|
11030
|
+
get: /**
|
|
11031
|
+
* url 信息 播放地址信息
|
|
11032
|
+
*/ function get() {
|
|
11033
|
+
if (this.options.url) {
|
|
11034
|
+
return parseEzopenUrl(this.options.url);
|
|
11035
|
+
}
|
|
11036
|
+
return {};
|
|
11037
|
+
}
|
|
11038
|
+
},
|
|
10965
11039
|
{
|
|
10966
11040
|
key: "width",
|
|
10967
11041
|
get: /**
|
|
@@ -11371,6 +11445,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11371
11445
|
zh: zh,
|
|
11372
11446
|
en: en
|
|
11373
11447
|
};
|
|
11374
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.1';
|
|
11448
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.1';
|
|
11375
11449
|
|
|
11376
11450
|
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 v3.1.1
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.1
|
|
3
|
+
* Copyright (c) 2026-08-10 02:32:17 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
@@ -393,7 +393,8 @@
|
|
|
393
393
|
'urlInfo',
|
|
394
394
|
'videoLevelList',
|
|
395
395
|
'videoLevel',
|
|
396
|
-
'recMonth'
|
|
396
|
+
'recMonth',
|
|
397
|
+
'url'
|
|
397
398
|
];
|
|
398
399
|
/**
|
|
399
400
|
* 当移动端 picker 控件打开时需要关闭动画(定时器)
|
|
@@ -4838,6 +4839,59 @@
|
|
|
4838
4839
|
}
|
|
4839
4840
|
};
|
|
4840
4841
|
|
|
4842
|
+
/**
|
|
4843
|
+
* flv 预览
|
|
4844
|
+
*/ var hlsRecTemplate = {
|
|
4845
|
+
autoFocus: 3,
|
|
4846
|
+
// poster:
|
|
4847
|
+
// "https://img2.baidu.com/it/u=3209353042,356122753&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500",
|
|
4848
|
+
footer: {
|
|
4849
|
+
btnList: [
|
|
4850
|
+
{
|
|
4851
|
+
iconId: 'play',
|
|
4852
|
+
part: 'left',
|
|
4853
|
+
isrender: 1
|
|
4854
|
+
},
|
|
4855
|
+
{
|
|
4856
|
+
iconId: 'capturePicture',
|
|
4857
|
+
part: 'left',
|
|
4858
|
+
defaultActive: 0,
|
|
4859
|
+
isrender: 1
|
|
4860
|
+
},
|
|
4861
|
+
{
|
|
4862
|
+
iconId: 'volume',
|
|
4863
|
+
part: 'left',
|
|
4864
|
+
defaultActive: 0,
|
|
4865
|
+
isrender: 1
|
|
4866
|
+
},
|
|
4867
|
+
{
|
|
4868
|
+
iconId: 'zoom',
|
|
4869
|
+
part: 'left',
|
|
4870
|
+
defaultActive: 0,
|
|
4871
|
+
isrender: 1
|
|
4872
|
+
},
|
|
4873
|
+
{
|
|
4874
|
+
iconId: 'speed',
|
|
4875
|
+
part: 'right',
|
|
4876
|
+
defaultActive: 0,
|
|
4877
|
+
isrender: 1
|
|
4878
|
+
},
|
|
4879
|
+
{
|
|
4880
|
+
iconId: 'fullscreen',
|
|
4881
|
+
part: 'right',
|
|
4882
|
+
defaultActive: 0,
|
|
4883
|
+
isrender: 1
|
|
4884
|
+
},
|
|
4885
|
+
{
|
|
4886
|
+
iconId: 'globalFullscreen',
|
|
4887
|
+
part: 'right',
|
|
4888
|
+
defaultActive: 0,
|
|
4889
|
+
isrender: 1
|
|
4890
|
+
}
|
|
4891
|
+
]
|
|
4892
|
+
}
|
|
4893
|
+
};
|
|
4894
|
+
|
|
4841
4895
|
/**
|
|
4842
4896
|
* pc 预览
|
|
4843
4897
|
*/ var pcLive = {
|
|
@@ -10077,7 +10131,7 @@
|
|
|
10077
10131
|
_assert_this_initialized(_this).emit(EVENTS$2.control.speedPanelOpenChange, open, value, item);
|
|
10078
10132
|
}
|
|
10079
10133
|
})) || this;
|
|
10080
|
-
_this._filterSpeedList(options.list, options.props.recType);
|
|
10134
|
+
_this._filterSpeedList(options.list, options.props.recType, options.props.url);
|
|
10081
10135
|
_this.on(EVENTS$2.speedChange, function(speed) {
|
|
10082
10136
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
10083
10137
|
});
|
|
@@ -10091,18 +10145,24 @@
|
|
|
10091
10145
|
* 滤掉本地回放不支持的倍速
|
|
10092
10146
|
* @param optionsList 初始化配置倍速列表
|
|
10093
10147
|
* @param type 回放类型
|
|
10094
|
-
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
10148
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
|
|
10095
10149
|
if (!optionsList) {
|
|
10096
|
-
// 非用户自定义
|
|
10097
|
-
if (type === 'rec') {
|
|
10098
|
-
// 本地回放 不支持 8 16 32 倍速
|
|
10150
|
+
// 非用户自定义 /openpb/ 是标准流回放路径
|
|
10151
|
+
if (type === 'rec' || (url == null ? void 0 : url.includes('/openpb/'))) {
|
|
10152
|
+
// ezopen本地回放 或 hls 回放 不支持 8 16 32 倍速
|
|
10099
10153
|
var list = this.list.filter(function(item) {
|
|
10100
10154
|
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
10101
10155
|
});
|
|
10102
10156
|
this.updateOptions(list);
|
|
10103
|
-
} else {
|
|
10157
|
+
} else if (type === 'cloudRec' || type === 'cloudRecord') {
|
|
10104
10158
|
// 云端回放 支持 8 16 32 倍速
|
|
10105
10159
|
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
10160
|
+
} else {
|
|
10161
|
+
// 三方默认回放倍速设置
|
|
10162
|
+
var list1 = this.list.filter(function(item) {
|
|
10163
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
10164
|
+
});
|
|
10165
|
+
this.updateOptions(list1);
|
|
10106
10166
|
}
|
|
10107
10167
|
}
|
|
10108
10168
|
};
|
|
@@ -11853,7 +11913,11 @@
|
|
|
11853
11913
|
}
|
|
11854
11914
|
if (!theme._playing) (_theme_posterControl = theme.posterControl) == null ? void 0 : _theme_posterControl.show();
|
|
11855
11915
|
props = THEME_PROPS.reduce(function(acc, cur) {
|
|
11856
|
-
|
|
11916
|
+
if (cur === 'url') {
|
|
11917
|
+
acc[cur] = theme.options.url;
|
|
11918
|
+
} else {
|
|
11919
|
+
acc[cur] = theme[cur];
|
|
11920
|
+
}
|
|
11857
11921
|
return acc;
|
|
11858
11922
|
}, {});
|
|
11859
11923
|
// 由于 resize 改变有延时(节流), 第一次渲染时, 宽度高度可能为 0, 需要手动设置一下
|
|
@@ -12456,11 +12520,10 @@
|
|
|
12456
12520
|
// _recMonthObj: Record<string, string[]> = {};
|
|
12457
12521
|
/**
|
|
12458
12522
|
* 录像回放的月份列表 @private
|
|
12459
|
-
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false,
|
|
12523
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0;
|
|
12460
12524
|
_this._initOptions(options);
|
|
12461
12525
|
if (_this.options.type === 'ezopen') {
|
|
12462
12526
|
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
12463
|
-
_this.urlInfo = distExports$3.parseEzopenUrl(_this.options.url);
|
|
12464
12527
|
if ((_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.spaceId) {
|
|
12465
12528
|
_this.options.spaceId = _this.urlInfo.searchParams.spaceId;
|
|
12466
12529
|
}
|
|
@@ -12515,9 +12578,10 @@
|
|
|
12515
12578
|
var template = (_this_options1 = _this.options) == null ? void 0 : _this_options1.template; // ThemeTemplateType | string | undefined
|
|
12516
12579
|
var initialThemeData;
|
|
12517
12580
|
if (options.type === 'hls' || options.type === 'ezhls') {
|
|
12581
|
+
var _options_url;
|
|
12518
12582
|
// hls / ezhls:@3.1.1 起支持自定义 themeData,但不支持标准提供的模板;未传时回退 hlsLiveTemplate
|
|
12519
|
-
// FIXME: 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
12520
|
-
initialThemeData = themeData !== undefined ? themeData : hlsLiveTemplate;
|
|
12583
|
+
// FIXME: themeData 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
12584
|
+
initialThemeData = themeData !== undefined ? themeData : ((_options_url = options.url) == null ? void 0 : _options_url.includes('/openpb/')) ? hlsRecTemplate : hlsLiveTemplate;
|
|
12521
12585
|
} else if ([
|
|
12522
12586
|
'flv',
|
|
12523
12587
|
'mp4'
|
|
@@ -13240,13 +13304,12 @@
|
|
|
13240
13304
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
13241
13305
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
13242
13306
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
if (urlInfo.recType === 'cloud' && (urlInfo == null ? void 0 : (_urlInfo_searchParams = urlInfo.searchParams) == null ? void 0 : _urlInfo_searchParams.busType) === '7') {
|
|
13307
|
+
if (this.urlInfo.type === 'rec') {
|
|
13308
|
+
var _this_urlInfo_searchParams, _this_urlInfo;
|
|
13309
|
+
if (this.urlInfo.recType === 'cloud' && ((_this_urlInfo = this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.busType) === '7') {
|
|
13247
13310
|
this.recType = 'cloudRecord';
|
|
13248
13311
|
return 'cloudRecord';
|
|
13249
|
-
} else if (urlInfo.recType === 'cloud') {
|
|
13312
|
+
} else if (this.urlInfo.recType === 'cloud') {
|
|
13250
13313
|
this.recType = 'cloudRec';
|
|
13251
13314
|
return 'cloudRec';
|
|
13252
13315
|
} else {
|
|
@@ -13254,13 +13317,13 @@
|
|
|
13254
13317
|
return 'rec';
|
|
13255
13318
|
}
|
|
13256
13319
|
}
|
|
13257
|
-
} else if (distExports$3.isHttp(url) && url.includes(
|
|
13258
|
-
// 萤石 ll-hls 回放
|
|
13259
|
-
if (url.includes(
|
|
13320
|
+
} else if (distExports$3.isHttp(url) && url.includes('/openpb/')) {
|
|
13321
|
+
// 萤石 ll-hls/flv 回放
|
|
13322
|
+
if (url.includes('rec=cloud')) {
|
|
13260
13323
|
// 云存储
|
|
13261
13324
|
this.recType = 'cloudRec';
|
|
13262
13325
|
return 'cloudRec';
|
|
13263
|
-
} else if (url.includes(
|
|
13326
|
+
} else if (url.includes('rec=local')) {
|
|
13264
13327
|
// 本地存储
|
|
13265
13328
|
this.recType = 'rec';
|
|
13266
13329
|
return 'rec';
|
|
@@ -13308,6 +13371,17 @@
|
|
|
13308
13371
|
}
|
|
13309
13372
|
};
|
|
13310
13373
|
_create_class(Theme, [
|
|
13374
|
+
{
|
|
13375
|
+
key: "urlInfo",
|
|
13376
|
+
get: /**
|
|
13377
|
+
* url 信息 播放地址信息
|
|
13378
|
+
*/ function get() {
|
|
13379
|
+
if (this.options.url) {
|
|
13380
|
+
return distExports$3.parseEzopenUrl(this.options.url);
|
|
13381
|
+
}
|
|
13382
|
+
return {};
|
|
13383
|
+
}
|
|
13384
|
+
},
|
|
13311
13385
|
{
|
|
13312
13386
|
key: "width",
|
|
13313
13387
|
get: /**
|
|
@@ -13717,7 +13791,7 @@
|
|
|
13717
13791
|
zh: zh,
|
|
13718
13792
|
en: en
|
|
13719
13793
|
};
|
|
13720
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.1';
|
|
13794
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.1';
|
|
13721
13795
|
|
|
13722
13796
|
// 不要动这里的代码, 这个出口是为了编译成 umd 规范的文件
|
|
13723
13797
|
|
package/dist/style.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import I18n, { I18nTranslation } from '@ezuikit/utils-i18n';
|
|
|
4
4
|
import { LoggerCls, LoggerOptions } from '@ezuikit/utils-logger';
|
|
5
5
|
import { BasePtzOptions } from '@ezuikit/control-ptz';
|
|
6
6
|
import { RecListModalOptions } from '@ezuikit/control-rec-list-modal';
|
|
7
|
+
import * as _ezuikit_utils_tools from '@ezuikit/utils-tools';
|
|
7
8
|
import Zoom from '@ezuikit/control-zoom';
|
|
8
9
|
import { TimeLineTimeSection } from '@ezuikit/control-time-line';
|
|
9
10
|
import { TimePickerOptions } from '@ezuikit/control-date-picker';
|
|
@@ -17,7 +18,7 @@ declare const THEME_SCALE_MODE_TYPE: {
|
|
|
17
18
|
/** 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 */
|
|
18
19
|
readonly fullAuto: 2;
|
|
19
20
|
};
|
|
20
|
-
declare const THEME_PROPS: readonly ["width", "height", "playing", "volume", "muted", "loading", "recType", "isCurrentFullscreen", "orientationAngle", "zooming", "zoom", "recording", "recordList", "speed", "urlInfo", "videoLevelList", "videoLevel", "recMonth"];
|
|
21
|
+
declare const THEME_PROPS: readonly ["width", "height", "playing", "volume", "muted", "loading", "recType", "isCurrentFullscreen", "orientationAngle", "zooming", "zoom", "recording", "recordList", "speed", "urlInfo", "videoLevelList", "videoLevel", "recMonth", "url"];
|
|
21
22
|
/**
|
|
22
23
|
*
|
|
23
24
|
* 事件名
|
|
@@ -1491,9 +1492,10 @@ declare class Theme extends EventEmitter {
|
|
|
1491
1492
|
readonly audioInfo: "audioInfo";
|
|
1492
1493
|
readonly videoInfo: "videoInfo";
|
|
1493
1494
|
readonly firstFrameDisplay: "firstFrameDisplay";
|
|
1494
|
-
readonly fullscreen: "fullscreen";
|
|
1495
|
+
readonly fullscreen: "fullscreen"; /** 所有私有流的模板 @since 0.0.1 */
|
|
1495
1496
|
readonly exitFullscreen: "exitFullscreen";
|
|
1496
1497
|
readonly fullscreenChange: "fullscreenChange";
|
|
1498
|
+
/** 播放器配置项 */
|
|
1497
1499
|
readonly resize: "resize";
|
|
1498
1500
|
readonly orientationChange: "orientationChange";
|
|
1499
1501
|
readonly audioCodecUnsupported: "audioCodecUnsupported";
|
|
@@ -1503,7 +1505,7 @@ declare class Theme extends EventEmitter {
|
|
|
1503
1505
|
readonly speedChange: "speedChange";
|
|
1504
1506
|
readonly recordingChange: "recordingChange";
|
|
1505
1507
|
readonly talkingChange: "talkingChange";
|
|
1506
|
-
readonly talkVolumeChange: "talkVolumeChange";
|
|
1508
|
+
readonly talkVolumeChange: "talkVolumeChange"; /** 封面控件 @since 0.0.1 @private */
|
|
1507
1509
|
readonly broadcastChange: "broadcastChange";
|
|
1508
1510
|
readonly aichatChange: "aichatChange";
|
|
1509
1511
|
readonly liveChange: "liveChange";
|
|
@@ -1520,9 +1522,9 @@ declare class Theme extends EventEmitter {
|
|
|
1520
1522
|
readonly getOSDTime: "getOSDTime";
|
|
1521
1523
|
readonly control: {
|
|
1522
1524
|
readonly play: "Control.play";
|
|
1523
|
-
readonly playDestroy: "Control.playDestroy";
|
|
1525
|
+
readonly playDestroy: "Control.playDestroy";
|
|
1524
1526
|
readonly capturePicture: "Control.capturePicture";
|
|
1525
|
-
readonly capturePictureResult: "Control.capturePictureResult";
|
|
1527
|
+
readonly capturePictureResult: "Control.capturePictureResult"; /** @since 0.0.1 @private */
|
|
1526
1528
|
readonly capturePictureDestroy: "Control.capturePictureDestroy";
|
|
1527
1529
|
readonly volumechange: "Control.volumechange";
|
|
1528
1530
|
readonly volumePanelOpenChange: "Control.volumePanelOpenChange";
|
|
@@ -1531,7 +1533,6 @@ declare class Theme extends EventEmitter {
|
|
|
1531
1533
|
readonly headerMoreShowControlsChange: "Control.headerMoreShowControlsChange";
|
|
1532
1534
|
readonly headerMorePanelOpenChange: "Control.headerMorePanelOpenChange";
|
|
1533
1535
|
readonly footerMoreShowControlsChange: "Control.footerMoreShowControlsChange";
|
|
1534
|
-
/** 放大中 true: 可缩放状态,false: 禁止缩放状态(不能缩放) @private */
|
|
1535
1536
|
readonly footerMorePanelOpenChange: "Control.footerMorePanelOpenChange";
|
|
1536
1537
|
readonly deviceDestroy: "Control.deviceDestroy";
|
|
1537
1538
|
readonly recTypeChange: "Control.recTypeChange";
|
|
@@ -1541,6 +1542,9 @@ declare class Theme extends EventEmitter {
|
|
|
1541
1542
|
readonly definitionPanelOpenChange: "Control.definitionPanelOpenChange";
|
|
1542
1543
|
readonly definitionDestroy: "Control.definitionDestroy";
|
|
1543
1544
|
readonly speedChange: "Control.speedChange";
|
|
1545
|
+
/**
|
|
1546
|
+
* 录像回放的月份列表 @private
|
|
1547
|
+
*/
|
|
1544
1548
|
readonly speedPanelOpenChange: "Control.speedPanelOpenChange";
|
|
1545
1549
|
readonly speedDestroy: "Control.speedDestroy";
|
|
1546
1550
|
readonly ptzPanelOpenChange: "Control.ptzPanelOpenChange";
|
|
@@ -1595,7 +1599,9 @@ declare class Theme extends EventEmitter {
|
|
|
1595
1599
|
readonly mobileExtendDestroy: "Theme.mobileExtendDestroy";
|
|
1596
1600
|
readonly recFooterDestroy: "Theme.recFooterDestroy";
|
|
1597
1601
|
};
|
|
1598
|
-
readonly message: "message";
|
|
1602
|
+
readonly message: "message"; /**
|
|
1603
|
+
* url 信息 播放地址信息
|
|
1604
|
+
*/
|
|
1599
1605
|
};
|
|
1600
1606
|
/** 语言包 @since 0.0.1 */
|
|
1601
1607
|
static LOCALES: {
|
|
@@ -1700,6 +1706,7 @@ declare class Theme extends EventEmitter {
|
|
|
1700
1706
|
397007: string;
|
|
1701
1707
|
399000: string;
|
|
1702
1708
|
399001: string;
|
|
1709
|
+
/** 移动端竖屏, 全屏情况下不展示扩张,放置在 footer 中 */
|
|
1703
1710
|
399002: string;
|
|
1704
1711
|
399016: string;
|
|
1705
1712
|
399048: string;
|
|
@@ -1764,6 +1771,7 @@ declare class Theme extends EventEmitter {
|
|
|
1764
1771
|
CHANGE_VIDEO_LEVEL: string;
|
|
1765
1772
|
CHANGE_VIDEO_LEVEL_FAIL: string;
|
|
1766
1773
|
GET_VIDEO_LEVEL_LIST: string;
|
|
1774
|
+
/** 消息提示控件 @since 0.0.1 @private */
|
|
1767
1775
|
PLEASE_INPUT_RIGHT_VIDEO_LEVEL: string;
|
|
1768
1776
|
VIDEO_LEVEL_NOT_SUPPORT: string;
|
|
1769
1777
|
VIDEO_LEVEL_AUTO: string;
|
|
@@ -1786,17 +1794,18 @@ declare class Theme extends EventEmitter {
|
|
|
1786
1794
|
BTN_AICHAT: string;
|
|
1787
1795
|
BTN_LIVE: string;
|
|
1788
1796
|
BTN_REC_DROPDOWN: string;
|
|
1789
|
-
BTN_ALARM_MESSAGE: string;
|
|
1797
|
+
BTN_ALARM_MESSAGE: string;
|
|
1790
1798
|
REC_DROPDOWN_CLOUD_REC: string;
|
|
1791
|
-
REC_DROPDOWN_CLOUD_RECORD: string;
|
|
1799
|
+
REC_DROPDOWN_CLOUD_RECORD: string;
|
|
1792
1800
|
REC_DROPDOWN_LOCAL_REC: string;
|
|
1793
|
-
BTN_ZOOM: string;
|
|
1794
|
-
BTN_3D_ZOOM: string;
|
|
1801
|
+
BTN_ZOOM: string; /** 回放底部时间轴 @since 0.0.1 @private */
|
|
1802
|
+
BTN_3D_ZOOM: string;
|
|
1803
|
+
BTN_PTZ: string;
|
|
1804
|
+
BTN_GLOBAL_FULLSCREEN: string;
|
|
1805
|
+
/**
|
|
1795
1806
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
1796
1807
|
* @private
|
|
1797
1808
|
*/
|
|
1798
|
-
BTN_PTZ: string;
|
|
1799
|
-
BTN_GLOBAL_FULLSCREEN: string;
|
|
1800
1809
|
BTN_EXIT_GLOBAL_FULLSCREEN: string;
|
|
1801
1810
|
BTN_FULLSCREEN: string;
|
|
1802
1811
|
BTN_EXIR_FULLSCREEN: string;
|
|
@@ -1814,13 +1823,14 @@ declare class Theme extends EventEmitter {
|
|
|
1814
1823
|
CAPTURE_FAILED: string;
|
|
1815
1824
|
START_RECORD_SUCCESS: string;
|
|
1816
1825
|
START_RECORD_FAILED: string;
|
|
1817
|
-
STOP_RECORD_SUCCESS: string;
|
|
1826
|
+
STOP_RECORD_SUCCESS: string; /** resizeObserver 监听销毁 */
|
|
1818
1827
|
STOP_RECORD_FAILED: string;
|
|
1819
1828
|
RECORD_TIPS: string;
|
|
1820
1829
|
RECORDS: string;
|
|
1821
1830
|
OPEN_SOUND: string;
|
|
1822
1831
|
CLOSE_SOUND: string;
|
|
1823
1832
|
SOUND_OPENED: string;
|
|
1833
|
+
/** 容器的宽 */
|
|
1824
1834
|
ZOOM: string;
|
|
1825
1835
|
START_ZOOM: string;
|
|
1826
1836
|
CLOSE_ZOOM: string;
|
|
@@ -1829,10 +1839,11 @@ declare class Theme extends EventEmitter {
|
|
|
1829
1839
|
ZOOM_ADD_MAX: string;
|
|
1830
1840
|
ZOOM_SUB_MIN: string;
|
|
1831
1841
|
ZOOM_LIMIT_MAX: string;
|
|
1832
|
-
ZOOM_LIMIT_MIN: string;
|
|
1842
|
+
ZOOM_LIMIT_MIN: string;
|
|
1833
1843
|
ZOOM_NOT_ENABLED: string;
|
|
1834
|
-
'3D_ZOOM': string;
|
|
1835
|
-
|
|
1844
|
+
'3D_ZOOM': string;
|
|
1845
|
+
/** @private 加载中 */
|
|
1846
|
+
'3D_ZOOM_DISABLE': string;
|
|
1836
1847
|
'3D_ZOOM_FAILED': string;
|
|
1837
1848
|
START_3D_ZOOM: string;
|
|
1838
1849
|
CLOSE_3D_ZOOM: string;
|
|
@@ -1840,38 +1851,36 @@ declare class Theme extends EventEmitter {
|
|
|
1840
1851
|
'3D_ZOOM_ACTIVED': string;
|
|
1841
1852
|
'3D_ZOOM_NOT_ACTIVED': string;
|
|
1842
1853
|
'3D_ZOOM_CLOSED': string;
|
|
1843
|
-
CHANGE_ZOOM_TYPE: string;
|
|
1854
|
+
CHANGE_ZOOM_TYPE: string;
|
|
1844
1855
|
FULLSCREEN: string;
|
|
1845
|
-
FULLSCREEN_EXIT: string;
|
|
1856
|
+
FULLSCREEN_EXIT: string; /** 自定清晰度 @private */
|
|
1846
1857
|
GET_WEB_FULLSCREEN_STATUS: string;
|
|
1847
1858
|
WEB_FULLSCREEN: string;
|
|
1848
1859
|
WEB_FULLSCREEN_EXIT: string;
|
|
1860
|
+
/** 回放片段列表 */
|
|
1849
1861
|
DESTROY: string;
|
|
1850
1862
|
GET_CAPACITY: string;
|
|
1851
1863
|
GET_PTZ_STATUS: string;
|
|
1852
1864
|
GET_PTZ_STATUS_FAILED: string;
|
|
1853
|
-
/**
|
|
1854
|
-
* 录像回放的月份列表 @private
|
|
1855
|
-
*/
|
|
1856
1865
|
MOBILE_HIDE_PTZ: string;
|
|
1857
1866
|
OPTION_PTZ_FAILED: string;
|
|
1858
1867
|
MOBILE_PTZ_TIPS: string;
|
|
1859
|
-
/**
|
|
1860
|
-
* 录像回放的月份列表 @private
|
|
1861
|
-
*/
|
|
1862
1868
|
PTZ_FAST: string;
|
|
1863
1869
|
PTZ_MID: string;
|
|
1864
1870
|
PTZ_SLOW: string;
|
|
1865
1871
|
PTZ_SPEED: string;
|
|
1866
1872
|
DEVICE_ZOOM: string;
|
|
1867
1873
|
DEVICE_FOCUS: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* 录像回放的月份列表 @private
|
|
1876
|
+
*/
|
|
1868
1877
|
NOT_SUPPORT_DEVICE_ZOOM: string;
|
|
1869
1878
|
NOT_SUPPORT_FOCUS: string;
|
|
1870
1879
|
MIRROR: string;
|
|
1871
1880
|
MIRROR_TYPE_ERROR: string;
|
|
1872
1881
|
CHANGE_FEC_TYPE: string;
|
|
1873
1882
|
DEVICE_NOT_SUPPORT: string;
|
|
1874
|
-
TYPE_NOT_SUPPORT: string; /**
|
|
1883
|
+
TYPE_NOT_SUPPORT: string; /** 销毁标识 @readonly */
|
|
1875
1884
|
FEC_SUPPORT_VERSION: string;
|
|
1876
1885
|
NO_CANVAS_ID: string;
|
|
1877
1886
|
SET_FEC_PARAMS: string;
|
|
@@ -1930,7 +1939,7 @@ declare class Theme extends EventEmitter {
|
|
|
1930
1939
|
395558: string;
|
|
1931
1940
|
395560: string;
|
|
1932
1941
|
395561: string;
|
|
1933
|
-
395562: string;
|
|
1942
|
+
395562: string;
|
|
1934
1943
|
395563: string;
|
|
1935
1944
|
395564: string;
|
|
1936
1945
|
395566: string;
|
|
@@ -1941,7 +1950,8 @@ declare class Theme extends EventEmitter {
|
|
|
1941
1950
|
395601: string;
|
|
1942
1951
|
395602: string;
|
|
1943
1952
|
395610: string;
|
|
1944
|
-
|
|
1953
|
+
/** 暂停控件 @since 0.0.1 @private */
|
|
1954
|
+
395620: string;
|
|
1945
1955
|
395701: string;
|
|
1946
1956
|
395702: string;
|
|
1947
1957
|
395703: string;
|
|
@@ -1957,14 +1967,14 @@ declare class Theme extends EventEmitter {
|
|
|
1957
1967
|
396108: string;
|
|
1958
1968
|
396109: string;
|
|
1959
1969
|
396110: string;
|
|
1960
|
-
/** resizeObserver 监听销毁 */
|
|
1961
1970
|
396501: string;
|
|
1962
1971
|
396502: string;
|
|
1963
1972
|
396503: string;
|
|
1964
1973
|
396504: string;
|
|
1965
1974
|
396505: string;
|
|
1966
|
-
|
|
1967
|
-
|
|
1975
|
+
/** 屏幕旋转角度 0 | 90 | 180 | 270 */
|
|
1976
|
+
396506: string; /** 是否播放中 @private */
|
|
1977
|
+
396508: string;
|
|
1968
1978
|
396509: string;
|
|
1969
1979
|
396510: string;
|
|
1970
1980
|
396511: string;
|
|
@@ -1972,9 +1982,6 @@ declare class Theme extends EventEmitter {
|
|
|
1972
1982
|
396513: string;
|
|
1973
1983
|
396514: string;
|
|
1974
1984
|
396515: string;
|
|
1975
|
-
/**
|
|
1976
|
-
* 录像回放的月份列表 @private
|
|
1977
|
-
*/
|
|
1978
1985
|
396516: string;
|
|
1979
1986
|
396517: string;
|
|
1980
1987
|
396518: string;
|
|
@@ -2033,7 +2040,9 @@ declare class Theme extends EventEmitter {
|
|
|
2033
2040
|
STOP_SUCCESS: string;
|
|
2034
2041
|
CHANGE_PLAYURL_SUCCESS: string;
|
|
2035
2042
|
CHANGE_PLAYURL_FAILED: string;
|
|
2036
|
-
GET_OSD_TIME: string;
|
|
2043
|
+
GET_OSD_TIME: string; /**
|
|
2044
|
+
* url 信息 播放地址信息
|
|
2045
|
+
*/
|
|
2037
2046
|
GET_OSD_TIME_FAILED: string;
|
|
2038
2047
|
SET_POSTER: string;
|
|
2039
2048
|
RESIZE: string;
|
|
@@ -2041,12 +2050,6 @@ declare class Theme extends EventEmitter {
|
|
|
2041
2050
|
SPEED_RATE: string;
|
|
2042
2051
|
SPEED_CANCEL: string;
|
|
2043
2052
|
GET_SPEED: string;
|
|
2044
|
-
/**
|
|
2045
|
-
* 当前播放状态
|
|
2046
|
-
* ```ts
|
|
2047
|
-
* theme.playing // boolean
|
|
2048
|
-
* ```
|
|
2049
|
-
*/
|
|
2050
2053
|
MAX_SPEED_LIMIT: string;
|
|
2051
2054
|
MIN_SPEED_LIMIT: string;
|
|
2052
2055
|
SEEK_CANNOT_CROSS_DAYS: string;
|
|
@@ -2076,13 +2079,6 @@ declare class Theme extends EventEmitter {
|
|
|
2076
2079
|
BTN_PAUSE: string;
|
|
2077
2080
|
BTN_VOLUME: string;
|
|
2078
2081
|
BTN_MUTED: string;
|
|
2079
|
-
/**
|
|
2080
|
-
* 加载状态
|
|
2081
|
-
* ```ts
|
|
2082
|
-
* // 事件监听
|
|
2083
|
-
* theme.on(Theme.EVENTS.loading, (loading: boolean) => {})
|
|
2084
|
-
* ```
|
|
2085
|
-
*/
|
|
2086
2082
|
BTN_RECORDVIDEO: string;
|
|
2087
2083
|
BTN_CAPTURE: string;
|
|
2088
2084
|
BTN_TALK: string;
|
|
@@ -2294,10 +2290,12 @@ declare class Theme extends EventEmitter {
|
|
|
2294
2290
|
_onPauseTimingFunc: ((open: boolean) => void) | null;
|
|
2295
2291
|
/** 销毁标识 @readonly */
|
|
2296
2292
|
destroyed: boolean;
|
|
2297
|
-
/** 播放地址信息 */
|
|
2298
|
-
urlInfo: any | null;
|
|
2299
2293
|
scaleMode: ThemeOptions['scaleMode'];
|
|
2300
2294
|
constructor(options: ThemeOptions);
|
|
2295
|
+
/**
|
|
2296
|
+
* url 信息 播放地址信息
|
|
2297
|
+
*/
|
|
2298
|
+
get urlInfo(): Partial<_ezuikit_utils_tools.EzopenURL>;
|
|
2301
2299
|
/**
|
|
2302
2300
|
* 容器的宽(单位 px)
|
|
2303
2301
|
* ```ts
|
|
@@ -2629,7 +2627,7 @@ declare class Theme extends EventEmitter {
|
|
|
2629
2627
|
* @param url 录像 url
|
|
2630
2628
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
2631
2629
|
*/
|
|
2632
|
-
protected _getRecType(url: string): "" | "
|
|
2630
|
+
protected _getRecType(url: string): "" | "cloudRec" | "cloudRecord" | "rec";
|
|
2633
2631
|
private resetControl;
|
|
2634
2632
|
/**
|
|
2635
2633
|
* 窗口全屏后旋转 90度判断, 然后设置控件已经旋转 90度, 为了解决控件交互问题
|
|
@@ -2755,7 +2753,7 @@ interface ThemeOptions {
|
|
|
2755
2753
|
ptzOptions?: OmitControlOptions<PtzOptions> | null;
|
|
2756
2754
|
/** 回放类型控件配置, 设置 null 不渲染控件 @since 0.0.1 */
|
|
2757
2755
|
recOptions?: OmitControlOptions<RecOptions> | null;
|
|
2758
|
-
/** 录像列表控件配置, 设置 null 不渲染控件 @since
|
|
2756
|
+
/** 录像列表控件配置, 设置 null 不渲染控件 @since 3.1.1 */
|
|
2759
2757
|
recListOptions?: OmitControlOptions<RecListOptions> | null;
|
|
2760
2758
|
/** 录制控件配置 ,设置 null 不渲染控件 @since 0.0.1 */
|
|
2761
2759
|
recordOptions?: OmitControlOptions<RecordOptions> | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezuikit/player-theme",
|
|
3
|
-
"version": "3.1.1",
|
|
3
|
+
"version": "3.1.2-beta.1",
|
|
4
4
|
"description": "player theme",
|
|
5
5
|
"title": "theme",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"theme",
|
|
28
28
|
"ezuikit",
|
|
29
29
|
"ezviz",
|
|
30
|
+
"ezopen",
|
|
30
31
|
"ui"
|
|
31
32
|
],
|
|
32
33
|
"author": "Ezviz-OpenBiz",
|