@ -4,10 +4,23 @@ It will try to slowly adjust the playback rate to enable the player to get
@@ -4,10 +4,23 @@ It will try to slowly adjust the playback rate to enable the player to get
@ -18,24 +31,32 @@ const MIN_BUFFER_DURATION = 500; // Min duration a buffer event must last to be
@@ -18,24 +31,32 @@ const MIN_BUFFER_DURATION = 500; // Min duration a buffer event must last to be
constMAX_SPEEDUP_RATE=1.08;// The playback rate when compensating for latency.
constMAX_SPEEDUP_RAMP=0.02;// The max amount we will increase the playback rate at once.
constTIMEOUT_DURATION=30*1000;// The amount of time we stop handling latency after certain events.
constCHECK_TIMER_INTERVAL=5*1000;// How often we check if we should be compensating for latency.
constCHECK_TIMER_INTERVAL=3*1000;// How often we check if we should be compensating for latency.
constBUFFERING_AMNESTY_DURATION=3*1000*60;// How often until a buffering event expires.
constREQUIRED_BANDWIDTH_RATIO=2.0;// The player:bitrate ratio required to enable compensating for latency.
constHIGHEST_LATENCY_SEGMENT_LENGTH_MULTIPLIER=2.5;// Segment length * this value is when we start compensating.
constLOWEST_LATENCY_SEGMENT_LENGTH_MULTIPLIER=1.7;// Segment length * this value is when we stop compensating.
constMIN_LATENCY=4*1000;// The lowest we'll continue compensation to be running at.
constMAX_LATENCY=8*1000;// The highest we'll allow a target latency to be before we start compensating.
constHIGHEST_LATENCY_SEGMENT_LENGTH_MULTIPLIER=2.6;// Segment length * this value is when we start compensating.
constLOWEST_LATENCY_SEGMENT_LENGTH_MULTIPLIER=1.8;// Segment length * this value is when we stop compensating.
constMIN_LATENCY=4*1000;// The absolute lowest we'll continue compensation to be running at.
constMAX_LATENCY=15*1000;// The absolute highest we'll allow a target latency to be before we start compensating.
constMAX_JUMP_LATENCY=7*1000;// How much behind the max latency we need to be behind before we allow a jump.
constMAX_JUMP_FREQUENCY=20*1000;// How often we'll allow a time jump.
constSTARTUP_WAIT_TIME=10*1000;// The amount of time after we start up that we'll allow monitoring to occur.