     // MARK: Private Properties
     
     fileprivate var player = AVPlayer()
+
+    private var regularPlayerView: RegularPlayerView
+
+    private var playerLayer: AVPlayerLayer {
+        return self.regularPlayerView.playerLayer
+    }
+
+    private var seekTolerance: CMTime?
     
     // MARK: Public API
     

        }
    }
    
    public let view: UIView = RegularPlayerView(frame: .zero)
    
    private var regularPlayerView: RegularPlayerView {
        return self.view as! RegularPlayerView
    }
    
    private var playerLayer: AVPlayerLayer {
        return self.regularPlayerView.playerLayer
    }
    
    // MARK: Player

        return self.player.errorForPlayerOrItem
    }
    
    open func seek(to time: TimeInterval) {
        let cmTime = CMTimeMakeWithSeconds(time, preferredTimescale: Int32(NSEC_PER_SEC))

        if let tolerance = self.seekTolerance {
            self.player.seek(to: cmTime, toleranceBefore: tolerance, toleranceAfter: tolerance)
        } else {
            self.player.seek(to: cmTime)
        }
        
        self.time = time
    }
    
    open func play() {
        self.player.play()
    }
    
    open func pause() {
        self.player.pause()
    }
    
    // MARK: Lifecycle
    
    public init(seekTolerance: TimeInterval? = nil) {
        self.regularPlayerView = RegularPlayerView(frame: .zero)
        self.seekTolerance = seekTolerance.map {
            CMTimeMakeWithSeconds($0, preferredTimescale: Int32(NSEC_PER_SEC))
        }

        super.init()
        
        self.addPlayerObservers()
        self.regularPlayerView.configureForPlayer(player: self.player)
        self.setupAirplay()
    }
    
