Aspect ratio is not changing while playing
I want to add full screen mode over iphone x while playing.
if self.isFullScreen {
vlcPlayer.videoAspectRatio = UnsafeMutablePointer(mutating: ("\(16):\(9)" as NSString).utf8String)
} else {
let width: Int = Int(view.frame.width)
let height: Int = Int(view.frame.height)
vlcPlayer.videoAspectRatio = UnsafeMutablePointer(mutating: ("\(width):\(height)" as NSString).utf8String)
}
But this is not changing aspect ratio at all. When I tried to change aspect ratio before playing, it was working well, but that is just only once. Please help me to solve this issue.