mpv checklist for player PRs
Run this on every PR that touches player/local, PlayerViewModel, the phone or TV player screens, or the device profile. It exists because #267 passed every ExoPlayer test and left the mpv backend in BUFFERING forever (#284). Ten minutes on one device; the backend is switched under Settings → Player, or with the app force-stopped through pref_player_backend in the debug app’s shared prefs.
Same item, both backends, and write down what differed. A shared failure is not an mpv bug; a difference is.
The player-verify skill (.claude/skills/player-verify/SKILL.md, plain Markdown for any agent) turns this list into adb steps: which test item, what to run, what output passes, which checks need a real device, and the report to paste into the PR. Its scripts open the player on an item, switch the backend, and read the states, reports, media session and refresh rate vote back.
Every PR
Section titled “Every PR”- Resume. Play an item from Continue Watching. No spinner after the first frame, the quality, speed, audio and subtitle buttons enabled, trickplay on the seek bar, Next enabled on an episode. Log:
Changed player state to ExoPlayer.STATE_READYwithin a few seconds offile-loaded. - From 0. Play an episode from its page. Same checks.
- Seek. Seek bar, the 5 s and 15 s buttons, a double tap. Position lands where it was dropped, the spinner goes away, no second seek on the way back.
- Media session.
adb shell dumpsys media_sessionwhile playing: statePLAYING, a position, the right title. - Display refresh rate. While playing a 24fps item,
adb shell dumpsys SurfaceFlinger | grep -A1 '^ SurfaceView\[nl.midasvo'(the leading space picks the “HWC layers” table; without it the grep also matches layer lines that carry no vote): the player’s SurfaceView row must end in a vote such as23.98 Hz ExactOrMultiple OnlySeamless, on both backends. An empty “Frame Rate (Explicit)” column means no hint was sent and a 120Hz phone stays at 120Hz for the whole playback (#338). The log lineVideo 23.976fps, display ...Hz of [...]shows what the display settled on five seconds in.PlayerInvariantsTestpins the code side of this. On a TV that tunnels (the layer’s composition isSIDEBAND), ExoPlayer’s direct play of an mkv must vote too (#1024): logcatVideo stream: tunneling=true, format frame rate=[-1.0], server's=23.976…says the server’s rate was handed over. - Back out. During loading and while playing. No crash in
adb logcat -b events | grep am_crash, areportStoppedwith the right position.
When the PR touches the playlist, segments or the end of an item
Section titled “When the PR touches the playlist, segments or the end of an item”- Next and previous buttons on an episode, and the outro’s “Up next” card into the next episode (fake segments in a debug build:
files/fake_segments.txt, seeDebugSegments.kt). - Autoplay at the end once, and
NavigateBackonce in the log, not twice.
When the PR touches loading, the profile or the quality switch
Section titled “When the PR touches loading, the profile or the quality switch”- Quality switch to a cap below the file’s bitrate: reloads at the same position, keeps playing, the play/pause button shows Pause, the media session says
PLAYING. - Over https. One start from 0 and one quality switch with the server added by its https address (
tools/test-server/setup.sh https, seedocs/dev-environment.md). mpv reads https through its own TLS library, so the http test server does not cover it. When the PR touches how mpv opens a stream or its network options, also one start throughtools/test-server/caddy-tls.sh’sverify_if_givensite (#960). - Slow link (emulator at 3G): the state settles, no
BUFFERING↔READYflapping for mpv.
What not to do
Section titled “What not to do”- Don’t fix mpv by touching the ExoPlayer path. Phone playback on ExoPlayer must not change in an mpv PR.
- Don’t trust a screenshot over the log: the picture can move while
playbackStateis stillBUFFERING. - Don’t explain a difference you haven’t reproduced; label it as a hypothesis in the PR.
- Say for every fix whether it belongs to CE, to upstream Findroid (
MPVPlayer.ktas they ship it) or to libmpv.
The reading behind this list is in docs/mpv-research/.
Source: docs/mpv-checklist.md · raw Markdown