5

I'd like to know if there is any cross browser light-weight invisible sound players that are controlled by JavaScript, but not using any frameworks like jQuery.

I'm not looking to use HTML5 at all. So maybe a solution that uses Flash.

Something that is not more than load() and play().

CodeOverload
  • 47,274
  • 54
  • 131
  • 219
  • 2
    maybe HTML5 is what you need? – Achshar Sep 09 '11 at 10:44
  • @Achshar i believe that HTML5 tags are still limited, am i missing something? – CodeOverload Sep 09 '11 at 10:55
  • well they are kind of casual.. depends on what do you want to use it for? the target audience.. e.g for something like SO or techcrunch, it is kind of safe to use it but for, like, a government or business website it is not? – Achshar Sep 09 '11 at 10:58
  • 2
    i'll go out on a limb and say that unless you are not making a site to be used by old people, go ahead and use HTML5. – Achshar Sep 09 '11 at 11:00
  • 1
    There's probably a reason why stuff like for example the Google Doodles and Angry Birds on the web, that use HTML(5) for the visuals, still uses Flash for the sound. http://www.phoboslab.org/log/2011/03/the-state-of-html5-audio – Lars Blåsjö Sep 25 '11 at 12:23
  • IE8 doesn't support HTML5 and according to this: http://gs.statcounter.com/#browser_version-ww-monthly-201010-201210 it still accounts for about 13% of the user base, including a lot of corporate users, so HTML5 is not yet the whole answer. – Andrew Wyld Oct 16 '12 at 09:33

4 Answers4

8

I believe SoundManager 2 may fit your needs:

http://www.schillmania.com/projects/soundmanager2/

Lars Blåsjö
  • 6,118
  • 2
  • 19
  • 23
1

SoundJS

http://www.createjs.com/#!/SoundJS

A Javascript library that provides a simple API, and powerful features to make working with audio a breeze.

  • Nice looking examples
  • Easy to use
  • Large following of users
  • Continuous development
  • Published on GitHub
  • and you can use it via a CDN:

http://cdnjs.cloudflare.com/ajax/libs/SoundJS/0.4.1/soundjs.min.js

Community
  • 1
  • 1
cwd
  • 53,018
  • 53
  • 161
  • 198
  • The latest version of SoundJS: [http://code.createjs.com/soundjs-0.5.0.min.js](http://code.createjs.com/soundjs-0.5.0.min.js) – OJay Oct 01 '13 at 15:50
1

If you don't care about old browser, i'd suggest looking at what you can do with the audio tag of HTML5.

For example to play see: http://dev.w3.org/html5/spec/Overview.html#playing-the-media-resource

Py.
  • 3,499
  • 1
  • 34
  • 53
  • Even if i had to ignore old browsers, i still have to provide multiple audio formats :( – CodeOverload Sep 09 '11 at 11:01
  • You mean more than mp3 and ogg? (I agree that the different supported format change from one browser to another) – Py. Sep 09 '11 at 11:08
  • well not even mp3, Mozilla cant play mp3 :O – Achshar Sep 09 '11 at 11:15
  • Yeah I just saw that (in the following question: http://stackoverflow.com/questions/4923136/why-doesnt-firefox-support-mp3-file-format-in-audio ) – Py. Sep 09 '11 at 11:19
  • Converting files shouldn't be of a issue. It's not hard to create a shell script that converts a full directory of audio files to ogg files (I've done it multiple times using cvlc). – Rob W Sep 20 '11 at 20:15
  • 1
    Converting files may not be an issue by itself, but if you have to keep a mp3, ogg and wav copy of each audio file on your server it starts to be a pretty big waste of resources. Even though I don't like Flash very much, I think it will stay the best solution for quite some time concerning audio support. – Shautieh Sep 20 '11 at 20:51
1

The 1Pixelout Player for Wordpress could by used (just use the SWF) and then hidden with CSS http://wpaudioplayer.com/

-edit DewPlayer has also JavaScript Controls (scroll down to the bottom) http://www.alsacreations.fr/dewplayer-en

yunzen
  • 32,854
  • 11
  • 73
  • 106