BillyWM/jsmodplayer

Pure Javascript playback for other browsers

Closed this issue · 3 comments

Wean other browers off dynamicaudio.js. Unfortunately, support for the competing Web Audio API (audionode) is spotty. Opera currently supports neither.

  • Web Audio API

Still not enabled on Linux and Windows in Chrome 12 (Canary). Requires --enable-webaudio flag anyway.
http://peter.sh/2011/04/web-audio-api-script-de-obfuscation-an-updated-ui-and-the-contentsettings-api/
Enabled in Mac Safari, Chromium (I think?). Have heard it's buggy, crashes

As support improves in coming months, use a library that abstracts over Web Audio API and Audio Data API

Now for the alternatives....

  • Chrome:

Didn't use to support .wav for Audio elements, but now seems to according to:

http://www.jplayer.org/HTML5.Audio.Support/

Also didn't use to support .wav for Data URIs, but now seems to. May be problematic
Mar 2010: http://code.google.com/p/chromium/issues/detail?id=39713
Oct 2010: http://code.google.com/p/chromium/issues/detail?id=59367
First try to see if we can achieve gapless realtime playback.
Otherwise, try to see if we can pre-generate a whole .mod to .wav then play it
This should be possible with fast JS engines. Native players can do this in a few seconds

May have Data URI size limit

  • Opera:

See about on-the-fly method. Failing that, try pre-generation method.
May have Data URI size limit

I'd recommend the XAudioJS library I wrote: https://github.com/grantgalitz/XAudioJS
Supports:

  • mozilla audio data api
  • web audio api (chrome dev uses this by default now)
  • adobe flash 10
  • wav pcm data uris (limited, because buffering properly & gapless is hard with multiple small wav pcm blocks)
    You can ask me implementation questions if you need.

Thanks, I've come across your library actually and have been following your progress!
I think we might have crossed paths on Reddit one time too.

Problem status: solved itself.

It's 2014 and the Web Audio API is fully supported in most browsers, even many mobile ones........except, of course, IE. Never change, Microsoft.