eBuzz Nigeria

How to Add or Embed Audio and Video in a Web page


<video> tag

The tag can be utilized if you would like the video to seem on the internet page.
The controls attribute allow you to add video controls, like play, pause, and quantity.
The tag related to this tag allow you to specify different video codecs. Browser will play the video file which is been acknowledged firstly among the many codecs specified. .mp4 is probably the most generally acknowledged video format by the a number of browsers.
It has following attributes:

Attributes Description Values
top : Set the peak of the window for video to be seem. pixels
width : Sets the width of the window in pixels or share of obtainable display decision. pixels
title : Provides label for embedded object. text
autoplay : Sets whether or not the media aspect ought to begin routinely or not. true or false
loop : Allows you to have the film play repeatedly.
true-plays eternally from begin to finish
false-pays as soon as
palindrome-plays eternally forwards and backwards
true, false or palindrome
controls: Specifies whether or not you need the media controller bar to be proven or not. true or false

The <supply> tag has following attributes:

Attributes Description Values
src : URL of the video file. URL
sort : file format of the video file. Video/mp4, Video/WebM, Video/ogg

Now let see the eg.
<video top="315" width="420" controls="true" autoplay="true" loop="true" >
<supply src="https://www.blogging-hacks.com/flower.mp4" sort="video/mp4">
<supply src="flower.ogg" sort="video/ogg">
</video>

Output:


<audio > tag

This tag can be utilized to play an audio in the HTML file.
The controls attribute allow you to add audio controls, like play, pause, and quantity.
The tag related to this tag allow you to specify different audio codecs. Browser will play the audio file which is been acknowledged firstly among the many codecs specified. .mp3 is probably the most generally acknowledged audio format by the a number of browsers.
It takes following attributes :

Attributes Description Values
title : Provides label for embedded object. text
autoplay : Sets whether or not the media aspect ought to begin routinely or not. true or false
loop : Allows you to have the film play repeatedly.
true-plays eternally from begin to finish
false-pays as soon as
palindrome-plays eternally forwards and backwards
true, false or palindrome
controls: Specifies whether or not you need the media controller bar to be proven or not. true or false

<audio controls loop="2" >
<supply src="https://www.blogging-hacks.com/horse.ogg" sort="audio/ogg">
<supply src="https://www.blogging-hacks.com/horse.mp3" sort="audio/mpeg">
</audio >


Share on FacebookShare on TwitterShare on Linkedin

Search More of: , ,

« | »




Recent Posts


Pages