@volcengine/veplayer 2.10.2-rc.0 → 2.10.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 +1 -1
- package/esm/veplayer.biz.live.development.js +52 -20
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +18 -2
- package/esm/veplayer.development.js +88 -23
- package/esm/veplayer.live.d.ts +18 -2
- package/esm/veplayer.live.development.js +88 -23
- package/esm/veplayer.live.production.js +3 -5
- package/esm/veplayer.production.js +3 -5
- package/esm/veplayer.vod.d.ts +1 -1
- package/esm/veplayer.vod.development.js +37 -4
- package/esm/veplayer.vod.production.js +2 -4
- package/package.json +1 -1
- package/umd/index.d.ts +1 -1
- package/umd/veplayer.biz.live.development.js +52 -20
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +18 -2
- package/umd/veplayer.development.js +88 -23
- package/umd/veplayer.live.d.ts +18 -2
- package/umd/veplayer.live.development.js +88 -23
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +1 -1
- package/umd/veplayer.vod.development.js +37 -4
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +18 -2
- package/veplayer.live.d.ts +18 -2
- package/veplayer.vod.d.ts +1 -1
package/package.json
CHANGED
package/umd/index.d.ts
CHANGED
|
@@ -26575,10 +26575,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
26575
26575
|
device_id: deviceId,
|
|
26576
26576
|
error_report_stop: true,
|
|
26577
26577
|
ext: {
|
|
26578
|
-
veplayer_version: "2.3.
|
|
26578
|
+
veplayer_version: "2.3.0",
|
|
26579
26579
|
flv_version: "3.0.23-rc.6",
|
|
26580
26580
|
hls_version: "3.0.21-rc.21",
|
|
26581
|
-
rts_version: "0.2.1-alpha.
|
|
26581
|
+
rts_version: "0.2.1-alpha.53"
|
|
26582
26582
|
}
|
|
26583
26583
|
});
|
|
26584
26584
|
}
|
|
@@ -27859,7 +27859,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
27859
27859
|
);
|
|
27860
27860
|
}
|
|
27861
27861
|
const src = typeof document === "undefined" && typeof location === "undefined" ? require("url").pathToFileURL(__filename).href : typeof document === "undefined" ? location.href : document.currentScript && document.currentScript.src || new URL("umd/veplayer.biz.live.development.js", document.baseURI).href;
|
|
27862
|
-
const baseUrl = src
|
|
27862
|
+
const baseUrl = src.slice(0, src.lastIndexOf("/"));
|
|
27863
27863
|
const loader = new Loader({
|
|
27864
27864
|
baseUrl
|
|
27865
27865
|
});
|
|
@@ -28172,7 +28172,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
28172
28172
|
}
|
|
28173
28173
|
async canPlay() {
|
|
28174
28174
|
return {
|
|
28175
|
-
canPlay: isFLVSupported()
|
|
28175
|
+
canPlay: isFLVSupported(),
|
|
28176
|
+
extraInfo: {
|
|
28177
|
+
isFLVSupported: isFLVSupported()
|
|
28178
|
+
}
|
|
28176
28179
|
};
|
|
28177
28180
|
}
|
|
28178
28181
|
shouldFallbackWhenStall() {
|
|
@@ -28656,7 +28659,11 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
28656
28659
|
isRTMSupportCodec()
|
|
28657
28660
|
]);
|
|
28658
28661
|
return {
|
|
28659
|
-
canPlay: isSupported && isSupportCodec
|
|
28662
|
+
canPlay: isSupported && isSupportCodec,
|
|
28663
|
+
extraInfo: {
|
|
28664
|
+
isRTMSupported: isSupported,
|
|
28665
|
+
isRTMSupportCodec: isSupportCodec
|
|
28666
|
+
}
|
|
28660
28667
|
};
|
|
28661
28668
|
}
|
|
28662
28669
|
shouldFallbackWhenStall() {
|
|
@@ -28712,16 +28719,20 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
28712
28719
|
this.current = this._getStartProtocol();
|
|
28713
28720
|
}
|
|
28714
28721
|
// 获取最终返回的播放类型和参数。
|
|
28715
|
-
async getProtocol() {
|
|
28722
|
+
async getProtocol(protocolCanPlayResults = {}) {
|
|
28716
28723
|
if (!this.current) {
|
|
28717
28724
|
return;
|
|
28718
28725
|
}
|
|
28719
|
-
const { canPlay } = await this.current.canPlay() ?? {};
|
|
28726
|
+
const { canPlay, extraInfo } = await this.current.canPlay() ?? {};
|
|
28727
|
+
protocolCanPlayResults[this.current.protocolType] = {
|
|
28728
|
+
canPlay,
|
|
28729
|
+
...extraInfo
|
|
28730
|
+
};
|
|
28720
28731
|
if (canPlay) {
|
|
28721
28732
|
return this.current;
|
|
28722
28733
|
}
|
|
28723
28734
|
this.next();
|
|
28724
|
-
return this.getProtocol();
|
|
28735
|
+
return this.getProtocol(protocolCanPlayResults);
|
|
28725
28736
|
}
|
|
28726
28737
|
// 降级时,将指针指到上次结束的位置
|
|
28727
28738
|
next() {
|
|
@@ -34591,6 +34602,8 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34591
34602
|
__publicField(this, "_selector");
|
|
34592
34603
|
__publicField(this, "_protocol");
|
|
34593
34604
|
__publicField(this, "_playlistMap", {});
|
|
34605
|
+
// 存储每个协议的 canPlay 检查结果
|
|
34606
|
+
__publicField(this, "_protocolCanPlayResults", {});
|
|
34594
34607
|
this._options = options;
|
|
34595
34608
|
this._init({
|
|
34596
34609
|
url: options.url,
|
|
@@ -34603,6 +34616,10 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34603
34616
|
get protocol() {
|
|
34604
34617
|
return this._protocol;
|
|
34605
34618
|
}
|
|
34619
|
+
// 获取协议选择过程中每个协议的 canPlay 检查结果
|
|
34620
|
+
get protocolCanPlayResults() {
|
|
34621
|
+
return this._protocolCanPlayResults;
|
|
34622
|
+
}
|
|
34606
34623
|
get queue() {
|
|
34607
34624
|
var _a;
|
|
34608
34625
|
return (_a = this._selector) == null ? void 0 : _a._queue;
|
|
@@ -34650,8 +34667,11 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34650
34667
|
return { protocolMap, playlistMap };
|
|
34651
34668
|
}
|
|
34652
34669
|
async getProtocol() {
|
|
34670
|
+
this._protocolCanPlayResults = {};
|
|
34653
34671
|
if (this._selector) {
|
|
34654
|
-
this._protocol = await this._selector.getProtocol(
|
|
34672
|
+
this._protocol = await this._selector.getProtocol(
|
|
34673
|
+
this._protocolCanPlayResults
|
|
34674
|
+
);
|
|
34655
34675
|
}
|
|
34656
34676
|
return this._protocol;
|
|
34657
34677
|
}
|
|
@@ -34756,7 +34776,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34756
34776
|
__publicField(this, "player");
|
|
34757
34777
|
__publicField(this, "protocolManager");
|
|
34758
34778
|
__publicField(this, "beforeFallbackError", async (error2) => {
|
|
34759
|
-
var _a, _b, _c, _d, _e2, _f, _g, _h, _i2, _j, _k, _l, _m, _n2;
|
|
34779
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i2, _j, _k, _l, _m, _n2, _o;
|
|
34760
34780
|
if (!((_b = (_a = this.protocolManager) == null ? void 0 : _a.protocol) == null ? void 0 : _b.shouldFallbackWhenError({ error: error2 })) || !((_d = (_c = this.protocolManager) == null ? void 0 : _c.protocol) == null ? void 0 : _d.nextProtocol)) {
|
|
34761
34781
|
return { canEmitError: true };
|
|
34762
34782
|
}
|
|
@@ -34777,13 +34797,22 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34777
34797
|
}
|
|
34778
34798
|
});
|
|
34779
34799
|
this.fallback();
|
|
34780
|
-
|
|
34800
|
+
let canplayStr = "";
|
|
34801
|
+
try {
|
|
34802
|
+
canplayStr = JSON.stringify((_l = this.protocolManager) == null ? void 0 : _l.protocolCanPlayResults);
|
|
34803
|
+
canplayStr = `json:${canplayStr}`;
|
|
34804
|
+
} catch (e2) {
|
|
34805
|
+
console.warn("Failed to stringify protocolCanPlayResults:", e2);
|
|
34806
|
+
canplayStr = "json:{}";
|
|
34807
|
+
}
|
|
34808
|
+
(_o = teaTracker.liveLogger) == null ? void 0 : _o.sendLog({
|
|
34781
34809
|
event_key: "fallback",
|
|
34782
34810
|
playlist: this.protocolManager.playlist,
|
|
34783
34811
|
code: error2.errorCode,
|
|
34784
34812
|
message: error2.message,
|
|
34785
34813
|
// 降级的协议
|
|
34786
|
-
protocol: (
|
|
34814
|
+
protocol: (_n2 = (_m = this.protocolManager) == null ? void 0 : _m.protocol) == null ? void 0 : _n2.protocolType,
|
|
34815
|
+
canplay: canplayStr
|
|
34787
34816
|
});
|
|
34788
34817
|
return { canEmitError: false };
|
|
34789
34818
|
});
|
|
@@ -49820,9 +49849,7 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
|
|
|
49820
49849
|
logger: options.logger,
|
|
49821
49850
|
appId: ((_c = options.logger) == null ? void 0 : _c.appId) || 654925,
|
|
49822
49851
|
syncWaitSettings: false,
|
|
49823
|
-
strategies: {
|
|
49824
|
-
rtmAdaptiveBuffer: true
|
|
49825
|
-
}
|
|
49852
|
+
strategies: {}
|
|
49826
49853
|
});
|
|
49827
49854
|
if (!teaTracker.tea) {
|
|
49828
49855
|
teaTracker.init(options.logger);
|
|
@@ -49870,6 +49897,14 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
|
|
|
49870
49897
|
},
|
|
49871
49898
|
VePlayerLive
|
|
49872
49899
|
);
|
|
49900
|
+
let canplayStr = "";
|
|
49901
|
+
try {
|
|
49902
|
+
canplayStr = JSON.stringify(protocolManager.protocolCanPlayResults);
|
|
49903
|
+
canplayStr = `json:${canplayStr}`;
|
|
49904
|
+
} catch (e2) {
|
|
49905
|
+
console.warn("Failed to stringify protocolCanPlayResults:", e2);
|
|
49906
|
+
canplayStr = "json:{}";
|
|
49907
|
+
}
|
|
49873
49908
|
(_h = teaTracker.liveLogger) == null ? void 0 : _h.sendLog({
|
|
49874
49909
|
event_key: "initial_info",
|
|
49875
49910
|
// 是否开启多 Source
|
|
@@ -49880,10 +49915,7 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
|
|
|
49880
49915
|
// 初始化 protocol
|
|
49881
49916
|
protocol: (_g = protocolManager.protocol) == null ? void 0 : _g.protocolType
|
|
49882
49917
|
},
|
|
49883
|
-
|
|
49884
|
-
isRTMSupportCodec: await isRTMSupportCodec(),
|
|
49885
|
-
isRTMSupported: await isRTMSupported(),
|
|
49886
|
-
isFLVSupported: isFLVSupported()
|
|
49918
|
+
canplay: canplayStr
|
|
49887
49919
|
});
|
|
49888
49920
|
player._protocolManager = protocolManager;
|
|
49889
49921
|
fallback.initErrorFallback(player, protocolManager);
|
|
@@ -49919,7 +49951,7 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
|
|
|
49919
49951
|
}
|
|
49920
49952
|
await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
|
|
49921
49953
|
...options,
|
|
49922
|
-
playerVersion: "2.3.
|
|
49954
|
+
playerVersion: "2.3.0",
|
|
49923
49955
|
type: "LIVE"
|
|
49924
49956
|
}));
|
|
49925
49957
|
return liveVeStrategy.veStrategyManager;
|