
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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/, ''));
Advertisements