Skip to content

Conversation

@google-labs-jules
Copy link

Implemented proper lifecycle management for libmpv on iOS.
Modified enterBackground to set wid to 0.
Modified enterForeground to set wid back to the metalLayer.
Removed the workaround that disabled vid.


PR created automatically by Jules for task 11242877970365080308 started by @Doezer

Optimize MediaCard widget by caching computed values
Instead of disabling the video track (which stops decoding) when entering background, we now properly detach the window surface (wid=0). This keeps the decoder active but stops rendering to the invalid layer. On resume, we re-attach the metalLayer. This fixes the black screen issue while preserving video state.
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@Doezer
Copy link
Owner

Doezer commented Dec 23, 2025

@jules what bug does it fix

@google-labs-jules
Copy link
Author

@jules what bug does it fix

This change fixes an issue where the video output would remain black after returning to the app from the background. By properly detaching the window surface (wid=0) on background and re-attaching it on foreground, we ensure the player state is preserved and rendering resumes correctly, instead of just disabling the video track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants