@volcengine/veplayer 2.4.0 → 2.4.1-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 +88 -76
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.development.js +45 -33
- package/esm/veplayer.live.development.js +45 -33
- 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 +88 -76
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.development.js +45 -33
- package/umd/veplayer.live.development.js +45 -33
- 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
|
@@ -13746,7 +13746,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13746
13746
|
* @returns
|
|
13747
13747
|
*/
|
|
13748
13748
|
get playerVersion() {
|
|
13749
|
-
return "2.4.0";
|
|
13749
|
+
return "2.4.1-rc.0";
|
|
13750
13750
|
}
|
|
13751
13751
|
/** {zh}
|
|
13752
13752
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -19067,6 +19067,29 @@ var __publicField = (obj, key, value) => {
|
|
|
19067
19067
|
return RtmPlugin.isSupportedH264();
|
|
19068
19068
|
return false;
|
|
19069
19069
|
}
|
|
19070
|
+
const getAbrStrategy = async (options) => {
|
|
19071
|
+
var _a, _b;
|
|
19072
|
+
const streamType = options.url && getStreamType(options.url);
|
|
19073
|
+
if (streamType === "rtm") {
|
|
19074
|
+
return {};
|
|
19075
|
+
}
|
|
19076
|
+
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;
|
|
19077
|
+
if (!abrOptions) {
|
|
19078
|
+
return {};
|
|
19079
|
+
}
|
|
19080
|
+
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
19081
|
+
return {
|
|
19082
|
+
options: {
|
|
19083
|
+
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
19084
|
+
...abrOptions,
|
|
19085
|
+
open: abrOptions.enable ?? true
|
|
19086
|
+
}
|
|
19087
|
+
},
|
|
19088
|
+
plugins: [
|
|
19089
|
+
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
19090
|
+
]
|
|
19091
|
+
};
|
|
19092
|
+
};
|
|
19070
19093
|
const rtmStrategy = {
|
|
19071
19094
|
options: {},
|
|
19072
19095
|
module: DynamicModule.PluginRtm
|
|
@@ -19081,6 +19104,8 @@ var __publicField = (obj, key, value) => {
|
|
|
19081
19104
|
const getRtmStrategy = async (options, player) => {
|
|
19082
19105
|
var _a;
|
|
19083
19106
|
let backupStrategy;
|
|
19107
|
+
let backupOptions = {};
|
|
19108
|
+
let backupModule = [];
|
|
19084
19109
|
const { url } = options;
|
|
19085
19110
|
const {
|
|
19086
19111
|
fallbackUrl,
|
|
@@ -19095,7 +19120,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19095
19120
|
} else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && util.isMseSupported(Codec.H264)) {
|
|
19096
19121
|
backupStrategy = createHlsMseStrategy(options);
|
|
19097
19122
|
}
|
|
19098
|
-
const [rtmCdn, backupCdn] = await Promise.all([
|
|
19123
|
+
const [rtmCdn, backupCdn, backupAbr] = await Promise.all([
|
|
19099
19124
|
load(rtmStrategy.module).then((module2) => {
|
|
19100
19125
|
return module2.RtmPlugin;
|
|
19101
19126
|
}).catch(() => void 0),
|
|
@@ -19105,8 +19130,18 @@ var __publicField = (obj, key, value) => {
|
|
|
19105
19130
|
} else if ((backupStrategy == null ? void 0 : backupStrategy.module) === DynamicModule.PluginHls) {
|
|
19106
19131
|
return module2.HlsPlugin;
|
|
19107
19132
|
}
|
|
19108
|
-
}).catch(() => void 0)
|
|
19133
|
+
}).catch(() => void 0),
|
|
19134
|
+
getAbrStrategy({ ...options, url: actualFallbackUrl }).catch(
|
|
19135
|
+
() => void 0
|
|
19136
|
+
)
|
|
19109
19137
|
]);
|
|
19138
|
+
if (backupType) {
|
|
19139
|
+
backupOptions = {
|
|
19140
|
+
...backupStrategy == null ? void 0 : backupStrategy.options,
|
|
19141
|
+
...backupAbr == null ? void 0 : backupAbr.options
|
|
19142
|
+
};
|
|
19143
|
+
backupModule = [backupCdn, ...(backupAbr == null ? void 0 : backupAbr.plugins) ?? []];
|
|
19144
|
+
}
|
|
19110
19145
|
const [RTMSupported, RTMSupportCodec] = await Promise.all([
|
|
19111
19146
|
isRTMSupported(),
|
|
19112
19147
|
isRTMSupportCodec()
|
|
@@ -19124,7 +19159,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19124
19159
|
}
|
|
19125
19160
|
return {
|
|
19126
19161
|
options: {
|
|
19127
|
-
...
|
|
19162
|
+
...backupOptions || {},
|
|
19128
19163
|
url: actualFallbackUrl,
|
|
19129
19164
|
_RTMdegrade: {
|
|
19130
19165
|
_originRtmUrl: url,
|
|
@@ -19132,19 +19167,19 @@ var __publicField = (obj, key, value) => {
|
|
|
19132
19167
|
_isRTMSupportCodec: RTMSupportCodec
|
|
19133
19168
|
}
|
|
19134
19169
|
},
|
|
19135
|
-
plugins:
|
|
19170
|
+
plugins: backupModule
|
|
19136
19171
|
};
|
|
19137
19172
|
}
|
|
19138
19173
|
return {
|
|
19139
19174
|
options: {
|
|
19140
|
-
...
|
|
19175
|
+
...backupOptions || {},
|
|
19141
19176
|
url: enableRTMAutoTranscode ? util.appendSearchParams(url, { enableRTMAutoTranscode: "true" }) : void 0,
|
|
19142
19177
|
_RTMdegrade: void 0,
|
|
19143
19178
|
rts: {
|
|
19144
19179
|
retryCount: 0,
|
|
19145
19180
|
...ret,
|
|
19146
19181
|
backupURL: actualFallbackUrl,
|
|
19147
|
-
backupConstruct:
|
|
19182
|
+
backupConstruct: backupModule
|
|
19148
19183
|
}
|
|
19149
19184
|
},
|
|
19150
19185
|
plugins: rtmCdn ? [rtmCdn] : []
|
|
@@ -21998,10 +22033,10 @@ var __publicField = (obj, key, value) => {
|
|
|
21998
22033
|
user_id: this._userId,
|
|
21999
22034
|
device_id: this._deviceId,
|
|
22000
22035
|
ext: {
|
|
22001
|
-
veplayer_version: "2.4.0",
|
|
22002
|
-
flv_version: "3.0.19-rc.
|
|
22036
|
+
veplayer_version: "2.4.1-rc.0",
|
|
22037
|
+
flv_version: "3.0.19-rc.10",
|
|
22003
22038
|
hls_version: "3.0.19-rc.0",
|
|
22004
|
-
rts_version: "0.2.1-alpha.
|
|
22039
|
+
rts_version: "0.2.1-alpha.1"
|
|
22005
22040
|
}
|
|
22006
22041
|
});
|
|
22007
22042
|
}
|
|
@@ -22295,29 +22330,6 @@ var __publicField = (obj, key, value) => {
|
|
|
22295
22330
|
}
|
|
22296
22331
|
return {};
|
|
22297
22332
|
};
|
|
22298
|
-
const getAbrStrategy = async (options) => {
|
|
22299
|
-
var _a, _b;
|
|
22300
|
-
const streamType = options.url && getStreamType(options.url);
|
|
22301
|
-
if (streamType === "rtm") {
|
|
22302
|
-
return {};
|
|
22303
|
-
}
|
|
22304
|
-
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;
|
|
22305
|
-
if (!abrOptions) {
|
|
22306
|
-
return {};
|
|
22307
|
-
}
|
|
22308
|
-
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
22309
|
-
return {
|
|
22310
|
-
options: {
|
|
22311
|
-
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
22312
|
-
...abrOptions,
|
|
22313
|
-
open: abrOptions.enable ?? true
|
|
22314
|
-
}
|
|
22315
|
-
},
|
|
22316
|
-
plugins: [
|
|
22317
|
-
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
22318
|
-
]
|
|
22319
|
-
};
|
|
22320
|
-
};
|
|
22321
22333
|
VeI18n.extend([
|
|
22322
22334
|
{
|
|
22323
22335
|
LANG: "zh-cn",
|
|
@@ -13746,7 +13746,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13746
13746
|
* @returns
|
|
13747
13747
|
*/
|
|
13748
13748
|
get playerVersion() {
|
|
13749
|
-
return "2.4.0";
|
|
13749
|
+
return "2.4.1-rc.0";
|
|
13750
13750
|
}
|
|
13751
13751
|
/** {zh}
|
|
13752
13752
|
* @brief 获取当前播放视频的清晰度唯一标识(definition)。
|
|
@@ -19067,6 +19067,29 @@ var __publicField = (obj, key, value) => {
|
|
|
19067
19067
|
return RtmPlugin.isSupportedH264();
|
|
19068
19068
|
return false;
|
|
19069
19069
|
}
|
|
19070
|
+
const getAbrStrategy = async (options) => {
|
|
19071
|
+
var _a, _b;
|
|
19072
|
+
const streamType = options.url && getStreamType(options.url);
|
|
19073
|
+
if (streamType === "rtm") {
|
|
19074
|
+
return {};
|
|
19075
|
+
}
|
|
19076
|
+
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;
|
|
19077
|
+
if (!abrOptions) {
|
|
19078
|
+
return {};
|
|
19079
|
+
}
|
|
19080
|
+
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
19081
|
+
return {
|
|
19082
|
+
options: {
|
|
19083
|
+
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
19084
|
+
...abrOptions,
|
|
19085
|
+
open: abrOptions.enable ?? true
|
|
19086
|
+
}
|
|
19087
|
+
},
|
|
19088
|
+
plugins: [
|
|
19089
|
+
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
19090
|
+
]
|
|
19091
|
+
};
|
|
19092
|
+
};
|
|
19070
19093
|
const rtmStrategy = {
|
|
19071
19094
|
options: {},
|
|
19072
19095
|
module: DynamicModule.PluginRtm
|
|
@@ -19081,6 +19104,8 @@ var __publicField = (obj, key, value) => {
|
|
|
19081
19104
|
const getRtmStrategy = async (options, player) => {
|
|
19082
19105
|
var _a;
|
|
19083
19106
|
let backupStrategy;
|
|
19107
|
+
let backupOptions = {};
|
|
19108
|
+
let backupModule = [];
|
|
19084
19109
|
const { url } = options;
|
|
19085
19110
|
const {
|
|
19086
19111
|
fallbackUrl,
|
|
@@ -19095,7 +19120,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19095
19120
|
} else if (backupType === "hls" && (sniffer$1.device !== "mobile" || ((_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.enableMSE)) && util.isMseSupported(Codec.H264)) {
|
|
19096
19121
|
backupStrategy = createHlsMseStrategy(options);
|
|
19097
19122
|
}
|
|
19098
|
-
const [rtmCdn, backupCdn] = await Promise.all([
|
|
19123
|
+
const [rtmCdn, backupCdn, backupAbr] = await Promise.all([
|
|
19099
19124
|
load(rtmStrategy.module).then((module2) => {
|
|
19100
19125
|
return module2.RtmPlugin;
|
|
19101
19126
|
}).catch(() => void 0),
|
|
@@ -19105,8 +19130,18 @@ var __publicField = (obj, key, value) => {
|
|
|
19105
19130
|
} else if ((backupStrategy == null ? void 0 : backupStrategy.module) === DynamicModule.PluginHls) {
|
|
19106
19131
|
return module2.HlsPlugin;
|
|
19107
19132
|
}
|
|
19108
|
-
}).catch(() => void 0)
|
|
19133
|
+
}).catch(() => void 0),
|
|
19134
|
+
getAbrStrategy({ ...options, url: actualFallbackUrl }).catch(
|
|
19135
|
+
() => void 0
|
|
19136
|
+
)
|
|
19109
19137
|
]);
|
|
19138
|
+
if (backupType) {
|
|
19139
|
+
backupOptions = {
|
|
19140
|
+
...backupStrategy == null ? void 0 : backupStrategy.options,
|
|
19141
|
+
...backupAbr == null ? void 0 : backupAbr.options
|
|
19142
|
+
};
|
|
19143
|
+
backupModule = [backupCdn, ...(backupAbr == null ? void 0 : backupAbr.plugins) ?? []];
|
|
19144
|
+
}
|
|
19110
19145
|
const [RTMSupported, RTMSupportCodec] = await Promise.all([
|
|
19111
19146
|
isRTMSupported(),
|
|
19112
19147
|
isRTMSupportCodec()
|
|
@@ -19124,7 +19159,7 @@ var __publicField = (obj, key, value) => {
|
|
|
19124
19159
|
}
|
|
19125
19160
|
return {
|
|
19126
19161
|
options: {
|
|
19127
|
-
...
|
|
19162
|
+
...backupOptions || {},
|
|
19128
19163
|
url: actualFallbackUrl,
|
|
19129
19164
|
_RTMdegrade: {
|
|
19130
19165
|
_originRtmUrl: url,
|
|
@@ -19132,19 +19167,19 @@ var __publicField = (obj, key, value) => {
|
|
|
19132
19167
|
_isRTMSupportCodec: RTMSupportCodec
|
|
19133
19168
|
}
|
|
19134
19169
|
},
|
|
19135
|
-
plugins:
|
|
19170
|
+
plugins: backupModule
|
|
19136
19171
|
};
|
|
19137
19172
|
}
|
|
19138
19173
|
return {
|
|
19139
19174
|
options: {
|
|
19140
|
-
...
|
|
19175
|
+
...backupOptions || {},
|
|
19141
19176
|
url: enableRTMAutoTranscode ? util.appendSearchParams(url, { enableRTMAutoTranscode: "true" }) : void 0,
|
|
19142
19177
|
_RTMdegrade: void 0,
|
|
19143
19178
|
rts: {
|
|
19144
19179
|
retryCount: 0,
|
|
19145
19180
|
...ret,
|
|
19146
19181
|
backupURL: actualFallbackUrl,
|
|
19147
|
-
backupConstruct:
|
|
19182
|
+
backupConstruct: backupModule
|
|
19148
19183
|
}
|
|
19149
19184
|
},
|
|
19150
19185
|
plugins: rtmCdn ? [rtmCdn] : []
|
|
@@ -21998,10 +22033,10 @@ var __publicField = (obj, key, value) => {
|
|
|
21998
22033
|
user_id: this._userId,
|
|
21999
22034
|
device_id: this._deviceId,
|
|
22000
22035
|
ext: {
|
|
22001
|
-
veplayer_version: "2.4.0",
|
|
22002
|
-
flv_version: "3.0.19-rc.
|
|
22036
|
+
veplayer_version: "2.4.1-rc.0",
|
|
22037
|
+
flv_version: "3.0.19-rc.10",
|
|
22003
22038
|
hls_version: "3.0.19-rc.0",
|
|
22004
|
-
rts_version: "0.2.1-alpha.
|
|
22039
|
+
rts_version: "0.2.1-alpha.1"
|
|
22005
22040
|
}
|
|
22006
22041
|
});
|
|
22007
22042
|
}
|
|
@@ -22295,29 +22330,6 @@ var __publicField = (obj, key, value) => {
|
|
|
22295
22330
|
}
|
|
22296
22331
|
return {};
|
|
22297
22332
|
};
|
|
22298
|
-
const getAbrStrategy = async (options) => {
|
|
22299
|
-
var _a, _b;
|
|
22300
|
-
const streamType = options.url && getStreamType(options.url);
|
|
22301
|
-
if (streamType === "rtm") {
|
|
22302
|
-
return {};
|
|
22303
|
-
}
|
|
22304
|
-
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;
|
|
22305
|
-
if (!abrOptions) {
|
|
22306
|
-
return {};
|
|
22307
|
-
}
|
|
22308
|
-
const abrPlugin = await load(DynamicModule.PluginAbr).catch(() => void 0);
|
|
22309
|
-
return {
|
|
22310
|
-
options: {
|
|
22311
|
-
[streamType === "flv" ? "abr" : "hlsabr"]: {
|
|
22312
|
-
...abrOptions,
|
|
22313
|
-
open: abrOptions.enable ?? true
|
|
22314
|
-
}
|
|
22315
|
-
},
|
|
22316
|
-
plugins: [
|
|
22317
|
-
streamType === "flv" ? abrPlugin == null ? void 0 : abrPlugin.AbrPlugin : abrPlugin == null ? void 0 : abrPlugin.HlsAbrPlugin
|
|
22318
|
-
]
|
|
22319
|
-
};
|
|
22320
|
-
};
|
|
22321
22333
|
VeI18n.extend([
|
|
22322
22334
|
{
|
|
22323
22335
|
LANG: "zh-cn",
|