<audio>¶
This element creates an audio player. Unlike <music>, the audio player is visible and can be interacted with by the player. Valid formats are .ogg
and .mux
Attributes¶
pos="X Y Z"
¶
Classic positioning, available for backwards compatibility
posn="X Y Z"
¶
size="width height"
¶
Classic sizing, available for backwards compatibility
sizen="width height"
¶
scale="factor"
¶
Element scale, a scale of 2
doubles the size.
data="audio.ogg"
¶
The path to the audio file. You can also wrap the path in the element instead. (Example: <audio>audio.ogg</audio>
)
play="1"
¶
This audio automatically starts playing when set to 1
looping="0"
¶
The audioplayer stops after the audio played once when set to 0
. The default value is 1
(looping)
Examples¶
<audio
pos="0 0 0"
data="alpine_race.ogg"
/>