mirror of
https://github.com/yattee/yattee.git
synced 2026-07-20 14:22:02 +00:00
Resume MPV rendering when expanded player view re-appears
On iPad, expanding the player after collapsing left the MPV display link paused, showing only a static frame. MiniPlayerView pauses rendering when its video preview hides during expand, and PlayerService.playerSheetDidAppear is gated behind background playback so it can't reliably resume. Call resumeRendering() from MPVVideoView.onAppear so the expanded view always restarts the display link.
This commit is contained in:
@@ -143,6 +143,13 @@ struct MPVVideoView: View {
|
||||
applies: appliesAspectRatio
|
||||
))
|
||||
.onAppear {
|
||||
#if os(iOS)
|
||||
// Resume the MPV display link when the expanded video view appears.
|
||||
// MiniPlayerView pauses rendering when its video preview hides during expand;
|
||||
// PlayerService.playerSheetDidAppear is gated behind background playback, so it
|
||||
// can't be relied on to resume.
|
||||
backend.resumeRendering()
|
||||
#endif
|
||||
// Start debug updates if overlay is already visible when view appears
|
||||
if playerState.showDebugOverlay {
|
||||
startDebugUpdates()
|
||||
|
||||
Reference in New Issue
Block a user