validateExecutedFragmentRequest while removing buffer may cause playback stall
Created by: orange4glace
Environment
-
The MPD passes the DASH-IF Conformance Tool on https://conformance.dashif.org/ -
The stream has correct Access-Control-Allow-Origin headers (CORS) -
There are no network errors such as 404s in the browser console when trying to play the stream -
The issue observed is not mentioned on https://github.com/Dash-Industry-Forum/dash.js/wiki/FAQ -
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:
- Dash.js version: 3.2.1
- Browser name/version: Chromium for Tizen
- OS name/version: Tizen 5.0
Steps to reproduce
validateExecutedFragmentRequest (eg: resolution changed) while removing buffer (eg: seeking)
Observed behavior
Playback stalls.
Console output
[13281][PlaybackController] Seeking to: 0
## Seeking fired
dash.all.debug_qa.js:34702 pruneAllSafely
dash.all.debug_qa.js:34705 pruning ranges [{…}]
dash.all.debug_qa.js:15615 [13287][BufferController][video] Removing buffer from: 10.502 to 30.497
## Removing video buffer..
dash.all.debug_qa.js:38541 onPlaybackSeeking 0
dash.all.debug_qa.js:38568 setSeekTarget 0
dash.all.debug_qa.js:34702 pruneAllSafely
dash.all.debug_qa.js:15615 [13294][BufferController][audio] getAllRangesWithSafetyFactor - No request found in current time position, removing full buffer 0 - 35.508
dash.all.debug_qa.js:34705 pruning ranges [{…}]
dash.all.debug_qa.js:15615 [13298][BufferController][audio] Removing buffer from: 0 to 35.508
## Removing audio buffer..
dash.all.debug_qa.js:38541 onPlaybackSeeking 0
dash.all.debug_qa.js:38568 setSeekTarget 0
dash.all.debug_qa.js:38357 validateExecutedFragmentRequest 0 12.018999999999998
## [video] validateExecutedFragmentRequest scheduled while removing buffer
## 0 = currentTime
## 12.018999999999998 = bufferLevel
dash.all.debug_qa.js:38568 setSeekTarget 12.018999999999998
## As a result, seek target is set to 12.018999999999998
## meaning that the Scheduler will start buffering from 12.018999999999998
## Notice that currentTime == 0
dash.all.debug_qa.js:15615 [13323][BufferController][video] onRemoved buffer from: 10.502 to 30.497
dash.all.debug_qa.js:15615 [13324][BufferController][video] Buffered range: 9.676 - 10.511, currentTime = 0
## Video buffer is removed.
dash.all.debug_qa.js:15615 [13325][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 0.000).
dash.all.debug_qa.js:15615 [13328][BufferController][audio] onRemoved buffer from: 0 to 35.508
## Audio buffer is removed.
dash.all.debug_qa.js:15615 [13330][AbrController] [audio] switching from buffer occupancy to throughput ABR rule (buffer: 0.000).
dash.all.debug_qa.js:15615 [13377][PlaybackController] Native video element event: waiting
[13843][ThroughputRule] [video] requesting switch to index: 3 Average throughput 69896 kbps
dash.all.debug_qa.js:15615 [13846][SwitchHistoryRule] Switch history rule index: 2 samples: 7 drops: 2
dash.all.debug_qa.js:15615 [13848][AbrController] [video] stay on 2/3 (buffer: 0)
[13851][DashHandler][video] Getting the request for time : 12.018999999999998
## The video scheduler starts buffering from 12.018999999999998
## while we need segment from 0sec since video had been seeked to time 0sec.
dash.all.debug_qa.js:15615 [13853][DashHandler][video] Index for time 12.018999999999998 is 2
dash.all.debug_qa.js:38568 setSeekTarget NaN
dash.all.debug_qa.js:15615 [13856][ScheduleController][video] Next fragment request url is ....
dash.all.debug_qa.js:15615 [13879][ThroughputRule] [audio] requesting switch to index: 0 Average throughput 76788 kbps
dash.all.debug_qa.js:15615 [13881][AbrController] [audio] stay on 0/0 (buffer: 0)
[13884][DashHandler][audio] Getting the request for time : 0
dash.all.debug_qa.js:15615 [13887][DashHandler][audio] Index for time 0 is 0
dash.all.debug_qa.js:38568 setSeekTarget NaN
dash.all.debug_qa.js:15615 [13891][ScheduleController][audio] Next fragment request url is ...
dash.all.debug_qa.js:15615 [14009][ScheduleController][audio] OnFragmentLoadingCompleted - Url: ... , Range: ...
dash.all.debug_qa.js:15615 [14029][BufferController][audio] Buffered range: 0 - 4.992, currentTime = 0
dash.all.debug_qa.js:15615 [14062][ThroughputRule] [audio] requesting switch to index: 0 Average throughput 76189 kbps
dash.all.debug_qa.js:15615 [14064][AbrController] [audio] stay on 0/0 (buffer: 4.992)
## Finally video segments for 0-12.018999999999998 is lost.
## Playback stalls.
Expected behavior
validateExecutedFragmentRequest
should not be executed while removing buffer.