import { PluginContainerData, Media, PlaybackOptions } from "./common.js";
const baseVideoData = {};
const VideoData = {
  fromJSON(object) {
    const message = { ...baseVideoData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? PluginContainerData.fromJSON(object.containerData) : void 0;
    message.video = object.video !== void 0 && object.video !== null ? Media.fromJSON(object.video) : void 0;
    message.thumbnail = object.thumbnail !== void 0 && object.thumbnail !== null ? Media.fromJSON(object.thumbnail) : void 0;
    message.disableDownload = object.disableDownload !== void 0 && object.disableDownload !== null ? Boolean(object.disableDownload) : void 0;
    message.title = object.title !== void 0 && object.title !== null ? String(object.title) : void 0;
    message.options = object.options !== void 0 && object.options !== null ? PlaybackOptions.fromJSON(object.options) : void 0;
    return message;
  },
  toJSON(message) {
    const obj = {};
    message.containerData !== void 0 && (obj.containerData = message.containerData ? PluginContainerData.toJSON(message.containerData) : void 0);
    message.video !== void 0 && (obj.video = message.video ? Media.toJSON(message.video) : void 0);
    message.thumbnail !== void 0 && (obj.thumbnail = message.thumbnail ? Media.toJSON(message.thumbnail) : void 0);
    message.disableDownload !== void 0 && (obj.disableDownload = message.disableDownload);
    message.title !== void 0 && (obj.title = message.title);
    message.options !== void 0 && (obj.options = message.options ? PlaybackOptions.toJSON(message.options) : void 0);
    return obj;
  }
};
export {
  VideoData
};
//# sourceMappingURL=plugin_video.js.map
