Play audio
Plays an MP3 track in your app.
π The Tag
This set of tags allows to play an MP3 track in your app.
[action:play:URL] or [action:play]
Use [action:play] if you are getting the URL by API.Plays the MP3 audio track. When this element is visible, the pause element will be invisible, and vice versa.
Replace URL with an actual URL ending in .mp3
π Where to add the tag: Any layer, except top-level and container.
[action:pause]Pauses the MP3 audio track. This element will be invisible until user clicks the play element.
π Where to add the tag: Any layer, except top-level and container.
[audio:progress:#]You can change the color by setting the HEX color in the tag.
Displays a progress bar to move forward or rewind the audio track. The appearance will be the native component for each device.
π Where to add the tag: A Rectangle layer.
[audio:background]Optional tag. If this tag is included, audio files will continue playing when the app is open in the background. In order to stop the audio, users will have to return to the page where the audio was started and tap pause.
If this tag is not included, audio files will only play when its page is visible and will pause otherwise. Requesting a new build for your published app is required after adding this tag.
π Where to add the tag: Any layer, except top-level and container.
[audio:loading]Optional tag. The element that will be displayed from the moment the play element is clicked until the audio file is ready to be played, along with the pause element.
π Where to add the tag: Any layer, except top-level and container.
[audio:currenttime]Displays the progressive playing time & the total time of the audio track.
π Where to add the tag: A text layer.
[audio:totaltime]Displays the total time of the audio track.
π Where to add the tag: A text layer.
Make sure your phone it's not on mute.

π·οΈ How to add the tag
1. Paste the tag [action:play:URL] into the layer name of your play element (can be an icon, shape, button, or text).

2. Paste the tag [action:pause] into the layer name of your pause element (can be an icon, shape, button, or text).

3. Paste the tag [audio:currenttime] into the layer name of a text layer. The placeholder time in your design will be replaced by a progressive counter in 00:00 format.

4. Paste the tag [audio:totaltime] into the layer name of a text layer. The placeholder time in your design will be replaced by the real total time of the audio in 00:00 format.

5. [OPTIONAL] Add the tag [audio:background] to the same layer where you added [action:play:URL].

6. [OPTIONAL] Paste the tag [audio:loading] into the layer name of your loading element.

7. Import to Bravo & preview on Bravo Vision π
πΎ Example files
Duplicate the files below to see how to set it up!
Last updated
Was this helpful?