- 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
How to detect HTML5 audio MP3 support
To detect HTML5 audio MP3 support, use the Modernizr library.
As stated in the official specification −
Source − Screenshot from the official Modernizr documentation
For detecting HTML5 audio MP3 support, you can also check the User-Agent to detect which browser is used.
You can also use JavaScript to test −
var x = document.createElement('audio'); return !!(x.canPlayType && x.canPlayType('audio/mpeg;').replace(/no/, ''));
- Related Articles
- How to download Audio MP3 from YouTube mobile app?
- How to play HTML5 Audio Randomly
- HTML5 Audio to Play Randomly
- HTML5 audio control stop button
- How to check web browser support in HTML5
- Is it possible to style HTML5 audio tag?
- HTML5 check if audio is playing
- Using Modernizr to detect HTML5 features
- HTML5 audio not playing in PhoneGap App
- How do we embed audio in web pages in HTML5?
- Does HTML5 Canvas support Double Buffering?
- How to detect point on canvas after canvas rotation in HTML5
- Detect folders in Safari with HTML5
- Which browsers support the HTML5 History API?
- Detect compatibility of the new HTML5 tag with jQuery.

Advertisements