Fixes for Insufficient buffer rule seek reset
Created by: robertbryer
Seeking is causing problems with the insufficient buffer rule and causing the quality to drop to 0 occasionally on seek - This PR:
- Prevents the rules being asked in ScheduleController when 'pruning is in progress' because we discard the result anyway in this case.
- Changes the insufficient buffer rule to not clear the flag based on getMaxIndex() being called, so there's no side effects for this function if we discard the result.
- Set the limit to two fragments instead of just one, for cases where we seek very close to the edge of fragment and lose the buffer.
You can test seeking close to segment boundaries with this on big buck bunny:
http://reference.dashif.org/dash.js/v2.9.1/samples/dash-if-reference-player/index.html
$('video')[0].currentTime = -0.1 + 4 * 20