Player freezes if seeks while buffering during normal play
Created by: marcoslhc
Environment
-
The MPD passes the DASH-IF Conformance Tool on http://dashif.org/conformance.html -
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 occurrs in the latest reference client on http://dashif.org/reference/players/javascript/ and not just on my page
- Link to playable MPD file: I have no DRM-free resources at the time, sorry
- Dash.js version: 2.1.1
- Browser name/version: Chrome 51.0.2704.84 (64-bit) (happened in other chrome versions though)
- OS name/version: OSX El Capitan 10.11.5
Steps to reproduce
- Start playing a stream
- wait for the player starts buffering (maybe you want to throttle the network)
- Immediately after the player starts buffering try to seek (or pause/play)
Observed behaviour
The player freezes and becomes unresponsive
Console output
[13302] Getting the request for audio time : 1184
[13303] Index for audio time 1184 is 295
[13303] SegmentTemplate: 1180 / 2630
[13303] Getting the next request at index: 296
[13303] SegmentTemplate: 1184 / 2630
[state.service] --- isControlsActive: true
[Worker Stopped] ---
[state.service] --- isControlsActive: false
[state.service] --- isEpisodesActive: false
[state.service] --- isAudioSettingsActive: false
[state.service] --- isVolumeActive: false
[state.service] --- isControlsActive: true
[state.service] --- isScrubbing: false
[state.service] --- isControlsActive: true
[state.service] --- isControlsActive: false
[state.service] --- isEpisodesActive: false
[state.service] --- isAudioSettingsActive: false
[state.service] --- isVolumeActive: false
[state.service] --- isControlsActive: true
[30456] try to prune buffer
[30456] pruning buffer: 1122.061745 seconds.
[30457] try to prune buffer
[30457] pruning buffer: 1122.062447 seconds.
[30459] Schedule controller starting for video
[30460] Schedule controller starting for audio
[state.service] --- isControlsActive: true
[state.service] --- isScrubbing: false
[state.service] --- isControlsActive: true
[blim.service] --- Context: CONTINUE
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: true
[state.service] --- isControlsActive: true
[state.service] --- isControlsActive: true
XHR finished loading: POST "http://localhost:3000/api/player/asset/8203/video/27284/stream/78a65890-cfb…db1-308cc47a6e97?asset_duration=2630&state=CONTINUE&timeline_position=1172".
[state.service] --- isControlsActive: true
[state.service] --- isVolumeActive: false
[state.service] --- isControlsActive: true
[Worker Stopped] ---
XHR finished loading: GET "http://dash.blim.com/PAID0000000000727665/dash/124420_6213028bb833593cf4439fa38211e653/audio/2_stereo_128000/cenc_dash/segment_296.m4s".
[36437] Buffered Range: 1139.989333 - 1187.989333
[36438] Getting the request for audio time : 1188
[36438] Index for audio time 1188 is 296
[36438] SegmentTemplate: 1184 / 2630
[36439] Getting the next request at index: 297
[36439] SegmentTemplate: 1188 / 2630
[state.service] --- isControlsActive: false
[state.service] --- isEpisodesActive: false
[state.service] --- isAudioSettingsActive: false
[state.service] --- isVolumeActive: false
[state.service] --- isBuffering: true
[39088] Stalling Buffer
[39088] Waiting for more buffer before starting playback.
[39089] Native video element event: ratechange: 0
[state.service] --- isControlsActive: true
[state.service] --- isScrubbing: false
[state.service] --- isControlsActive: true
[dash-player.service] --- About to start interval
[state.service] --- isBuffering: true
// About this time I tried to seek and then it froze
[41279] Seeking to: 1165.755646
[state.service] --- isBuffering: false
[state.service] --- isPlaying: true
[state.service] --- isPaused: false
[41281] Native video element event: playing
[41282] Got enough buffer to start.
[state.service] --- isBuffering: true
[41308] Getting the request for text/vtt time : 1165.755646
[state.service] --- isBuffering: false
[41407] Native video element event: seeked
[state.service] --- isBuffering: false
[state.service] --- isPlaying: true
[state.service] --- isPaused: false
[41407] Native video element event: playing
[41429] Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end. 1165.755646 was changed to 1187.989333
[41429] Getting the request for audio time : 1187.989333
[41430] Index for audio time 1187.989333 is 296
[41430] SegmentTemplate: 1184 / 2630
[41430] Getting the next request at index: 297
[41430] SegmentTemplate: 1188 / 2630
[41431] ThroughputRule requesting switch to index: 10 type: video Priority: Default Average throughput 46266 kbps
[41432] Prior to making a request for time, NextFragmentRequestRule is aligning index handler's currentTime with bufferedRange.end. 1165.755646 was changed to 1181.179999
[41432] Getting the request for video time : 1181.179999
[41432] Index for video time 1181.179999 is 294
[41433] SegmentTemplate: 1177.176 / 2630
[41433] Getting the next request at index: 295
[41433] SegmentTemplate: 1181.1799999999998 / 2630
[42308] Getting the request for text/vtt time : 0
[43231] AbandonRequestsRule ( video frag id 295 ) is asking to abandon and switch to quality to 0 measured bandwidth was 26
XHR failed loading: GET "http://dash.blim.com/PAID0000000000727665/dash/124420_6213028bb833593cf4439fa38211e653/video/720_2406400/cenc_dash/segment_295.m4s".
XHR failed loading: GET "http://dash.blim.com/PAID0000000000727665/dash/124420_6213028bb833593cf4439fa38211e653/video/720_2406400/cenc_dash/segment_295.m4s".
[43234] Getting the request for video time : 1183.2819999999997
[43235] Index for video time 1183.2819999999997 is 295
[43236] Index for video time 1183.2819999999997 is 295
[state.service] --- isControlsActive: true
[state.service] --- isControlsActive: true
[dash-player.service] --- About to destroy interval
[dash-player.service] --- interval destroyed
[state.service] --- isPaused: true
[state.service] --- isPlaying: false
[47152] Native video element event: pause
[state.service] --- isControlsActive: true
[Worker Stopped] ---
[60456] try to prune buffer