Skip to content

unsupported audio formats #4

@vectorsize

Description

@vectorsize

At the moment when loading an unsupported audio format the browser returns an error without any explanations, perhaps we can support that in the loader?

here's an example of how one can check the browser's capabilities:

var myAudio = document.createElement('audio'); 

if (myAudio.canPlayType) {
  // Currently canPlayType(type) returns: "", "maybe" or "probably" 
  var canPlayMp3 = !!myAudio.canPlayType && "" != myAudio.canPlayType('audio/mpeg');
  var canPlayOgg = !!myAudio.canPlayType && "" != myAudio.canPlayType('audio/ogg; codecs="vorbis"');

  console.log(canPlayMp3, canPlayOgg);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions