@give-tech/ec-player 0.0.1-beta.2 → 0.0.1-beta.3

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/dist/index.js CHANGED
@@ -2766,6 +2766,12 @@ class FLVPlayer extends BasePlayer {
2766
2766
  }
2767
2767
  console.log("[FLVPlayer] Buffer ready, frames:", this._timedFrameBuffer.length, "queue:", this._videoTagQueue.length);
2768
2768
  if (this._timedFrameBuffer.length > 0) {
2769
+ if (this.config.isLive && this._timedFrameBuffer.length > 15) {
2770
+ const droppedCount = this._timedFrameBuffer.length - 5;
2771
+ this._timedFrameBuffer = this._timedFrameBuffer.slice(-5);
2772
+ this.droppedFrames += droppedCount;
2773
+ console.log("[FLVPlayer] Live resume: dropped", droppedCount, "old frames, keeping latest 5");
2774
+ }
2769
2775
  this.firstFrameDts = this._timedFrameBuffer[0].dts;
2770
2776
  this.playStartTime = performance.now();
2771
2777
  console.log("[FLVPlayer] Play time initialized, firstFrameDts:", this.firstFrameDts);