   ///
   /// - Parameter prop: The property name
   /// - Parameter data: The data value to set
-  open func setProp(_ prop: String, data: [String: Any]) {
+  open func setProp(_ prop: String, data: [String: Any], completion: (() -> ())? = nil) {
     guard isInitialized, let converted = convertPayloadToString(payload: data) else { return }
+    
     let js = "player.setProp('\(prop)', \(converted))"
-    webView.evaluateJavaScript(js, completionHandler: nil)
+    
+    webView.evaluateJavaScript(js) { _,_ in
+      completion?()
+    }
   }
   
   /// Construct the player load JS string

    notifyPlayerApi(method: "controls", argument: hasControls)
  }
  
  final public func notifyPlayerApi(method: String, argument: String? = nil) {
    let playerArgument = argument != nil ? argument! : "null"
    webView.evaluateJavaScript("player.api('\(method)', \(playerArgument))", completionHandler: nil)
  }
  
  open func toggleFullscreen() {

    notifyPlayerApi(method: "seek", argument: "\(to)")
  }
  
  open func mute(completion: (() -> ())? = nil) {
    webView.evaluateJavaScript("player.mute()") { _,_ in
      completion?()
    }
  }

  open func unmute(completion: (() -> ())? = nil) {
    webView.evaluateJavaScript("player.unmute()") { _,_ in
      completion?()
    }
  }
  
}
