Necessity of minBufferToKeep setting
Created by: orange4glace
Currently, bufferToKeep
can be set by user, but this is also changing by internally when QUOTA_EXCEED_ERROR
occurs.
Let's say bufferToKeep
is set to 3
by internally (by QUOTA_EXCEEDED_ERROR
) and each data fragment has 5 seconds long.
Now, assuming that currentTime is 2313.827
, current buffered range is 2304.969 - 2329.994
and QUOTA_EXCEED_ERROR
occured.
It will try clearing buffers from 0 - 2309.827 (currentTime - bufferToKeep)
since bufferToKeep === 3
.
In some platform, especially in Tizen TV, it will clears 0 - 2314
because 2309.827
belongs to fragment 2309-2314
and it loses buffered range between 2313.827 - 2314
and player stalls.
According to this, we need a minBufferToKeep
settings so that we can keep the minimum buffer we want.
related log:
[92274][BufferController][audio] Buffered range: 2299.819 - 2330.005, currentTime = 2310.103
dash.all.debug.js:15615 [92284][AbrController] [audio] stay on 0/0 (buffer: 19.902)
dash.all.debug.js:15615 [92285][DashHandler][audio] Getting the next request at index: 466
dash.all.debug.js:15615 [92287][ScheduleController][audio] Next fragment request url is https://tv.m.drmnmv.naver.com/v?_lsu_sa_=6a13967c07b13df72cc299176842639da3983bf59c32313d3905f69d3aa639d89eef8e9230d3c2dce5803f88d8082d89b25600570b53aa6620c362c95a6257ff614e35250b88cc75bdb2525c30af4dfe497adc59cb7e4a2d44c4992a35cfdff936810f5519ad95144a70e3e5c5cc8f5eeda948f73e3fd67f04ee7e7ab75a1d46&ckey=100501346
dash.all.debug.js:15615 [92360][ScheduleController][audio] OnFragmentLoadingCompleted - Url: https://tv.m.drmnmv.naver.com/v?_lsu_sa_=6a13967c07b13df72cc299176842639da3983bf59c32313d3905f69d3aa639d89eef8e9230d3c2dce5803f88d8082d89b25600570b53aa6620c362c95a6257ff614e35250b88cc75bdb2525c30af4dfe497adc59cb7e4a2d44c4992a35cfdff936810f5519ad95144a70e3e5c5cc8f5eeda948f73e3fd67f04ee7e7ab75a1d46&ckey=100501346 , Range:94119588-94321123
dash.all.debug.js:15615 [92377][BufferController][audio] Buffered range: 2299.819 - 2334.997, currentTime = 2310.194
dash.all.debug.js:15615 [95054][AbrController] [video] stay on 3/3 (buffer: 17.168)
dash.all.debug.js:15615 [95056][DashHandler][video] Getting the next request at index: 466
dash.all.debug.js:15615 [95058][ScheduleController][video] Next fragment request url is https://tv.m.drmnmv.naver.com/v?_lsu_sa_=6a53c97db7113c9790c409396322979e83f531452032b19b3f25c8931a1837f8f4eacef63e7322d4952539c861007d11843c83dd8e19ee3b6ba959cc777fba959841cafa9c9d4fde91da91679499ead88fbe2c8e3bb67154fc1c10775a216a6de269048ecc1d47c40c683e509830eb6528b0b6af46411e1a5fa74ad212bcca75&ckey=100501346
dash.all.debug.js:15615 [96017][SourceBufferSink][video] SourceBuffer append failed "QuotaExceededError: Failed to execute 'appendBuffer' on 'SourceBuffer': The SourceBuffer is full, and cannot free space to append additional buffers."
dash.all.debug.js:15615 [96019][BufferController][video] Quota exceeded, Critical Buffer: 16.015999999999988
dash.all.debug.js:15615 [96021][BufferController][video] Clearing playback buffer to overcome quota exceed situation
dash.all.debug.js:15615 [96023][ScheduleController][video] Schedule Controller stops
dash.all.debug.js:15615 [96025][ScheduleController][video] video Schedule Controller stops
dash.all.debug.js:35071 startRangeToKeep: 2310.6238000000003 currentTime: 2313.827 bufferToKeep: 3.2032
dash.all.debug.js:15615 [96030][BufferController][video] Removing buffer from: 0 to 2310
dash.all.debug.js:15615 [96032][ScheduleController][video] OnFragmentLoadingCompleted - Url: https://tv.m.drmnmv.naver.com/v?_lsu_sa_=6a53c97db7113c9790c409396322979e83f531452032b19b3f25c8931a1837f8f4eacef63e7322d4952539c861007d11843c83dd8e19ee3b6ba959cc777fba959841cafa9c9d4fde91da91679499ead88fbe2c8e3bb67154fc1c10775a216a6de269048ecc1d47c40c683e509830eb6528b0b6af46411e1a5fa74ad212bcca75&ckey=100501346 , Range:1584617436-1592743182
dash.all.debug.js:15615 [96037][BufferController][video] onRemoved buffer from: 0 to 2310
dash.all.debug.js:15615 [96038][BufferController][video] Buffered range: 2314.979 - 2329.994, currentTime = 2313.857
dash.all.debug.js:15615 [96039][ScheduleController][video] Schedule Controller starts