Software Archive
Read-only legacy content
17061 Discussions

Defining audio codecs in a data URI (data URL)

Joan_A_
Beginner
414 Views

Hello,

I am working with data URIs (data URLs) for audio files and I have noticed that they only have the MIME type and not the codecs.

For example, a typical data URL encoded in base 64 for OGG format starts with 'data:audio/ogg;base64,' (and continues with the data itself encoded in base64).

Since OGG is just a container format and not an audio format itself, is it possible to also define the codecs inside the data URL? As for example 'data:audio/ogg;codecs="vorbis";base64,' or something similar.

If it is not possible, why not? Is it not needed? In the case it is not needed, why do some web browsers need us to specify the codecs in order to get "probably" instead of "maybe" string from canPlayType method of the Audio API (HTML5)?

Thank you very much in advance.

Cheers,
 Joan

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
414 Views

Joan -- I think you search Stack Overflow and similar forums for the answers you're seeking. We are providing support for the use of the XDK and helping people integrate Cordova plugins into their apps. We're not able to provide answers to HTML5 architecture issues, that is well beyond the scope of this forum.

0 Kudos
Reply