While embedding a video to your webpage, very first thing you need to keep in mind is the browser support, like where this will work and where it will not. Only the latest versions of most browsers support native video playback using HTML5's "video" tag.
Secondly, media types supported by the video tag are : mp4, webM, ogg.
The control attribute is used to add controls to video like play, pause, and volume. It is advisable to include width and height attributes of the video. The type attribute of the the
Output:
Once the video has been embedded into your HTML document, you can programmatically control it by using JavaScript code.
var video1 = document.getElementByTagName(video)[0];
video1.play();
0 Comment(s)