Jump to content

how to upload video file on a html page


lak

Recommended Posts

you'll need to embed the video into the page. Or you give the user a link to download the file and let them play it locally on their machine.You can use the object and embed tags, as one or the other only works in explorer (cant remember which). Its a real pain getting it to validate as well if you want valid code. Unless its been altered since i last looked into it.Or you can use flash, like youtube (except not as compressed). This will help stop people looking up the source code and downloading the video in mpg or wmv format. Plus i find flash is more reliable than video formats embedded into the page.:)

Link to comment
Share on other sites

- For Internet Explorer, the <object> tag usually needs the classid attribute. Other browsers don't support them.- The object tag will represent the HTML inside it inside it if it's unable to load the object.Put these two things together and you get this:

<!-- code for internet explorer --><object type="video/mpeg" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" style="width: 400px; height: 300px;" id="someVideo">   <param name="FileName" value="file.mpg" />   <!-- code for other browsers-->   <object type="video/mpeg" style="width: 400px; height: 300px;" id="someVideo">      <param name="FileName" value="file.mpg" />   </object>   <!-- --></object>

Link to comment
Share on other sites

Dark Knight's code will work, but it is not valid XHTML (or HTML). Use the <object> tag instead.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...