Little Audio Bug - When Using Multiple Players

I really really like what you’ve done with the audio players!!!

I really like that it loops!

Like the look and feel!

I have 70 large players open at WindyTown

Can you put in a cut off command when switching audio players?

Example: playing one track - listening scrolls down sees another they would like to hear…

clicks

Now both tracks are playing!!!

Needs an auto off when new recording is selected…

Please :folded_hands:

-Mike :slight_smile:

I’ll chat with @ben tomorrow and see what we can do!

I put this in backend JS of my early audio player., which does the trick.

const audioPlayers = document.querySelectorAll("audio");

function stopOtherPlayers(currentPlayer) {
	audioPlayers.forEach(player => {
		if (player !== currentPlayer && !player.paused) {
			player.pause();
		}
	});
}

audioPlayers.forEach(player => {
	player.addEventListener("play", function () {
		stopOtherPlayers(this);
	});

	player.addEventListener("ended", function () {
		this.currentTime = 0;
	});
});

I’ve fixed this one, it’ll be included in the next build :slight_smile: