text: /*
   * Copyright (C) 2021 Alibaba Inc. All rights reserved.
   * Author: Kraken Team.
   */
  
  #ifndef KRAKENBRIDGE_MEDIA_ERROR_EVENT_H
  #define KRAKENBRIDGE_MEDIA_ERROR_EVENT_H
  
  #include "bindings/qjs/dom/element.h"
  
  namespace kraken::binding::qjs {
  
  
  void bindMediaErrorEvent(std::unique_ptr<JSContext> &context);
  
  struct NativeMediaErrorEvent {
    NativeEvent nativeEvent;
    int64_t code;
    NativeString *message;
  };
  class MediaErrorEvent : public Event {
  public:
    MediaErrorEvent() = delete;
    explicit MediaErrorEvent(JSContext *context);
    JSValue constructor(QjsContext *ctx, JSValue func_obj, JSValue this_val, int argc, JSValue *argv) override;
    
    OBJECT_INSTANCE(MediaErrorEvent);
  private:
    
  };
  class MediaErrorEventInstance : public EventInstance {
  public:
    MediaErrorEventInstance() = delete;
    explicit MediaErrorEventInstance(MediaErrorEvent *event, NativeEvent *nativeEvent);
  private:
    DEFINE_HOST_CLASS_PROPERTY(2, code, message)
  };
  
  }
  
  #endif //KRAKENBRIDGE_MEDIA_ERROR_EVENTT_H
  