The sound component plays a designated sound.
There are a few ways you can set a sound source in your app:
Upload a sound to your app. Be careful of the Thunkable 50 MB app size limit
Provide a link to the sound. The link has to end in .mp3
, .wav
, etc
You can set a volume for the Sound component between 0 and 100.
The available options for Android are Duck Others and Do Not Mix.
Duck Others: This is the default option. If this option is set, your sound lowers the volume ("ducks") of audio from other apps while your audio plays.
Do Not Mix: If this option is set, your sound interrupts audio from other apps.
The options for iOS are Duck Others, Mix With Others, and Do Not Mix.
Duck Others: If this option is set, your sound lowers the volume ("ducks") of audio from other apps while your selected audio plays.
Mix With Others: This is the default option. If this option is set, your sound is mixed with audio playing in background apps.
Do Not Mix: If this option is set, your selected sound interrupts audio from other apps.
Keep in mind that the outcome depends on the interruption mode set by the other app playing the audio.
If this switch is set to true, the sound is muted.
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.
This block will be triggered when a sound stops playing.
This block will be triggered if there is an error with the Sound component.
Use this block to play the selected sound from the drop-down menu.
This block plays the selected sound starting from the second you choose.
Use this block to play the selected sound from the drop-down menu as an effect.
This sound can't be stopped or paused.
Use this block to pause the selected sound from the drop-down menu.
Use this block to resume the selected sound from the drop-down menu.
A sound can only be resumed if it has been paused.
Returns true
or false
value for whether this sound is playing.
Returns true
or false
value for whether this sound is loading.
Returns the total duration of this sound in seconds.
Returns the sound's specific time in seconds.
Use this block to stop the selected sound from the drop-down menu.
Set the Sound's source using the drop-down menu or by using a Text block to specify a filename or a URL.
Get the name of the Sound source.
Set the Sound volume to a value between 0 and 100.
Get the Sound volume.
Set Sound Interruption Mode on Android/iOS to a value between Duck Others, Mix With Others and Do Not Mix.
Get the Interruption Mode on Android.
Get the Interruption Mode on iOS.
Mute or unmute the sound by setting the value to True or False.
Get the value (True or False) if the sound is muted.