Repository navigation
10.15.4: BADGER-16: hide subtitles when seeking away (#408)
📺 What
Fixes a bug where IMSC subtitles remained on-screen after seeking to a time without a subtitle
🛠 How
After a seek is detected:
- Removes the subtitle DOM element
- Clears state to ensure a check is always performed to render a subtitle if available
A seek is detected if, over a 750ms period, playback time reverses, or jumps forward by > 2 seconds
✅ Testing
Test Guidelines
| Test engineer sign off | ❌ |
|---|
Added 3 unit tests which operate with mock data:
- Ensure subtitles are removed after seeking back to a time without a subtitle
- Ensure subtitles remain rendered after seeking forward to a time with a subtitle (within the same long-duration subtitle)
- Ensure subtitles remain rendered after seeking back & forth (within the same long-duration subtitle) between different segments of a live-stream