   
   func player(_ player: DMPlayerViewController, didReceiveEvent event: PlayerEvent)
   func player(_ player: DMPlayerViewController, openUrl url: URL)
+  func player(_ player: DMPlayerViewController, didFailWithError error: Error)
   
 }
 

    }
    return nil
  }
}


    guard let event = EventParser.parseEvent(from: message.body) else { return }
    delegate?.player(self, didReceiveEvent: event)
  }
  
}

/// A weak delegate bridge. WKScriptMessageHandler retains it's delegate and causes a memory leak.
