- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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.
var x = document.createElement('audio'); return !!(x.canPlayType && x.canPlayType('audio/mpeg;').replace(/no/, ''));
- How to play HTML5 Audio Randomly
- HTML5 Audio to Play Randomly
- HTML5 audio control stop button
- How to check web browser support in HTML5
- HTML5 check if audio is playing
- Using Modernizr to detect HTML5 features
- Is it possible to style HTML5 audio tag?
- Does HTML5 Canvas support Double Buffering?
- HTML5 audio not playing in PhoneGap App
- How do we embed audio in web pages in HTML5?
- Which browsers support the HTML5 History API?
- Detect folders in Safari with HTML5
- How to detect point on canvas after canvas rotation in HTML5
- HTML5 <audio> tag on Android for PhoneGap application
- HTML5 <audio> tag not working in Android Webview