HTML 5 Video Embed

10.4.10
See how simple it is to embed video with HTML 5, Read on to see the customization options available as attributes of video elements. You can also put the old flash/java code inside video element so that old browsers will display video using flash/java.
<video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls> 
  Your browser does not support the <code>video> element.

</video>



See how we can customize our video easily by setting some attributes.
src: The link to video resource.
poster : Poster Image is used set the image that should be displayed when the video is not available. Poster Image is supposed to be some frame from the video itself.
preload : this can be set to 3 possible values
    none- no video data will be preloaded until user initiates "play".
    metadata- actual video is not preloaded but metadata aout video ie.dimensions, first frame, track list, duration, etc will be preloaded
    automatic- The video will be automatically preloaded
autoplay : The video will start playing automatically without  waiting for user triggering "play". autoplay can be true or false
loop : If set to true video will seek back to start once it has reached end.
controls : controls is Boolean attribute which is used to indicate whether user agent controls are used or scripted controls are provided using script. If the attribute is present it means user has not provided any explicit controls.
width : width of element.
height : height of element.

Here is a link to how you can script your own controls for playback and controls. http://www.broken-links.com/2009/10/06/building-html5-video-controls-with-javascript/

Related Posts by Categories



Widget by Hoctro | Jack Book

0 Responses: