@volcengine/veplayer-plugin 2.4.2-rc.1 → 2.4.3-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.
Files changed (31) hide show
  1. package/esm/index.development.js +1968 -659
  2. package/esm/index.production.js +1 -1
  3. package/esm/veplayer.plugin.abr.development.js +71 -3
  4. package/esm/veplayer.plugin.abr.production.js +1 -1
  5. package/esm/veplayer.plugin.drm.development.js +71 -3
  6. package/esm/veplayer.plugin.drm.production.js +1 -1
  7. package/esm/veplayer.plugin.flv.development.js +727 -196
  8. package/esm/veplayer.plugin.flv.production.js +1 -1
  9. package/esm/veplayer.plugin.hls.development.js +1237 -308
  10. package/esm/veplayer.plugin.hls.production.js +1 -1
  11. package/esm/veplayer.plugin.mp4.development.js +73 -5
  12. package/esm/veplayer.plugin.mp4.production.js +1 -1
  13. package/esm/veplayer.plugin.rtm.development.js +124 -139
  14. package/esm/veplayer.plugin.rtm.production.js +1 -1
  15. package/esm/veplayer.plugin.shaka.development.js +72 -4
  16. package/esm/veplayer.plugin.shaka.production.js +1 -1
  17. package/package.json +1 -1
  18. package/umd/veplayer.plugin.abr.development.js +71 -3
  19. package/umd/veplayer.plugin.abr.production.js +1 -1
  20. package/umd/veplayer.plugin.drm.development.js +71 -3
  21. package/umd/veplayer.plugin.drm.production.js +1 -1
  22. package/umd/veplayer.plugin.flv.development.js +727 -196
  23. package/umd/veplayer.plugin.flv.production.js +1 -1
  24. package/umd/veplayer.plugin.hls.development.js +1237 -308
  25. package/umd/veplayer.plugin.hls.production.js +1 -1
  26. package/umd/veplayer.plugin.mp4.development.js +73 -5
  27. package/umd/veplayer.plugin.mp4.production.js +1 -1
  28. package/umd/veplayer.plugin.rtm.development.js +124 -139
  29. package/umd/veplayer.plugin.rtm.production.js +1 -1
  30. package/umd/veplayer.plugin.shaka.development.js +72 -4
  31. package/umd/veplayer.plugin.shaka.production.js +1 -1
@@ -339,14 +339,6 @@
339
339
  }
340
340
  }, exports3;
341
341
  }
342
- function _typeof$2(obj) {
343
- "@babel/helpers - typeof";
344
- return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
345
- return typeof obj2;
346
- } : function(obj2) {
347
- return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
348
- }, _typeof$2(obj);
349
- }
350
342
  function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
351
343
  try {
352
344
  var info = gen[key](arg);
@@ -1542,7 +1534,7 @@
1542
1534
  }
1543
1535
  return offsetTime;
1544
1536
  };
1545
- var version = "3.0.19-rc.0";
1537
+ var version = "3.0.20-rc.6";
1546
1538
  var ERROR_MAP = {
1547
1539
  1: 5101,
1548
1540
  2: 5102,
@@ -1606,8 +1598,6 @@
1606
1598
  }
1607
1599
  }
1608
1600
  );
1609
- var PLAY = "play";
1610
- var PAUSE = "pause";
1611
1601
  var ERROR = "error";
1612
1602
  var DESTROY = "destroy";
1613
1603
  var URL_CHANGE = "urlchange";
@@ -1652,8 +1642,7 @@
1652
1642
  }
