문제

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>
도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top