Function hasFormat

  • check if the given audio format is supported

    Parameters

    • codec:
          | "ogg"
          | "mp4"
          | "webm"
          | "mp3"
          | "mpeg"
          | "opus"
          | "oga"
          | "wav"
          | "aac"
          | "caf"
          | "m4a"
          | "m4b"
          | "weba"
          | "dolby"
          | "flac"

      the audio format to check for support

    Returns boolean

    return true if the given audio format is supported