Skip to content

Commit

Permalink
refactor: Improve clear segments storage logic
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaDemchenko committed Aug 23, 2024
1 parent 4fbb299 commit 206c526
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ export class SegmentsMemoryStorage implements ISegmentsStorage {
let shouldRemove = false;

if (isLiveStream) {
shouldRemove = currentPlayback >= highDemandTimeWindow + endTime;
shouldRemove = currentPlayback > highDemandTimeWindow + endTime;
} else {
const httpDownloadTimeWindow =
this.getHttpDownloadTimeWindow(streamType);
shouldRemove =
currentPlayback >= endTime + httpDownloadTimeWindow * 1.05;
currentPlayback > endTime + httpDownloadTimeWindow * 1.05;
}

if (shouldRemove) {
Expand Down

0 comments on commit 206c526

Please sign in to comment.