How to get rid of plug-ins using the <video> tag4984115297815?
The <video> tag is an element of HTML Media. It is added in HTML5 along with its sibling, audio. Before the release of HTML5, a video could only be played in a browser with a plug-in (like flash). The HTML5 <video> element specifies a standard way to embed a video in a web page. That is to say that the video is identified by adding a video URL to a source attribute, and one can use it to embed videos imported from the computer or hosted by an external website.
For the basic use, all we need to do in an HTML document is to add the video URL to the element by using the source element to identify the video URL and to add the controls attribute so that website visitors can control video options. It is also important to use the width and height attributes to set the size of the video. Let’s see a simple example:
;video width=”640″ height=”480″ src=”https://example.com/movie.mp4″ controls;
There is another notable way of using the ;video; tag. As long as a website visitor’s browser supports the video element and allows playing an mp4 file they will be able to play the video in their browser. If their browser doesn’t support the video element or the file format provided they will see a message providing a link where they can download the video. To give an illustration of what I mean, let’s look at the following HTML document:
<video width=”320″ height=”240″ controls> <source src=”movie.mp4″ type=”video/mp4″>
Sorry, your browser doesn’t support HTML5 ;code;video;/code;, here is a ;a href=”movie.mp4″; link to the video;/a; instead.;/video;
At a minimum, to use the video element the following attributes need to be used: src (defines the URL where the video content is hosted), type defines the format of the file), controls (must be specified or no visual element will appear to control playback of the content).
Moreover, there are a number of optional attributes which can be used to influence the way video content is loaded. These attributes include:
autoplay: specifies that the video will start playing as soon as it is ready,
loop: specifies that the video will start over again, every time it is finished,
poster: selects an image to display as the poster for the video until playback begins,
preload: tells how the author thinks the video should be loaded when the page loads.
WebMvideo/webmOggvideo/oggCurrently, the HTML5 video tag supports 3 types of video files:
Another key point to remember is that ;video; element is supported by all modern browsers. Here we have a table with the numbers that specify the first browser version that fully supports the element.
;video; 4.0 9.0 3.5 4.0 10.5