View Full Version : Best way to handle video

01-09-2013, 04:33 PM

I am trying to get a video to work. First of all, what is the most reliable way to do this for all browsers, etc? Embed it in the current page or provide a link for them which will download the video and then play automatically with whatever they have on their computer?

I tried wmbedding it as a SWF but I couldn't get the skin to cooperate! I tried the video tag with othe methods. Damn this sucks!!!

01-10-2013, 02:50 PM
Hello. It depends on what format of video you are using, if you are using HTML5 then you can use this code:

<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
Where each 'source' is a different format of video, and the browser will check for video compatibility with each format. In the event of no compatibility, it displays: Your browser does not support the video tag.

If you are using flash, this is my preferred code:

<object width="550" height="400" data="shuriken.swf" id="video">
<param name="movie" value="shuriken.swf" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always" />
<embed src="shuriken.swf" type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true" width="800" height="605" />

This allows you to change the size of things. The object width/height determines the size on the page itself. After that it's just some CSS fidgeting and you have a nicely positioned functional video in your page.

PS. 'Shuriken.swf' is where you'd place your video name. If it is not in the root folder, make sure to have the directory correct. Also, the 'id' is simply a CSS caller.

Hope this helps.