videojs / http-streaming

HLS, DASH, and future HTTP streaming protocols library for video.js
https://videojs-http-streaming.netlify.app/
Other
2.53k stars 425 forks source link

fix: audio segment on incorrect timeline #1530

Closed wseymour15 closed 3 months ago

wseymour15 commented 3 months ago

Description

Currently there is an edge case in DASH where certain points of audio segments and video segments do not always exist on the same timeline.

Example: We seek to 100 seconds into the video. There is an audio segment that is from 98-100.25 seconds, and the video segment is from 100-109.95. The audio segment is on a timeline from 90-99.99, and the video segment is on a timeline from 110-119.99. We fall into a loop in this scenario because VHS catches that we have bad timelines, but we do not do anything to fix it in this scenario.

This change allows us to check for this specific scenario. When we attempt to load an audio segment that is on a prior timeline to the video segment, we will now force the player forward to just past the faulty audio segment. This ensures that the audio and video segments will now be on the same timeline.

Specific Changes proposed

Requirements Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.36%. Comparing base (d23539a) to head (efe1d0d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1530 +/- ## ========================================== + Coverage 86.33% 86.36% +0.03% ========================================== Files 43 43 Lines 11118 11144 +26 Branches 2540 2545 +5 ========================================== + Hits 9599 9625 +26 Misses 1519 1519 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.