Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using <source> tags to enable multiple audio format support. #6

Closed
amari opened this issue Mar 15, 2012 · 1 comment
Closed

Using <source> tags to enable multiple audio format support. #6

amari opened this issue Mar 15, 2012 · 1 comment

Comments

@amari
Copy link

amari commented Mar 15, 2012

Safari lacks Ogg support, and Firefox and Chromium do not support Mp3. This is much more future proof than the current solution of swapping the file extension for different browsers.

For example, what if chrome dropped ogg in favor of some webm-like audio format. Code would have to be updated, existing assets would need to be converted.

If the source tag were to be used, then the developer could change

SoundJS.filetypes = ["ogg", "mp3", "m4a"] to SoundJS.filetypes = ["ogg", "mp3", "m4a", "weba"] without having to fiddle with documentation of the audio formats that a browser supports.

The browser would only load the format that it needs.

@amari
Copy link
Author

amari commented Mar 15, 2012

Never mind, failed to read documentation in SoundJS.js

@amari amari closed this as completed Mar 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant