Post

Replies

Boosts

Views

Activity

Video playback performance suffers unless I wiggle the mouse
For years (since I got my M1 MacBook Pro) I've experienced this weird performance degradation. I've tried posting about it to numerous channels, always without a reply. I figured I'd try here. The symptom is: video playback (of visual frames, not audio; audio is unaffected) stutters if I just let the player play. I'll start a video playing, it will play normally, but if I leave the computer alone to play back, the frame rate will drop dramatically (one or two frames per second, even slower). If I wiggle the mouse (generating events), playback resumes normally. After a few seconds, it will stutter again. It's as if the computer were throttling back on system clocks or something because there’s no user input. As you can imagine, this is a frustrating user experience when trying to watch videos. It doesn't matter if it's a YouTube video playing in Safari, or a WWDC video playing in the WWDC.app or Developer.app, or any other video in QuickTime Player.app. And it doesn't always happen. I have my own video playback app that doesn't seem to suffer from this, even though it plays multiple videos simultaneously. I'm on power adapter, and settings are generally set to maximum performance when on power adapter. Any ideas?
0
0
389
Oct ’24
CloudKit sharing limits?
When you share records, they get put into a new zone. Creating a zone for the share makes sense to me, but I thought I read that there was a limit to the number of zones one could have (something like 1024). Does this mean a user can’t share more than 1024 separate items with 1024 different people? I assume any other items shared with the same group end up in an existing zone.
0
0
400
Oct ’24
Suppressing contextual menu on AVPlayerView in SwiftUI app
My app plays videos. At first I used SwiftUI’s VideoPlayer, but that didn't give me enough control over the underlying AVPlayerView, so I created my own NSViewRepresentable. That works well, and I can adjust the AVPlayerView as I see fit. But it seems to have a contextual menu that still appears instead of the one I try to apply using SwiftUI. If I put a non-opaque color over the AVPlayerView in a ZStack, I'm able to then add a .contextMenu that works, but only if the color is non-opaque (e.g. Color(red: 0, green: 0, blue: 0, opacity: 0.00001)). This feels like a pretty hacky solution, and doesn’t work if I set opacity: to 0. Is there a better way to keep AVPlayerView from handling events? It also gets scroll events (which scrubs through the movie) that I'd like to suppress.
Topic: UI Frameworks SubTopic: SwiftUI
0
0
279
Dec ’24