AVPlayerViewController broken constraints

Hello everyone. I am making a video player app.


The issue I am facing right now is that simply adding `AVPlayerViewController.view` into my view hierarchy breaks its constraints. To prove my point, I've made a test project with the default `ViewController` class modified like so:


import UIKit
import AVKit
class ViewController: UIViewController {
    @IBOutlet weak var frame: UIView!
  
    var playerVC: AVPlayerViewController!
  
    override func viewDidLoad() {
        super.viewDidLoad()
        playerVC = AVPlayerViewController()
        playerVC.view.translatesAutoresizingMaskIntoConstraints = false
      
        addChildViewController(playerVC)
        frame.addSubview(playerVC.view)
      
        playerVC.view.leadingAnchor.constraint(equalTo: frame.leadingAnchor).isActive = true
        playerVC.view.trailingAnchor.constraint(equalTo: frame.trailingAnchor).isActive = true
        playerVC.view.topAnchor.constraint(equalTo: frame.topAnchor).isActive = true
        playerVC.view.bottomAnchor.constraint(equalTo: frame.bottomAnchor).isActive = true
    }
}


[Here](https://gitlab.com/heruvilius/AVPlayerViewControllerBugTest) is my test project's git.