dash.js
dash.js copied to clipboard
incorrect ranges on remove sourceBuffer
Environment
- [x] The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/
- [x] The stream has correct Access-Control-Allow-Origin headers (CORS)
- [x] There are no network errors such as 404s in the browser console when trying to play the stream
- [x] The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ
- [x] The issue occurs in the latest reference client on http://reference.dashif.org/dash.js/ and not just on my page
- Link to playable MPD file: https://kinescope.io/a9971d96-3c4e-4559-b13b-5b468604e985/master.mpd
- Dash.js version: 4.4.1
- Browser name/version: Google Chrome 105.0.5195.125, (x86_64)
- OS name/version: macOS
Steps to reproduce
- disable loop and autoplay
- seek to near end video
document.getElementsByTagName('video')[0].currentTime = 29
- seek to 0
document.getElementsByTagName('video')[0].currentTime = 0
- press play or start play from js
document.getElementsByTagName('video')[0].play()
Observed behavior
Player is not playing
Console output
document.getElementsByTagName('video')[0].currentTime = 0
[17239623][PlaybackController] Seeking to: 0
[17239629][StreamProcessor][video] TypeError: Failed to execute 'remove' on 'SourceBuffer': The start provided (30) is outside the range (0, 29.6333).
[17239629][StreamProcessor][audio] TypeError: Failed to execute 'remove' on 'SourceBuffer': The start provided (30) is outside the range (0, 29.6333).
document.getElementsByTagName('video')[0].play()
[17404851][PlaybackController] Native video element event: play
[17404853][PlaybackController] Native video element event: waiting
Expected behavior
player start playing
Where is a trouble
when we seek back, player try remove buffer, and get ranges for remove here but since the duration of the video is 29.6333+BUFFER_END_THRESHOLD = 30.035781
and function return non-existent ranges {start: 30, end: 30.035781}
second example
- Link to playable MPD file: https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd
Steps to reproduce
- disable loop and autoplay
- seek to near end video
document.getElementsByTagName('video')[0].currentTime = 634
- seek to 575
document.getElementsByTagName('video')[0].currentTime = 575
- press play or start play from js
document.getElementsByTagName('video')[0].play()
@vdalex25 Can you please check if #4056 solves the issue
@dsilhavy yes, i checked it and don`t see more trouble here, thanks