- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML5 audio control stop button
Try the following code to add a stop button to your audio in HTML5:
function displayStopBtn() { var myPlayer = document.getElementsByTagName('audio')[0]; myPlayer.pause(); myPlayer.currentTime = 0; }
You can also include jQuery:
$("#stopButton").click(function () { audio.pause(); audio.currentTime = 0; });
- Related Articles
- HTML5 Audio to Play Randomly
- HTML5 check if audio is playing
- How to play HTML5 Audio Randomly
- How to detect HTML5 audio MP3 support
- HTML5 audio not playing in PhoneGap App
- Stop Web Workers in HTML5
- Is it possible to style HTML5 audio tag?
- Image button with HTML5
- How to stop a loop with a stop button in Tkinter?
- How do we embed audio in web pages in HTML5?
- HTML5 display as image rather than “choose file” button
- Create a media resources for media elements, defined inside video or audio elements in HTML5.
- How do you create a Tkinter GUI stop button to break an infinite loop?
- HTML DOM Audio Object
- What is Audio Steganography?

Advertisements