+ 3
What is the code of play audio and Video in html.
2 Réponses
+ 4
checkout HTML5 it has "video" tag which plays video...
eg:<video width='---' height='-----' autoplay controls ><source src='---' ></source> </video>
also audio tag too...
+ 1
For Video in Latest HTML5
<video width="320" height="240" autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
This browser does not support the video tag.
</video>
See :
<Video>tag for inserting video.
autoplay is attribute to automatically start video as soon as the webpage loads.
<source>for file files directory and its type.
See I have written "This browser does not support the video tag." if browser doesn't support the video element then this text is displayed.
Same goes for audio too...
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>