method
audio_tag
v3.0.7 -
Show latest stable
-
0 notes -
Class: ActionView::Helpers::AssetTagHelper
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0
- 2.0.1
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.2
- 2.3.8
- 3.0.0 (0)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (-38)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
audio_tag(source, options = {})
public
Returns an html audio tag for the source. The source can be full path or file that exists in your public audios directory.
Examples
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" />


