HTML5 Video Player Issues


#1

So, I wanted to set up a HTML5 player like this. I want my videos to be playable on most browsers.

Here is a link to the image: Example Image

I know there are options to turn on Flash Media Player and Quicktime Streaming.

The code which I have been working with is called VideoJs. Which is suppose run on most browsers to give the user the ability to watch the video no matter what browser they have. It isn’t perfect, but as I was try to implement it once I could not get a .mp4 file which I convert to play on my computer or on my dreamhost website, as well as the other formats they use, .ogg and .webm. They have a built-in flash fallback function built-in to the code, you just pass in the source. This also did not kick in with the suggested .mp4 file like in their examples on the main page of the website linked above.

The code doesn’t say anything about installing stuff onto the server, so there shouldn’t be an issue there unless I need to mess with htaccess right?

Would be more effective to enable both quicktime streaming and the flash video player, here on Dreamhost, and convert the files accordingly from the .wmv format which is a windows media video file to the appropriate .mov for Quicktime and .swf for flash.

Is there a way to simply say in code without the use of the HTML5 tag to play the video, depending on the machine, first in windows media player(WMP), then quicktime(QT) if a mac, then if all else falls go to flash?

Like this,

if(computeros == Windows)
{
if(WMPinstalled == true)
{
useWMP(video.wmv);
}
else{
tryQT();
}
}
function tryQT{
if(computeros == Mac)
{
if(QTinstalled == true)
{
useQT(video.mov);
}
else{
tryFlash();
}
}
else{
if(QTinstalled == true)
{
useQT(video.mov);
}
else{
tryFlash();
}
}

function tryFlash{
if(Flashinstalled == true)
{
useFlash(video.swf);
}
else{
popup(“Sorry, no video player installed. Try downloading the file for later.”);
}
}

Then the user can download the file from the site to view on another video player that would not normally be recognized according to the above code, or if their was an issue with the player’s loading the videos for some reason.

I am not a much of a coder, I just know how the basic coding language works. There was probably an error in the above coding example, but hopefully it makes sense to whoever is reading this. If you could point out any possible errors in the above coding example? That would be great as well. Obviously, I meant to simply the example, there would be more code that just defining simple functions like useQT, etc., I was just trying to short my explanation as much as possible.

Thank you for your time.