Pergunta

I'm having a problem with mediaelement js and webm files in FF. I have converted a mp4 vide into a webm file, and made it available on my server. I'm using the code below.

<video width="320" id="player1" height="240" controls="controls">
<source type="video/webm"   src="somefile.webm" />
<source type="video/ogg"   src="somefile.ogv" />
<source type="video/mp4" src="somefile.mp4" />
<-- there is also a flash fallback which is working fine in FF, but I've removed it here to simplify the example -->
</video>

This works fine in all browsers except Firefox. It tells me that the file is damaged and can not be played. But, if i open firebug and open the webm-file by selecting "Open in new tab" - the video is loaded from my server and played correctly - in Firefox.

Is there anyone else who has come across the same problem and knows a solution to it? I've been searching, but i seem only to find answers saying that the file doesn't have the correct mime-type. I don't think that's the problem in my situation, since it plays very well in FF when i open it in a new tab, and not playing through mediaelement js.

Edit: The response headers in firefox, for the file that is "damaged" says "Content-Type video/webm"

Foi útil?

Solução

Seems like the server did not set the correct Content-Type after all. I got it fixed, and now it works like a charm.

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