Skip to content

Instantly share code, notes, and snippets.

@grobertson
Created July 16, 2013 14:45
Show Gist options
  • Save grobertson/6009380 to your computer and use it in GitHub Desktop.
Save grobertson/6009380 to your computer and use it in GitHub Desktop.
try {
if(this.Modernizr.audio){
// Ogg
if(this.Modernizr.audio.ogg === "probably"){
this.log('This browser probably supports ogg vorbis');
this.browserOggSupport = true;
}
if(this.Modernizr.audio.ogg === "maybe"){
this.log('This browser may support ogg vorbis');
this.browserOggSupport = true;
}
//Mp3
if(this.Modernizr.audio.mp3 === "maybe") {
this.log('This browser may support mp3');
this.browserMp3Support = true;
}
if(this.Modernizr.audio.mp3 === "probably") {
this.log('This browser probably supports mp3');
this.browserMp3Support = true;
}
}else{
this.log('No audio support detected.');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment