Post

Replies

Boosts

Views

Activity

SwiftUI AVPlayer fullscreen custom controls/overlay
Is it possible to create custom controls or overlay to a fullscreen player in swiftui? I'm able to go fullscreen using coordinator then: playerController?.perform(NSSelectorFromString("enterFullScreenAnimated:completionHandler:"), with: animated, with: nil) and exiting with: playerController?.perform(NSSelectorFromString("exitFullScreenAnimated:completionHandler:"), with: animated, with: nil) when the device orientation changes. My app is locked in portrait and only goes to landscape for fullscreen videos. If I use the method refered just above, the video switches to fullscreen in landscape no problem but I'm not able to present anything over the video. I'd like to have my own custom controls or overlay. If I go another route and force a rotation and resize the frame of my video, I can add an overlay or custom controls, but the rotation and resize animation are very ugly and choppy (white bits in the background for example). I'd love to replicate the animation in the native player going fullscreen. Any type of help/hint is welcome.
0
1
1.4k
Jun ’22