I want to play an audio of 1sec play on touchstart
and ends at touchend
event. I want it for piano button in my web project without using any library or framework.
Asked
Active
Viewed 64 times
0

Rohit
- 39
- 3
-
Create an audio element and call its methods in the event handlers. https://stackoverflow.com/questions/14834520/html5-audio-stop-function – kol Jul 26 '21 at 07:22
-
Does this answer your question? [HTML5 Audio stop function](https://stackoverflow.com/questions/14834520/html5-audio-stop-function) – Abdelrahman Hatem Jul 27 '21 at 00:12