Sound

The sound component plays a designated sound.

Set Source

There are a few ways you can set a sound source in your app:

  1. Upload a sound to your app. Be careful of the Thunkable 50 MB app size limitโ€‹

  2. Provide a link to the sound. The link has to end in .mp3, .wav, etc

Volume

You can set a volume for the Sound component between 0 and 100.

Blocks

Events

On Source Loaded

This block will be triggered when the source of a Sound component is loaded. It is recommended to use this block if changing a Sound component's source during app runtime.

If a given audio is already the source of a Sound component, and you use a block to set the same audio as the source of the Sound component, this block will not be triggered. We recommend using an if statement to say that if the audio is already the source of the Sound component, execute the action you would take when the source is loaded.

In the following screenshot, we want this audio to play when the Button is pressed. If this audio is already the source for the Sound component, we play the sound. If not, we set the audio to be the Sound's source. Once the source is loaded, we play the audio.

On Error

This block will be triggered if there is an error with the Sound component.

Functions

Play, Pause, Resume or Stop a sound.

A sound can only be resumed if it has been paused.

Set/Get Source

Set the Sound's source using the drop-down menu or by using a Text block to specify a filename or URL.

Get the name of the Sound source.

Set/Get Volume

Set Sound volume to value between 0 and 100.

Get Sound volume.

โ€‹