I am new to iOS development. I want to play a video. So I am using MPMoviePlayerController to play my video. Now I want to set the corner radius for this video. Don't know how to do it?
I tried layer.cornerRadius for the backgroundview from the storyboard. It is not working.
Here is my movie player code
let url = NSURL.fileURLWithPath(path)
moviePlayer = MPMoviePlayerController(contentURL: url)
if let player = moviePlayer {
player.view.frame = videoBackgroundView.bounds
player.prepareToPlay()
player.scalingMode = .Fill
videoBackgroundView.addSubview(player.view)
}
Is it possible to set corner for video? Please someone help me to solve this.
I don't know if you can apply the
cornerRadiustoplayer.view.layer(maybe? I have to try it). Anyway you can apply a mask to that layer