How to Play an AVI on Your Website
Getting video content on a website has always been a challenge, since video files are large and resource heavy. Sites such as YouTube have tried to ease such a task with embedding tools, but most Web designers agree that flash video does not offer the quality or reliability that other video codecs do. Luckily though, HTML5 now supports a video element tag, meaning you can use most video containers, such as .mp4 or .avi.
Instructions
-
-
1
Change the doctype of your index.html file to <!DOCTYPE HTML> to indicate to the browser that you are using HTML5. Save the file, and close it if you are not going to place the video in the index file.
-
2
Decide where you wish to place your .avi video file in your website. At this location, type: <video height="" width="" controls></video> . In between the quotation marks, enter the height and width values of your video. This will tell the browser how to render your video file.
-
-
3
Enter your video's location in between the two video tags. Your code should look something like this:
<video height="620" width="480" controls>
<source src="FILENAME.avi" type ="video/avi" />
</video>Keep in mind that the dimensions of said video are merely for illustrative purposes and that "FILENAME.avi" would need to be replaced with the name of your video.
-
4
Save your index.html (or whatever .html document you are working in) to finalize all changes. The .avi file will now play on your website.
-
1
Tips & Warnings
At the moment, Safari, Chrome, and Firefox all support this implementation of Web video.
HTML5 is not officially the standard of Web development, meaning by employing this method, you will be ahead of the standards curve on the web. This shouldn't be much of an issue, as if a browser cannot recognize your code, it will merely default to HTML4, meaning users will still be able to use your site.