+ 8

Audio Pause

How to make an audio pause onclick of another element?

28th Jul 2020, 5:50 PM
Kayla Onobun (QOG)
Kayla Onobun (QOG) - avatar
5 Antworten
28th Jul 2020, 11:07 PM
PresidentOfYes12
PresidentOfYes12 - avatar
+ 6
Yeah i think so since it is javascript used to control canvas so yes
28th Jul 2020, 6:05 PM
Kenephil
Kenephil - avatar
+ 6
You can identify it first. For example: var getaud=document.getElementById("audio") function start(){ getaud.play(); //or: getaud.pause()
28th Jul 2020, 6:30 PM
Goke Ekundayo
Goke Ekundayo - avatar
+ 4
Thanks guys but the audio wasn't put in the HTML, it was put in the JS https://code.sololearn.com/WCY9dwN1c3r6/?ref=app
28th Jul 2020, 7:55 PM
Kayla Onobun (QOG)
Kayla Onobun (QOG) - avatar
29th Jul 2020, 4:37 PM
Dark
Dark - avatar