@byteplus/veplayer-plugin 2.4.0 → 2.4.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.
@@ -2759,6 +2759,21 @@ var Buffer$1 = /* @__PURE__ */ function() {
2759
2759
  length: Buffer2.totalLength && Buffer2.totalLength(buffers)
2760
2760
  };
2761
2761
  }
2762
+ }, {
2763
+ key: "isBuffered",
2764
+ value: function isBuffered(media, pos) {
2765
+ if (media) {
2766
+ var buffered = Buffer2.get(media);
2767
+ if (buffered !== null && buffered !== void 0 && buffered.length) {
2768
+ for (var i = 0; i < buffered.length; i++) {
2769
+ if (pos >= buffered.start(i) && pos <= buffered.end(i)) {
2770
+ return true;
2771
+ }
2772
+ }
2773
+ }
2774
+ }
2775
+ return false;
2776
+ }
2762
2777
  }]);
2763
2778
  return Buffer2;
2764
2779
  }();
@@ -5888,7 +5903,7 @@ var AAC = /* @__PURE__ */ function() {
5888
5903
  continue;
5889
5904
  }
5890
5905
  frameLength = (data[i + 3] & 3) << 11 | data[i + 4] << 3 | (data[i + 5] & 224) >> 5;
5891
- if (len - i < frameLength)
5906
+ if (!frameLength || len - i < frameLength)
5892
5907
  break;
5893
5908
  protectionSkipBytes = (~data[i + 1] & 1) * 2;
5894
5909
  frames.push({
@@ -10307,7 +10322,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
10307
10322
  }
10308
10323
  return;
10309
10324
  }
10310
- if (opts.isLive && media.readyState === 4 && bufferEnd > opts.disconnectTime) {
10325
+ if (opts.isLive && media.readyState === 4 && bufferEnd - media.currentTime > opts.disconnectTime) {
10311
10326
  _this.disconnect();
10312
10327
  }
10313
10328
  }
@@ -10479,7 +10494,7 @@ var Flv = /* @__PURE__ */ function(_EventEmitter) {
10479
10494
  _createClass$4(Flv2, [{
10480
10495
  key: "version",
10481
10496
  get: function get() {
10482
- return "3.0.19-rc.0";
10497
+ return "3.0.19-rc.10";
10483
10498
  }
10484
10499
  }, {
10485
10500
  key: "isLive",