@volcengine/veplayer-plugin 2.5.0-rc.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.d.ts +0 -1
- package/esm/index.development.css +0 -7
- package/esm/index.development.js +47274 -53342
- package/esm/index.production.css +1 -1
- package/esm/index.production.js +4 -13
- package/esm/veplayer.plugin.abr.development.js +12 -0
- package/esm/veplayer.plugin.abr.production.js +1 -1
- package/esm/veplayer.plugin.drm.development.js +12 -0
- package/esm/veplayer.plugin.drm.production.js +1 -1
- package/esm/veplayer.plugin.flv.development.js +675 -194
- package/esm/veplayer.plugin.flv.production.js +1 -1
- package/esm/veplayer.plugin.hls.development.js +1159 -369
- package/esm/veplayer.plugin.hls.production.js +1 -1
- package/esm/veplayer.plugin.mp4.development.js +13 -1
- package/esm/veplayer.plugin.mp4.production.js +1 -1
- package/esm/veplayer.plugin.rtm.development.js +167 -51
- package/esm/veplayer.plugin.rtm.production.js +1 -1
- package/esm/veplayer.plugin.shaka.development.js +12 -0
- package/esm/veplayer.plugin.shaka.production.js +1 -1
- package/package.json +1 -1
- package/umd/index.d.ts +0 -1
- package/umd/veplayer.plugin.abr.development.js +12 -0
- package/umd/veplayer.plugin.abr.production.js +1 -1
- package/umd/veplayer.plugin.drm.development.js +12 -0
- package/umd/veplayer.plugin.drm.production.js +1 -1
- package/umd/veplayer.plugin.flv.development.js +675 -194
- package/umd/veplayer.plugin.flv.production.js +1 -1
- package/umd/veplayer.plugin.hls.development.js +1126 -336
- package/umd/veplayer.plugin.hls.production.js +1 -1
- package/umd/veplayer.plugin.mp4.development.js +13 -1
- package/umd/veplayer.plugin.mp4.production.js +1 -1
- package/umd/veplayer.plugin.rtm.development.js +167 -51
- package/umd/veplayer.plugin.rtm.production.js +1 -1
- package/umd/veplayer.plugin.shaka.development.js +12 -0
- package/umd/veplayer.plugin.shaka.production.js +1 -1
- package/esm/veplayer.plugin.ad.development.css +0 -7
- package/esm/veplayer.plugin.ad.development.js +0 -9042
- package/esm/veplayer.plugin.ad.production.css +0 -1
- package/esm/veplayer.plugin.ad.production.js +0 -4
- package/umd/veplayer.plugin.ad.development.css +0 -7
- package/umd/veplayer.plugin.ad.development.js +0 -9045
- package/umd/veplayer.plugin.ad.production.css +0 -1
- package/umd/veplayer.plugin.ad.production.js +0 -1
|
@@ -1534,7 +1534,7 @@
|
|
|
1534
1534
|
}
|
|
1535
1535
|
return offsetTime;
|
|
1536
1536
|
};
|
|
1537
|
-
var version = "3.0.
|
|
1537
|
+
var version = "3.0.21-rc.5";
|
|
1538
1538
|
var ERROR_MAP = {
|
|
1539
1539
|
1: 5101,
|
|
1540
1540
|
2: 5102,
|
|
@@ -1598,6 +1598,8 @@
|
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
1600
|
);
|
|
1601
|
+
var PLAY = "play";
|
|
1602
|
+
var PAUSE = "pause";
|
|
1601
1603
|
var ERROR = "error";
|
|
1602
1604
|
var DESTROY = "destroy";
|
|
1603
1605
|
var URL_CHANGE = "urlchange";
|
|
@@ -2001,6 +2003,18 @@
|
|
|
2001
2003
|
}
|
|
2002
2004
|
}
|
|
2003
2005
|
}
|
|
2006
|
+
}, {
|
|
2007
|
+
key: "defineMethod",
|
|
2008
|
+
value: function defineMethod(Obj, map) {
|
|
2009
|
+
for (var key in map) {
|
|
2010
|
+
if (Object.prototype.hasOwnProperty.call(map, key) && typeof map[key] === "function") {
|
|
2011
|
+
Object.defineProperty(Obj, key, {
|
|
2012
|
+
configurable: true,
|
|
2013
|
+
value: map[key]
|
|
2014
|
+
});
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2004
2018
|
}, {
|
|
2005
2019
|
key: "defaultConfig",
|
|
2006
2020
|
get: function get() {
|
|
@@ -4868,7 +4882,9 @@
|
|
|
4868
4882
|
loadTimeout: 5e3,
|
|
4869
4883
|
stallInterval: 400,
|
|
4870
4884
|
networkEvaluateInterval: 1e3,
|
|
4871
|
-
delayHint: 0
|
|
4885
|
+
delayHint: 0,
|
|
4886
|
+
seamlesslyReload: false,
|
|
4887
|
+
enableOriginSdpLogger: false
|
|
4872
4888
|
}, opts);
|
|
4873
4889
|
}
|
|
4874
4890
|
function _getStats(stats) {
|
|
@@ -5131,6 +5147,7 @@
|
|
|
5131
5147
|
_defineProperty$2(_assertThisInitialized$1(_this), "_audioTransceicer", null);
|
|
5132
5148
|
_defineProperty$2(_assertThisInitialized$1(_this), "_videoTransceicer", null);
|
|
5133
5149
|
_defineProperty$2(_assertThisInitialized$1(_this), "_mediaStream", null);
|
|
5150
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_lastMediaStream", null);
|
|
5134
5151
|
_defineProperty$2(_assertThisInitialized$1(_this), "_media", null);
|
|
5135
5152
|
_defineProperty$2(_assertThisInitialized$1(_this), "_opts", null);
|
|
5136
5153
|
_defineProperty$2(_assertThisInitialized$1(_this), "_loader", null);
|
|
@@ -5138,19 +5155,10 @@
|
|
|
5138
5155
|
_defineProperty$2(_assertThisInitialized$1(_this), "_retry", 0);
|
|
5139
5156
|
_defineProperty$2(_assertThisInitialized$1(_this), "_waitingTimer", 0);
|
|
5140
5157
|
_defineProperty$2(_assertThisInitialized$1(_this), "_rctConnectStartTs", 0);
|
|
5158
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_isReplacing", false);
|
|
5141
5159
|
_defineProperty$2(_assertThisInitialized$1(_this), "_onTrack", function(e) {
|
|
5142
5160
|
logger.log("addTrack: ", e.track, e.streams);
|
|
5143
5161
|
_this["_".concat(e.track.kind)] = e.track;
|
|
5144
|
-
if (!_this._mediaStream) {
|
|
5145
|
-
_this._mediaStream = new MediaStream();
|
|
5146
|
-
_this._media.srcObject = _this._mediaStream;
|
|
5147
|
-
var req = _this._media.play();
|
|
5148
|
-
if (req && req.catch) {
|
|
5149
|
-
req.catch(function(e2) {
|
|
5150
|
-
});
|
|
5151
|
-
}
|
|
5152
|
-
}
|
|
5153
|
-
_this._mediaStream.addTrack(e.track);
|
|
5154
5162
|
});
|
|
5155
5163
|
_defineProperty$2(_assertThisInitialized$1(_this), "_mockWaitingByTimeupdate", function() {
|
|
5156
5164
|
var _this$_pc, _this$_pc2;
|
|
@@ -5198,6 +5206,9 @@
|
|
|
5198
5206
|
}));
|
|
5199
5207
|
_this._retry = _this._opts.retryCount;
|
|
5200
5208
|
_this._bindMediaEvent();
|
|
5209
|
+
if (_this._opts.mediaStream && _this._opts.seamlesslyReload) {
|
|
5210
|
+
_this._lastMediaStream = _this._opts.mediaStream;
|
|
5211
|
+
}
|
|
5201
5212
|
return _this;
|
|
5202
5213
|
}
|
|
5203
5214
|
_createClass$2(Rts2, [{
|
|
@@ -5309,6 +5320,7 @@
|
|
|
5309
5320
|
_this3.load(_this3._url);
|
|
5310
5321
|
}
|
|
5311
5322
|
if (pc.connectionState === "connected") {
|
|
5323
|
+
_this3._handleMediaStream();
|
|
5312
5324
|
_this3.emit(EVENT.TTFB, {
|
|
5313
5325
|
url: _this3._url,
|
|
5314
5326
|
responseUrl: _this3._url,
|
|
@@ -5317,6 +5329,40 @@
|
|
|
5317
5329
|
}
|
|
5318
5330
|
});
|
|
5319
5331
|
}
|
|
5332
|
+
}, {
|
|
5333
|
+
key: "_handleMediaStream",
|
|
5334
|
+
value: function _handleMediaStream() {
|
|
5335
|
+
var _this4 = this;
|
|
5336
|
+
if (this._lastMediaStream) {
|
|
5337
|
+
var _this$_media$play;
|
|
5338
|
+
var videoTrack = this._lastMediaStream.getVideoTracks()[0];
|
|
5339
|
+
var audioTrack = this._lastMediaStream.getAudioTracks()[0];
|
|
5340
|
+
if (videoTrack) {
|
|
5341
|
+
this._lastMediaStream.removeTrack(videoTrack);
|
|
5342
|
+
}
|
|
5343
|
+
if (audioTrack) {
|
|
5344
|
+
this._lastMediaStream.removeTrack(audioTrack);
|
|
5345
|
+
}
|
|
5346
|
+
this._mediaStream = this._lastMediaStream;
|
|
5347
|
+
this._audio && this._mediaStream.addTrack(this._audio);
|
|
5348
|
+
this._video && this._mediaStream.addTrack(this._video);
|
|
5349
|
+
this._isReplacing = true;
|
|
5350
|
+
this._media.pause();
|
|
5351
|
+
(_this$_media$play = this._media.play()) === null || _this$_media$play === void 0 ? void 0 : _this$_media$play.finally(function() {
|
|
5352
|
+
_this4._isReplacing = false;
|
|
5353
|
+
});
|
|
5354
|
+
} else {
|
|
5355
|
+
this._mediaStream = new MediaStream();
|
|
5356
|
+
this._audio && this._mediaStream.addTrack(this._audio);
|
|
5357
|
+
this._video && this._mediaStream.addTrack(this._video);
|
|
5358
|
+
this._media.srcObject = this._mediaStream;
|
|
5359
|
+
var req = this._media.play();
|
|
5360
|
+
if (req && req.catch) {
|
|
5361
|
+
req.catch(function(e) {
|
|
5362
|
+
});
|
|
5363
|
+
}
|
|
5364
|
+
}
|
|
5365
|
+
}
|
|
5320
5366
|
}, {
|
|
5321
5367
|
key: "_bindMediaEvent",
|
|
5322
5368
|
value: function _bindMediaEvent() {
|
|
@@ -5327,7 +5373,7 @@
|
|
|
5327
5373
|
key: "_connect",
|
|
5328
5374
|
value: function() {
|
|
5329
5375
|
var _connect2 = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee2() {
|
|
5330
|
-
var pc, offer, delayHint, parsed, finnalUrl, _answer$remoteSdp, _answer$remoteSdp2, parseSession, sessionId, reqStart, res, answer, err, _parsed;
|
|
5376
|
+
var pc, offer, delayHint, parsed, finnalUrl, _this$_opts, _answer$remoteSdp, _this$_opts2, _answer$remoteSdp2, _parsed$media, parseSession, sessionId, reqStart, res, answer, err, _parsed;
|
|
5331
5377
|
return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
|
|
5332
5378
|
while (1)
|
|
5333
5379
|
switch (_context2.prev = _context2.next) {
|
|
@@ -5403,7 +5449,7 @@
|
|
|
5403
5449
|
sessionId = parseSession ? parseSession[1] : Date.now() + "666";
|
|
5404
5450
|
this.emit(EVENT.LOAD_START, {
|
|
5405
5451
|
url: finnalUrl,
|
|
5406
|
-
offersdp: offer.sdp,
|
|
5452
|
+
offersdp: (_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.enableOriginSdpLogger ? offer.sdp : void 0,
|
|
5407
5453
|
sessionId
|
|
5408
5454
|
});
|
|
5409
5455
|
reqStart = Date.now();
|
|
@@ -5438,12 +5484,19 @@
|
|
|
5438
5484
|
case 42:
|
|
5439
5485
|
logger.log("answer:");
|
|
5440
5486
|
logger.log((_answer$remoteSdp = answer.remoteSdp) === null || _answer$remoteSdp === void 0 ? void 0 : _answer$remoteSdp.sdp);
|
|
5487
|
+
_parsed = lib.parse(answer.remoteSdp.sdp);
|
|
5441
5488
|
this.emit(EVENT.LOAD_COMPLETE, {
|
|
5442
5489
|
url: finnalUrl,
|
|
5443
5490
|
elapsed: Date.now() - reqStart,
|
|
5444
|
-
answersdp: (_answer$remoteSdp2 = answer.remoteSdp) === null || _answer$remoteSdp2 === void 0 ? void 0 : _answer$remoteSdp2.sdp
|
|
5491
|
+
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,
|
|
5492
|
+
parsedSdp: _parsed === null || _parsed === void 0 ? void 0 : (_parsed$media = _parsed.media) === null || _parsed$media === void 0 ? void 0 : _parsed$media.map(function(media) {
|
|
5493
|
+
return {
|
|
5494
|
+
candidates: media.candidates,
|
|
5495
|
+
rtp: media.rtp,
|
|
5496
|
+
type: media.type
|
|
5497
|
+
};
|
|
5498
|
+
})
|
|
5445
5499
|
});
|
|
5446
|
-
_parsed = lib.parse(answer.remoteSdp.sdp);
|
|
5447
5500
|
_parsed.media.forEach(function(x) {
|
|
5448
5501
|
x.fingerprint.hash = x.fingerprint.hash.toUpperCase();
|
|
5449
5502
|
});
|
|
@@ -5489,11 +5542,11 @@
|
|
|
5489
5542
|
}
|
|
5490
5543
|
}, {
|
|
5491
5544
|
key: "destroy",
|
|
5492
|
-
value: function destroy() {
|
|
5545
|
+
value: function destroy(keepClearMediaStream) {
|
|
5493
5546
|
var _this$_media2;
|
|
5494
5547
|
this._disconnect();
|
|
5495
5548
|
(_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
|
|
5496
|
-
if (this._media) {
|
|
5549
|
+
if (this._media && !keepClearMediaStream) {
|
|
5497
5550
|
this._media.srcObject = null;
|
|
5498
5551
|
}
|
|
5499
5552
|
if (this._pc) {
|
|
@@ -5593,15 +5646,36 @@
|
|
|
5593
5646
|
}
|
|
5594
5647
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
5595
5648
|
_defineProperty$2(_assertThisInitialized$1(_this), "_rts", null);
|
|
5649
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_mediaStream", null);
|
|
5650
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_disconnectTimer", void 0);
|
|
5596
5651
|
_defineProperty$2(_assertThisInitialized$1(_this), "_rtsOpts", null);
|
|
5597
|
-
_defineProperty$2(_assertThisInitialized$1(_this), "
|
|
5652
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_onPause", function() {
|
|
5653
|
+
if (_this._disconnectTimer) {
|
|
5654
|
+
return;
|
|
5655
|
+
}
|
|
5656
|
+
_this._disconnectTimer = setTimeout(function() {
|
|
5657
|
+
_this._closeAfterPause();
|
|
5658
|
+
_this._clearDisconnectTimer();
|
|
5659
|
+
}, _this.config.disconnectTime * 1e3);
|
|
5660
|
+
});
|
|
5661
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_reInit", function() {
|
|
5598
5662
|
var _this$_rts;
|
|
5599
|
-
|
|
5663
|
+
_this._clearDisconnectTimer();
|
|
5664
|
+
if ((_this$_rts = _this._rts) !== null && _this$_rts !== void 0 && _this$_rts._pc) {
|
|
5665
|
+
return;
|
|
5666
|
+
}
|
|
5667
|
+
_this._init();
|
|
5668
|
+
_this._bindRtsEvents();
|
|
5669
|
+
});
|
|
5670
|
+
_defineProperty$2(_assertThisInitialized$1(_this), "_init", function() {
|
|
5671
|
+
var _this$_rts2;
|
|
5672
|
+
(_this$_rts2 = _this._rts) === null || _this$_rts2 === void 0 ? void 0 : _this$_rts2.destroy();
|
|
5600
5673
|
var config = _this.player.config;
|
|
5601
5674
|
var rtsOpts = config.rts || {};
|
|
5602
5675
|
_this._rtsOpts = rtsOpts;
|
|
5603
5676
|
_this._rts = new Rts(_objectSpread2$2({
|
|
5604
5677
|
media: _this.player.video,
|
|
5678
|
+
mediaStream: _this._mediaStream,
|
|
5605
5679
|
preProcessUrl: function preProcessUrl(url, ext) {
|
|
5606
5680
|
var _this$player$preProce, _this$player;
|
|
5607
5681
|
return ((_this$player$preProce = (_this$player = _this.player).preProcessUrl) === null || _this$player$preProce === void 0 ? void 0 : _this$player$preProce.call(_this$player, url, ext)) || {
|
|
@@ -5613,35 +5687,41 @@
|
|
|
5613
5687
|
_this._rts.load(config.url);
|
|
5614
5688
|
});
|
|
5615
5689
|
_defineProperty$2(_assertThisInitialized$1(_this), "_onSwitchURL", function(url) {
|
|
5616
|
-
if (
|
|
5690
|
+
if (url) {
|
|
5617
5691
|
_this.player.config.url = url;
|
|
5692
|
+
}
|
|
5693
|
+
if (_this._rts) {
|
|
5618
5694
|
_this._rts.switchURL(url);
|
|
5695
|
+
} else {
|
|
5696
|
+
_this._reInit();
|
|
5619
5697
|
}
|
|
5620
5698
|
});
|
|
5621
5699
|
_defineProperty$2(_assertThisInitialized$1(_this), "destroy", function() {
|
|
5622
|
-
var _this$
|
|
5700
|
+
var _this$_rts3;
|
|
5623
5701
|
_this.player.switchURL = _this._originSwitchFn;
|
|
5624
|
-
|
|
5702
|
+
_this._clearDisconnectTimer();
|
|
5703
|
+
(_this$_rts3 = _this._rts) === null || _this$_rts3 === void 0 ? void 0 : _this$_rts3.destroy();
|
|
5704
|
+
_this._rts = null;
|
|
5625
5705
|
});
|
|
5626
5706
|
return _this;
|
|
5627
5707
|
}
|
|
5628
5708
|
_createClass$2(RtsPlugin2, [{
|
|
5629
5709
|
key: "pc",
|
|
5630
5710
|
get: function get() {
|
|
5631
|
-
var _this$
|
|
5632
|
-
return (_this$
|
|
5711
|
+
var _this$_rts4;
|
|
5712
|
+
return (_this$_rts4 = this._rts) === null || _this$_rts4 === void 0 ? void 0 : _this$_rts4.pc;
|
|
5633
5713
|
}
|
|
5634
5714
|
}, {
|
|
5635
5715
|
key: "videoTrack",
|
|
5636
5716
|
get: function get() {
|
|
5637
|
-
var _this$
|
|
5638
|
-
return (_this$
|
|
5717
|
+
var _this$_rts5;
|
|
5718
|
+
return (_this$_rts5 = this._rts) === null || _this$_rts5 === void 0 ? void 0 : _this$_rts5.videoTack;
|
|
5639
5719
|
}
|
|
5640
5720
|
}, {
|
|
5641
5721
|
key: "audioTrack",
|
|
5642
5722
|
get: function get() {
|
|
5643
|
-
var _this$
|
|
5644
|
-
return (_this$
|
|
5723
|
+
var _this$_rts6;
|
|
5724
|
+
return (_this$_rts6 = this._rts) === null || _this$_rts6 === void 0 ? void 0 : _this$_rts6.audioTrack;
|
|
5645
5725
|
}
|
|
5646
5726
|
}, {
|
|
5647
5727
|
key: "core",
|
|
@@ -5651,37 +5731,41 @@
|
|
|
5651
5731
|
}, {
|
|
5652
5732
|
key: "loader",
|
|
5653
5733
|
get: function get() {
|
|
5654
|
-
var _this$
|
|
5655
|
-
return (_this$
|
|
5734
|
+
var _this$_rts7;
|
|
5735
|
+
return (_this$_rts7 = this._rts) === null || _this$_rts7 === void 0 ? void 0 : _this$_rts7.loader;
|
|
5656
5736
|
}
|
|
5657
5737
|
}, {
|
|
5658
5738
|
key: "version",
|
|
5659
5739
|
get: function get() {
|
|
5660
|
-
return "0.2.1-alpha.
|
|
5740
|
+
return "0.2.1-alpha.14";
|
|
5661
5741
|
}
|
|
5662
5742
|
}, {
|
|
5663
5743
|
key: "beforePlayerInit",
|
|
5664
5744
|
value: function beforePlayerInit() {
|
|
5665
|
-
var _this$player2, _this2 = this;
|
|
5745
|
+
var _this$player2, _this$player$config, _this$player$config$r, _this2 = this;
|
|
5666
5746
|
this._init();
|
|
5667
5747
|
if (!this._originSwitchFn) {
|
|
5668
5748
|
this._originSwitchFn = this.player.switchURL.bind(this.player);
|
|
5669
5749
|
}
|
|
5670
5750
|
this.player.switchURL = this._onSwitchURL;
|
|
5671
|
-
(_this$player2 = this.player) === null || _this$player2 === void 0 ? void 0 : _this$player2.useHooks("replay",
|
|
5672
|
-
var _this2$_rts;
|
|
5673
|
-
return (_this2$_rts = _this2._rts) === null || _this2$_rts === void 0 ? void 0 : _this2$_rts.switchURL();
|
|
5674
|
-
});
|
|
5751
|
+
(_this$player2 = this.player) === null || _this$player2 === void 0 ? void 0 : _this$player2.useHooks("replay", this._onSwitchURL);
|
|
5675
5752
|
this.on(URL_CHANGE, this._onSwitchURL);
|
|
5676
5753
|
this.on(DESTROY, this.destroy);
|
|
5677
|
-
this.
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5754
|
+
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") {
|
|
5755
|
+
this.on(PAUSE, function() {
|
|
5756
|
+
var _this2$_rts;
|
|
5757
|
+
if (!((_this2$_rts = _this2._rts) !== null && _this2$_rts !== void 0 && _this2$_rts._isReplacing)) {
|
|
5758
|
+
_this2._onPause();
|
|
5759
|
+
}
|
|
5760
|
+
});
|
|
5761
|
+
this.on(PLAY, function() {
|
|
5762
|
+
var _this2$_rts2;
|
|
5763
|
+
if (!((_this2$_rts2 = _this2._rts) !== null && _this2$_rts2 !== void 0 && _this2$_rts2._isReplacing)) {
|
|
5764
|
+
_this2._reInit();
|
|
5765
|
+
}
|
|
5766
|
+
});
|
|
5767
|
+
}
|
|
5768
|
+
this._bindRtsEvents();
|
|
5685
5769
|
try {
|
|
5686
5770
|
BasePlugin.defineGetterOrSetter(this.player, {
|
|
5687
5771
|
__url: {
|
|
@@ -5703,20 +5787,52 @@
|
|
|
5703
5787
|
}, {
|
|
5704
5788
|
key: "getStats",
|
|
5705
5789
|
value: function getStats2() {
|
|
5706
|
-
var _this$
|
|
5707
|
-
return (_this$
|
|
5790
|
+
var _this$_rts8;
|
|
5791
|
+
return (_this$_rts8 = this._rts) === null || _this$_rts8 === void 0 ? void 0 : _this$_rts8.getStats();
|
|
5708
5792
|
}
|
|
5709
5793
|
}, {
|
|
5710
5794
|
key: "getStatsSnapshoot",
|
|
5711
5795
|
value: function getStatsSnapshoot2() {
|
|
5712
|
-
var _this$
|
|
5713
|
-
return (_this$
|
|
5796
|
+
var _this$_rts9;
|
|
5797
|
+
return (_this$_rts9 = this._rts) === null || _this$_rts9 === void 0 ? void 0 : _this$_rts9.getStatsSnapshoot();
|
|
5714
5798
|
}
|
|
5715
5799
|
}, {
|
|
5716
5800
|
key: "getNetWorkInfo",
|
|
5717
5801
|
value: function getNetWorkInfo() {
|
|
5718
|
-
var _this$
|
|
5719
|
-
return (_this$
|
|
5802
|
+
var _this$_rts10;
|
|
5803
|
+
return (_this$_rts10 = this._rts) === null || _this$_rts10 === void 0 ? void 0 : _this$_rts10.networkStats;
|
|
5804
|
+
}
|
|
5805
|
+
}, {
|
|
5806
|
+
key: "_clearDisconnectTimer",
|
|
5807
|
+
value: function _clearDisconnectTimer() {
|
|
5808
|
+
clearTimeout(this._disconnectTimer);
|
|
5809
|
+
this._disconnectTimer = void 0;
|
|
5810
|
+
}
|
|
5811
|
+
}, {
|
|
5812
|
+
key: "_closeAfterPause",
|
|
5813
|
+
value: function _closeAfterPause() {
|
|
5814
|
+
var _this$_rts11, _this$config, _this$_rts13;
|
|
5815
|
+
if (!((_this$_rts11 = this._rts) !== null && _this$_rts11 !== void 0 && _this$_rts11._pc)) {
|
|
5816
|
+
return;
|
|
5817
|
+
}
|
|
5818
|
+
if ((_this$config = this.config) !== null && _this$config !== void 0 && _this$config.seamlesslyReload) {
|
|
5819
|
+
var _this$_rts12;
|
|
5820
|
+
this._mediaStream = (_this$_rts12 = this._rts) === null || _this$_rts12 === void 0 ? void 0 : _this$_rts12._mediaStream;
|
|
5821
|
+
}
|
|
5822
|
+
(_this$_rts13 = this._rts) === null || _this$_rts13 === void 0 ? void 0 : _this$_rts13.destroy(true);
|
|
5823
|
+
this._rts = null;
|
|
5824
|
+
}
|
|
5825
|
+
}, {
|
|
5826
|
+
key: "_bindRtsEvents",
|
|
5827
|
+
value: function _bindRtsEvents() {
|
|
5828
|
+
this._transErrorEvent();
|
|
5829
|
+
this._transCoreEvent(EVENT.LOAD_START);
|
|
5830
|
+
this._transCoreEvent(EVENT.LOAD_COMPLETE);
|
|
5831
|
+
this._transCoreEvent(EVENT.TTFB);
|
|
5832
|
+
this._transCoreEvent(EVENT.LOAD_RESPONSE_HEADERS);
|
|
5833
|
+
this._transCoreEvent(EVENT.LOAD_RETRY);
|
|
5834
|
+
this._transCoreEvent(EVENT.METADATA_PARSED);
|
|
5835
|
+
this._transCoreEvent(EXTEND_EVENTS.RTC_STATE_CHANGE);
|
|
5720
5836
|
}
|
|
5721
5837
|
}, {
|
|
5722
5838
|
key: "_transErrorEvent",
|