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


#1507

Can this be done like this, or no?

I tried doing that here, doesn't seem to work on all buttons,
https://jsfiddle.net/nd1hsenr/183/

Plus,

getPause
Doesn't work when you put SVG.

    function hideAllButtons(button) {
        button.querySelectorAll("svg").forEach(hide);
    }

    function getPlay(button) {
        return button.querySelector("svg");
    }

    function getPause(button) {
           return button.querySelector("svg");
    }

#1508

No, that can't be done.


#1509

I have no idea why this line of code was on here, but can I get rid of it?
Is it not needed?
document.querySelector(".wrap").classList.add("inactivee");


  document.querySelector(".wrap").classList.add("inactivee");
  var playButton = document.querySelector(".wrap");
  playButton.addEventListener("click", initialOverlayClickHandler);
}());

Added:
https://jsfiddle.net/ffvkbLjw/234/
document.querySelector(".wrap").classList.add("inactivee");

Removed:
https://jsfiddle.net/ffvkbLjw/237/
document.querySelector(".wrap").classList.add("inactivee");


#1510

That was from when you were previously using inactive to trigger a change of state, which has since been changed to be active instead. Yes you can remove it.


#1511

Thank you......
And you can see I figured out how to get it working.


#1512

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.