ERROR: Audio on app needs to always stop playing when moving away from media screen

Hello Thunkers! :wave:t2:

I have an app that automatically starts streaming audio tracks from a Thunkable database in a shuffled format as soon as it arrives on the MEDIA page. This works beautifully! (And I have a lot of you amazing fellow Thunkers to thank for this!! :star_struck: )

What I want it to do, is STOP playing whenever the user moves to another screen.

These are the blocks I’ve used to achieve this, when the user navigates away, on other screens:
Screen Shot 2021-11-05 at 19.48.05

Unfortunately, I seem to run into an error at times (not every time, but often enough)… normally when I arrive on MEDIA and try to navigate away “too quickly”… the audio files will keep playing on the next screen I go to, unless I navigate to yet another screen.

Sometimes it happens even after listening to these tracks for a while on MEDIA and navigate away.

It’s an obvious error that really needs sorting out! :sweat_smile:

This is a link to the project if you have a moment to see what I may be doing wrong!
https://x.thunkable.com/copy/242a5afa9c9fb6b5083351b30d448158

A huge thank you to anyone who can help me figure this one out!!

Anyone have an idea what might be happening here?

I really want the user navigating away from the Media screen to stop all of the audio.

Not sure why it happens sometimes and not other times.

Many thanks!