audio_tag(*sources)
Instance Public methods
Returns an HTML audio tag for the
source
. The source
can be full path or file that
exists in your public audios directory.
audio_tag("sound") # => <audio src="/audios/sound" /> audio_tag("sound.wav") # => <audio src="/audios/sound.wav" /> audio_tag("sound.wav", autoplay: true, controls: true) # => <audio autoplay="autoplay" controls="controls" src="/audios/sound.wav" /> audio_tag("sound.wav", "sound.mid") # => <audio><source src="/audios/sound.wav" /><source src="/audios/sound.mid" /></audio>
Please login to continue.