In reply to @bimbe_lien on Twitter.
AudioJS elements expose a player
object, with a play()
method that can be called programmatically—from outside of the element.
Try this:
- Open http://jedfoster.com/AudioJS/ in your browser
- Open the console and paste in this:
document.body.querySelector(".tube-css audio").player.play();
Note that the AudioJS element is the <audio>
tag.
So you to wire up an outside element you could do:
$('#outsideElement').click(function() { $('#audioPlayer').player.play(); });