For this we have taken a particular height and width to show the video. attribute control adds video controls, like play, pause, and volume adjusting seek bar.
Listing 1: Script to Adding Simple Video File on Page
<!DOCTYPE html>
<html>
<head>
<title>HTML Video Tag Example</title>
</head>
<body>
<video width="320" height="240" controls="controls" autoplay="autoplay">
<source src="dhoom.mp4" type="video/mp4">
<object data="" width="320" height="240">
<embed width="320" height="240" src="dhoom.mp4">
</object>
</video>
</body>
</html>
Figure 1: This figure is output of embeding simple video on page in HTML.
Here we saw that the control attribute adds video controls, like play, pause, and volume adjusting seek bar. Also it can be seen that the video is being played in particular region on page, reason is we have included width and height attributes for playing the video. If height and width are set, the space required for the video is reserved when the page is loaded. However, without these attributes, browser will adjust itself or will display to full page.
There was no standard procedure to play video on web pages. Most videos today are shown through flash or various plug-in. However, different browsers may have different plug-ins. Without any standardized method it becomes difficult to provide different plug-ins for different browsers. As a remedy to this, HTML5 defines a new element which specifies a standard way to embed a video/movie on a web page: the <video> element. This <video> element is supported by all major browsers such as Internet explorer, Google Chrome, Safari, Opera etc.
The <video> element was proposed by Opera Software in February 2007 Opera also released a preview build that was showcased the same day, and a manifest that called for video to become a first-class citizen of the web.