Friday, 24 October 2014

Playing YouTube Video on HTML page

You can also embed HTML video code into your web page using the <object> tag. To cater for browsers that don't support the <object> tag, you can nest the <embed> tag inside the <object> tag.
Listed example will cover a demonstration of adding YouTube video.
Listing : Playing YouTube Video on Page
<!DOCTYPE html>
<html>
<head>
<title>HTML Video Tag Example</title>
</head>
<body>

<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/tIBxavsiHzM" />
<embed src="http://www.youtube.com/v/tIBxavsiHzM" type="application/x-shockwave-flash" width="425" height="350" />
</object>
</body>
</html>





Figure 2: Above figure is example of demonstration of adding YouTube video on page.
The above script is supported by IE 7.

No comments:

Post a Comment