             object: player?.currentItem)
     }
 
+    private func maximizePlayer(view: UIView, changes: NSKeyValueObservedChange<CGRect>) {
+        guard let playerLayer = playerLayer else { return }
+        playerLayer.frame = view.bounds
+        setupMaxResolution(for: playerLayer.frame.size)
+    }
+
     private func didFinishedItem(from notification: NSNotification?) -> Bool {
         guard let object = notification?.object as? AVPlayerItem,
             let item = player?.currentItem,

    private var asset: AVURLAsset?
    private var backgroundSessionBackup: AVAudioSession.Category?
    private(set) var loopObserver: NSKeyValueObservation?

    var lastDvrAvailability: Bool?
    #if os(tvOS)

        if let timeObserver = timeObserver {
            player.removeTimeObserver(timeObserver)
        }
        loopObserver = nil
        observers.forEach { $0.invalidate() }
        observers.removeAll()
    }

    override open func destroy() {
