@volcengine/veplayer 2.4.1-rc.0 → 2.4.2-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/veplayer.biz.live.development.js +75 -87
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +10 -0
- package/esm/veplayer.development.js +33 -45
- package/esm/veplayer.live.d.ts +10 -0
- package/esm/veplayer.live.development.js +33 -45
- package/esm/veplayer.live.production.js +2 -2
- package/esm/veplayer.production.js +2 -2
- package/esm/veplayer.vod.development.js +1 -1
- package/esm/veplayer.vod.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.biz.live.development.js +75 -87
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +10 -0
- package/umd/veplayer.development.js +33 -45
- package/umd/veplayer.live.d.ts +10 -0
- package/umd/veplayer.live.development.js +33 -45
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.development.js +1 -1
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +10 -0
- package/veplayer.live.d.ts +10 -0
package/esm/veplayer.d.ts
CHANGED
|
@@ -5579,6 +5579,11 @@ interface Rtm {
|
|
|
5579
5579
|
* @default 1000
|
|
5580
5580
|
*/
|
|
5581
5581
|
networkEvaluateInterval?: number;
|
|
5582
|
+
/** {zh}
|
|
5583
|
+
* @brief 暂停断流,播放无缝重新拉流
|
|
5584
|
+
* @default false
|
|
5585
|
+
*/
|
|
5586
|
+
seamlesslyReload?: boolean;
|
|
5582
5587
|
}
|
|
5583
5588
|
/** {zh}
|
|
5584
5589
|
* @list option
|
|
@@ -10389,6 +10394,11 @@ declare namespace live {
|
|
|
10389
10394
|
* @default 1000
|
|
10390
10395
|
*/
|
|
10391
10396
|
networkEvaluateInterval?: number;
|
|
10397
|
+
/** {zh}
|
|
10398
|
+
* @brief 暂停断流,播放无缝重新拉流
|
|
10399
|
+
* @default false
|
|
10400
|
+
*/
|
|
10401
|
+
seamlesslyReload?: boolean;
|
|
10392
10402
|
}
|
|
10393
10403
|
/** {zh}
|
|
10394
10404
|
* @list option
|
|
@@ -13742,7 +13742,7 @@ class VePlayerBase {
|
|
|
13742
13742
|
* @returns
|
|
13743
13743
|
*/
|
|
13744
13744
|
get playerVersion() {
|
|
13745
|
-
return "2.4.
|
|
13745
|
+
return "2.4.2-rc.0";
|
|
13746
13746
|
}
|
|
13747
13747
|
/** {zh}
|
|
13748
13748
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -19063,29 +19063,6 @@ async function isRTMSupportCodec(codec = RTMCodec.H264) {
|
|
|
19063
19063
|
return RtmPlugin.isSupportedH264();
|
|
19064
19064
|
return false;
|
|
19065
19065
|
}
|
|
19066
|
-
const getAbrStrategy = async (options) => {
|
|
19067
|
-
var _a, _b;
|
|
19068
|
-
const streamType = options.url && getStreamType(options.url);
|
|
19069
|
-
if (streamType === "rtm") {
|
|
19070
|
-
return {};
|
|
19071
|
-
}
|
|
19072
|
-
const abrOptions = streamType === "flv" ? (_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.abr : (_b = options == null ? void 0 : options.hls) == null ? void 0 : _b.abr;
|
|
19073
|
-
if (!abrOptions) {
|
|
19074
|
-
return {};
|
|
19075
|
-
}
|
|
19076
|
-
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
19077
|
-
return {
|
|
19078
|
-
options: {
|
|
19079
|
-
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
19080
|
-
...abrOptions,
|
|
19081
|
-
open: abrOptions.enable ?? true
|
|
19082
|
-
}
|
|
19083
|
-
},
|
|
19084
|
-
plugins: [
|
|
19085
|
-
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
19086
|
-
]
|
|
19087
|
-
};
|
|
19088
|
-
};
|
|
19089
19066
|
const rtmStrategy = {
|
|
19090
19067
|
options: {},
|
|
19091
19068
|
module: DynamicModule.PluginRtm
|
|
@@ -19100,8 +19077,6 @@ const generateFallbackUrl = (url) => {
|
|
|
19100
19077
|
const getRtmStrategy = async (options, player) => {
|
|
19101
19078
|
var _a;
|
|
19102
19079
|
let backupStrategy;
|
|
19103
|
-
let backupOptions = {};
|
|
19104
|
-
let backupModule = [];
|
|
19105
19080
|
const { url } = options;
|
|
19106
19081
|
const {
|
|
19107
19082
|
fallbackUrl,
|
|
@@ -19116,7 +19091,7 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19116
19091
|
} else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && util.isMseSupported(Codec.H264)) {
|
|
19117
19092
|
backupStrategy = createHlsMseStrategy(options);
|
|
19118
19093
|
}
|
|
19119
|
-
const [rtmCdn, backupCdn
|
|
19094
|
+
const [rtmCdn, backupCdn] = await Promise.all([
|
|
19120
19095
|
load(rtmStrategy.module).then((module) => {
|
|
19121
19096
|
return module.RtmPlugin;
|
|
19122
19097
|
}).catch(() => void 0),
|
|
@@ -19126,18 +19101,8 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19126
19101
|
} else if ((backupStrategy == null ? void 0 : backupStrategy.module) === DynamicModule.PluginHls) {
|
|
19127
19102
|
return module.HlsPlugin;
|
|
19128
19103
|
}
|
|
19129
|
-
}).catch(() => void 0)
|
|
19130
|
-
getAbrStrategy({ ...options, url: actualFallbackUrl }).catch(
|
|
19131
|
-
() => void 0
|
|
19132
|
-
)
|
|
19104
|
+
}).catch(() => void 0)
|
|
19133
19105
|
]);
|
|
19134
|
-
if (backupType) {
|
|
19135
|
-
backupOptions = {
|
|
19136
|
-
...backupStrategy == null ? void 0 : backupStrategy.options,
|
|
19137
|
-
...backupAbr == null ? void 0 : backupAbr.options
|
|
19138
|
-
};
|
|
19139
|
-
backupModule = [backupCdn, ...(backupAbr == null ? void 0 : backupAbr.plugins) ?? []];
|
|
19140
|
-
}
|
|
19141
19106
|
const [RTMSupported, RTMSupportCodec] = await Promise.all([
|
|
19142
19107
|
isRTMSupported(),
|
|
19143
19108
|
isRTMSupportCodec()
|
|
@@ -19155,7 +19120,7 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19155
19120
|
}
|
|
19156
19121
|
return {
|
|
19157
19122
|
options: {
|
|
19158
|
-
...
|
|
19123
|
+
...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
|
|
19159
19124
|
url: actualFallbackUrl,
|
|
19160
19125
|
_RTMdegrade: {
|
|
19161
19126
|
_originRtmUrl: url,
|
|
@@ -19163,19 +19128,19 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19163
19128
|
_isRTMSupportCodec: RTMSupportCodec
|
|
19164
19129
|
}
|
|
19165
19130
|
},
|
|
19166
|
-
plugins:
|
|
19131
|
+
plugins: backupCdn ? [backupCdn] : []
|
|
19167
19132
|
};
|
|
19168
19133
|
}
|
|
19169
19134
|
return {
|
|
19170
19135
|
options: {
|
|
19171
|
-
...
|
|
19136
|
+
...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
|
|
19172
19137
|
url: enableRTMAutoTranscode ? util.appendSearchParams(url, { enableRTMAutoTranscode: "true" }) : void 0,
|
|
19173
19138
|
_RTMdegrade: void 0,
|
|
19174
19139
|
rts: {
|
|
19175
19140
|
retryCount: 0,
|
|
19176
19141
|
...ret,
|
|
19177
19142
|
backupURL: actualFallbackUrl,
|
|
19178
|
-
backupConstruct:
|
|
19143
|
+
backupConstruct: backupCdn
|
|
19179
19144
|
}
|
|
19180
19145
|
},
|
|
19181
19146
|
plugins: rtmCdn ? [rtmCdn] : []
|
|
@@ -22029,10 +21994,10 @@ class Logger extends Plugin {
|
|
|
22029
21994
|
user_id: this._userId,
|
|
22030
21995
|
device_id: this._deviceId,
|
|
22031
21996
|
ext: {
|
|
22032
|
-
veplayer_version: "2.4.
|
|
22033
|
-
flv_version: "3.0.19-rc.
|
|
21997
|
+
veplayer_version: "2.4.2-rc.0",
|
|
21998
|
+
flv_version: "3.0.19-rc.0",
|
|
22034
21999
|
hls_version: "3.0.19-rc.0",
|
|
22035
|
-
rts_version: "0.2.1-alpha.
|
|
22000
|
+
rts_version: "0.2.1-alpha.2"
|
|
22036
22001
|
}
|
|
22037
22002
|
});
|
|
22038
22003
|
}
|
|
@@ -22326,6 +22291,29 @@ const getDrmStrategy = async (options, player) => {
|
|
|
22326
22291
|
}
|
|
22327
22292
|
return {};
|
|
22328
22293
|
};
|
|
22294
|
+
const getAbrStrategy = async (options) => {
|
|
22295
|
+
var _a, _b;
|
|
22296
|
+
const streamType = options.url && getStreamType(options.url);
|
|
22297
|
+
if (streamType === "rtm") {
|
|
22298
|
+
return {};
|
|
22299
|
+
}
|
|
22300
|
+
const abrOptions = streamType === "flv" ? (_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.abr : (_b = options == null ? void 0 : options.hls) == null ? void 0 : _b.abr;
|
|
22301
|
+
if (!abrOptions) {
|
|
22302
|
+
return {};
|
|
22303
|
+
}
|
|
22304
|
+
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
22305
|
+
return {
|
|
22306
|
+
options: {
|
|
22307
|
+
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
22308
|
+
...abrOptions,
|
|
22309
|
+
open: abrOptions.enable ?? true
|
|
22310
|
+
}
|
|
22311
|
+
},
|
|
22312
|
+
plugins: [
|
|
22313
|
+
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
22314
|
+
]
|
|
22315
|
+
};
|
|
22316
|
+
};
|
|
22329
22317
|
VeI18n.extend([
|
|
22330
22318
|
{
|
|
22331
22319
|
LANG: "zh-cn",
|
package/esm/veplayer.live.d.ts
CHANGED
|
@@ -5579,6 +5579,11 @@ interface Rtm {
|
|
|
5579
5579
|
* @default 1000
|
|
5580
5580
|
*/
|
|
5581
5581
|
networkEvaluateInterval?: number;
|
|
5582
|
+
/** {zh}
|
|
5583
|
+
* @brief 暂停断流,播放无缝重新拉流
|
|
5584
|
+
* @default false
|
|
5585
|
+
*/
|
|
5586
|
+
seamlesslyReload?: boolean;
|
|
5582
5587
|
}
|
|
5583
5588
|
/** {zh}
|
|
5584
5589
|
* @list option
|
|
@@ -10389,6 +10394,11 @@ declare namespace live {
|
|
|
10389
10394
|
* @default 1000
|
|
10390
10395
|
*/
|
|
10391
10396
|
networkEvaluateInterval?: number;
|
|
10397
|
+
/** {zh}
|
|
10398
|
+
* @brief 暂停断流,播放无缝重新拉流
|
|
10399
|
+
* @default false
|
|
10400
|
+
*/
|
|
10401
|
+
seamlesslyReload?: boolean;
|
|
10392
10402
|
}
|
|
10393
10403
|
/** {zh}
|
|
10394
10404
|
* @list option
|
|
@@ -13742,7 +13742,7 @@ class VePlayerBase {
|
|
|
13742
13742
|
* @returns
|
|
13743
13743
|
*/
|
|
13744
13744
|
get playerVersion() {
|
|
13745
|
-
return "2.4.
|
|
13745
|
+
return "2.4.2-rc.0";
|
|
13746
13746
|
}
|
|
13747
13747
|
/** {zh}
|
|
13748
13748
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -19063,29 +19063,6 @@ async function isRTMSupportCodec(codec = RTMCodec.H264) {
|
|
|
19063
19063
|
return RtmPlugin.isSupportedH264();
|
|
19064
19064
|
return false;
|
|
19065
19065
|
}
|
|
19066
|
-
const getAbrStrategy = async (options) => {
|
|
19067
|
-
var _a, _b;
|
|
19068
|
-
const streamType = options.url && getStreamType(options.url);
|
|
19069
|
-
if (streamType === "rtm") {
|
|
19070
|
-
return {};
|
|
19071
|
-
}
|
|
19072
|
-
const abrOptions = streamType === "flv" ? (_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.abr : (_b = options == null ? void 0 : options.hls) == null ? void 0 : _b.abr;
|
|
19073
|
-
if (!abrOptions) {
|
|
19074
|
-
return {};
|
|
19075
|
-
}
|
|
19076
|
-
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
19077
|
-
return {
|
|
19078
|
-
options: {
|
|
19079
|
-
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
19080
|
-
...abrOptions,
|
|
19081
|
-
open: abrOptions.enable ?? true
|
|
19082
|
-
}
|
|
19083
|
-
},
|
|
19084
|
-
plugins: [
|
|
19085
|
-
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
19086
|
-
]
|
|
19087
|
-
};
|
|
19088
|
-
};
|
|
19089
19066
|
const rtmStrategy = {
|
|
19090
19067
|
options: {},
|
|
19091
19068
|
module: DynamicModule.PluginRtm
|
|
@@ -19100,8 +19077,6 @@ const generateFallbackUrl = (url) => {
|
|
|
19100
19077
|
const getRtmStrategy = async (options, player) => {
|
|
19101
19078
|
var _a;
|
|
19102
19079
|
let backupStrategy;
|
|
19103
|
-
let backupOptions = {};
|
|
19104
|
-
let backupModule = [];
|
|
19105
19080
|
const { url } = options;
|
|
19106
19081
|
const {
|
|
19107
19082
|
fallbackUrl,
|
|
@@ -19116,7 +19091,7 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19116
19091
|
} else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && util.isMseSupported(Codec.H264)) {
|
|
19117
19092
|
backupStrategy = createHlsMseStrategy(options);
|
|
19118
19093
|
}
|
|
19119
|
-
const [rtmCdn, backupCdn
|
|
19094
|
+
const [rtmCdn, backupCdn] = await Promise.all([
|
|
19120
19095
|
load(rtmStrategy.module).then((module) => {
|
|
19121
19096
|
return module.RtmPlugin;
|
|
19122
19097
|
}).catch(() => void 0),
|
|
@@ -19126,18 +19101,8 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19126
19101
|
} else if ((backupStrategy == null ? void 0 : backupStrategy.module) === DynamicModule.PluginHls) {
|
|
19127
19102
|
return module.HlsPlugin;
|
|
19128
19103
|
}
|
|
19129
|
-
}).catch(() => void 0)
|
|
19130
|
-
getAbrStrategy({ ...options, url: actualFallbackUrl }).catch(
|
|
19131
|
-
() => void 0
|
|
19132
|
-
)
|
|
19104
|
+
}).catch(() => void 0)
|
|
19133
19105
|
]);
|
|
19134
|
-
if (backupType) {
|
|
19135
|
-
backupOptions = {
|
|
19136
|
-
...backupStrategy == null ? void 0 : backupStrategy.options,
|
|
19137
|
-
...backupAbr == null ? void 0 : backupAbr.options
|
|
19138
|
-
};
|
|
19139
|
-
backupModule = [backupCdn, ...(backupAbr == null ? void 0 : backupAbr.plugins) ?? []];
|
|
19140
|
-
}
|
|
19141
19106
|
const [RTMSupported, RTMSupportCodec] = await Promise.all([
|
|
19142
19107
|
isRTMSupported(),
|
|
19143
19108
|
isRTMSupportCodec()
|
|
@@ -19155,7 +19120,7 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19155
19120
|
}
|
|
19156
19121
|
return {
|
|
19157
19122
|
options: {
|
|
19158
|
-
...
|
|
19123
|
+
...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
|
|
19159
19124
|
url: actualFallbackUrl,
|
|
19160
19125
|
_RTMdegrade: {
|
|
19161
19126
|
_originRtmUrl: url,
|
|
@@ -19163,19 +19128,19 @@ const getRtmStrategy = async (options, player) => {
|
|
|
19163
19128
|
_isRTMSupportCodec: RTMSupportCodec
|
|
19164
19129
|
}
|
|
19165
19130
|
},
|
|
19166
|
-
plugins:
|
|
19131
|
+
plugins: backupCdn ? [backupCdn] : []
|
|
19167
19132
|
};
|
|
19168
19133
|
}
|
|
19169
19134
|
return {
|
|
19170
19135
|
options: {
|
|
19171
|
-
...
|
|
19136
|
+
...(backupStrategy == null ? void 0 : backupStrategy.options) || {},
|
|
19172
19137
|
url: enableRTMAutoTranscode ? util.appendSearchParams(url, { enableRTMAutoTranscode: "true" }) : void 0,
|
|
19173
19138
|
_RTMdegrade: void 0,
|
|
19174
19139
|
rts: {
|
|
19175
19140
|
retryCount: 0,
|
|
19176
19141
|
...ret,
|
|
19177
19142
|
backupURL: actualFallbackUrl,
|
|
19178
|
-
backupConstruct:
|
|
19143
|
+
backupConstruct: backupCdn
|
|
19179
19144
|
}
|
|
19180
19145
|
},
|
|
19181
19146
|
plugins: rtmCdn ? [rtmCdn] : []
|
|
@@ -22029,10 +21994,10 @@ class Logger extends Plugin {
|
|
|
22029
21994
|
user_id: this._userId,
|
|
22030
21995
|
device_id: this._deviceId,
|
|
22031
21996
|
ext: {
|
|
22032
|
-
veplayer_version: "2.4.
|
|
22033
|
-
flv_version: "3.0.19-rc.
|
|
21997
|
+
veplayer_version: "2.4.2-rc.0",
|
|
21998
|
+
flv_version: "3.0.19-rc.0",
|
|
22034
21999
|
hls_version: "3.0.19-rc.0",
|
|
22035
|
-
rts_version: "0.2.1-alpha.
|
|
22000
|
+
rts_version: "0.2.1-alpha.2"
|
|
22036
22001
|
}
|
|
22037
22002
|
});
|
|
22038
22003
|
}
|
|
@@ -22326,6 +22291,29 @@ const getDrmStrategy = async (options, player) => {
|
|
|
22326
22291
|
}
|
|
22327
22292
|
return {};
|
|
22328
22293
|
};
|
|
22294
|
+
const getAbrStrategy = async (options) => {
|
|
22295
|
+
var _a, _b;
|
|
22296
|
+
const streamType = options.url && getStreamType(options.url);
|
|
22297
|
+
if (streamType === "rtm") {
|
|
22298
|
+
return {};
|
|
22299
|
+
}
|
|
22300
|
+
const abrOptions = streamType === "flv" ? (_a = options == null ? void 0 : options.flv) == null ? void 0 : _a.abr : (_b = options == null ? void 0 : options.hls) == null ? void 0 : _b.abr;
|
|
22301
|
+
if (!abrOptions) {
|
|
22302
|
+
return {};
|
|
22303
|
+
}
|
|
22304
|
+
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
22305
|
+
return {
|
|
22306
|
+
options: {
|
|
22307
|
+
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
22308
|
+
...abrOptions,
|
|
22309
|
+
open: abrOptions.enable ?? true
|
|
22310
|
+
}
|
|
22311
|
+
},
|
|
22312
|
+
plugins: [
|
|
22313
|
+
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
22314
|
+
]
|
|
22315
|
+
};
|
|
22316
|
+
};
|
|
22329
22317
|
VeI18n.extend([
|
|
22330
22318
|
{
|
|
22331
22319
|
LANG: "zh-cn",
|