@byteplus/veplayer-plugin 2.4.0-rc.5 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/veplayer-plugin",
3
- "version": "2.4.0-rc.5",
3
+ "version": "2.4.1-rc.0",
4
4
  "main": "./umd/index.production.js",
5
5
  "module": "./esm/index.production.js",
6
6
  "browser": "./umd/index.production.js",
@@ -2763,6 +2763,21 @@
2763
2763
  length: Buffer2.totalLength && Buffer2.totalLength(buffers)
2764
2764
  };
2765
2765
  }
2766
+ }, {
2767
+ key: "isBuffered",
2768
+ value: function isBuffered(media, pos) {
2769
+ if (media) {
2770
+ var buffered = Buffer2.get(media);
2771
+ if (buffered !== null && buffered !== void 0 && buffered.length) {
2772
+ for (var i = 0; i < buffered.length; i++) {
2773
+ if (pos >= buffered.start(i) && pos <= buffered.end(i)) {
2774
+ return true;
2775
+ }
2776
+ }
2777
+ }
2778
+ }
2779
+ return false;
2780
+ }
2766
2781
  }]);
2767
2782
  return Buffer2;
2768
2783
  }();
@@ -5892,7 +5907,7 @@
5892
5907
  continue;
5893
5908
  }
5894
5909
  frameLength = (data[i + 3] & 3) << 11 | data[i + 4] << 3 | (data[i + 5] & 224) >> 5;
5895
- if (len - i < frameLength)
5910
+ if (!frameLength || len - i < frameLength)
5896
5911
  break;
5897
5912
  protectionSkipBytes = (~data[i + 1] & 1) * 2;
5898
5913
  frames.push({
@@ -10311,7 +10326,7 @@
10311
10326
  }
10312
10327
  return;
10313
10328
  }
10314
- if (opts.isLive && media.readyState === 4 && bufferEnd > opts.disconnectTime) {
10329
+ if (opts.isLive && media.readyState === 4 && bufferEnd - media.currentTime > opts.disconnectTime) {
10315
10330
  _this.disconnect();
10316
10331
  }
10317
10332
  }
@@ -10483,7 +10498,7 @@
10483
10498
  _createClass$4(Flv2, [{
10484
10499
  key: "version",
10485
10500
  get: function get() {
10486
- return "3.0.19-rc.0";
10501
+ return "3.0.19-rc.10";
10487
10502
  }
10488
10503
  }, {
10489
10504
  key: "isLive",