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


#444

speaker should be hidden.
https://jsfiddle.net/zfs5qqq9/8/

And it shouldn't flip back to initial.

only the svg should change back.


#445

Things now work when going from the first button playing to playing the second one.

It's time to get things working when going from the second button playing, to playing the first one.


#446

The showPlayButton() function currently only hides the pause image.
Instead of that, it needs to use the hideAllButtons() function instead.


#447

Don't forget to pass button as the argument to the hideAllButtons() function.


#448

  function showPlayButton(button) {
    var play = getPlay(button);
    var pause = getPause(button);
    hideAllButtons(button);
    show(play);

  }

#449

You haven't supplied a link yet after doing the update.

Does it work?


#450

https://jsfiddle.net/zfs5qqq9/12/

  function showPlayButton(button) {
    var play = getPlay(button);
    hideAllButtons(button);
    show(play);

  }

#451

The code A showPlayButton() function hasn't yet been updated. Do that.


#452

https://jsfiddle.net/zfs5qqq9/15/


#453

Add the hideAllButtons() function to the first set of code. Just below the hide() function is a good place for that.


#454

https://jsfiddle.net/zfs5qqq9/18/

ReferenceError: hideAllButtons is not defined
[Learn More]
_display:198:5
TypeError: button is undefined
[Learn More]
_display:283:5


#455

Read my previous post.


#456

this is wrong?

  function hide(el) {
    el.classList.add("hidea");
    hideAllButtons();
  }

#457

Don't change the hide() function.

You need to add the hideAllButtons() function from the second set of code, to the first set of code.


#458

https://jsfiddle.net/zfs5qqq9/20/

  function show(el) {
   el.classList.remove("hidea");
    el.classList.remove("hideb");
     hideAllButtons();
  }

#459

Don't change the hide() function. Put it back to what it was before.

You need to add the hideAllButtons() function from the second set of code, to the first set of code.


#460

https://jsfiddle.net/zfs5qqq9/21/


#461

You need to add the hideAllButtons() function from the second set of code, to the first set of code.


#462

Where???????????????


#463

Below the existing hide() function is a good place to put the hideAllButtons() function. Also move it in the second set of code so that it's just below the hide function there too.