cwizou
18 hours ago
That's super cool, congrats on releasing it ! It's a feature that some people periodically ask me to add in Aerial, but I never got to it. Piping from yt-dlp to AVFoundation is definitely the way to go.
I was gonna warn you about a bug in macOS 15+ where your screensaver stays around after you go back to the desktop, but for some reason your code seems to avoid that issue. I'm not quite sure how, as you don't hook stopAnimation or any event apart from the deinit. But it works, so, massive kudos, I'll have to try and understand why !
hauxir
18 hours ago
interesting you pointed that out because i ran into that exact problem!
look at the animateoneframe function, there's the workaround
cwizou
17 hours ago
So fyi, the way you hook it there is what makes the preview flicker in System Settings.
You check if the screen is locked, and if not, kill the host. But screen is not locked in System Settings. So basically, you're killing the host process every 2 seconds (and macOS, at least in Tahoe, restarts it, it doesn't in previous macOS versions).
That's also what causes your issues with "Options" not working (because you killed the instance that was linked to that button). The way we workaround it usually is to hook a system event.
You can check https://github.com/AerialScreensaver/ScreenSaverMinimal
Look for handleWillStopNotification and com.apple.screensaver.willstop
cwizou
18 hours ago
Ha, you do the exit trick too then, I just missed it.
FYI that works 99% of the time, but for some people it sometimes crashes (because we exit our host container - legacyScreenSaver.appex - and sometimes if you do it at a wrong time things just hang).