# Thunkable X - playing music (ie a theme song) while using the app

**URL:** <https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661>\
**Category:** Questions about Thunkable X\
**Created:** [March 29, 2019, 4:17am UTC](https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661 "2019-03-29T04:17:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rshepard](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@rshepard](https://community.thunkable.com/u/rshepard)\
**Post date:** [March 29, 2019, 4:17am UTC](https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661/1 "2019-03-29T04:17:43Z")

</div>

Okay, I have a couple of posts, as I am trying to get comfortable with thunkable x. I have searched the community and not found anything specific to these issues.

This one is about music. I added a song to my app that I want to play while user is accessing the app.

It works fine except:

When I close (ie minimize, like to go to another app, browser, etc.), the music keeps playing. It also starts to ‘double up’ , as in the song plays over itself as I leave/enter the app.

I am using ‘onsourceloaded’ function to call the song to play.

Ideally, I would like a song to play continually while user is enjoying the app, looping. And, it should pause or start over when a user leaves the app and start again when user returns to the app. (Most apps/games have such a theme song that plays in the background while user is playing)

Anyone have any success with such an endeavor? Appreciate any input.

Thanks  
Roger

---

<div class="post-metadata">

**Author:** ![rshepard](https://avatars.discourse-cdn.com/v4/letter/r/d26b3c/32.png) [@rshepard](https://community.thunkable.com/u/rshepard)\
**Post date:** [March 30, 2019, 7:44pm UTC](https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661/2 "2019-03-30T19:44:24Z")

</div>

Just to add info regarding my issue with sound in my project: when I access the app on my IPad, the sound DOES stop when I leave the app to go to another program.

However the sound will not stop when I leave the app using my android phone. But when I receive a phone call on my android phone and have left the app, the sound will stop then.

Naturally I want the theme song of the app to only play when I am accessing the app. Anyone else have this issue, or know how to ensure the sound only plays when I am using the app? Note I am using an mp3 file with the sound component, using the “When onsourceloaded” function.

Please advise if anyone has had this issue and/or can advise a solution.

Thank you!  
Roger

---

<div class="post-metadata">

**Author:** ![mirian.satoj8](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mirian.satoj8](https://community.thunkable.com/u/mirian.satoj8)\
**Post date:** [October 24, 2020, 4:48pm UTC](https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661/3 "2020-10-24T16:48:58Z")

</div>

Hi Roger,  
We are getting the same behaviour as you are describing.  
Can you please share with me if you got a solution for this?  
Many thanks in advance.  
Regards, Mirian

---

<div class="post-metadata">

**Author:** ![Dean\_Artis](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dean\_Artis](https://community.thunkable.com/u/Dean_Artis)\
**Post date:** [October 24, 2020, 5:39pm UTC](https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661/4 "2020-10-24T17:39:06Z")

</div>

Is it really a sensible thing to ask someone for a solution 2 years after they last posted in this topic?

Create a new topic, explain what should be happening, and what happens instead. Show your blocks. Then maybe you’ll get an answer.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:15pm UTC](https://community.thunkable.com/t/thunkable-x-playing-music-ie-a-theme-song-while-using-the-app/73661/5 "2024-11-08T12:15:53Z")

</div>


