Skip to content

Commit

Permalink
Merge pull request #4023 from video-dev/bugfix/subtitle-start-pos
Browse files Browse the repository at this point in the history
Fix subtitle segment loading with current time less than target-duration
  • Loading branch information
robwalch committed Jun 8, 2021
2 parents 17f4bf2 + 120e098 commit 2b5edad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/buffer-helper.ts
Expand Up @@ -91,6 +91,7 @@ export class BufferHelper {
end: number;
nextStart?: number;
} {
pos = Math.max(0, pos);
// sort on buffer.start/smaller end (IE does not always return sorted buffered range)
buffered.sort(function (a, b) {
const diff = a.start - b.start;
Expand Down

0 comments on commit 2b5edad

Please sign in to comment.