Reputation: 81
This is my code:
self.playerView?.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2));
self.playerView?.setVideoGravity(AVLayerVideoGravityResizeAspectFill)
self.playerView?.setMovieToPlayer(mp)
First line to transform from portrait to landscape... mp is AVPlayer..
Storyboard pic and black color is the playerView
inside ViewController MainView
and the constraints are
trailing = Player View.trailing
Player View.bottom = Bottom Layout Guide.top
Player View.top = top
Player View.leading = leading
The output is: View is not Occupying the full screen but leaving some space at left and right
Somebody help please? Atleast Provide some tutorial...
Upvotes: 1
Views: 3119