Getting audio players to play their respective streams out of their element


#584

Add this to all of them?
button.classList.remove("active");

showPlayButton

#585

That's what I've been spending the past half hour trying to get you to do.


#586

Here:
https://jsfiddle.net/zfs5qqq9/160/


#587

You forgot to do it on the D code too as well.


#588

Now this issue.
#566

https://jsfiddle.net/zfs5qqq9/161/


#589

I click on the D button, then on the yellow C button, and the D button stops playing as it's supposed to.

Please investigate further and provide more useful information about how to make the problem occur.


#590

#591

I click on the D button then on the B button, and the D button stops playing as it should do.
It seems to work for me.


#592

2 buttons are opened,

Should not be possible.


#593

Once again, I click on the D button and then on the A button, and the D button pauses as it's supposed to.

Pleased supply instructions on how to experience the problem that you are experiencing.


#594

Click on A

Then Click on D

They don't flip back.


#595

Good one, so it's the D code that needs to be updated.


#596

The isPlaying() function is where you'll find the issue. Compare it with the other isPlaying() functions.


#597

There's nothing to compare if they all look the same.

  function isPlaying(button) {
    var play = getPlay(button);
    return play.classList.contains("hidea") || play.classList.contains("hideb") ||
      play.classList.contains("hidec") || play.classList.contains("hided") ||
      play.classList.contains("hidee") || play.classList.contains("hidef");
  }

#598

I know that you are wrong with that statement. Look again.


#599

Fixed:
https://jsfiddle.net/zfs5qqq9/165/


#600

When I do this one, I need to rename active:
http://jsfiddle.net/9d03h1hk/195/


#601

You need to make it consistent with proper behaviour, using "activated" for something that's always different after you first click on it, and "active" for something that changes when you play/pause the player.


#602

With the inactive part for the links, I recommend that you adjust those too so that they only show when "activated" is on the links element.


#603

Now what:
https://jsfiddle.net/zfs5qqq9/175/