     }
 
     override var currentTime: TimeInterval {
-        playerView.getCurrentTime({ [weak self] (time, nil) in
+        playerView.getCurrentTime { [weak self] time, _ in
             self?.videoCurrentTime = time
-        })
+        }
         return Double(videoCurrentTime)
     }
+    
     override init(environment : Environment) {
         playerView = WKYTPlayerView()
-        barTintColor = UINavigationBar.appearance().barTintColor ?? environment.styles.navigationItemTintColor()
         super.init(environment: environment)
         playerView.delegate = self
     }

        createYoutubePlayer()
    }
    
    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        playerView.stopVideo()
        UINavigationBar.appearance().barTintColor = barTintColor
    }

    private func createYoutubePlayer() {
        loadingIndicatorView.startAnimating()
        UINavigationBar.appearance().barTintColor = .black
        view.addSubview(playerView)
    }


    let playerView: WKYTPlayerView
    var videoID: String = ""
    private var videoCurrentTime: Float = 0.0

    private lazy var errorMessageLabel: UILabel = {
        let label = UILabel()
