Playing only one video/audio source at a time

Hello people, I just recently got blocs and really love it!

It made me creating a site in no time, with almost no problems!

No that im fine tuning it, there are a few things, that I don’t know how to solve, one of it is, that when I hit start on several audio sources (or video) they all play at the same time.

Is there an option, so that when I click on a new audio source, the old source stops automatically?

Here is the site, with the problem

thx in advance!

Somebody cleverer than me may know a code solution for what you need and I can see the value, though I never thought about users clicking several play buttons at the same time.

I think this might do what you want:


Well its not about hitting play on several buttons at a time, but to be able to hit play on the next song/video, without having to manually stop the already playing.

Since I have uploaded the songs as video its better to approach the problem with videos in mind, then with songs. So the question would be, how can I make a video stop automatically, when starting a new video!

Thx for the brick, unfortunately this isn’t quiet what I need. The website is completely done already, All I need is a playing video to stop, when hitting play on another.

thank you :slight_smile:

Hopefully one of the Blocs users that does more hand coding may be able to offer a solution.

1 Like

Hello @mr.birdy, as @Flashman says, the player is a good investment. It can be styled to a certain extent to match your site, and only one audio sample will play at a time.
You can see (hear) it in action here:

1 Like

Thx, I already bought it, since it will be useful in the future, but it doesn’t seem to solve my current problem.

I want my page to remain as it is, without messing with the look. All I need is a feature to have it the same way, but so the one video stops, when the next plays ^^

But im fiddling around with theist bought player, as we “speak” :wink:

Sei I just did a quick google search and then this came up… Im nor coder, so I don’t exactly know, if this is of any use, but it sure seems to me, like it is :sweat_smile:
Anyone got an idea how to implement this in blocs?

here is a script but IDK how to use it…

Hello @mr.birdy is this what you need?

1 Like

wow, yea! Pretty much!

even better would be if the videos would go back into the original state (just because it looks ugly if the player items are still visible), but this makes the other videos stop, when I hit a new one, so its basically what I need!!

How did you do that? :smiley:

Ok, I found your script and copied it into the index file at the very bottom bevor the body closes, IDK if that is the smartest way, but it works! I have no idea about coding or whatsoever, but I feel like a pro hacker now, haha :smiley:

Thank You so much for the help!! Maybe I’ll even figure out how to put the videos back into their original status^^

The only way is refreshing internally the div. let me try something and I let you know.


Yeah that’s what I use.

I replaced all the videos with YouTube Videos due to copyright. Now the same problem comes up again… is there anyway to change the code so it also works with YouTube videos? :confused: