@ezuikit/player-theme 3.1.2-beta.1 → 3.1.2-beta.3
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 +2 -2
- package/dist/index.cjs +112 -30
- package/dist/index.esm.js +112 -30
- package/dist/index.umd.js +112 -30
- package/dist/style.css +1 -1
- package/dist/style.js +2 -2
- package/dist/types/index.d.ts +339 -46
- package/package.json +3 -2
package/dist/constant.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.2-beta.
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.3
|
|
3
|
+
* Copyright (c) 2026-08-14 08:18:55 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
'use strict';
|
|
@@ -4277,6 +4277,7 @@ function debounce(func, wait) {
|
|
|
4277
4277
|
var // rerender 画面
|
|
4278
4278
|
_theme_contentControl_emit, _theme_contentControl;
|
|
4279
4279
|
(_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);
|
|
4280
|
+
theme._videoInfo = info;
|
|
4280
4281
|
}
|
|
4281
4282
|
});
|
|
4282
4283
|
theme == null ? void 0 : theme.on(EVENTS.resize, function() {
|
|
@@ -7140,6 +7141,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7140
7141
|
_inherits$f(AIChat, Control);
|
|
7141
7142
|
function AIChat(options) {
|
|
7142
7143
|
var _this;
|
|
7144
|
+
var _options_urlInfo_searchParams, _options_urlInfo, _options_urlInfo1;
|
|
7143
7145
|
_this = Control.call(this, _extends$e({}, options, {
|
|
7144
7146
|
tagName: 'span',
|
|
7145
7147
|
controlType: 'button',
|
|
@@ -7153,7 +7155,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7153
7155
|
_this._render();
|
|
7154
7156
|
}
|
|
7155
7157
|
});
|
|
7156
|
-
if (options.urlInfo.searchParams.busType !== '7' && options.urlInfo.recType === 'cloud' && options.sdkType === 'base') {
|
|
7158
|
+
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') {
|
|
7157
7159
|
_this.$container.style.removeProperty('display');
|
|
7158
7160
|
} else {
|
|
7159
7161
|
_this.$container.style.display = 'none';
|
|
@@ -9450,7 +9452,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9450
9452
|
if (theme.options.deviceOptions !== null) {
|
|
9451
9453
|
var _theme_controls;
|
|
9452
9454
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
|
|
9453
|
-
var _theme_options;
|
|
9455
|
+
var _theme_urlInfo, _theme_urlInfo1, _theme_options;
|
|
9454
9456
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
9455
9457
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
9456
9458
|
rootContainer: theme.$container,
|
|
@@ -9461,8 +9463,8 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9461
9463
|
language: theme.options.language,
|
|
9462
9464
|
locales: theme.i18n.translations,
|
|
9463
9465
|
type: theme.options.type,
|
|
9464
|
-
deviceSerial: theme.urlInfo.deviceSerial,
|
|
9465
|
-
channelNo: theme.urlInfo.channelNo
|
|
9466
|
+
deviceSerial: (_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.deviceSerial,
|
|
9467
|
+
channelNo: (_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.channelNo
|
|
9466
9468
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
|
|
9467
9469
|
props: props
|
|
9468
9470
|
}));
|
|
@@ -9473,7 +9475,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9473
9475
|
// footer
|
|
9474
9476
|
if (Controls[item.iconId]) {
|
|
9475
9477
|
if (theme.options["" + item.iconId + "Options"] !== null) {
|
|
9476
|
-
var _theme_options1;
|
|
9478
|
+
var _theme_urlInfo2, _theme_urlInfo3, _theme_options1;
|
|
9477
9479
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9478
9480
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
9479
9481
|
rootContainer: theme.$container,
|
|
@@ -9486,8 +9488,8 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9486
9488
|
env: theme.options.env,
|
|
9487
9489
|
accessToken: theme.options.accessToken,
|
|
9488
9490
|
token: theme.options.token,
|
|
9489
|
-
deviceSerial: theme.urlInfo.deviceSerial,
|
|
9490
|
-
channelNo: theme.urlInfo.channelNo,
|
|
9491
|
+
deviceSerial: (_theme_urlInfo2 = theme.urlInfo) == null ? void 0 : _theme_urlInfo2.deviceSerial,
|
|
9492
|
+
channelNo: (_theme_urlInfo3 = theme.urlInfo) == null ? void 0 : _theme_urlInfo3.channelNo,
|
|
9491
9493
|
urlInfo: theme.urlInfo
|
|
9492
9494
|
} : {}, {
|
|
9493
9495
|
PLAY_TYPE: theme.options.type,
|
|
@@ -9733,7 +9735,7 @@ function _renderTheme(theme, data) {
|
|
|
9733
9735
|
var _renderTimeLine = function(theme, container, props) {
|
|
9734
9736
|
if (props === void 0) props = {};
|
|
9735
9737
|
if (!theme.controls.timeLineControl && theme.options.timeLineOptions !== null) {
|
|
9736
|
-
var _theme_urlInfo, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9738
|
+
var _theme_urlInfo, _theme_urlInfo1, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9737
9739
|
var _showSectionIcon;
|
|
9738
9740
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9739
9741
|
theme.controls.timeLineControl = new Controls['timeLine'](_extends$1({
|
|
@@ -9742,7 +9744,7 @@ var _renderTimeLine = function(theme, container, props) {
|
|
|
9742
9744
|
},
|
|
9743
9745
|
language: theme.options.language,
|
|
9744
9746
|
locales: theme.i18n.translations,
|
|
9745
|
-
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + theme.urlInfo.validateCode : ''
|
|
9747
|
+
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + ((_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.validateCode) : ''
|
|
9746
9748
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["timeLineOptions"]) || {}, {
|
|
9747
9749
|
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,
|
|
9748
9750
|
props: props
|
|
@@ -10145,7 +10147,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10145
10147
|
_inherits(Theme, EventEmitter);
|
|
10146
10148
|
function Theme(options) {
|
|
10147
10149
|
var _this;
|
|
10148
|
-
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
|
|
10150
|
+
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_urlInfo_searchParams, _this_urlInfo, _this_options, _this_options1;
|
|
10149
10151
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
10150
10152
|
* @since 0.0.1
|
|
10151
10153
|
* @private
|
|
@@ -10165,7 +10167,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10165
10167
|
*/ _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, /**
|
|
10166
10168
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
10167
10169
|
* @private
|
|
10168
|
-
*/ _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, // /**
|
|
10170
|
+
*/ _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, // /**
|
|
10169
10171
|
// * 记录回放的月份
|
|
10170
10172
|
// *
|
|
10171
10173
|
// * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
|
|
@@ -10176,16 +10178,17 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10176
10178
|
// _recMonthObj: Record<string, string[]> = {};
|
|
10177
10179
|
/**
|
|
10178
10180
|
* 录像回放的月份列表 @private
|
|
10179
|
-
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0;
|
|
10181
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0, _this._videoInfo = {};
|
|
10180
10182
|
_this._initOptions(options);
|
|
10181
10183
|
if (_this.options.type === 'ezopen') {
|
|
10182
|
-
var
|
|
10183
|
-
if ((
|
|
10184
|
-
|
|
10184
|
+
var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo2;
|
|
10185
|
+
if ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.spaceId) {
|
|
10186
|
+
var _this_urlInfo_searchParams2, _this_urlInfo3;
|
|
10187
|
+
_this.options.spaceId = (_this_urlInfo3 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo3.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.spaceId;
|
|
10185
10188
|
}
|
|
10186
|
-
if (_this.urlInfo.type === 'rec') {
|
|
10187
|
-
var
|
|
10188
|
-
_this._seekDate = ((
|
|
10189
|
+
if (((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : _this_urlInfo2.type) === 'rec') {
|
|
10190
|
+
var _this_urlInfo_searchParams3, _this_urlInfo4, _this_urlInfo_searchParams4, _this_urlInfo5;
|
|
10191
|
+
_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');
|
|
10189
10192
|
}
|
|
10190
10193
|
}
|
|
10191
10194
|
_this._getRecType(_this.options.url);
|
|
@@ -10217,7 +10220,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10217
10220
|
var _this_options_volumeOptions_muted, _ref1;
|
|
10218
10221
|
_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;
|
|
10219
10222
|
var _this_options_speedOptions_value, _ref2;
|
|
10220
|
-
|
|
10223
|
+
// playbackSpeed 是 萤石标准流倍速字段
|
|
10224
|
+
_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);
|
|
10221
10225
|
_this._mobileInnerWidthHeight = _this._mobileInnerWidthHeight.bind(_this);
|
|
10222
10226
|
_this._throttleMobileInnerWidthHeight = throttle(_this._mobileInnerWidthHeight, 20).bind(_this);
|
|
10223
10227
|
_this._onDblClickFullscreen = debounce(_this._onDblClickFullscreen, 20).bind(_this);
|
|
@@ -10455,6 +10459,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10455
10459
|
if (this.i18n) this.i18n = null;
|
|
10456
10460
|
this.recType = '';
|
|
10457
10461
|
this.recMonth = []; // 清空数据
|
|
10462
|
+
// 重置
|
|
10463
|
+
this._videoInfo = {};
|
|
10458
10464
|
this.emit(EVENTS.theme.destroyed);
|
|
10459
10465
|
this.removeAllListeners();
|
|
10460
10466
|
if (this.logger) this.logger = null;
|
|
@@ -10470,6 +10476,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10470
10476
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
10471
10477
|
clone: false
|
|
10472
10478
|
});
|
|
10479
|
+
this._url = this.options.url;
|
|
10473
10480
|
// ⚠警告 (./utils/interactiveHF.ts)
|
|
10474
10481
|
// PC 中窗口鼠标在header footer 移动(mousemove), 不允许消失及不要冒泡
|
|
10475
10482
|
// Mobile 中窗口点击在header footer 上(pointerdown/touchstart), 不允许消失及不要冒泡
|
|
@@ -10960,12 +10967,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10960
10967
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
10961
10968
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
10962
10969
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10970
|
+
var _this_urlInfo;
|
|
10971
|
+
if (((_this_urlInfo = this.urlInfo) == null ? void 0 : _this_urlInfo.type) === 'rec') {
|
|
10972
|
+
var _this_urlInfo1, _this_urlInfo_searchParams, _this_urlInfo2, _this_urlInfo3;
|
|
10973
|
+
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') {
|
|
10966
10974
|
this.recType = 'cloudRecord';
|
|
10967
10975
|
return 'cloudRecord';
|
|
10968
|
-
} else if (this.urlInfo.recType === 'cloud') {
|
|
10976
|
+
} else if (((_this_urlInfo3 = this.urlInfo) == null ? void 0 : _this_urlInfo3.recType) === 'cloud') {
|
|
10969
10977
|
this.recType = 'cloudRec';
|
|
10970
10978
|
return 'cloudRec';
|
|
10971
10979
|
} else {
|
|
@@ -11027,13 +11035,22 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11027
11035
|
}
|
|
11028
11036
|
};
|
|
11029
11037
|
_create_class(Theme, [
|
|
11038
|
+
{
|
|
11039
|
+
key: "url",
|
|
11040
|
+
get: function get() {
|
|
11041
|
+
return this._url;
|
|
11042
|
+
},
|
|
11043
|
+
set: function set(url) {
|
|
11044
|
+
this._url = url;
|
|
11045
|
+
}
|
|
11046
|
+
},
|
|
11030
11047
|
{
|
|
11031
11048
|
key: "urlInfo",
|
|
11032
11049
|
get: /**
|
|
11033
11050
|
* url 信息 播放地址信息
|
|
11034
11051
|
*/ function get() {
|
|
11035
|
-
if (this.
|
|
11036
|
-
return utilsTools.parseEzopenUrl(this.
|
|
11052
|
+
if (this._url) {
|
|
11053
|
+
return utilsTools.parseEzopenUrl(this._url);
|
|
11037
11054
|
}
|
|
11038
11055
|
return {};
|
|
11039
11056
|
}
|
|
@@ -11060,6 +11077,41 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11060
11077
|
return this._height;
|
|
11061
11078
|
}
|
|
11062
11079
|
},
|
|
11080
|
+
{
|
|
11081
|
+
key: "videoInfo",
|
|
11082
|
+
get: /**
|
|
11083
|
+
* 视频信息
|
|
11084
|
+
* @version 3.1.2
|
|
11085
|
+
* ```ts
|
|
11086
|
+
* theme.videoInfo // ThemeVideoInfo
|
|
11087
|
+
* ```
|
|
11088
|
+
*/ function get() {
|
|
11089
|
+
return this._videoInfo || {};
|
|
11090
|
+
}
|
|
11091
|
+
},
|
|
11092
|
+
{
|
|
11093
|
+
key: "videoWidth",
|
|
11094
|
+
get: /**
|
|
11095
|
+
* 视频分辨率 宽
|
|
11096
|
+
*
|
|
11097
|
+
* @version 3.1.2
|
|
11098
|
+
*
|
|
11099
|
+
* ```ts
|
|
11100
|
+
* theme.videoWidth // number
|
|
11101
|
+
* ```
|
|
11102
|
+
*/ function get() {
|
|
11103
|
+
return this._videoInfo.width || 0;
|
|
11104
|
+
}
|
|
11105
|
+
},
|
|
11106
|
+
{
|
|
11107
|
+
key: "videoHeight",
|
|
11108
|
+
get: /**
|
|
11109
|
+
* 视频分辨率 高
|
|
11110
|
+
* @version 3.1.2
|
|
11111
|
+
*/ function get() {
|
|
11112
|
+
return this._videoInfo.height || 0;
|
|
11113
|
+
}
|
|
11114
|
+
},
|
|
11063
11115
|
{
|
|
11064
11116
|
key: "playing",
|
|
11065
11117
|
get: /**
|
|
@@ -11324,13 +11376,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11324
11376
|
{
|
|
11325
11377
|
key: "speed",
|
|
11326
11378
|
get: function get() {
|
|
11327
|
-
return this._speed;
|
|
11379
|
+
return +this._speed;
|
|
11328
11380
|
},
|
|
11329
11381
|
set: /**
|
|
11330
11382
|
* 倍速
|
|
11331
11383
|
*/ function set(speed) {
|
|
11332
11384
|
speed = +speed;
|
|
11333
|
-
if (speed !== this._speed) {
|
|
11385
|
+
if (speed !== +this._speed) {
|
|
11334
11386
|
this._speed = speed;
|
|
11335
11387
|
this.emit(EVENTS.speedChange, speed);
|
|
11336
11388
|
}
|
|
@@ -11437,6 +11489,36 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11437
11489
|
*/ function get() {
|
|
11438
11490
|
return !!this._footerMoreControl;
|
|
11439
11491
|
}
|
|
11492
|
+
},
|
|
11493
|
+
{
|
|
11494
|
+
key: "isEzopen",
|
|
11495
|
+
get: function get() {
|
|
11496
|
+
// 私有流地址
|
|
11497
|
+
return /^ezopen:\/\//.test(this._url);
|
|
11498
|
+
}
|
|
11499
|
+
},
|
|
11500
|
+
{
|
|
11501
|
+
key: "isEzviz",
|
|
11502
|
+
get: /**
|
|
11503
|
+
* 判断播放地址是萤石的播放地址
|
|
11504
|
+
* @since 3.1.2
|
|
11505
|
+
*/ function get() {
|
|
11506
|
+
var path = this._url.split('?')[0];
|
|
11507
|
+
var queryStr = this._url.split('?')[1];
|
|
11508
|
+
var lastPath = path.split('/')[path.split('/').length - 1];
|
|
11509
|
+
// ezopen://open.ys7.com/BC7799091/1.rec
|
|
11510
|
+
// rtmp://rtmp05open.ys7.com:1935/v3/openpb/BC7799091_1_1
|
|
11511
|
+
// https://open.ys7.com/v3/openpb/llhls/BC7799091_1_1.m3u8
|
|
11512
|
+
// https://rtmp05open.ys7.com:9188/v3/openpb/BC7799091_1_1.flv
|
|
11513
|
+
// https://host:2001/live?dev=D08197169&chn=1&ss=token&stream=1
|
|
11514
|
+
if (// 私有流地址
|
|
11515
|
+
/^ezopen:\/\//.test(path) || // 标准流地址
|
|
11516
|
+
path.includes('/openlive/') || path.includes('/openpb/') && /[a-zA-Z0-9:]+_\d+_\d+/.test(lastPath) || // webtransport 取流
|
|
11517
|
+
utilsTools.isHttp(this._url) && queryStr && /dev=[a-zA-Z0-9:]+/.test(queryStr) && /chn=\d+/.test(queryStr) && /stream=\d+/.test(queryStr) && queryStr.includes('ssn=')) {
|
|
11518
|
+
return true;
|
|
11519
|
+
}
|
|
11520
|
+
return false;
|
|
11521
|
+
}
|
|
11440
11522
|
}
|
|
11441
11523
|
]);
|
|
11442
11524
|
return Theme;
|
|
@@ -11447,7 +11529,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11447
11529
|
zh: zh,
|
|
11448
11530
|
en: en
|
|
11449
11531
|
};
|
|
11450
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.
|
|
11532
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.3';
|
|
11451
11533
|
|
|
11452
11534
|
exports.Control = Control;
|
|
11453
11535
|
exports.EVENTS = EVENTS;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @ezuikit/player-theme v3.1.2-beta.
|
|
3
|
-
* Copyright (c) 2026-08-
|
|
2
|
+
* @ezuikit/player-theme v3.1.2-beta.3
|
|
3
|
+
* Copyright (c) 2026-08-14 08:18:55 Ezviz-OpenBiz
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
@@ -4275,6 +4275,7 @@ function debounce(func, wait) {
|
|
|
4275
4275
|
var // rerender 画面
|
|
4276
4276
|
_theme_contentControl_emit, _theme_contentControl;
|
|
4277
4277
|
(_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);
|
|
4278
|
+
theme._videoInfo = info;
|
|
4278
4279
|
}
|
|
4279
4280
|
});
|
|
4280
4281
|
theme == null ? void 0 : theme.on(EVENTS.resize, function() {
|
|
@@ -7138,6 +7139,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7138
7139
|
_inherits$f(AIChat, Control);
|
|
7139
7140
|
function AIChat(options) {
|
|
7140
7141
|
var _this;
|
|
7142
|
+
var _options_urlInfo_searchParams, _options_urlInfo, _options_urlInfo1;
|
|
7141
7143
|
_this = Control.call(this, _extends$e({}, options, {
|
|
7142
7144
|
tagName: 'span',
|
|
7143
7145
|
controlType: 'button',
|
|
@@ -7151,7 +7153,7 @@ function _ts_generator$2(thisArg, body) {
|
|
|
7151
7153
|
_this._render();
|
|
7152
7154
|
}
|
|
7153
7155
|
});
|
|
7154
|
-
if (options.urlInfo.searchParams.busType !== '7' && options.urlInfo.recType === 'cloud' && options.sdkType === 'base') {
|
|
7156
|
+
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') {
|
|
7155
7157
|
_this.$container.style.removeProperty('display');
|
|
7156
7158
|
} else {
|
|
7157
7159
|
_this.$container.style.display = 'none';
|
|
@@ -9448,7 +9450,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9448
9450
|
if (theme.options.deviceOptions !== null) {
|
|
9449
9451
|
var _theme_controls;
|
|
9450
9452
|
if (!((_theme_controls = theme.controls) == null ? void 0 : _theme_controls["deviceControl"])) {
|
|
9451
|
-
var _theme_options;
|
|
9453
|
+
var _theme_urlInfo, _theme_urlInfo1, _theme_options;
|
|
9452
9454
|
// eslint-disable-next-line @typescript-eslint/dot-notation, new-cap, @typescript-eslint/no-unsafe-argument
|
|
9453
9455
|
theme.controls["deviceControl"] = new Controls["device"](_extends$1({
|
|
9454
9456
|
rootContainer: theme.$container,
|
|
@@ -9459,8 +9461,8 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9459
9461
|
language: theme.options.language,
|
|
9460
9462
|
locales: theme.i18n.translations,
|
|
9461
9463
|
type: theme.options.type,
|
|
9462
|
-
deviceSerial: theme.urlInfo.deviceSerial,
|
|
9463
|
-
channelNo: theme.urlInfo.channelNo
|
|
9464
|
+
deviceSerial: (_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.deviceSerial,
|
|
9465
|
+
channelNo: (_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.channelNo
|
|
9464
9466
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["deviceOptions"]) || {}, {
|
|
9465
9467
|
props: props
|
|
9466
9468
|
}));
|
|
@@ -9471,7 +9473,7 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9471
9473
|
// footer
|
|
9472
9474
|
if (Controls[item.iconId]) {
|
|
9473
9475
|
if (theme.options["" + item.iconId + "Options"] !== null) {
|
|
9474
|
-
var _theme_options1;
|
|
9476
|
+
var _theme_urlInfo2, _theme_urlInfo3, _theme_options1;
|
|
9475
9477
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9476
9478
|
theme.controls["" + item.iconId + "Control"] = new Controls[item.iconId](_extends$1({
|
|
9477
9479
|
rootContainer: theme.$container,
|
|
@@ -9484,8 +9486,8 @@ function _renderControls(theme, $container, btnList, props) {
|
|
|
9484
9486
|
env: theme.options.env,
|
|
9485
9487
|
accessToken: theme.options.accessToken,
|
|
9486
9488
|
token: theme.options.token,
|
|
9487
|
-
deviceSerial: theme.urlInfo.deviceSerial,
|
|
9488
|
-
channelNo: theme.urlInfo.channelNo,
|
|
9489
|
+
deviceSerial: (_theme_urlInfo2 = theme.urlInfo) == null ? void 0 : _theme_urlInfo2.deviceSerial,
|
|
9490
|
+
channelNo: (_theme_urlInfo3 = theme.urlInfo) == null ? void 0 : _theme_urlInfo3.channelNo,
|
|
9489
9491
|
urlInfo: theme.urlInfo
|
|
9490
9492
|
} : {}, {
|
|
9491
9493
|
PLAY_TYPE: theme.options.type,
|
|
@@ -9731,7 +9733,7 @@ function _renderTheme(theme, data) {
|
|
|
9731
9733
|
var _renderTimeLine = function(theme, container, props) {
|
|
9732
9734
|
if (props === void 0) props = {};
|
|
9733
9735
|
if (!theme.controls.timeLineControl && theme.options.timeLineOptions !== null) {
|
|
9734
|
-
var _theme_urlInfo, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9736
|
+
var _theme_urlInfo, _theme_urlInfo1, _theme_options, _theme_options1, _this, _theme_options2;
|
|
9735
9737
|
var _showSectionIcon;
|
|
9736
9738
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
9737
9739
|
theme.controls.timeLineControl = new Controls['timeLine'](_extends$1({
|
|
@@ -9740,7 +9742,7 @@ var _renderTimeLine = function(theme, container, props) {
|
|
|
9740
9742
|
},
|
|
9741
9743
|
language: theme.options.language,
|
|
9742
9744
|
locales: theme.i18n.translations,
|
|
9743
|
-
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + theme.urlInfo.validateCode : ''
|
|
9745
|
+
coverQuery: ((_theme_urlInfo = theme.urlInfo) == null ? void 0 : _theme_urlInfo.validateCode) ? "decodekey=" + ((_theme_urlInfo1 = theme.urlInfo) == null ? void 0 : _theme_urlInfo1.validateCode) : ''
|
|
9744
9746
|
}, ((_theme_options = theme.options) == null ? void 0 : _theme_options["timeLineOptions"]) || {}, {
|
|
9745
9747
|
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,
|
|
9746
9748
|
props: props
|
|
@@ -10143,7 +10145,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10143
10145
|
_inherits(Theme, EventEmitter);
|
|
10144
10146
|
function Theme(options) {
|
|
10145
10147
|
var _this;
|
|
10146
|
-
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_options, _this_options1;
|
|
10148
|
+
var _this_options_volumeOptions, _this_options_volumeOptions1, _this_options_speedOptions, _this_urlInfo_searchParams, _this_urlInfo, _this_options, _this_options1;
|
|
10147
10149
|
_this = EventEmitter.call(this) || this, /** 播放器配置项 */ _this.options = THEME_DEFAULT_OPTIONS, _this.staticPath = '', /** 所有控件列表, 所有控件名称规则(`${iconId}Control`), 如音量控件 this.controls["volumeControl"] @since 0.0.1 */ _this.controls = {}, /**
|
|
10148
10150
|
* @since 0.0.1
|
|
10149
10151
|
* @private
|
|
@@ -10163,7 +10165,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10163
10165
|
*/ _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, /**
|
|
10164
10166
|
* 移动端扩展容器, 扩展的控件渲染在指定容器以外, 仅只用端适用, 为了可以放置大的控件和方便开发接入
|
|
10165
10167
|
* @private
|
|
10166
|
-
*/ _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, // /**
|
|
10168
|
+
*/ _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, // /**
|
|
10167
10169
|
// * 记录回放的月份
|
|
10168
10170
|
// *
|
|
10169
10171
|
// * key: {序列号}_{通道号}_{rec | cloud | cloudRecord} 比如:BC7799091_1_rec BC7799091_1_cloud BC7799091_1_cloudRecord
|
|
@@ -10174,16 +10176,17 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10174
10176
|
// _recMonthObj: Record<string, string[]> = {};
|
|
10175
10177
|
/**
|
|
10176
10178
|
* 录像回放的月份列表 @private
|
|
10177
|
-
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0;
|
|
10179
|
+
*/ _this.recMonth = [], /** 清理 header/footer 动画 定时器 @private */ _this._onPauseTimingFunc = null, /** 销毁标识 @readonly */ _this.destroyed = false, _this.scaleMode = 0, _this._videoInfo = {};
|
|
10178
10180
|
_this._initOptions(options);
|
|
10179
10181
|
if (_this.options.type === 'ezopen') {
|
|
10180
|
-
var
|
|
10181
|
-
if ((
|
|
10182
|
-
|
|
10182
|
+
var _this_urlInfo_searchParams1, _this_urlInfo1, _this_urlInfo2;
|
|
10183
|
+
if ((_this_urlInfo1 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams1 = _this_urlInfo1.searchParams) == null ? void 0 : _this_urlInfo_searchParams1.spaceId) {
|
|
10184
|
+
var _this_urlInfo_searchParams2, _this_urlInfo3;
|
|
10185
|
+
_this.options.spaceId = (_this_urlInfo3 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams2 = _this_urlInfo3.searchParams) == null ? void 0 : _this_urlInfo_searchParams2.spaceId;
|
|
10183
10186
|
}
|
|
10184
|
-
if (_this.urlInfo.type === 'rec') {
|
|
10185
|
-
var
|
|
10186
|
-
_this._seekDate = ((
|
|
10187
|
+
if (((_this_urlInfo2 = _this.urlInfo) == null ? void 0 : _this_urlInfo2.type) === 'rec') {
|
|
10188
|
+
var _this_urlInfo_searchParams3, _this_urlInfo4, _this_urlInfo_searchParams4, _this_urlInfo5;
|
|
10189
|
+
_this._seekDate = ((_this_urlInfo4 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams3 = _this_urlInfo4.searchParams) == null ? void 0 : _this_urlInfo_searchParams3.begin) ? DateTime.toDate((_this_urlInfo5 = _this.urlInfo) == null ? void 0 : (_this_urlInfo_searchParams4 = _this_urlInfo5.searchParams) == null ? void 0 : _this_urlInfo_searchParams4.begin) : DateTime.toDate(DateTime.format(new Date(), 'YYYY/MM/DD') + ' 00:00:00');
|
|
10187
10190
|
}
|
|
10188
10191
|
}
|
|
10189
10192
|
_this._getRecType(_this.options.url);
|
|
@@ -10215,7 +10218,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10215
10218
|
var _this_options_volumeOptions_muted, _ref1;
|
|
10216
10219
|
_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;
|
|
10217
10220
|
var _this_options_speedOptions_value, _ref2;
|
|
10218
|
-
|
|
10221
|
+
// playbackSpeed 是 萤石标准流倍速字段
|
|
10222
|
+
_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);
|
|
10219
10223
|
_this._mobileInnerWidthHeight = _this._mobileInnerWidthHeight.bind(_this);
|
|
10220
10224
|
_this._throttleMobileInnerWidthHeight = throttle(_this._mobileInnerWidthHeight, 20).bind(_this);
|
|
10221
10225
|
_this._onDblClickFullscreen = debounce(_this._onDblClickFullscreen, 20).bind(_this);
|
|
@@ -10453,6 +10457,8 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10453
10457
|
if (this.i18n) this.i18n = null;
|
|
10454
10458
|
this.recType = '';
|
|
10455
10459
|
this.recMonth = []; // 清空数据
|
|
10460
|
+
// 重置
|
|
10461
|
+
this._videoInfo = {};
|
|
10456
10462
|
this.emit(EVENTS.theme.destroyed);
|
|
10457
10463
|
this.removeAllListeners();
|
|
10458
10464
|
if (this.logger) this.logger = null;
|
|
@@ -10468,6 +10474,7 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10468
10474
|
this.options = deepmerge(THEME_DEFAULT_OPTIONS, options, {
|
|
10469
10475
|
clone: false
|
|
10470
10476
|
});
|
|
10477
|
+
this._url = this.options.url;
|
|
10471
10478
|
// ⚠警告 (./utils/interactiveHF.ts)
|
|
10472
10479
|
// PC 中窗口鼠标在header footer 移动(mousemove), 不允许消失及不要冒泡
|
|
10473
10480
|
// Mobile 中窗口点击在header footer 上(pointerdown/touchstart), 不允许消失及不要冒泡
|
|
@@ -10958,12 +10965,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
10958
10965
|
* @returns {"rec" | "cloudRecord" | "cloudRec" | ""} 录像类型, rec: 录像, cloudRec: 云录像, cloudRecord: 云录制
|
|
10959
10966
|
*/ _proto._getRecType = function _getRecType(url) {
|
|
10960
10967
|
if (this.options.type === 'ezopen' && /^ezopen:\/\//.test(url)) {
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10968
|
+
var _this_urlInfo;
|
|
10969
|
+
if (((_this_urlInfo = this.urlInfo) == null ? void 0 : _this_urlInfo.type) === 'rec') {
|
|
10970
|
+
var _this_urlInfo1, _this_urlInfo_searchParams, _this_urlInfo2, _this_urlInfo3;
|
|
10971
|
+
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') {
|
|
10964
10972
|
this.recType = 'cloudRecord';
|
|
10965
10973
|
return 'cloudRecord';
|
|
10966
|
-
} else if (this.urlInfo.recType === 'cloud') {
|
|
10974
|
+
} else if (((_this_urlInfo3 = this.urlInfo) == null ? void 0 : _this_urlInfo3.recType) === 'cloud') {
|
|
10967
10975
|
this.recType = 'cloudRec';
|
|
10968
10976
|
return 'cloudRec';
|
|
10969
10977
|
} else {
|
|
@@ -11025,13 +11033,22 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11025
11033
|
}
|
|
11026
11034
|
};
|
|
11027
11035
|
_create_class(Theme, [
|
|
11036
|
+
{
|
|
11037
|
+
key: "url",
|
|
11038
|
+
get: function get() {
|
|
11039
|
+
return this._url;
|
|
11040
|
+
},
|
|
11041
|
+
set: function set(url) {
|
|
11042
|
+
this._url = url;
|
|
11043
|
+
}
|
|
11044
|
+
},
|
|
11028
11045
|
{
|
|
11029
11046
|
key: "urlInfo",
|
|
11030
11047
|
get: /**
|
|
11031
11048
|
* url 信息 播放地址信息
|
|
11032
11049
|
*/ function get() {
|
|
11033
|
-
if (this.
|
|
11034
|
-
return parseEzopenUrl(this.
|
|
11050
|
+
if (this._url) {
|
|
11051
|
+
return parseEzopenUrl(this._url);
|
|
11035
11052
|
}
|
|
11036
11053
|
return {};
|
|
11037
11054
|
}
|
|
@@ -11058,6 +11075,41 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11058
11075
|
return this._height;
|
|
11059
11076
|
}
|
|
11060
11077
|
},
|
|
11078
|
+
{
|
|
11079
|
+
key: "videoInfo",
|
|
11080
|
+
get: /**
|
|
11081
|
+
* 视频信息
|
|
11082
|
+
* @version 3.1.2
|
|
11083
|
+
* ```ts
|
|
11084
|
+
* theme.videoInfo // ThemeVideoInfo
|
|
11085
|
+
* ```
|
|
11086
|
+
*/ function get() {
|
|
11087
|
+
return this._videoInfo || {};
|
|
11088
|
+
}
|
|
11089
|
+
},
|
|
11090
|
+
{
|
|
11091
|
+
key: "videoWidth",
|
|
11092
|
+
get: /**
|
|
11093
|
+
* 视频分辨率 宽
|
|
11094
|
+
*
|
|
11095
|
+
* @version 3.1.2
|
|
11096
|
+
*
|
|
11097
|
+
* ```ts
|
|
11098
|
+
* theme.videoWidth // number
|
|
11099
|
+
* ```
|
|
11100
|
+
*/ function get() {
|
|
11101
|
+
return this._videoInfo.width || 0;
|
|
11102
|
+
}
|
|
11103
|
+
},
|
|
11104
|
+
{
|
|
11105
|
+
key: "videoHeight",
|
|
11106
|
+
get: /**
|
|
11107
|
+
* 视频分辨率 高
|
|
11108
|
+
* @version 3.1.2
|
|
11109
|
+
*/ function get() {
|
|
11110
|
+
return this._videoInfo.height || 0;
|
|
11111
|
+
}
|
|
11112
|
+
},
|
|
11061
11113
|
{
|
|
11062
11114
|
key: "playing",
|
|
11063
11115
|
get: /**
|
|
@@ -11322,13 +11374,13 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11322
11374
|
{
|
|
11323
11375
|
key: "speed",
|
|
11324
11376
|
get: function get() {
|
|
11325
|
-
return this._speed;
|
|
11377
|
+
return +this._speed;
|
|
11326
11378
|
},
|
|
11327
11379
|
set: /**
|
|
11328
11380
|
* 倍速
|
|
11329
11381
|
*/ function set(speed) {
|
|
11330
11382
|
speed = +speed;
|
|
11331
|
-
if (speed !== this._speed) {
|
|
11383
|
+
if (speed !== +this._speed) {
|
|
11332
11384
|
this._speed = speed;
|
|
11333
11385
|
this.emit(EVENTS.speedChange, speed);
|
|
11334
11386
|
}
|
|
@@ -11435,6 +11487,36 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11435
11487
|
*/ function get() {
|
|
11436
11488
|
return !!this._footerMoreControl;
|
|
11437
11489
|
}
|
|
11490
|
+
},
|
|
11491
|
+
{
|
|
11492
|
+
key: "isEzopen",
|
|
11493
|
+
get: function get() {
|
|
11494
|
+
// 私有流地址
|
|
11495
|
+
return /^ezopen:\/\//.test(this._url);
|
|
11496
|
+
}
|
|
11497
|
+
},
|
|
11498
|
+
{
|
|
11499
|
+
key: "isEzviz",
|
|
11500
|
+
get: /**
|
|
11501
|
+
* 判断播放地址是萤石的播放地址
|
|
11502
|
+
* @since 3.1.2
|
|
11503
|
+
*/ function get() {
|
|
11504
|
+
var path = this._url.split('?')[0];
|
|
11505
|
+
var queryStr = this._url.split('?')[1];
|
|
11506
|
+
var lastPath = path.split('/')[path.split('/').length - 1];
|
|
11507
|
+
// ezopen://open.ys7.com/BC7799091/1.rec
|
|
11508
|
+
// rtmp://rtmp05open.ys7.com:1935/v3/openpb/BC7799091_1_1
|
|
11509
|
+
// https://open.ys7.com/v3/openpb/llhls/BC7799091_1_1.m3u8
|
|
11510
|
+
// https://rtmp05open.ys7.com:9188/v3/openpb/BC7799091_1_1.flv
|
|
11511
|
+
// https://host:2001/live?dev=D08197169&chn=1&ss=token&stream=1
|
|
11512
|
+
if (// 私有流地址
|
|
11513
|
+
/^ezopen:\/\//.test(path) || // 标准流地址
|
|
11514
|
+
path.includes('/openlive/') || path.includes('/openpb/') && /[a-zA-Z0-9:]+_\d+_\d+/.test(lastPath) || // webtransport 取流
|
|
11515
|
+
isHttp(this._url) && queryStr && /dev=[a-zA-Z0-9:]+/.test(queryStr) && /chn=\d+/.test(queryStr) && /stream=\d+/.test(queryStr) && queryStr.includes('ssn=')) {
|
|
11516
|
+
return true;
|
|
11517
|
+
}
|
|
11518
|
+
return false;
|
|
11519
|
+
}
|
|
11438
11520
|
}
|
|
11439
11521
|
]);
|
|
11440
11522
|
return Theme;
|
|
@@ -11445,6 +11527,6 @@ var THEME_DEFAULT_OPTIONS = {
|
|
|
11445
11527
|
zh: zh,
|
|
11446
11528
|
en: en
|
|
11447
11529
|
};
|
|
11448
|
-
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.
|
|
11530
|
+
/** 版本号 @since 0.0.1 */ Theme.THEME_VERSION = '3.1.2-beta.3';
|
|
11449
11531
|
|
|
11450
11532
|
export { Control, EVENTS, Fullscreen, Loading, Message, Play, Poster, Rec, Theme, Utils, Volume };
|