1653
1643
  if (this.__hooks && this.__hooks[hookName]) {
1654
1644
  try {
1655
- var _this$__hooks$hookNam;
1656
- var preRet = (_this$__hooks$hookNam = this.__hooks[hookName]).call.apply(_this$__hooks$hookNam, [this, this].concat(Array.prototype.slice.call(arguments)));
1645
+ var preRet = runHooks(this, hookName, handler);
1657
1646
  if (preRet) {
1658
1647
  if (preRet.then) {
1659
1648
  preRet.then(function(isContinue) {
@@ -1678,6 +1667,19 @@
1678
1667
  }
1679
1668
  }.bind(this);
1680
1669
  }
1670
+ function findHookIndex(hookName, handler) {
1671
+ var __hooks = this.__hooks;
1672
+ if (!__hooks || !Array.isArray(__hooks[hookName])) {
1673
+ return -1;
1674
+ }
1675
+ var hookHandlers = __hooks[hookName];
1676
+ for (var i = 0; i < hookHandlers.length; i++) {
1677
+ if (hookHandlers[i] === handler) {
1678
+ return i;
1679
+ }
1680
+ }
1681
+ return -1;
1682
+ }
1681
1683
  function useHooks(hookName, handler) {
1682
1684
  var __hooks = this.__hooks;
1683
1685
  if (!__hooks) {
@@ -1687,7 +1689,12 @@
1687
1689
  console.warn("has no supported hook which name [".concat(hookName, "]"));
1688
1690
  return false;
1689
1691
  }
1690
- __hooks && (__hooks[hookName] = handler);
1692
+ if (!Array.isArray(__hooks[hookName])) {
1693
+ __hooks[hookName] = [];
1694
+ }
1695
+ if (findHookIndex.call(this, hookName, handler) === -1) {
1696
+ __hooks[hookName].push(handler);
1697
+ }
1691
1698
  return true;
1692
1699
  }
1693
1700
  function removeHooks(hookName, handler) {
@@ -1695,6 +1702,13 @@
1695
1702
  if (!__hooks) {
1696
1703
  return;
1697
1704
  }
1705
+ if (Array.isArray(__hooks[hookName])) {
1706
+ var hooks = __hooks[hookName];
1707
+ var index = findHookIndex.call(this, hookName, handler);
1708
+ if (index !== -1) {
1709
+ hooks.splice(index, 1);
1710
+ }
1711
+ }
1698
1712
  delete __hooks[hookName];
1699
1713
  }
1700
1714
  function hooksDescriptor(instance) {
@@ -1716,6 +1730,38 @@
1716
1730
  function delHooksDescriptor(instance) {
1717
1731
  instance.__hooks = null;
1718
1732
  }
1733
+ function runHooks(obj, hookName, handler) {
1734
+ for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {
1735
+ args[_key5 - 3] = arguments[_key5];
1736
+ }
1737
+ if (obj.__hooks && Array.isArray(obj.__hooks[hookName])) {
1738
+ var hooks = obj.__hooks[hookName];
1739
+ var index = -1;
1740
+ var runHooksRecursive = function runHooksRecursive2(obj2, hookName2, handler2) {
1741
+ for (var _len6 = arguments.length, args2 = new Array(_len6 > 3 ? _len6 - 3 : 0), _key6 = 3; _key6 < _len6; _key6++) {
1742
+ args2[_key6 - 3] = arguments[_key6];
1743
+ }
1744
+ index++;
1745
+ if (hooks.length === 0 || index === hooks.length) {
1746
+ return handler2.call.apply(handler2, [obj2, obj2].concat(args2));
1747
+ }
1748
+ var hook2 = hooks[index];
1749
+ var ret = hook2.call.apply(hook2, [obj2, obj2].concat(args2));
1750
+ if (ret && ret.then) {
1751
+ return ret.then(function(data) {
1752
+ return data === false ? null : runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
1753
+ }).catch(function(e) {
1754
+ console.warn("[runHooks]".concat(hookName2, " reject"), e.message);
1755
+ });
1756
+ } else if (ret !== false) {
1757
+ return runHooksRecursive2.apply(void 0, [obj2, hookName2, handler2].concat(args2));
1758
+ }
1759
+ };
1760
+ return runHooksRecursive.apply(void 0, [obj, hookName, handler].concat(args));
1761
+ } else {
1762
+ return handler.call.apply(handler, [obj, obj].concat(args));
1763
+ }
1764
+ }
1719
1765
  function showErrorMsg(pluginName, msg) {
1720
1766
  XG_DEBUG.logError("[".concat(pluginName, "] event or callback cant be undefined or null when call ").concat(msg));
1721
1767
  }
@@ -1955,6 +2001,18 @@
1955
2001
  }
1956
2002
  }
1957
2003
  }
2004
+ }, {
2005
+ key: "defineMethod",
2006
+ value: function defineMethod(Obj, map) {
2007
+ for (var key in map) {
2008
+ if (Object.prototype.hasOwnProperty.call(map, key) && typeof map[key] === "function") {
2009
+ Object.defineProperty(Obj, key, {
2010
+ configurable: true,
2011
+ value: map[key]
2012
+ });
2013
+ }
2014
+ }
2015
+ }
1958
2016
  }, {
1959
2017
  key: "defaultConfig",
1960
2018
  get: function get() {
@@ -4822,8 +4880,7 @@
4822
4880
  loadTimeout: 5e3,
4823
4881
  stallInterval: 400,
4824
4882
  networkEvaluateInterval: 1e3,
4825
- delayHint: 0,
4826
- seamlesslyReload: false
4883
+ delayHint: 0
4827
4884
  }, opts);
