I have view hierarchy like following:
UIViewController
UIView (Top most view)
UIView (ContainerView)
UIView (MoviePlayer.swift) (with layer as AVPlayerLayer)
The MoviePlayer file is posted here. Now I want to make the MoviePlayer view go full screen. The current code does not work good as the view is constrained inside another view. I tried making y co-ordinate negative but that does not help much. Somehow that approach also messes with the click events of buttons. Another approach I thought was to show a new view controller with the MoviePlayer view common between the two or something like that I don't know how to do that. I basically want to do that like the facebook iOS app shows in table view cells.
I don't want to use MPMoviePlayerController, it's already deprecated and had used it previously which had many problem and didn't allow customisations.
This is link to demo code on github where I tried a similar setup. I cannot share my real code. Clicking on fullscreen shows the problem. I actually have to also implement a similar video player in UITableViewCell.