@ezuikit/player-theme 3.1.1 → 3.1.2-beta.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/constant.js +4 -3
- package/dist/index.cjs +160 -42
- package/dist/index.esm.js +161 -43
- package/dist/index.umd.js +160 -42
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +325 -56
- package/package.json +4 -2
package/dist/constant.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.2
|
|
3
|
+
* Copyright (c) 2026-08-12 04:37:54 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.
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.2
|
|
3
|
+
* Copyright (c) 2026-08-12 04:37:54 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 = {
|
|
@@ -7086,6 +7140,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7086
7140
|
_inherits$f(AIChat, Control);
|
|
7087
7141
|
function AIChat(options) {
|
|
7088
7142
|
var _this;
|
|
7143
|
+
var _options_urlInfo_searchParams, _options_urlInfo, _options_urlInfo1;
|
|
7089
7144
|
_this = Control.call(this, _extends$e({}, options, {
|
|
7090
7145
|
tagName: 'span',
|
|
7091
7146
|
controlType: 'button',
|
|
@@ -7099,7 +7154,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7099
7154
|
_this._render();
|
|
7100
7155
|
}
|
|
7101
7156
|
});
|
|
7102
|
-
if (options.urlInfo.searchParams.busType !== '7' && options.urlInfo.recType === 'cloud' && options.sdkType === 'base') {
|
|
7157
|
+
if (((_options_urlInfo = options.urlInfo) == null ? void 0 : (_options_urlInfo_searchParams = _options_urlInfo.searchParams) == null ? void 0 : _options_urlInfo_searchParams.busType) !== '7' && ((_options_urlInfo1 = options.urlInfo) == null ? void 0 : _options_urlInfo1.recType) === 'cloud' && options.sdkType === 'base') {
|
|
7103
7158
|
_this.$container.style.removeProperty('display');
|
|
7104
7159
|
} else {
|
|
7105
7160
|
_this.$container.style.display = 'none';
|
|
@@ -8204,7 +8259,7 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8204
8259
|
_assert_this_initialized(_this).emit(EVENTS.control.speedPanelOpenChange, open, value, item);
|
|
8205
8260
|
}
|
|
8206
8261
|
})) || this;
|
|
8207
|
-
_this._filterSpeedList(options.list, options.props.recType);
|
|
8262
|
+
_this._filterSpeedList(options.list, options.props.recType, options.props.url);
|
|
8208
8263
|
_this.on(EVENTS.speedChange, function(speed) {
|
|
8209
8264
|
if (_this.value !== speed + '') _this.value = speed + '';
|
|
8210
8265
|
});
|
|
@@ -8218,18 +8273,24 @@ var SPEED_DEFAULT_OPTIONS = {
|
|
|
8218
8273
|
* 滤掉本地回放不支持的倍速
|
|
8219
8274
|
* @param optionsList 初始化配置倍速列表
|
|
8220
8275
|
* @param type 回放类型
|
|
8221
|
-
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type) {
|
|
8276
|
+
*/ _proto._filterSpeedList = function _filterSpeedList(optionsList, type, url) {
|
|
8222
8277
|
if (!optionsList) {
|
|
8223
|
-
// 非用户自定义
|
|
8224
|
-
if (type === 'rec') {
|
|
8225
|
-
// 本地回放 不支持 8 16 32 倍速
|
|
8278
|
+
// 非用户自定义 /openpb/ 是标准流回放路径
|
|
8279
|
+
if (type === 'rec' || (url == null ? void 0 : url.includes('/openpb/'))) {
|
|
8280
|
+
// ezopen本地回放 或 hls 回放 不支持 8 16 32 倍速
|
|
8226
8281
|
var list = this.list.filter(function(item) {
|
|
8227
8282
|
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8228
8283
|
});
|
|
8229
8284
|
this.updateOptions(list);
|
|
8230
|
-
} else {
|
|
8285
|
+
} else if (type === 'cloudRec' || type === 'cloudRecord') {
|
|
8231
8286
|
// 云端回放 支持 8 16 32 倍速
|
|
8232
8287
|
this.updateOptions(SPEED_DEFAULT_OPTIONS.list);
|
|
8288
|
+
} else {
|
|
8289
|
+
// 三方默认回放倍速设置
|
|
8290
|
+
var list1 = this.list.filter(function(item) {
|
|
8291
|
+
return (item == null ? void 0 : item.value) && +item.value < 8;
|
|
8292
|
+
});
|
|
8293
|
+
this.updateOptions(list1);
|
|
8233
8294
|
}
|
|
8234
8295
|
}
|
|
8235
8296
|
};
|
|
@@ -9390,7 +9451,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9390
9451
|
if (theme.options.deviceOptions !== null) {
|
|
9391
9452
|
var _theme_controls;
|
|
9392
9453
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
|
|
9393
|
-
var _theme_options;
|
|
9454
|
+
var _theme_urlInfo, _theme_urlInfo1, _theme_options;
|
|
9394
9455
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
9395
9456
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
9396
9457
|
rootContainer: theme.$container,
|
|
@@ -9401,8 +9462,8 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9401
9462
|
language: theme.options.language,
|
|
9402
9463
|
locales: theme.i18n.translations,
|
|
9403
9464
|
type: theme.options.type,
|
|
9404
|
-
deviceSerial: theme.urlInfo.deviceSerial,
|
|
9405
|
-
channelNo: theme.urlInfo.channelNo
|
|
9465
|
+
deviceSerial: (_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.deviceSerial,
|
|
9466
|
+
channelNo: (_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.channelNo
|
|
9406
9467
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
|
|
9407
9468
|
props: props
|
|
9408
9469
|
}));
|
|
@@ -9413,7 +9474,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9413
9474
|
// footer
|
|
9414
9475
|
if (Controls[item.iconId]) {
|
|
9415
9476
|
if (theme.options["" + item.iconId + "Options"] !== null) {
|
|
9416
|
-
var _theme_options1;
|
|
9477
|
+
var _theme_urlInfo2, _theme_urlInfo3, _theme_options1;
|
|
9417
9478
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9418
9479
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
9419
9480
|
rootContainer: theme.$container,
|
|
@@ -9426,8 +9487,8 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9426
9487
|
env: theme.options.env,
|
|
9427
9488
|
accessToken: theme.options.accessToken,
|
|
9428
9489
|
token: theme.options.token,
|
|
9429
|
-
deviceSerial: theme.urlInfo.deviceSerial,
|
|
9430
|
-
channelNo: theme.urlInfo.channelNo,
|
|
9490
|
+
deviceSerial: (_theme_urlInfo2 = theme.urlInfo) == null ? void 0 : _theme_urlInfo2.deviceSerial,
|
|
9491
|
+
channelNo: (_theme_urlInfo3 = theme.urlInfo) == null ? void 0 : _theme_urlInfo3.channelNo,
|
|
9431
9492
|
urlInfo: theme.urlInfo
|
|
9432
9493
|
} : {}, {
|
|
9433
9494
|
PLAY_TYPE: theme.options.type,
|
|
@@ -9509,7 +9570,11 @@ function _renderTheme(theme, data) {
|
|
|
9509
9570
|
}
|
|
9510
9571
|
if (!theme._playing) (_theme_posterControl = theme.posterControl) == null ? void 0 : _theme_posterControl.show();
|
|
9511
9572
|
props = THEME_PROPS.reduce(function(acc, cur) {
|
|
9512
|
-
|
|
9573
|
+
if (cur === 'url') {
|
|
9574
|
+
acc[cur] = theme.options.url;
|
|
9575
|
+
} else {
|
|
9576
|
+
acc[cur] = theme[cur];
|
|
9577
|
+
}
|
|
9513
9578
|
return acc;
|
|
9514
9579
|
}, {});
|
|
9515
9580
|
// 由于 resize 改变有延时(节流), 第一次渲染时, 宽度高度可能为 0, 需要手动设置一下
|
|
@@ -9669,7 +9734,7 @@ function _renderTheme(theme, data) {
|
|
|
9669
9734
|
var _renderTimeLine = function(theme, container, props) {
|
|
9670
9735
|
if (props === void 0) props = {};
|
|
9671
9736
|
if (!theme.controls.timeLineControl && theme.options.timeLineOptions !== null) {
|
|
9672
|
-
var _theme_urlInfo, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9737
|
+
var _theme_urlInfo, _theme_urlInfo1, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9673
9738
|
var _showSectionIcon;
|
|
9674
9739
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9675
9740
|
theme.controls.timeLineControl = new Controls['timeLine'](_extends$1({
|
|
@@ -9678,7 +9743,7 @@ var _renderTimeLine = function(theme, container, props) {
|
|
|
9678
9743
|
},
|
|
9679
9744
|
language: theme.options.language,
|
|
9680
9745
|
locales: theme.i18n.translations,
|
|
9681
|
-
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + theme.urlInfo.validateCode : ''
|
|
9746
|
+
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + ((_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.validateCode) : ''
|
|
9682
9747
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["timeLineOptions"]) || {}, {
|
|
9683
9748
|
showSectionIcon: ((_theme_options1 = theme.options) == null ? void 0 : _theme_options1["recListOptions"]) !== null ? (_showSectionIcon = (_this = ((_theme_options2 = theme.options) == null ? void 0 : _theme_options2["timeLineOptions"]) || {}) == null ? void 0 : _this.showSectionIcon) != null ? _showSectionIcon : true : true,
|
|
9684
9749
|
props: props
|
|
@@ -10081,7 +10146,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10081
10146
|
_inherits(Theme, EventEmitter);
|
|
10082
10147
|
function Theme(options) {
|
|
10083
10148
|
var _this;
|
|
10084
|
-
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
|
|
10149
|
+
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_urlInfo_searchParams, _this_urlInfo, _this_options, _this_options1;
|
|
10085
10150
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
10086
10151
|
* @since 0.0.1
|
|
10087
10152
|
* @private
|
|
@@ -10101,7 +10166,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10101
10166
|
*/ _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, /**
|
|
10102
10167
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
10103
10168
|
* @private
|
|
10104
|
-
*/ _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, /** @private 加载中 */ _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, // /**
|
|
10169
|
+
*/ _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, _this._url = '', /** 是否播放中 @private */ _this._playing = false, /** @private 加载中 */ _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, // /**
|
|
10105
10170
|
// * 记录回放的月份
|
|
10106
10171
|
// *
|
|
10107
10172
|
// * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
|
|
@@ -10112,17 +10177,17 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10112
10177
|
// _recMonthObj: Record<string, string[]> = {};
|
|
10113
10178
|
/**
|
|
10114
10179
|
* 录像回放的月份列表 @private
|
|
10115
|
-
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false,
|
|
10180
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0;
|
|
10116
10181
|
_this._initOptions(options);
|
|
10117
10182
|
if (_this.options.type === 'ezopen') {
|
|
10118
|
-
var
|
|
10119
|
-
_this.urlInfo =
|
|
10120
|
-
|
|
10121
|
-
_this.options.spaceId = _this.urlInfo.searchParams.spaceId;
|
|
10183
|
+
var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo2;
|
|
10184
|
+
if ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.spaceId) {
|
|
10185
|
+
var _this_urlInfo_searchParams2, _this_urlInfo3;
|
|
10186
|
+
_this.options.spaceId = (_this_urlInfo3 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo3.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.spaceId;
|
|
10122
10187
|
}
|
|
10123
|
-
if (_this.urlInfo.type === 'rec') {
|
|
10124
|
-
var
|
|
10125
|
-
_this._seekDate = ((
|
|
10188
|
+
if (((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : _this_urlInfo2.type) === 'rec') {
|
|
10189
|
+
var _this_urlInfo_searchParams3, _this_urlInfo4, _this_urlInfo_searchParams4, _this_urlInfo5;
|
|
10190
|
+
_this._seekDate = ((_this_urlInfo4 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams3 = _this_urlInfo4.searchParams) == null ? void 0 : _this_urlInfo_searchParams3.begin) ? utilsTools.DateTime.toDate((_this_urlInfo5 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams4 = _this_urlInfo5.searchParams) == null ? void 0 : _this_urlInfo_searchParams4.begin) : utilsTools.DateTime.toDate(utilsTools.DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
|
|
10126
10191
|
}
|
|
10127
10192
|
}
|
|
10128
10193
|
_this._getRecType(_this.options.url);
|
|
@@ -10154,7 +10219,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10154
10219
|
var _this_options_volumeOptions_muted, _ref1;
|
|
10155
10220
|
_this._muted = (_ref1 = (_this_options_volumeOptions_muted = (_this_options_volumeOptions1 = _this.options.volumeOptions) == null ? void 0 : _this_options_volumeOptions1.muted) != null ? _this_options_volumeOptions_muted : _this.options.muted) != null ? _ref1 : false;
|
|
10156
10221
|
var _this_options_speedOptions_value, _ref2;
|
|
10157
|
-
|
|
10222
|
+
// playbackSpeed 是 萤石标准流倍速字段
|
|
10223
|
+
_this._speed = (_ref2 = (_this_options_speedOptions_value = (_this_options_speedOptions = _this.options.speedOptions) == null ? void 0 : _this_options_speedOptions.value) != null ? _this_options_speedOptions_value : (_this_urlInfo = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo.searchParams) == null ? void 0 : _this_urlInfo_searchParams.playbackSpeed) != null ? _ref2 : 1;
|
|
10158
10224
|
_this._mobileInnerWidthHeight = _this._mobileInnerWidthHeight.bind(_this);
|
|
10159
10225
|
_this._throttleMobileInnerWidthHeight = throttle(_this._mobileInnerWidthHeight, 20).bind(_this);
|
|
10160
10226
|
_this._onDblClickFullscreen = debounce(_this._onDblClickFullscreen, 20).bind(_this);
|
|
@@ -10171,9 +10237,10 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10171
10237
|
var template = (_this_options1 = _this.options) == null ? void 0 : _this_options1.template; // ThemeTemplateType | string | undefined
|
|
10172
10238
|
var initialThemeData;
|
|
10173
10239
|
if (options.type === 'hls' || options.type === 'ezhls') {
|
|
10240
|
+
var _options_url;
|
|
10174
10241
|
// hls / ezhls:@3.1.1 起支持自定义 themeData,但不支持标准提供的模板;未传时回退 hlsLiveTemplate
|
|
10175
|
-
// FIXME: 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
10176
|
-
initialThemeData = themeData !== undefined ? themeData : hlsLiveTemplate;
|
|
10242
|
+
// FIXME: themeData 部分控件在 hls 下不生效,开发者需自行斟酌
|
|
10243
|
+
initialThemeData = themeData !== undefined ? themeData : ((_options_url = options.url) == null ? void 0 : _options_url.includes('/openpb/')) ? hlsRecTemplate : hlsLiveTemplate;
|
|
10177
10244
|
} else if ([
|
|
10178
10245
|
'flv',
|
|
10179
10246
|
'mp4'
|
|
@@ -10406,6 +10473,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10406
10473
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
10407
10474
|
clone: false
|
|
10408
10475
|
});
|
|
10476
|
+
this._url = this.options.url;
|
|
10409
10477
|
// ⚠警告 (./utils/interactiveHF.ts)
|
|
10410
10478
|
// PC 中窗口鼠标在header footer 移动(mousemove), 不允许消失及不要冒泡
|
|
10411
10479
|
// Mobile 中窗口点击在header footer 上(pointerdown/touchstart), 不允许消失及不要冒泡
|
|
@@ -10896,13 +10964,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10896
10964
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
10897
10965
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
10898
10966
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
10899
|
-
var
|
|
10900
|
-
if (urlInfo.type === 'rec') {
|
|
10901
|
-
var
|
|
10902
|
-
if (urlInfo.recType === 'cloud' && (urlInfo == null ? void 0 : (
|
|
10967
|
+
var _this_urlInfo;
|
|
10968
|
+
if (((_this_urlInfo = this.urlInfo) == null ? void 0 : _this_urlInfo.type) === 'rec') {
|
|
10969
|
+
var _this_urlInfo1, _this_urlInfo_searchParams, _this_urlInfo2, _this_urlInfo3;
|
|
10970
|
+
if (((_this_urlInfo1 = this.urlInfo) == null ? void 0 : _this_urlInfo1.recType) === 'cloud' && ((_this_urlInfo2 = this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams = _this_urlInfo2.searchParams) == null ? void 0 : _this_urlInfo_searchParams.busType) === '7') {
|
|
10903
10971
|
this.recType = 'cloudRecord';
|
|
10904
10972
|
return 'cloudRecord';
|
|
10905
|
-
} else if (urlInfo.recType === 'cloud') {
|
|
10973
|
+
} else if (((_this_urlInfo3 = this.urlInfo) == null ? void 0 : _this_urlInfo3.recType) === 'cloud') {
|
|
10906
10974
|
this.recType = 'cloudRec';
|
|
10907
10975
|
return 'cloudRec';
|
|
10908
10976
|
} else {
|
|
@@ -10910,13 +10978,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10910
10978
|
return 'rec';
|
|
10911
10979
|
}
|
|
10912
10980
|
}
|
|
10913
|
-
} else if (utilsTools.isHttp(url) && url.includes(
|
|
10914
|
-
// 萤石 ll-hls 回放
|
|
10915
|
-
if (url.includes(
|
|
10981
|
+
} else if (utilsTools.isHttp(url) && url.includes('/openpb/')) {
|
|
10982
|
+
// 萤石 ll-hls/flv 回放
|
|
10983
|
+
if (url.includes('rec=cloud')) {
|
|
10916
10984
|
// 云存储
|
|
10917
10985
|
this.recType = 'cloudRec';
|
|
10918
10986
|
return 'cloudRec';
|
|
10919
|
-
} else if (url.includes(
|
|
10987
|
+
} else if (url.includes('rec=local')) {
|
|
10920
10988
|
// 本地存储
|
|
10921
10989
|
this.recType = 'rec';
|
|
10922
10990
|
return 'rec';
|
|
@@ -10964,6 +11032,26 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10964
11032
|
}
|
|
10965
11033
|
};
|
|
10966
11034
|
_create_class(Theme, [
|
|
11035
|
+
{
|
|
11036
|
+
key: "url",
|
|
11037
|
+
get: function get() {
|
|
11038
|
+
return this._url;
|
|
11039
|
+
},
|
|
11040
|
+
set: function set(url) {
|
|
11041
|
+
this._url = url;
|
|
11042
|
+
}
|
|
11043
|
+
},
|
|
11044
|
+
{
|
|
11045
|
+
key: "urlInfo",
|
|
11046
|
+
get: /**
|
|
11047
|
+
* url 信息 播放地址信息
|
|
11048
|
+
*/ function get() {
|
|
11049
|
+
if (this._url) {
|
|
11050
|
+
return utilsTools.parseEzopenUrl(this._url);
|
|
11051
|
+
}
|
|
11052
|
+
return {};
|
|
11053
|
+
}
|
|
11054
|
+
},
|
|
10967
11055
|
{
|
|
10968
11056
|
key: "width",
|
|
10969
11057
|
get: /**
|
|
@@ -11363,6 +11451,36 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11363
11451
|
*/ function get() {
|
|
11364
11452
|
return !!this._footerMoreControl;
|
|
11365
11453
|
}
|
|
11454
|
+
},
|
|
11455
|
+
{
|
|
11456
|
+
key: "isEzopen",
|
|
11457
|
+
get: function get() {
|
|
11458
|
+
// 私有流地址
|
|
11459
|
+
return /^ezopen:\/\//.test(this._url);
|
|
11460
|
+
}
|
|
11461
|
+
},
|
|
11462
|
+
{
|
|
11463
|
+
key: "isEzviz",
|
|
11464
|
+
get: /**
|
|
11465
|
+
* 判断播放地址是萤石的播放地址
|
|
11466
|
+
* @since 3.1.2
|
|
11467
|
+
*/ function get() {
|
|
11468
|
+
var path = this._url.split('?')[0];
|
|
11469
|
+
var queryStr = this._url.split('?')[1];
|
|
11470
|
+
var lastPath = path.split('/')[path.split('/').length - 1];
|
|
11471
|
+
// ezopen://open.ys7.com/BC7799091/1.rec
|
|
11472
|
+
// rtmp://rtmp05open.ys7.com:1935/v3/openpb/BC7799091_1_1
|
|
11473
|
+
// https://open.ys7.com/v3/openpb/llhls/BC7799091_1_1.m3u8
|
|
11474
|
+
// https://rtmp05open.ys7.com:9188/v3/openpb/BC7799091_1_1.flv
|
|
11475
|
+
// https://host:2001/live?dev=D08197169&chn=1&ss=token&stream=1
|
|
11476
|
+
if (// 私有流地址
|
|
11477
|
+
/^ezopen:\/\//.test(path) || // 标准流地址
|
|
11478
|
+
path.includes('/openlive/') || path.includes('/openpb/') && /[a-zA-Z0-9:]+_\d+_\d+/.test(lastPath) || // webtransport 取流
|
|
11479
|
+
utilsTools.isHttp(this._url) && queryStr && /dev=[a-zA-Z0-9:]+/.test(queryStr) && /chn=\d+/.test(queryStr) && /stream=\d+/.test(queryStr) && queryStr.includes('ssn=')) {
|
|
11480
|
+
return true;
|
|
11481
|
+
}
|
|
11482
|
+
return false;
|
|
11483
|
+
}
|
|
11366
11484
|
}
|
|
11367
11485
|
]);
|
|
11368
11486
|
return Theme;
|
|
@@ -11373,7 +11491,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11373
11491
|
zh: zh,
|
|
11374
11492
|
en: en
|
|
11375
11493
|
};
|
|
11376
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.
|
|
11494
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.2';
|
|
11377
11495
|
|
|
11378
11496
|
exports.Control = Control;
|
|
11379
11497
|
exports.EVENTS = EVENTS;
|