How do I tell the browser to open an avi file with VLC or similar in HTML?

avi, html, vlc

Solution

You should make sure that your web server is serving up the avi files with the appropriate `Content-Type` HTTP header.

Content-Type: video/x-msvideo

-- mime type reference.

This will cause the client's default player associated with the given `Content-Type` to load with the player. The client's default player will differ from user to user depending on their OS, installed programs and file association settings. For most windows users, this will be Media Player (unless the user has customized the default setting). For Mac users it will be something else (eg. VLC if they've installed it, or maybe Quicktime, if they've installed Flip4Mac). If the client doesn't have support for the given mime type, the browser will treat it as a file download.

Problem

So I have a list of avi files on a web page (For my own purposes!), and was wondering what do I have to put into the html code to tell the browser to open VLC? or mplayer or simliar?

Original source