A mobile lecture player downloads video in fixed-length segments (here 4s each) and keeps a short queue of them — the playback buffer B, measured in seconds of video already downloaded but not yet shown. Every time the buffer has room, the ABR (Adaptive BitRate) algorithm must pick which quality rung of the ladder to fetch next:
Download time: t_dl = (bitrate_r · segment_s) / throughput(t)
Buffer update: B += segment_s (on download finish)
B -= dt (while playing)
Rebuffer stall: triggers when B ≤ 0, playback pauses
until B ≥ 1 segment, then resumes
Buffer-based (BBA-0) — the algorithm Netflix popularized. It ignores throughput estimates entirely and reacts only to how much video is already buffered, using a reservoir/cushion map:
R(B) = R_min if B ≤ B_reservoir
R(B) = R_max if B ≥ B_cushion
R(B) = lerp(R_min..R_max,
(B−B_reservoir)/(B_cushion−B_reservoir)) otherwise
Throughput-based — the older heuristic: smooth measured throughput with an EWMA and request the highest rung that stays under a safety margin of the estimate:
thr_est = 0.85·thr_est + 0.15·thr_measured
choose highest rung r with bitrate_r ≤ 0.85 · thr_est
Switch profile and algorithm to see the trade-off: buffer-based adaptation reacts slower to a sudden drop but rarely stalls once the buffer has filled; throughput-based adaptation chases quality more aggressively and stalls more often on a fluctuating or degrading connection — the exact reason most EdTech apps (Coursera, Khan Academy, Udemy) default to buffer-aware players for lecture video.
This 2D view is the same buffer/network model as the 3D version of this sim, redrawn as a flat side-on diagram: the segment stack, download stream and quality staircase are 2D canvas shapes instead of 3D meshes — drag to pan, scroll/pinch to zoom.