I have a webpage that should accept only audio files, more precisely only mp3 files. So I have an input:
<input type="file" accept=".mp3" />
The problem is, Safari on iOS 10.3 ignores the accept
attribute. And even if didn't, there still would be no sense to accept audio on iOS 10, because Files are not supported on this iOS version. But what is more confusing, is that Safari shows a modal with these options:
- Take Photo or Video
- Photo library
Since my website only accepts audio, these options don't make much sense. So I'd prefer to show an error message on this Safari version.
The question is: is there a way (via HTML only or JS) to detect if a browser natively supports passing audio as a file to an <input />
tag?