← all posts site ↗

the tv plugin grew a seek bar and a volume fader

the tv popover's progress bar became an actual seek bar. click anywhere and the video jumps. the tv has no seek-to-position api over adb, so the backend sends bursts of remote seek keys, measures the tv's real step size from the first burst, and self-corrects until it lands within a few seconds of the target. hover first and it shows the time you would jump to, so you can aim before clicking.

the volume got the same treatment, a fader above the buttons. drag to a level and the backend does a burst of volume keys, learning how much one press moves the dial the first time so it can land within a step of the target. small moves are instant, big jumps take a few seconds of presses.

two bugs died along the way. paused videos never showed their state because the old pause detection never matched, and progress reads went from three adb round trips to one. there was also one confusing crash: hovering the bar before the first progress poll rendered a null time chip, fixed by guarding the label. and one stressful moment where a seek actually landed but the label kept saying it was seeking forever, which turned out to be the scheduled backend reload firing right in the middle of the click. the jump executed and the answer died with the old process. bad timing, not a broken seek.