AVPlayerLayer frame doesn't fit into UIView for video player
tobitech opened this issue · comments
Tobi Omotayo commented
Hello!. I'm trying to replicate this in my app I got the minimising feature right but couldn't get AVPlayerPlayer to fit into the UIView for a video player in my code, I have set this playerLayer.frame = self.videoPlayerView.frame self.videoPlayerView.layer.addSublayer(playerLayer)
but it still not inside of it. Where in the code could I be getting it wrong? It's just a thin rect at the middle of the screen as shown in the screenshot.
Tobi Omotayo commented
Okay I found a way to fix it using Apple's documentation of AVPlayerLayer.