         player?.playVid(vid, quality: kYYVideoQualityHD2, password: nil, from: 0)
     }
     
+    func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
+        loadingView?.isHidden = true
+    }
+    
     func handleVideoData() {
         dataController = DHVideoPlayDataController()
         dataController?.requestVideoDetailWithCallback(ykvid: ykvid!, callback: {

    
    func renderPlayView() {
        let request = dataController?.requestVideoDetailDataUrl()
        let viewModel: DHVideoPlayViewModel = DHVideoPlayViewModel(request: request!)
        DispatchQueue.main.async {
            self.videoPlayeView = DHVideoPlayView(frame: CGRect(x: 0, y: 0, width: kVideoPlayViewWidth, height: kVideoPlayViewHeight))
            self.videoPlayeView?.bindDataWithViewModel(viewModel: viewModel)
            self.view.addSubview(self.videoPlayeView!)
        }
    }
    
    override func viewDidLoad() {

//

import UIKit
import WebKit

class DHVideoPlayViewController: DHBaseDetailViewController, YYMediaPlayerEvents, WKNavigationDelegate {

    var ykvid: String?
    var player: YYMediaPlayer?
    var playerManager: YTEngineOpenViewManager?
    
    var dataController: DHVideoPlayDataController?
    var videoPlayView: DHVideoPlayView?
    var loadingView: DHLoadingView?
    
    func initPlayer() {
        player = YYMediaPlayer()
