📐
Thunkable Docs
Build an AppDrag and Drop DocsSnap to Place Docs
Snap to Place
Snap to Place
  • 👋Welcome to Thunkable Docs
  • 👶Getting Started
    • Signing In
    • Your Thunkable Projects Page
    • Tutorials
    • Live Test your App
  • 🆕Create New Project
    • Project Settings
    • Project Assets and Sizes
  • Thunkable Sample Projects
  • Public Gallery of Projects
  • 🛠️ Components
  • 🔘User Interface
  • Button
  • Label
  • Text Input
  • List Viewer
  • Web Viewer
  • Switch
  • Slider
  • Alert
  • Loading Icon
  • Date Input
  • Time Input
  • PDF Reader
  • Rating
  • 📊Data Viewers
  • Data Viewer List
  • Data Viewer Grid
  • Custom Data Viewer Layout
  • Data Sources
  • 📐Layout
  • Top Tab Navigator
  • Bottom Tab Navigator
  • Stack Navigator
  • Drawer Navigator
  • Screen
  • Row
  • Column
  • 📷 Image
  • Image
  • Photo Library
  • Camera
  • Barcode Scanner
  • Image Recognizer
  • Animation by Lottie
  • Video
  • Video Recorder
  • 🗄️ Data
  • Local Storage
  • Local DB
  • Realtime DB by Firebase
  • Airtable
  • Media DB by Cloudinary
  • File Picker
  • Web API
  • 🌍Location
  • Maps by Google and Apple
  • Location Sensor
  • 💲Monetization
  • Ads by AdMob
  • In-App Purchase
  • 🌐Sensors
  • Gyroscope
  • Magnetometer
  • Accelerometer
  • Timer
  • Bluetooth Low Energy
  • 🔊Voice
  • Sound
  • Text to Speech
  • Speech Recognizer
  • Translator
  • Audio Recorder
  • 🤝Social
  • Share
  • Email Sign In by Firebase
  • Push Notifications by One Signal
  • 🎮Gaming
  • Canvas
  • Sprites
  • Sprite Gallery
  • Canvas Label
  • 🤖Gaming Blocks🎮
  • Events
  • Motion
  • Looks
  • Direction
  • Sensing
  • Add & Remove
  • Stage
  • Canvas Label
  • 🤖Blocks
  • Control
  • Logic
  • Math
  • Text
  • Lists
  • Color
  • Objects
  • Device
  • Variables
  • Functions
  • "Any Component" Blocks
  • 🖥️ App Services & Emulators
  • 🔒App Data Privacy
  • ➕Make Copy
  • 📥Download
  • 📤Share
  • 📱Publish
  • Publish to App Store (iOS)
    • TestFlight Overview
      • TestFlight in Depth
  • Publish to Play Store (Android) with AAB
  • Publish as a Web App
  • Generate Screenshots
  • 🔎Troubleshooting
    • Login Issues
    • FAQs
  • 📏Intro to Spacing
  • 🖼️ Intro to Sizing
  • 🔤Fonts
  • 💾Managing Storage
  • 📝Bugs and Product Feedback
  • Snap to Place Hour of Code Videos
Powered by GitBook
On this page
  • Set Source
  • Volume
  • Interruption Mode Android
  • Interruption Mode iOS
  • Muted
  • Blocks
  • Events
  • On Source Loaded
  • Ends
  • On Error
  • Functions
  • Play
  • Play from
  • Play as Effect
  • Pause
  • Resume
  • Is Playing?
  • Is buffering?
  • duration
  • time
  • Stop
  • Set/Get Source
  • Set/Get Volume
  • Set/Get Interruption Mode
  • Set/Get muted

Was this helpful?

Export as PDF

Sound

The sound component plays a designated sound.

PreviousVoiceNextText to Speech

Last updated 6 months ago

Was this helpful?

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

  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.

Interruption Mode Android

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.

Interruption Mode iOS

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.

Keep in mind that the outcome depends on the interruption mode set by the other app playing the audio.

Muted

If this switch is set to true, the sound is muted.

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.

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.

Ends

This block will be triggered when a sound stops playing.

On Error

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

Functions

Play

Use this block to play the selected sound from the drop-down menu.

Play from

This block plays the selected sound starting from the second you choose.

Play as Effect

Use this block to play the selected sound from the drop-down menu as an effect.

This sound can't be stopped or paused.

Pause

Use this block to pause the selected sound from the drop-down menu.

Resume

Use this block to resume the selected sound from the drop-down menu.

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

Is Playing?

Returns true or false value for whether this sound is playing.

Is buffering?

Returns true or false value for whether this sound is loading.

duration

Returns the total duration of this sound in seconds.

time

Returns the sound's specific time in seconds.

Stop

Use this block to stop the selected sound from the drop-down menu.

Set/Get Source

Get the name of the Sound source.

Set/Get Volume

Set the Sound volume to a value between 0 and 100.

Get the Sound volume.

Set/Get Interruption Mode

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.

Set/Get muted

Mute or unmute the sound by setting the value to True or False.

Get the value (True or False) if the sound is muted.

Do Not Mix: If this option is set, your selected sound interrupts audio from other apps.

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 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.

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

Text
app size limit
if statement