Change from html5 media players to VLC

Solution 1:

No (official) information exists yet for HTML5, but I suppose that if the default player is changed in the browser, then HTML5 will use it as well. Below are some sources for installing the VLC plugin in various browsers and OS.

The "The Mozilla plugin" section in the Videolan manual, Chapter 4. Advanced use of VLC, explains the process for Windows/Firefox and OSX/Safari.

For Linux/Firefox see Howto: Firefox Install Multimedia Player VLC with plug-in.

Solution 2:

For Firefox, install the VLC plugin, and then execute this code:

var videos = document.getElementsByTagName("video");
for (var i = 0; i < videos.length; i++) {
  var vlc = document.createElement("embed");
  vlc.type = "application/x-vlc-plugin";
  if (videos[i].width) vlc.width = videos[i].width;
  if (videos[i].height) vlc.height = videos[i].height;
  vlc.setAttribute("target", videos[i].src);
  var sources = videos[i].getElementsByTagName("source");
  for (var j = 0; j < sources.length; j++) {
    vlc.setAttribute("target", sources[j].src);
  }
  vlc.setAttribute("id", videos[i].getAttribute("id"));
  vlc.setAttribute("class", videos[i].getAttribute("class"));
  videos[i].parentNode.replaceChild(vlc, videos[i]);
}

You can execute code with the FireBug console, or make this a script bookmark. Please note that this will only work with basic examples; javascript controlling of the video does not work properly anymore, and the videos will only be replaced at the moment you execute the code. Controls are also missing. You'd better use the browsers video player.