My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

Update 2008: I've moved to jquery and soundmanager is a great replacement for sound.js or jquery.sound.js

sound.js allows to play .wav/.mp3 files easily.

Examples

show.rjs

page.play "alert.mp3"

will generate:

Sound.play("sounds/alert.mp3")

show.rhtml / show.html.erb

 <%=link_to_function 'Press to Listen' do |page|
   page.play "alert.mp3"
 end
 %>

Supported Files

Tested with MP3 and WAV files.

Requirements:

  • Prototype 1.6
  • Script.aculo.us 1.8

Extra:

Installation

script/plugin install http://js-sound.googlecode.com/svn/trunk/js-sound

or

piston init http://js-sound.googlecode.com/svn/trunk/js-sound vendor/plugins/js-sound

Save you sound effects into public/sounds folder.

Author

Marcus Derencius - http://derenci.us - derencius gmail 2007-12

Powered by Google Project Hosting