@volcengine/veplayer-plugin 2.5.0 → 2.5.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/index.development.js +34 -17
- package/esm/index.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +7 -3
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +11 -5
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +1 -1
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +18 -11
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.plugin.flv.development.js +7 -3
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +11 -5
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +1 -1
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +18 -11
- package/umd/veplayer.plugin.rtm.production.js +1 -1
package/esm/index.development.js
CHANGED
|
@@ -1695,7 +1695,7 @@ var sniffer = {
|
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
|
-
var version$3 = "3.0.21-rc.
|
|
1698
|
+
var version$3 = "3.0.21-rc.5";
|
|
1699
1699
|
var ERROR_MAP = {
|
|
1700
1700
|
1: 5101,
|
|
1701
1701
|
2: 5102,
|
|
@@ -7832,10 +7832,14 @@ var FlvDemuxer = /* @__PURE__ */ function() {
|
|
|
7832
7832
|
key: "_parseG711",
|
|
7833
7833
|
value: function _parseG711(data2, pts, format2) {
|
|
7834
7834
|
var track = this.audioTrack;
|
|
7835
|
+
var audioData = data2.subarray(1);
|
|
7836
|
+
if (audioData.byteLength < 1)
|
|
7837
|
+
return;
|
|
7838
|
+
var sample = new AudioSample$2(pts, audioData);
|
|
7835
7839
|
track.codecType = format2 === 7 ? AudioCodecType$2.G711PCMA : AudioCodecType$2.G711PCMU;
|
|
7836
7840
|
track.sampleRate = 8e3;
|
|
7837
7841
|
track.codec = track.codecType;
|
|
7838
|
-
track.samples.push(
|
|
7842
|
+
track.samples.push(sample);
|
|
7839
7843
|
}
|
|
7840
7844
|
}, {
|
|
7841
7845
|
key: "_parseAac",
|
|
@@ -12800,7 +12804,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
12800
12804
|
_createClass$j(Flv2, [{
|
|
12801
12805
|
key: "version",
|
|
12802
12806
|
get: function get3() {
|
|
12803
|
-
return "3.0.21-rc.
|
|
12807
|
+
return "3.0.21-rc.5";
|
|
12804
12808
|
}
|
|
12805
12809
|
}, {
|
|
12806
12810
|
key: "isLive",
|
|
@@ -30709,7 +30713,8 @@ function getOption(opts) {
|
|
|
30709
30713
|
stallInterval: 400,
|
|
30710
30714
|
networkEvaluateInterval: 1e3,
|
|
30711
30715
|
delayHint: 0,
|
|
30712
|
-
seamlesslyReload: false
|
|
30716
|
+
seamlesslyReload: false,
|
|
30717
|
+
enableOriginSdpLogger: false
|
|
30713
30718
|
}, opts);
|
|
30714
30719
|
}
|
|
30715
30720
|
function _getStats(stats) {
|
|
@@ -31198,7 +31203,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
31198
31203
|
key: "_connect",
|
|
31199
31204
|
value: function() {
|
|
31200
31205
|
var _connect2 = _asyncToGenerator$8(/* @__PURE__ */ _regeneratorRuntime$8().mark(function _callee2() {
|
|
31201
|
-
var pc, offer, delayHint, parsed, finnalUrl, _answer$remoteSdp, _answer$remoteSdp2, parseSession, sessionId, reqStart, res, answer, err, _parsed;
|
|
31206
|
+
var pc, offer, delayHint, parsed, finnalUrl, _this$_opts, _answer$remoteSdp, _this$_opts2, _answer$remoteSdp2, _parsed$media, parseSession, sessionId, reqStart, res, answer, err, _parsed;
|
|
31202
31207
|
return _regeneratorRuntime$8().wrap(function _callee2$(_context2) {
|
|
31203
31208
|
while (1)
|
|
31204
31209
|
switch (_context2.prev = _context2.next) {
|
|
@@ -31274,7 +31279,7 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
31274
31279
|
sessionId = parseSession ? parseSession[1] : Date.now() + "666";
|
|
31275
31280
|
this.emit(EVENT$2.LOAD_START, {
|
|
31276
31281
|
url: finnalUrl,
|
|
31277
|
-
offersdp: offer.sdp,
|
|
31282
|
+
offersdp: (_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.enableOriginSdpLogger ? offer.sdp : void 0,
|
|
31278
31283
|
sessionId
|
|
31279
31284
|
});
|
|
31280
31285
|
reqStart = Date.now();
|
|
@@ -31309,12 +31314,19 @@ var Rts = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
31309
31314
|
case 42:
|
|
31310
31315
|
logger$6.log("answer:");
|
|
31311
31316
|
logger$6.log((_answer$remoteSdp = answer.remoteSdp) === null || _answer$remoteSdp === void 0 ? void 0 : _answer$remoteSdp.sdp);
|
|
31317
|
+
_parsed = lib$1.parse(answer.remoteSdp.sdp);
|
|
31312
31318
|
this.emit(EVENT$2.LOAD_COMPLETE, {
|
|
31313
31319
|
url: finnalUrl,
|
|
31314
31320
|
elapsed: Date.now() - reqStart,
|
|
31315
|
-
answersdp: (_answer$remoteSdp2 = answer.remoteSdp) === null || _answer$remoteSdp2 === void 0 ? void 0 : _answer$remoteSdp2.sdp
|
|
31321
|
+
answersdp: (_this$_opts2 = this._opts) !== null && _this$_opts2 !== void 0 && _this$_opts2.enableOriginSdpLogger ? answer === null || answer === void 0 ? void 0 : (_answer$remoteSdp2 = answer.remoteSdp) === null || _answer$remoteSdp2 === void 0 ? void 0 : _answer$remoteSdp2.sdp : void 0,
|
|
31322
|
+
parsedSdp: _parsed === null || _parsed === void 0 ? void 0 : (_parsed$media = _parsed.media) === null || _parsed$media === void 0 ? void 0 : _parsed$media.map(function(media) {
|
|
31323
|
+
return {
|
|
31324
|
+
candidates: media.candidates,
|
|
31325
|
+
rtp: media.rtp,
|
|
31326
|
+
type: media.type
|
|
31327
|
+
};
|
|
31328
|
+
})
|
|
31316
31329
|
});
|
|
31317
|
-
_parsed = lib$1.parse(answer.remoteSdp.sdp);
|
|
31318
31330
|
_parsed.media.forEach(function(x2) {
|
|
31319
31331
|
x2.fingerprint.hash = x2.fingerprint.hash.toUpperCase();
|
|
31320
31332
|
});
|
|
@@ -31519,6 +31531,7 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
31519
31531
|
_this.player.switchURL = _this._originSwitchFn;
|
|
31520
31532
|
_this._clearDisconnectTimer();
|
|
31521
31533
|
(_this$_rts3 = _this._rts) === null || _this$_rts3 === void 0 ? void 0 : _this$_rts3.destroy();
|
|
31534
|
+
_this._rts = null;
|
|
31522
31535
|
});
|
|
31523
31536
|
return _this;
|
|
31524
31537
|
}
|
|
@@ -31554,20 +31567,18 @@ var RtsPlugin = /* @__PURE__ */ function(_BasePlugin) {
|
|
|
31554
31567
|
}, {
|
|
31555
31568
|
key: "version",
|
|
31556
31569
|
get: function get3() {
|
|
31557
|
-
return "0.2.1-alpha.
|
|
31570
|
+
return "0.2.1-alpha.14";
|
|
31558
31571
|
}
|
|
31559
31572
|
}, {
|
|
31560
31573
|
key: "beforePlayerInit",
|
|
31561
31574
|
value: function beforePlayerInit() {
|
|
31562
|
-
var _this$player2,
|
|
31575
|
+
var _this$player2, _this$player$config, _this$player$config$r, _this2 = this;
|
|
31563
31576
|
this._init();
|
|
31564
31577
|
if (!this._originSwitchFn) {
|
|
31565
31578
|
this._originSwitchFn = this.player.switchURL.bind(this.player);
|
|
31566
31579
|
}
|
|
31567
31580
|
this.player.switchURL = this._onSwitchURL;
|
|
31568
|
-
(_this$player2 = this.player) === null || _this$player2 === void 0 ? void 0 : _this$player2.useHooks("replay",
|
|
31569
|
-
return _this2._onSwitchURL();
|
|
31570
|
-
});
|
|
31581
|
+
(_this$player2 = this.player) === null || _this$player2 === void 0 ? void 0 : _this$player2.useHooks("replay", this._onSwitchURL);
|
|
31571
31582
|
this.on(URL_CHANGE, this._onSwitchURL);
|
|
31572
31583
|
this.on(DESTROY, this.destroy);
|
|
31573
31584
|
if (typeof ((_this$player$config = this.player.config) === null || _this$player$config === void 0 ? void 0 : (_this$player$config$r = _this$player$config.rts) === null || _this$player$config$r === void 0 ? void 0 : _this$player$config$r.disconnectTime) !== "undefined") {
|
|
@@ -37627,7 +37638,11 @@ var MPEG = /* @__PURE__ */ function() {
|
|
|
37627
37638
|
track.config = [];
|
|
37628
37639
|
track.channelCount = header.channelCount;
|
|
37629
37640
|
track.sampleRate = header.sampleRate;
|
|
37630
|
-
|
|
37641
|
+
if (isFirefox$1) {
|
|
37642
|
+
track.codec = "mp3";
|
|
37643
|
+
} else {
|
|
37644
|
+
track.container = "audio/mpeg";
|
|
37645
|
+
}
|
|
37631
37646
|
track.samples.push(sample);
|
|
37632
37647
|
return {
|
|
37633
37648
|
length: header.frameLength
|
|
@@ -37758,8 +37773,10 @@ var TsDemuxer = /* @__PURE__ */ function() {
|
|
|
37758
37773
|
break;
|
|
37759
37774
|
case 3:
|
|
37760
37775
|
case 4:
|
|
37761
|
-
audioTrack.pid
|
|
37762
|
-
|
|
37776
|
+
if (audioTrack.pid === -1) {
|
|
37777
|
+
audioTrack.pid = audioPid = esPid;
|
|
37778
|
+
audioTrack.codecType = AudioCodecType$1.MP3;
|
|
37779
|
+
}
|
|
37763
37780
|
break;
|
|
37764
37781
|
case 27:
|
|
37765
37782
|
if (videoPid !== -1)
|
|
@@ -45961,7 +45978,7 @@ var Hls = /* @__PURE__ */ function(_EventEmitter) {
|
|
|
45961
45978
|
}]);
|
|
45962
45979
|
return Hls2;
|
|
45963
45980
|
}(EventEmitter$1);
|
|
45964
|
-
_defineProperty$a(Hls, "version", "3.0.21-rc.
|
|
45981
|
+
_defineProperty$a(Hls, "version", "3.0.21-rc.5");
|
|
45965
45982
|
try {
|
|
45966
45983
|
if (localStorage.getItem("xgd")) {
|
|
45967
45984
|
Hls.enableLogger();
|