# Module: BivouacHelpers::SoundView
[ "README", "AUTHORS", "COPYING", "lib/bivouac/helpers/view/goh/base.rb", "lib/bivouac/helpers/view/goh/form.rb", "lib/bivouac/helpers/view/goh/html.rb", "lib/bivouac/helpers/view/goh/sound.rb", "lib/bivouac/helpers/view/goh/scriptaculous.rb", "lib/bivouac/helpers/view/goh/javascript.rb", nil].each do
JavaScriptGenerator.view_html
BivouacHelpers.view_html
BivouacHelpers::SoundView.view_html
BivouacHelpers::ScriptAculoUsView.view_html
BivouacHelpers::BaseView.view_html
BivouacHelpers::JavaScriptView.view_html
BivouacHelpers::HtmlView.view_html
BivouacHelpers::FormView.view_html
end

Module BivouacHelpers::SoundView < Object

(in files lib/bivouac/helpers/view/goh/sound.rb )

bivouac/helpers/view/html

Methods

Public Instance method: disable_sound( )

Disable sound

    # File lib/bivouac/helpers/view/goh/sound.rb, line 21
21:     def disable_sound( )
22:       javascript_tag(disable_sound_js + ";\n")
23:     end

Public Instance method: enable_sound( )

Enable sound

    # File lib/bivouac/helpers/view/goh/sound.rb, line 30
30:     def enable_sound( )
31:       javascript_tag(enable_sound_js + ";\n")
32:     end

Public Instance method: play_sound( file, options = {} )

Play the file file

Example:

  play_sound("my_song.mp3", :replace => true)

The file must be in public

You can change the behaviour with various options, see script.aculo.us for more documentation.

    # File lib/bivouac/helpers/view/goh/sound.rb, line 12
12:     def play_sound( file, options = {} )
13:       javascript_tag(play_sound_js(file, options) + ";\n")
14:     end