web training room for online courses
Online Training for Asp.net MVC Web Designing Development, MS SQL, Digital Marketing

HTML5 video Element

Adding a video to any webpage is single element, as easy as adding an image. You don’t need to write any complicated markup for plug-ins

Adding Single Video, you can set video autoplay property

<video autoplay="autoplay" src="~/sound/dance.mp4" controls="controls" >

Adding Multiple Videos, setting video autoplay and loop property
<video width="320" height="240" autoplay="autoplay" controls="controls" loop="loop">
<source src="~/sound/dance.mp4" >
<source src="~/sound/dance2.mp4"> </video>

Here are few important attributes for video

attribute description
src this property is for setting up the file source, like source src="~/suound/file1.mp3"
autoplay autoplay="autoplay", This Boolean attribute specifies that if the video will automatically start playing, the value is "autoplay" which means "true".
controls controls="controls", Indicates browsers will display the control, that will allow the user to control video play/pause, volume etc.
loop loop="loop", Indicates that video will automatically start over again
muted muted="muted", if the property value set to muted then, then the audio will be muted when loaded for the first time

Useful HTML5 Elements

Implementing video in HTML5 is as simple as image, is just one element in Html5

Name Email Website
HTML5 VIdeo Tag
HTML5 Video Tag