How to play a m4a/mp3 file via html file

There is licensing issue playing m4a formats in modern browsers

So your browser’s console will generate something as the following:

Cannot play media. No decoders for requested formats: audio/m4a

Just use mp3, here is example:

Download mp3 sample and insert it into your html file:

cat test.html
<audio controls="controls">
<source src="file_example_MP3_700KB.mp3" type="audio/mp3" />




Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *