@byteplus/veplayer 2.3.1-rc.0 → 2.3.1-rc.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/esm/index.d.ts +6 -1
- package/esm/veplayer.biz.live.development.js +1 -7
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +13 -1
- package/esm/veplayer.development.js +27 -36
- package/esm/veplayer.live.d.ts +13 -1
- package/esm/veplayer.live.development.js +27 -36
- package/esm/veplayer.live.production.js +2 -2
- package/esm/veplayer.production.js +2 -2
- package/esm/veplayer.vod.d.ts +6 -1
- package/esm/veplayer.vod.development.js +2 -4
- package/esm/veplayer.vod.production.js +1 -1
- package/package.json +1 -1
- package/umd/index.d.ts +6 -1
- package/umd/veplayer.biz.live.development.js +1 -7
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +13 -1
- package/umd/veplayer.development.js +27 -36
- package/umd/veplayer.live.d.ts +13 -1
- package/umd/veplayer.live.development.js +27 -36
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +6 -1
- package/umd/veplayer.vod.development.js +2 -4
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +13 -1
- package/veplayer.live.d.ts +13 -1
- package/veplayer.vod.d.ts +6 -1
package/esm/veplayer.d.ts
CHANGED
|
@@ -2332,6 +2332,7 @@ declare enum DynamicModule {
|
|
|
2332
2332
|
PluginFlv = "plugin:flv",
|
|
2333
2333
|
PluginMp4 = "plugin:mp4",
|
|
2334
2334
|
PluginHls = "plugin:hls",
|
|
2335
|
+
PluginHlsJs = "plugin:hlsjs",
|
|
2335
2336
|
PluginShaka = "plugin:shaka",
|
|
2336
2337
|
PluginRtm = "plugin:rtm",
|
|
2337
2338
|
PluginXgvideo = "plugin:xgvideo",
|
|
@@ -2343,6 +2344,7 @@ type ModulesMap = {
|
|
|
2343
2344
|
[DynamicModule.PluginFlv]: Exports;
|
|
2344
2345
|
[DynamicModule.PluginMp4]: Exports;
|
|
2345
2346
|
[DynamicModule.PluginHls]: Exports;
|
|
2347
|
+
[DynamicModule.PluginHlsJs]: Exports;
|
|
2346
2348
|
[DynamicModule.PluginShaka]: Exports;
|
|
2347
2349
|
[DynamicModule.PluginRtm]: Exports;
|
|
2348
2350
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
@@ -4067,6 +4069,7 @@ declare namespace strategy {
|
|
|
4067
4069
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
4068
4070
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
4069
4071
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
4072
|
+
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
4070
4073
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
4071
4074
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
4072
4075
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
@@ -4097,6 +4100,7 @@ declare namespace strategy {
|
|
|
4097
4100
|
PluginFlv = "plugin:flv",
|
|
4098
4101
|
PluginMp4 = "plugin:mp4",
|
|
4099
4102
|
PluginHls = "plugin:hls",
|
|
4103
|
+
PluginHlsJs = "plugin:hlsjs",
|
|
4100
4104
|
PluginShaka = "plugin:shaka",
|
|
4101
4105
|
PluginRtm = "plugin:rtm",
|
|
4102
4106
|
PluginXgvideo = "plugin:xgvideo",
|
|
@@ -4108,6 +4112,7 @@ declare namespace strategy {
|
|
|
4108
4112
|
[DynamicModule.PluginFlv]: Exports;
|
|
4109
4113
|
[DynamicModule.PluginMp4]: Exports;
|
|
4110
4114
|
[DynamicModule.PluginHls]: Exports;
|
|
4115
|
+
[DynamicModule.PluginHlsJs]: Exports;
|
|
4111
4116
|
[DynamicModule.PluginShaka]: Exports;
|
|
4112
4117
|
[DynamicModule.PluginRtm]: Exports;
|
|
4113
4118
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
@@ -4149,7 +4154,7 @@ declare namespace strategy {
|
|
|
4149
4154
|
}
|
|
4150
4155
|
type StrategyCreator<T, R extends keyof ModulesMap = any> = (options?: T) => Strategy<T, R>;
|
|
4151
4156
|
const createFlvMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4152
|
-
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls>;
|
|
4157
|
+
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls | DynamicModule.PluginHlsJs>;
|
|
4153
4158
|
const createSoftDecodeH264Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4154
4159
|
const createSoftDecodeH265Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4155
4160
|
function getCodec(options: VePlayerBaseOptions): Promise<"unknown" | Codec>;
|
|
@@ -5579,6 +5584,8 @@ interface Hls {
|
|
|
5579
5584
|
* @default false
|
|
5580
5585
|
*/
|
|
5581
5586
|
enableMSE?: boolean;
|
|
5587
|
+
enableHlsJs?: boolean;
|
|
5588
|
+
hlsOpts?: any;
|
|
5582
5589
|
}
|
|
5583
5590
|
/** {zh}
|
|
5584
5591
|
* @detail api
|
|
@@ -8942,6 +8949,7 @@ declare namespace live {
|
|
|
8942
8949
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
8943
8950
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
8944
8951
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
8952
|
+
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
8945
8953
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
8946
8954
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8947
8955
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
@@ -8972,6 +8980,7 @@ declare namespace live {
|
|
|
8972
8980
|
PluginFlv = "plugin:flv",
|
|
8973
8981
|
PluginMp4 = "plugin:mp4",
|
|
8974
8982
|
PluginHls = "plugin:hls",
|
|
8983
|
+
PluginHlsJs = "plugin:hlsjs",
|
|
8975
8984
|
PluginShaka = "plugin:shaka",
|
|
8976
8985
|
PluginRtm = "plugin:rtm",
|
|
8977
8986
|
PluginXgvideo = "plugin:xgvideo",
|
|
@@ -8983,6 +8992,7 @@ declare namespace live {
|
|
|
8983
8992
|
[DynamicModule.PluginFlv]: Exports;
|
|
8984
8993
|
[DynamicModule.PluginMp4]: Exports;
|
|
8985
8994
|
[DynamicModule.PluginHls]: Exports;
|
|
8995
|
+
[DynamicModule.PluginHlsJs]: Exports;
|
|
8986
8996
|
[DynamicModule.PluginShaka]: Exports;
|
|
8987
8997
|
[DynamicModule.PluginRtm]: Exports;
|
|
8988
8998
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
@@ -10062,6 +10072,8 @@ declare namespace live {
|
|
|
10062
10072
|
* @default false
|
|
10063
10073
|
*/
|
|
10064
10074
|
enableMSE?: boolean;
|
|
10075
|
+
enableHlsJs?: boolean;
|
|
10076
|
+
hlsOpts?: any;
|
|
10065
10077
|
}
|
|
10066
10078
|
/** {zh}
|
|
10067
10079
|
* @detail api
|
|
@@ -12474,6 +12474,7 @@ const NAME_MAP = {
|
|
|
12474
12474
|
"plugin:flv": "veplayer.plugin.flv.[env].[ext]",
|
|
12475
12475
|
"plugin:mp4": "veplayer.plugin.mp4.[env].[ext]",
|
|
12476
12476
|
"plugin:hls": "veplayer.plugin.hls.[env].[ext]",
|
|
12477
|
+
"plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]",
|
|
12477
12478
|
"plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
|
|
12478
12479
|
"plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
|
|
12479
12480
|
"plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
|
|
@@ -12485,6 +12486,7 @@ var DynamicModule = /* @__PURE__ */ ((DynamicModule2) => {
|
|
|
12485
12486
|
DynamicModule2["PluginFlv"] = "plugin:flv";
|
|
12486
12487
|
DynamicModule2["PluginMp4"] = "plugin:mp4";
|
|
12487
12488
|
DynamicModule2["PluginHls"] = "plugin:hls";
|
|
12489
|
+
DynamicModule2["PluginHlsJs"] = "plugin:hlsjs";
|
|
12488
12490
|
DynamicModule2["PluginShaka"] = "plugin:shaka";
|
|
12489
12491
|
DynamicModule2["PluginRtm"] = "plugin:rtm";
|
|
12490
12492
|
DynamicModule2["PluginXgvideo"] = "plugin:xgvideo";
|
|
@@ -13432,10 +13434,6 @@ class VePlayerBase {
|
|
|
13432
13434
|
plugins.forEach((plugin) => {
|
|
13433
13435
|
TopRightBar.isTopRightPlugin(plugin, options) ? topRightPlugins.push(plugin) : normalPlugins.push(plugin);
|
|
13434
13436
|
});
|
|
13435
|
-
window._veplayer_test_log["startxgplayer"] = {
|
|
13436
|
-
msg: "start to new XGPlayer",
|
|
13437
|
-
timestamp: performance.now()
|
|
13438
|
-
};
|
|
13439
13437
|
this._player = new Player({
|
|
13440
13438
|
...DEFAULT_OPTIONS,
|
|
13441
13439
|
...xgOptions,
|
|
@@ -18729,25 +18727,10 @@ const getFlvStrategy = async (options) => {
|
|
|
18729
18727
|
if (!mseStrategy && !softStrategy) {
|
|
18730
18728
|
return {};
|
|
18731
18729
|
}
|
|
18732
|
-
window._veplayer_test_log["beforefetch"] = {
|
|
18733
|
-
msg: "start to load cdn",
|
|
18734
|
-
timestamp: performance.now()
|
|
18735
|
-
};
|
|
18736
18730
|
const [mseModule, softModule] = await Promise.all([
|
|
18737
18731
|
(mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
|
|
18738
18732
|
(softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
|
|
18739
18733
|
]);
|
|
18740
|
-
if (mseModule) {
|
|
18741
|
-
window._veplayer_test_log["fetched"] = {
|
|
18742
|
-
msg: "cdn loaded",
|
|
18743
|
-
timestamp: performance.now()
|
|
18744
|
-
};
|
|
18745
|
-
} else {
|
|
18746
|
-
window._veplayer_test_log["fetched"] = {
|
|
18747
|
-
msg: "cdn loaded but empty",
|
|
18748
|
-
timestamp: performance.now()
|
|
18749
|
-
};
|
|
18750
|
-
}
|
|
18751
18734
|
(softModule == null ? void 0 : softModule.XGVideoPlugin) && ((_c = softStrategy == null ? void 0 : softStrategy.afterLoad) == null ? void 0 : _c.call(softStrategy, softModule == null ? void 0 : softModule.XGVideoPlugin));
|
|
18752
18735
|
const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
|
|
18753
18736
|
const plugins = [];
|
|
@@ -18805,16 +18788,30 @@ const createFlvMseStrategy = (options) => {
|
|
|
18805
18788
|
module: DynamicModule.PluginFlv
|
|
18806
18789
|
};
|
|
18807
18790
|
};
|
|
18808
|
-
const createHlsMseStrategy = (options) =>
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18817
|
-
|
|
18791
|
+
const createHlsMseStrategy = (options) => {
|
|
18792
|
+
var _a;
|
|
18793
|
+
if (options == null ? void 0 : options.hls.enableHlsJs) {
|
|
18794
|
+
return {
|
|
18795
|
+
options: {
|
|
18796
|
+
hlsJsPlugin: {
|
|
18797
|
+
hlsOpts: (_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.hlsOpts
|
|
18798
|
+
}
|
|
18799
|
+
},
|
|
18800
|
+
module: DynamicModule.PluginHlsJs
|
|
18801
|
+
};
|
|
18802
|
+
} else {
|
|
18803
|
+
return {
|
|
18804
|
+
options: {
|
|
18805
|
+
hls: {
|
|
18806
|
+
retryCount: 0,
|
|
18807
|
+
pollRetryCount: 0,
|
|
18808
|
+
...(options == null ? void 0 : options.hls) ?? {}
|
|
18809
|
+
}
|
|
18810
|
+
},
|
|
18811
|
+
module: DynamicModule.PluginHls
|
|
18812
|
+
};
|
|
18813
|
+
}
|
|
18814
|
+
};
|
|
18818
18815
|
const createSoftDecodeH264Strategy = () => ({
|
|
18819
18816
|
options: {
|
|
18820
18817
|
mediaType: "xg-video",
|
|
@@ -21808,7 +21805,7 @@ class Logger extends Plugin {
|
|
|
21808
21805
|
user_id: this._userId,
|
|
21809
21806
|
device_id: this._deviceId,
|
|
21810
21807
|
ext: {
|
|
21811
|
-
veplayer_version: "2.3.1-rc.
|
|
21808
|
+
veplayer_version: "2.3.1-rc.2",
|
|
21812
21809
|
flv_version: "3.0.15-alpha.2",
|
|
21813
21810
|
hls_version: "3.0.12",
|
|
21814
21811
|
rts_version: "0.2.0-alpha.5"
|
|
@@ -22189,12 +22186,6 @@ class VePlayerLive extends VePlayerBase {
|
|
|
22189
22186
|
async function createLivePlayer(options) {
|
|
22190
22187
|
var _a, _b;
|
|
22191
22188
|
let player = void 0;
|
|
22192
|
-
window._veplayer_test_log = {
|
|
22193
|
-
start: {
|
|
22194
|
-
msg: "start to create veplayer",
|
|
22195
|
-
timestamp: performance.now()
|
|
22196
|
-
}
|
|
22197
|
-
};
|
|
22198
22189
|
if (!options || !options.url && !options.playlist) {
|
|
22199
22190
|
throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
|
|
22200
22191
|
}
|
package/esm/veplayer.live.d.ts
CHANGED
|
@@ -2332,6 +2332,7 @@ declare enum DynamicModule {
|
|
|
2332
2332
|
PluginFlv = "plugin:flv",
|
|
2333
2333
|
PluginMp4 = "plugin:mp4",
|
|
2334
2334
|
PluginHls = "plugin:hls",
|
|
2335
|
+
PluginHlsJs = "plugin:hlsjs",
|
|
2335
2336
|
PluginShaka = "plugin:shaka",
|
|
2336
2337
|
PluginRtm = "plugin:rtm",
|
|
2337
2338
|
PluginXgvideo = "plugin:xgvideo",
|
|
@@ -2343,6 +2344,7 @@ type ModulesMap = {
|
|
|
2343
2344
|
[DynamicModule.PluginFlv]: Exports;
|
|
2344
2345
|
[DynamicModule.PluginMp4]: Exports;
|
|
2345
2346
|
[DynamicModule.PluginHls]: Exports;
|
|
2347
|
+
[DynamicModule.PluginHlsJs]: Exports;
|
|
2346
2348
|
[DynamicModule.PluginShaka]: Exports;
|
|
2347
2349
|
[DynamicModule.PluginRtm]: Exports;
|
|
2348
2350
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
@@ -4067,6 +4069,7 @@ declare namespace strategy {
|
|
|
4067
4069
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
4068
4070
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
4069
4071
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
4072
|
+
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
4070
4073
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
4071
4074
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
4072
4075
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
@@ -4097,6 +4100,7 @@ declare namespace strategy {
|
|
|
4097
4100
|
PluginFlv = "plugin:flv",
|
|
4098
4101
|
PluginMp4 = "plugin:mp4",
|
|
4099
4102
|
PluginHls = "plugin:hls",
|
|
4103
|
+
PluginHlsJs = "plugin:hlsjs",
|
|
4100
4104
|
PluginShaka = "plugin:shaka",
|
|
4101
4105
|
PluginRtm = "plugin:rtm",
|
|
4102
4106
|
PluginXgvideo = "plugin:xgvideo",
|
|
@@ -4108,6 +4112,7 @@ declare namespace strategy {
|
|
|
4108
4112
|
[DynamicModule.PluginFlv]: Exports;
|
|
4109
4113
|
[DynamicModule.PluginMp4]: Exports;
|
|
4110
4114
|
[DynamicModule.PluginHls]: Exports;
|
|
4115
|
+
[DynamicModule.PluginHlsJs]: Exports;
|
|
4111
4116
|
[DynamicModule.PluginShaka]: Exports;
|
|
4112
4117
|
[DynamicModule.PluginRtm]: Exports;
|
|
4113
4118
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
@@ -4149,7 +4154,7 @@ declare namespace strategy {
|
|
|
4149
4154
|
}
|
|
4150
4155
|
type StrategyCreator<T, R extends keyof ModulesMap = any> = (options?: T) => Strategy<T, R>;
|
|
4151
4156
|
const createFlvMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4152
|
-
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls>;
|
|
4157
|
+
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls | DynamicModule.PluginHlsJs>;
|
|
4153
4158
|
const createSoftDecodeH264Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4154
4159
|
const createSoftDecodeH265Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4155
4160
|
function getCodec(options: VePlayerBaseOptions): Promise<"unknown" | Codec>;
|
|
@@ -5579,6 +5584,8 @@ interface Hls {
|
|
|
5579
5584
|
* @default false
|
|
5580
5585
|
*/
|
|
5581
5586
|
enableMSE?: boolean;
|
|
5587
|
+
enableHlsJs?: boolean;
|
|
5588
|
+
hlsOpts?: any;
|
|
5582
5589
|
}
|
|
5583
5590
|
/** {zh}
|
|
5584
5591
|
* @detail api
|
|
@@ -8942,6 +8949,7 @@ declare namespace live {
|
|
|
8942
8949
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
8943
8950
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
8944
8951
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
8952
|
+
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
8945
8953
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
8946
8954
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8947
8955
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
@@ -8972,6 +8980,7 @@ declare namespace live {
|
|
|
8972
8980
|
PluginFlv = "plugin:flv",
|
|
8973
8981
|
PluginMp4 = "plugin:mp4",
|
|
8974
8982
|
PluginHls = "plugin:hls",
|
|
8983
|
+
PluginHlsJs = "plugin:hlsjs",
|
|
8975
8984
|
PluginShaka = "plugin:shaka",
|
|
8976
8985
|
PluginRtm = "plugin:rtm",
|
|
8977
8986
|
PluginXgvideo = "plugin:xgvideo",
|
|
@@ -8983,6 +8992,7 @@ declare namespace live {
|
|
|
8983
8992
|
[DynamicModule.PluginFlv]: Exports;
|
|
8984
8993
|
[DynamicModule.PluginMp4]: Exports;
|
|
8985
8994
|
[DynamicModule.PluginHls]: Exports;
|
|
8995
|
+
[DynamicModule.PluginHlsJs]: Exports;
|
|
8986
8996
|
[DynamicModule.PluginShaka]: Exports;
|
|
8987
8997
|
[DynamicModule.PluginRtm]: Exports;
|
|
8988
8998
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
@@ -10062,6 +10072,8 @@ declare namespace live {
|
|
|
10062
10072
|
* @default false
|
|
10063
10073
|
*/
|
|
10064
10074
|
enableMSE?: boolean;
|
|
10075
|
+
enableHlsJs?: boolean;
|
|
10076
|
+
hlsOpts?: any;
|
|
10065
10077
|
}
|
|
10066
10078
|
/** {zh}
|
|
10067
10079
|
* @detail api
|
|
@@ -12474,6 +12474,7 @@ const NAME_MAP = {
|
|
|
12474
12474
|
"plugin:flv": "veplayer.plugin.flv.[env].[ext]",
|
|
12475
12475
|
"plugin:mp4": "veplayer.plugin.mp4.[env].[ext]",
|
|
12476
12476
|
"plugin:hls": "veplayer.plugin.hls.[env].[ext]",
|
|
12477
|
+
"plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]",
|
|
12477
12478
|
"plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
|
|
12478
12479
|
"plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
|
|
12479
12480
|
"plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
|
|
@@ -12485,6 +12486,7 @@ var DynamicModule = /* @__PURE__ */ ((DynamicModule2) => {
|
|
|
12485
12486
|
DynamicModule2["PluginFlv"] = "plugin:flv";
|
|
12486
12487
|
DynamicModule2["PluginMp4"] = "plugin:mp4";
|
|
12487
12488
|
DynamicModule2["PluginHls"] = "plugin:hls";
|
|
12489
|
+
DynamicModule2["PluginHlsJs"] = "plugin:hlsjs";
|
|
12488
12490
|
DynamicModule2["PluginShaka"] = "plugin:shaka";
|
|
12489
12491
|
DynamicModule2["PluginRtm"] = "plugin:rtm";
|
|
12490
12492
|
DynamicModule2["PluginXgvideo"] = "plugin:xgvideo";
|
|
@@ -13432,10 +13434,6 @@ class VePlayerBase {
|
|
|
13432
13434
|
plugins.forEach((plugin) => {
|
|
13433
13435
|
TopRightBar.isTopRightPlugin(plugin, options) ? topRightPlugins.push(plugin) : normalPlugins.push(plugin);
|
|
13434
13436
|
});
|
|
13435
|
-
window._veplayer_test_log["startxgplayer"] = {
|
|
13436
|
-
msg: "start to new XGPlayer",
|
|
13437
|
-
timestamp: performance.now()
|
|
13438
|
-
};
|
|
13439
13437
|
this._player = new Player({
|
|
13440
13438
|
...DEFAULT_OPTIONS,
|
|
13441
13439
|
...xgOptions,
|
|
@@ -18729,25 +18727,10 @@ const getFlvStrategy = async (options) => {
|
|
|
18729
18727
|
if (!mseStrategy && !softStrategy) {
|
|
18730
18728
|
return {};
|
|
18731
18729
|
}
|
|
18732
|
-
window._veplayer_test_log["beforefetch"] = {
|
|
18733
|
-
msg: "start to load cdn",
|
|
18734
|
-
timestamp: performance.now()
|
|
18735
|
-
};
|
|
18736
18730
|
const [mseModule, softModule] = await Promise.all([
|
|
18737
18731
|
(mseStrategy == null ? void 0 : mseStrategy.module) && load(mseStrategy.module).catch(() => void 0),
|
|
18738
18732
|
(softStrategy == null ? void 0 : softStrategy.module) && load(softStrategy.module).catch(() => void 0)
|
|
18739
18733
|
]);
|
|
18740
|
-
if (mseModule) {
|
|
18741
|
-
window._veplayer_test_log["fetched"] = {
|
|
18742
|
-
msg: "cdn loaded",
|
|
18743
|
-
timestamp: performance.now()
|
|
18744
|
-
};
|
|
18745
|
-
} else {
|
|
18746
|
-
window._veplayer_test_log["fetched"] = {
|
|
18747
|
-
msg: "cdn loaded but empty",
|
|
18748
|
-
timestamp: performance.now()
|
|
18749
|
-
};
|
|
18750
|
-
}
|
|
18751
18734
|
(softModule == null ? void 0 : softModule.XGVideoPlugin) && ((_c = softStrategy == null ? void 0 : softStrategy.afterLoad) == null ? void 0 : _c.call(softStrategy, softModule == null ? void 0 : softModule.XGVideoPlugin));
|
|
18752
18735
|
const combineOptions$1 = combineOptions([mseStrategy, softStrategy]);
|
|
18753
18736
|
const plugins = [];
|
|
@@ -18805,16 +18788,30 @@ const createFlvMseStrategy = (options) => {
|
|
|
18805
18788
|
module: DynamicModule.PluginFlv
|
|
18806
18789
|
};
|
|
18807
18790
|
};
|
|
18808
|
-
const createHlsMseStrategy = (options) =>
|
|
18809
|
-
|
|
18810
|
-
|
|
18811
|
-
|
|
18812
|
-
|
|
18813
|
-
|
|
18814
|
-
|
|
18815
|
-
|
|
18816
|
-
|
|
18817
|
-
|
|
18791
|
+
const createHlsMseStrategy = (options) => {
|
|
18792
|
+
var _a;
|
|
18793
|
+
if (options == null ? void 0 : options.hls.enableHlsJs) {
|
|
18794
|
+
return {
|
|
18795
|
+
options: {
|
|
18796
|
+
hlsJsPlugin: {
|
|
18797
|
+
hlsOpts: (_a = options == null ? void 0 : options.hls) == null ? void 0 : _a.hlsOpts
|
|
18798
|
+
}
|
|
18799
|
+
},
|
|
18800
|
+
module: DynamicModule.PluginHlsJs
|
|
18801
|
+
};
|
|
18802
|
+
} else {
|
|
18803
|
+
return {
|
|
18804
|
+
options: {
|
|
18805
|
+
hls: {
|
|
18806
|
+
retryCount: 0,
|
|
18807
|
+
pollRetryCount: 0,
|
|
18808
|
+
...(options == null ? void 0 : options.hls) ?? {}
|
|
18809
|
+
}
|
|
18810
|
+
},
|
|
18811
|
+
module: DynamicModule.PluginHls
|
|
18812
|
+
};
|
|
18813
|
+
}
|
|
18814
|
+
};
|
|
18818
18815
|
const createSoftDecodeH264Strategy = () => ({
|
|
18819
18816
|
options: {
|
|
18820
18817
|
mediaType: "xg-video",
|
|
@@ -21808,7 +21805,7 @@ class Logger extends Plugin {
|
|
|
21808
21805
|
user_id: this._userId,
|
|
21809
21806
|
device_id: this._deviceId,
|
|
21810
21807
|
ext: {
|
|
21811
|
-
veplayer_version: "2.3.1-rc.
|
|
21808
|
+
veplayer_version: "2.3.1-rc.2",
|
|
21812
21809
|
flv_version: "3.0.15-alpha.2",
|
|
21813
21810
|
hls_version: "3.0.12",
|
|
21814
21811
|
rts_version: "0.2.0-alpha.5"
|
|
@@ -22189,12 +22186,6 @@ class VePlayerLive extends VePlayerBase {
|
|
|
22189
22186
|
async function createLivePlayer(options) {
|
|
22190
22187
|
var _a, _b;
|
|
22191
22188
|
let player = void 0;
|
|
22192
|
-
window._veplayer_test_log = {
|
|
22193
|
-
start: {
|
|
22194
|
-
msg: "start to create veplayer",
|
|
22195
|
-
timestamp: performance.now()
|
|
22196
|
-
}
|
|
22197
|
-
};
|
|
22198
22189
|
if (!options || !options.url && !options.playlist) {
|
|
22199
22190
|
throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
|
|
22200
22191
|
}
|