I have this sample code, that works:
<video src="./ellen.ogv" width="320" height="240" type='video/ogg; codecs="theora, vorbis"' controls></video>
And this one that doesn’t work:
<video src="./ellen" width="320" height="240" type='video/ogg; codecs="theora, vorbis"' controls></video>
The only change was on the name of the file. First one “point” his extension, second one does not.
This is just a simple view of my problem, where the file I want to stream CAN’T have extension, but is a theora/vorbis (ogv) file.
How can I deal with this problem, i.e., make video tag works even if my filename doesn’t have a “.extension” ?
First, the
typeattribute is not allowed on the video tag. Place thetypeattribute in asourcetag instead, like this:Second, video files must be served with the proper MIME type by the web server, even when you have specified a
typeattribute in thesourceelement. Make sure that your web server serves your video files withContent-Type: video/oggregardless of whether they have the.ogvextension or not.