perf: parallelize playback startup

This commit is contained in:
edde746
2026-04-24 23:20:31 +02:00
parent df94e83592
commit 3a69e49ab8
5 changed files with 149 additions and 79 deletions
@@ -1174,6 +1174,12 @@ class ExoPlayerCore(private val activity: Activity) : Player.Listener {
firstFrameRendered = true
cancelDecoderHangCheck()
emitLog("debug", "decoder-hang", "First frame rendered — decoder OK")
// STATE_READY fires when the player has enough buffered to start, but
// the first frame may not be on screen yet (decoder init + keyframe
// decode). The MPV-parity `playback-restart` event consumers (Dart
// first-frame detection, frame-rate matching) want the moment the
// pixel actually hits the screen, which is here.
delegate?.onEvent("playback-restart", null)
}
}