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

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 > 60) {
2770
+ const droppedCount = this._timedFrameBuffer.length - 30;
2771
+ this._timedFrameBuffer = this._timedFrameBuffer.slice(-30);
2772
+ this.droppedFrames += droppedCount;
2773
+ console.log("[FLVPlayer] Live resume: dropped", droppedCount, "old frames, keeping latest 30");
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);
@@ -2788,8 +2794,7 @@ class FLVPlayer extends BasePlayer {
2788
2794
  this.prefetcher.stop();
2789
2795
  }
2790
2796
  if (this.config.isLive) {
2791
- console.log("[FLVPlayer] Pausing live stream, stopping download");
2792
- this.stopLiveDownload();
2797
+ console.log("[FLVPlayer] Pausing live stream, keeping download running");
2793
2798
  }
2794
2799
  }
2795
2800
  /**