Back to Aframe

A Sound

docs/primitives/a-sound.md

1.7.1565 B
Original Source

The sound primitive wraps the sound component.

Example

html
<a-scene>
  <a-sound src="src: url(click.mp3)" autoplay="true" position="0 2 5"></a-sound>
</a-scene>

Attributes

AttributeComponent MappingDefault Value
autoplaysound.autoplayfalse
loopsound.loopfalse
onsound.onnull
srcsound.srcnull
volumesound.volume1