text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  
  const isObjectFilled = obj => {
    for (let key in obj) {
      if (obj.hasOwnProperty(key)) {
        if (obj[key] === null) {
          return false;
        }
      }
    }
  
    return true;
  };
  
  class MediaInfo {
    constructor() {
      this.mimeType = null;
      this.duration = null;
      this.hasVideo = null;
      this.video = {
        codec: null,
        width: null,
        height: null,
        profile: null,
        level: null,
        frameRate: {
          fixed: true,
          fps: 25,
          fps_num: 25000,
          fps_den: 1000
        },
        chromaFormat: null,
        parRatio: {
          width: 1,
          height: 1
        }
      };
      this.hasAudio = null;
      this.audio = {
        codec: null,
        sampleRate: null,
        sampleRateIndex: null,
        channelCount: null
      };
    }
  
    isComplete() {
      return MediaInfo.isBaseInfoReady(this) && MediaInfo.isVideoReady(this) && MediaInfo.isAudioReady(this);
    }
  
    static isBaseInfoReady(mediaInfo) {
      return isObjectFilled(mediaInfo);
    }
  
    static isVideoReady(mediaInfo) {
      if (!mediaInfo.hasVideo) {
        return true;
      }
  
      return isObjectFilled(mediaInfo.video);
    }
  
    static isAudioReady(mediaInfo) {
      if (!mediaInfo.hasAudio) {
        return true;
      }
  
      return isObjectFilled(mediaInfo.video);
    }
  
  }
  
  exports.default = MediaInfo;