Mobile app version of vmapp.org
Login or Join
Chiappetta492

: My website hosts various m4a files but they do not play in Internet Explorer I've got an m4a file that loads properly in all browsers, except for Internet Explorer (no surprise). The error

@Chiappetta492

Posted in: #Audio #Html5 #InternetExplorer

I've got an m4a file that loads properly in all browsers, except for Internet Explorer (no surprise). The error is: "Invalid source".

My HTML5 code looks like this:

<audio controls>
<source src="../music/music.m4a" type="audio/aac">
Your browser does not support the audio element.
</audio>


I have also tried replacing the extension aac with m4a, like so:

<audio controls>
<source src="../music/lasthymn.m4a" type="audio/m4a">
Your browser does not support the audio element.
</audio>


Unfortunately, this still returns the "Invalid source" error... how can we fix this?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Chiappetta492

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

The problem would seem to be that you are specifying an unsupported/invalid mime-type in the type attribute. (See IE audio object - Scroll down for the supported mime-types.)

If this is AAC in an MP4 container then the correct mime-type should probably be audio/mp4.

Internet Explorer does not appear to be able to handle an incorrect mime-type, whereas other browsers are far more tolerable. In fact Chrome seems to be able to play the media regardless of what "type" you try to say it is.

10% popularity Vote Up Vote Down


 

@Courtney195

Fixed the issue by using the following HTML5 markup:

<audio src="music.m4a" controls></audio>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme