   /// - Parameter videoId: The video's XID
   public func load(videoId: String) {
     assert(baseUrl != nil)
-    if self.loaded {
-      webView.evaluateJavaScript("player.load('\(videoId)')", completionHandler: nil)
-    }
-    else {
-      self.loadVideoId = videoId
-    }
+    
+    guard isInitialized else {
+      self.videoIdToLoad = videoId
+      return
+    }
+
+    webView.evaluateJavaScript("player.load('\(videoId)')", completionHandler: nil)
   }
   
   private func newRequest(accessToken: String?, parameters: [String: Any]) -> URLRequest {

extension DMPlayerViewController: WKNavigationDelegate {
  
  public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
    self.loaded = true
    
    if let loadVideoId = self.loadVideoId {
      self.load(videoId: loadVideoId)
      self.loadVideoId = nil
    }
  }
  
}

  fileprivate static let pathPrefix = "/embed/"
  private static let messageHandlerEvent = "triggerEvent"
  
  fileprivate var isInitialized = false
  fileprivate var videoIdToLoad: String?
  
  public weak var delegate: DMPlayerViewControllerDelegate?
  