4828
4885
  }
4829
4886
  function _getStats(stats) {
@@ -5086,7 +5143,6 @@
5086
5143
  _defineProperty$2(_assertThisInitialized$1(_this), "_audioTransceicer", null);
5087
5144
  _defineProperty$2(_assertThisInitialized$1(_this), "_videoTransceicer", null);
5088
5145
  _defineProperty$2(_assertThisInitialized$1(_this), "_mediaStream", null);
5089
- _defineProperty$2(_assertThisInitialized$1(_this), "_lastMediaStream", null);
5090
5146
  _defineProperty$2(_assertThisInitialized$1(_this), "_media", null);
5091
5147
  _defineProperty$2(_assertThisInitialized$1(_this), "_opts", null);
5092
5148
  _defineProperty$2(_assertThisInitialized$1(_this), "_loader", null);
@@ -5094,10 +5150,19 @@
5094
5150
  _defineProperty$2(_assertThisInitialized$1(_this), "_retry", 0);
5095
5151
  _defineProperty$2(_assertThisInitialized$1(_this), "_waitingTimer", 0);
5096
5152
  _defineProperty$2(_assertThisInitialized$1(_this), "_rctConnectStartTs", 0);
5097
- _defineProperty$2(_assertThisInitialized$1(_this), "_isReplacing", false);
5098
5153
  _defineProperty$2(_assertThisInitialized$1(_this), "_onTrack", function(e) {
5099
5154
  logger.log("addTrack: ", e.track, e.streams);
5100
5155
  _this["_".concat(e.track.kind)] = e.track;
5156
+ if (!_this._mediaStream) {
5157
+ _this._mediaStream = new MediaStream();
5158
+ _this._media.srcObject = _this._mediaStream;
5159
+ var req = _this._media.play();
5160
+ if (req && req.catch) {
5161
+ req.catch(function(e2) {
5162
+ });
5163
+ }
5164
+ }
5165
+ _this._mediaStream.addTrack(e.track);
5101
5166
  });
5102
5167
  _defineProperty$2(_assertThisInitialized$1(_this), "_mockWaitingByTimeupdate", function() {
5103
5168
  var _this$_pc, _this$_pc2;
@@ -5145,9 +5210,6 @@
5145
5210
  }));
5146
5211
  _this._retry = _this._opts.retryCount;
5147
5212
  _this._bindMediaEvent();
5148
- if (_this._opts.mediaStream && _this._opts.seamlesslyReload) {
5149
- _this._lastMediaStream = _this._opts.mediaStream;
5150
- }
5151
5213
  return _this;
5152
5214
  }
