+ 7
gt{ What should I use for a button? Basically, I want to press the button to turn the music on or off, I have a Switch of Material Design, but I do not know how to do it. } Where's the Code? basically add a click eventlistener which toggles play() & pause() or stop() audio state with button click. add if else conditions for your use case. Check below link for media events https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events Check below link for help with DOM & events. https://zellwk.com/blog/js-in-dom/ if you post in English you will get more answers. https://www.sololearn.com/discuss/333866/?ref=app
30th Dec 2017, 4:41 AM
Lord Krishna
Lord Krishna - avatar
0
Usando JS/Jquery y DOM
30th Dec 2017, 5:07 AM
Daniel
Daniel - avatar