Demo project: PlayPauseDemo_JHSv1.hype.zip (339.7 KB)
In this Demo project “myAudio” is set as a global (in this case: “On Scene Load”)…
window.myAudio = hypeDocument.getElementById("myAudio1");
Note that the “id” is the id of the audio track as shown in the innerHTML of the button) NOT the button’s id set in the “Identity” panel.
(myAudio.paused) ? myAudio.play() : myAudio.pause();