5153
5215
  _createClass$2(Rts2, [{
@@ -5191,9 +5253,9 @@
5191
5253
  }, {
5192
5254
  key: "load",
5193
5255
  value: function() {
5194
- var _load = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee(url, seamless) {
5256
+ var _load = _asyncToGenerator$1(/* @__PURE__ */ _regeneratorRuntime$1().mark(function _callee(url) {
5195
5257
  var _this2 = this;
5196
- var _this$_pc3;
5258
+ var lastPc;
5197
5259
  return _regeneratorRuntime$1().wrap(function _callee$(_context) {
5198
5260
  while (1)
5199
5261
  switch (_context.prev = _context.next) {
@@ -5201,43 +5263,39 @@
5201
5263
  this._disconnect();
5202
5264
  this._url = url;
5203
5265
  this._retry = this._opts.retryCount;
5204
- if (seamless) {
5205
- this._lastPc = this._pc;
5206
- } else {
5207
- (_this$_pc3 = this._pc) === null || _this$_pc3 === void 0 ? void 0 : _this$_pc3.close();
5266
+ lastPc = this._pc;
5267
+ if (lastPc) {
5268
+ lastPc.close();
5208
5269
  }
5209
- _context.prev = 4;
5270
+ _context.prev = 5;
5210
5271
  this._pc = new RTCPeerConnection();
5211
5272
  this._bindRTCEvents();
5212
- _context.next = 9;
5273
+ _context.next = 10;
5213
5274
  return this._connect(url);
5214
- case 9:
5215
- _context.next = 14;
5275
+ case 10:
5276
+ _context.next = 15;
5216
5277
  break;
5217
- case 11:
5218
- _context.prev = 11;
5219
- _context.t0 = _context["catch"](4);
5278
+ case 12:
5279
+ _context.prev = 12;
5280
+ _context.t0 = _context["catch"](5);
5220
5281
  setTimeout(function() {
5221
5282
  return _this2._emitError(StreamingError.create(ERR.OTHER, null, _context.t0));
5222
5283
  });
5223
- case 14:
5284
+ case 15:
5224
5285
  case "end":
5225
5286
  return _context.stop();
5226
5287
  }
5227
- }, _callee, this, [[4, 11]]);
5288
+ }, _callee, this, [[5, 12]]);
5228
5289
  }));
5229
- function load(_x, _x2) {
5290
+ function load(_x) {
5230
5291
  return _load.apply(this, arguments);
5231
5292
  }
5232
5293
  return load;
5233
5294
  }()
5234
5295
  }, {
5235
5296
  key: "switchURL",
5236
- value: function switchURL(url, seamless) {
5237
- if (seamless) {
5238
- this._lastMediaStream = this._mediaStream;
5239
- }
5240
- this.load(url || this._url, seamless);
5297
+ value: function switchURL(url) {
5298
+ this.load(url || this._url);
5241
5299
  }
5242
5300
  }, {
5243
5301
  key: "_bindRTCEvents",
@@ -5263,8 +5321,6 @@
5263
5321
  _this3.load(_this3._url);
5264
5322
  }
5265
5323
  if (pc.connectionState === "connected") {
5266
- _this3._closeLastPc();
5267
- _this3._handleMediaStream();
5268
5324
  _this3.emit(EVENT.TTFB, {
5269
5325
  url: _this3._url,
5270
5326
  responseUrl: _this3._url,
@@ -5273,40 +5329,6 @@
5273
5329
  }
5274
5330
  });
5275
5331
  }
5276
- }, {
5277
- key: "_handleMediaStream",
5278
- value: function _handleMediaStream() {
5279
- var _this4 = this;
5280
- if (this._lastMediaStream) {
5281
- var _this$_media$play;
5282
- var videoTrack = this._lastMediaStream.getVideoTracks()[0];
5283
- var audioTrack = this._lastMediaStream.getAudioTracks()[0];
5284
- if (videoTrack) {
5285
- this._lastMediaStream.removeTrack(videoTrack);
5286
- }
5287
- if (audioTrack) {
5288
- this._lastMediaStream.removeTrack(audioTrack);
5289
- }
5290
- this._mediaStream = this._lastMediaStream;
5291
- this._mediaStream.addTrack(this._audio);
5292
- this._mediaStream.addTrack(this._video);
5293
- this._isReplacing = true;
5294
- this._media.pause();
5295
- (_this$_media$play = this._media.play()) === null || _this$_media$play === void 0 ? void 0 : _this$_media$play.finally(function() {
5296
- _this4._isReplacing = false;
5297
- });
5298
- } else {
5299
- this._mediaStream = new MediaStream();
5300
- this._mediaStream.addTrack(this._audio);
5301
- this._mediaStream.addTrack(this._video);
5302
- this._media.srcObject = this._mediaStream;
5303
- var req = this._media.play();
5304
- if (req && req.catch) {
5305
- req.catch(function(e) {
5306
- });
5307
- }
5308
- }
5309
- }
5310
5332
  }, {
5311
5333
  key: "_bindMediaEvent",
5312
5334
  value: function _bindMediaEvent() {
@@ -5461,14 +5483,6 @@
5461
5483
  }
5462
5484
  return _connect;
5463
5485
  }()
5464
- }, {
5465
- key: "_closeLastPc",
5466
- value: function _closeLastPc() {
5467
- if (this._lastPc) {
5468
- this._lastPc.close();
5469
- this._lastPc = null;
5470
- }
5471
- }
5472
5486
  }, {
5473
5487
  key: "_disconnect",
5474
5488
  value: function _disconnect() {
@@ -5483,19 +5497,17 @@
5483
5497
  }, {
5484
5498
  key: "_emitError",
5485
5499
  value: function _emitError(error) {
5486
- this._closeLastPc();
5487
5500
  this.emit(EVENT.ERROR, error);
5488
5501
  }
5489
5502
  }, {
5490
5503
  key: "destroy",
5491
5504
  value: function destroy() {
5492
- var _this$_media2, _this$_opts;
5505
+ var _this$_media2;
5493
5506
  this._disconnect();
5494
5507
  (_this$_media2 = this._media) === null || _this$_media2 === void 0 ? void 0 : _this$_media2.removeEventListener("timeupdate", this._mockWaitingByTimeupdate);
5495
- if (this._media && !((_this$_opts = this._opts) !== null && _this$_opts !== void 0 && _this$_opts.seamlesslyReload)) {
5508
+ if (this._media) {
5496
5509
  this._media.srcObject = null;
5497
5510
  }
5498
- this._closeLastPc();
5499
5511
  if (this._pc) {
5500
5512
  this._pc.close();
5501
5513
  }
@@ -5593,35 +5605,15 @@
5593
5605
  }
5594
5606
  _this = _super.call.apply(_super, [this].concat(args));
5595
5607
  _defineProperty$2(_assertThisInitialized$1(_this), "_rts", null);
5596
- _defineProperty$2(_assertThisInitialized$1(_this), "_mediaStream", null);
5597
5608
  _defineProperty$2(_assertThisInitialized$1(_this), "_rtsOpts", null);
5598
- _defineProperty$2(_assertThisInitialized$1(_this), "_onPause", function() {
5599
- var _this$_rts, _this$_rts2, _this$config, _this$_rts4;
5600
- if (!((_this$_rts = _this._rts) !== null && _this$_rts !== void 0 && _this$_rts._pc) || (_this$_rts2 = _this._rts) !== null && _this$_rts2 !== void 0 && _this$_rts2._isReplacing) {
5601
- return;
5602
- }
5603
- if ((_this$config = _this.config) !== null && _this$config !== void 0 && _this$config.seamlesslyReload) {
5604
- var _this$_rts3;
5605
- _this._mediaStream = (_this$_rts3 = _this._rts) === null || _this$_rts3 === void 0 ? void 0 : _this$_rts3._mediaStream;
5606
- }
5607
- (_this$_rts4 = _this._rts) === null || _this$_rts4 === void 0 ? void 0 : _this$_rts4.destroy();
5608
- });
5609
- _defineProperty$2(_assertThisInitialized$1(_this), "_onPlay", function() {
5610
- var _this$_rts5, _this$_rts6;
5611
- if ((_this$_rts5 = _this._rts) !== null && _this$_rts5 !== void 0 && _this$_rts5._pc || (_this$_rts6 = _this._rts) !== null && _this$_rts6 !== void 0 && _this$_rts6._isReplacing) {
5612
- return;
5613
- }
5614
- _this._init();
5615
- });
5616
5609
  _defineProperty$2(_assertThisInitialized$1(_this), "_init", function() {
5617
- var _this$_rts7;
5618
- (_this$_rts7 = _this._rts) === null || _this$_rts7 === void 0 ? void 0 : _this$_rts7.destroy();
5610
+ var _this$_rts;
5611
+ (_this$_rts = _this._rts) === null || _this$_rts === void 0 ? void 0 : _this$_rts.destroy();
5619
5612
  var config = _this.player.config;
5620
5613
  var rtsOpts = config.rts || {};
5621
5614
  _this._rtsOpts = rtsOpts;
5622
5615
  _this._rts = new Rts(_objectSpread2$2({
5623
5616
  media: _this.player.video,
5624
- mediaStream: _this._mediaStream,
5625
5617
  preProcessUrl: function preProcessUrl(url, ext) {
5626
5618
  var _this$player$preProce, _this$player;
5627
5619
  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)) || {
@@ -5632,39 +5624,36 @@
5632
5624
  }, rtsOpts));
5633
5625
  _this._rts.load(config.url);
5634
5626
  });
5635
- _defineProperty$2(_assertThisInitialized$1(_this), "_onSwitchURL", function(url, seamless) {
5627
+ _defineProperty$2(_assertThisInitialized$1(_this), "_onSwitchURL", function(url) {
5636
5628
  if (_this._rts) {
5637
- if (_typeof$2(seamless) === "object") {
5638
- seamless = seamless.seamless;
5639
- }
5640
5629
  _this.player.config.url = url;
5641
- _this._rts.switchURL(url, seamless);
5630
+ _this._rts.switchURL(url);
5642
5631
  }
5643
5632
  });
5644
5633
  _defineProperty$2(_assertThisInitialized$1(_this), "destroy", function() {
5645
- var _this$_rts8;
5634
+ var _this$_rts2;
5646
5635
  _this.player.switchURL = _this._originSwitchFn;
5647
- (_this$_rts8 = _this._rts) === null || _this$_rts8 === void 0 ? void 0 : _this$_rts8.destroy();
5636
+ (_this$_rts2 = _this._rts) === null || _this$_rts2 === void 0 ? void 0 : _this$_rts2.destroy();
5648
5637
  });
5649
5638
  return _this;
5650
5639
  }
5651
5640
  _createClass$2(RtsPlugin2, [{
5652
5641
  key: "pc",
5653
5642
  get: function get() {
5654
- var _this$_rts9;
5655
- return (_this$_rts9 = this._rts) === null || _this$_rts9 === void 0 ? void 0 : _this$_rts9.pc;
5643
+ var _this$_rts3;
5644
+ return (_this$_rts3 = this._rts) === null || _this$_rts3 === void 0 ? void 0 : _this$_rts3.pc;
5656
5645
  }
5657
5646
  }, {
5658
5647
  key: "videoTrack",
5659
5648
  get: function get() {
5660
- var _this$_rts10;
5661
- return (_this$_rts10 = this._rts) === null || _this$_rts10 === void 0 ? void 0 : _this$_rts10.videoTack;
5649
+ var _this$_rts4;
5650
+ return (_this$_rts4 = this._rts) === null || _this$_rts4 === void 0 ? void 0 : _this$_rts4.videoTack;
5662
5651
  }
5663
5652
  }, {
5664
5653
  key: "audioTrack",
5665
5654
  get: function get() {
5666
- var _this$_rts11;
5667
- return (_this$_rts11 = this._rts) === null || _this$_rts11 === void 0 ? void 0 : _this$_rts11.audioTrack;
5655
+ var _this$_rts5;
5656
+ return (_this$_rts5 = this._rts) === null || _this$_rts5 === void 0 ? void 0 : _this$_rts5.audioTrack;
5668
5657
  }
5669
5658
  }, {
5670
5659
  key: "core",
@@ -5674,18 +5663,18 @@
5674
5663
  }, {
5675
5664
  key: "loader",
5676
5665
  get: function get() {
5677
- var _this$_rts12;
5678
- return (_this$_rts12 = this._rts) === null || _this$_rts12 === void 0 ? void 0 : _this$_rts12.loader;
5666
+ var _this$_rts6;
5667
+ return (_this$_rts6 = this._rts) === null || _this$_rts6 === void 0 ? void 0 : _this$_rts6.loader;
5679
5668
  }
5680
5669
  }, {
5681
5670
  key: "version",
5682
5671
  get: function get() {
5683
- return "0.2.1-alpha.4";
5672
+ return "0.2.1-alpha.0";
5684
5673
  }
5685
5674
  }, {
5686
5675
  key: "beforePlayerInit",
5687
5676
  value: function beforePlayerInit() {
5688
- var _this$player2, _this2 = this, _this$player$config, _this$player$config$r;
5677
+ var _this$player2, _this2 = this;
5689
5678
  this._init();
5690
5679
  if (!this._originSwitchFn) {
5691
5680
  this._originSwitchFn = this.player.switchURL.bind(this.player);
@@ -5697,10 +5686,6 @@
5697
5686
  });
5698
5687
  this.on(URL_CHANGE, this._onSwitchURL);
5699
5688
  this.on(DESTROY, this.destroy);
5700
- if ((_this$player$config = this.player.config) !== null && _this$player$config !== void 0 && (_this$player$config$r = _this$player$config.rts) !== null && _this$player$config$r !== void 0 && _this$player$config$r.seamlesslyReload) {
5701
- this.on(PAUSE, this._onPause);
5702
- this.on(PLAY, this._onPlay);
5703
- }
5704
5689
  this._transErrorEvent();
5705
5690
  this._transCoreEvent(EVENT.LOAD_START);
5706
5691
  this._transCoreEvent(EVENT.LOAD_COMPLETE);
@@ -5730,20 +5715,20 @@
5730
5715
  }, {
5731
5716
  key: "getStats",
5732
5717
  value: function getStats2() {
5733
- var _this$_rts13;
5734
- return (_this$_rts13 = this._rts) === null || _this$_rts13 === void 0 ? void 0 : _this$_rts13.getStats();
5718
+ var _this$_rts7;
5719
+ return (_this$_rts7 = this._rts) === null || _this$_rts7 === void 0 ? void 0 : _this$_rts7.getStats();
5735
5720
  }
5736
5721
  }, {
5737
5722
  key: "getStatsSnapshoot",
5738
5723
  value: function getStatsSnapshoot2() {
5739
- var _this$_rts14;
5740
- return (_this$_rts14 = this._rts) === null || _this$_rts14 === void 0 ? void 0 : _this$_rts14.getStatsSnapshoot();
5724
+ var _this$_rts8;
5725
+ return (_this$_rts8 = this._rts) === null || _this$_rts8 === void 0 ? void 0 : _this$_rts8.getStatsSnapshoot();
5741
5726
  }
5742
5727
  }, {
5743
5728
  key: "getNetWorkInfo",
5744
5729
  value: function getNetWorkInfo() {
5745
- var _this$_rts15;
5746
- return (_this$_rts15 = this._rts) === null || _this$_rts15 === void 0 ? void 0 : _this$_rts15.networkStats;
5730
+ var _this$_rts9;
5731
+ return (_this$_rts9 = this._rts) === null || _this$_rts9 === void 0 ? void 0 : _this$_rts9.networkStats;
5747
5732
  }
5748
5733
  }, {
5749
5734
  key: "_transErrorEvent",