Let me see if I can build some different code for you
But before it, please confirm these points -
When screenSad opens, you will start the background guitar music, with a random happy music to make the user happy.
When he/she clicks the pause button, the background guitar music, as well as the happy music will stop. Then the resume button will appear, the pause button will hide.
When he/she clicks the resume button, the background guitar and the happy song resumes.
Ok.
If you are on your laptop/desktop right now, can you please open the first music link (given in the screenshot above) & post a screenshot of what appears?
I want to check whether the link redirects to a perfect/proper audio, instead of any other webpage.
Now, I would require some time, I am making blocks according to your requirements.
I request you to stay online in the community till then, because I may ask any question to you, and you might need to provide the answer…
So you can get your code as early as possible from my side
I am also wondering as well if I should Duplicate the Media screen 4 times for each of the 4 categories or have only 1 Media screen that somehow knows which button the user clicked to navigate to the screen (sad, mad, stressed or good) then call 4 different tables with tracks for these categories?
Someone said in this post below that duplicating screens is not the best practice.
However, it would only be 4 screens? So I wonder. What do you think?
Thank you so much, I completely missed this. When I amended that, the audio files began to play. I even added the background guitar and it all worked great! Thank you so much for all of your help.
About 75%! This is awesome already, so pleased to see it finally working this well.
There are a few more things to iron out.
Ideally, I would like there also to be:
Infinite loop for both background music and audio.
A “smart shuffle” (so it does not pull the same audio files again and again, but keeps it on a new track for a set amount of few iterations. For example, when I test it, sometimes the same audio file plays 3x. )
Also, if I press the pause button right away, the track files do not play at all. It’s as if this cancelled the process. When I click play again and wait, background music resumes, but the tracks do not ever start. However if I enter the Media page and wait, then click pause when the app has a chance to start the tracks, they will pause and play just fine like the background music.
So happy to see it coming along! Thank you again for showing me how this works!
Thank you Domhall, this makes a lot of sense! I want to do this the best way to save work in the future.
I have a question for this app.
If the user clicks a button on Screen1 (they are “categories” = sad, mad, stressed, good) … and the button navigates them to the Media screen… how can we then tell the Media screen that the user picked / clicked that specific category?
All 4 category buttons will navigate to Media and then the Media screen needs to call the correct category of music per their selection.
I was told not to have a navigation button do any other functions, so I’m unsure how to achieve this.