Pergunta

There is just code for video? How about code for audio, especially with flash fallback. Obviously it is working as there is an example at the top.

But if I just copy the code I only get this:

HTTP "Content-Type" of "audio/mpeg" is not supported. Load of media resource test.mp3 failed.

This is my .htaccess:

AddType audio/aac .aac
AddType audio/mp4 .mp4 .m4a
AddType audio/mpeg .mp1 .mp2 .mp3 .mpg .mpeg
AddType audio/ogg .oga .ogg
AddType audio/wav .wav
AddType audio/webm .webm

This is the code for the audio tag, I did include all the stuff as said on the docu:

<audio type="audio/mp3" src="test.mp3" preload="none" controls="control"></audio>
Foi útil?

Solução

As requested:

I haven't actually tried to use this before, but your mime type from htaccess doesn't match the one in your tag.

There is something else going on here though, since the mediaelementjs.com site appears to do exactly the same.

Glad it works though... sort of.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top