Skip to content

Instantly share code, notes, and snippets.

@vitaliy-bobrov
Created June 17, 2019 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitaliy-bobrov/15e463273f7a441272a0c465439fc6a5 to your computer and use it in GitHub Desktop.
Save vitaliy-bobrov/15e463273f7a441272a0c465439fc6a5 to your computer and use it in GitHub Desktop.
const audio = document.createElement('audio');
console.log(audio.canPlayType('audio/wav')); // "maybe"
if (!audio.canPlayType('audio/wav')) {
console.log('The format is not supported!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment