Answers for "how to play video on html page"

1

how to display video in html

________________________________________________________________________________________

###                         Video(s)                         ###


### adding video(s) is somewhat more complicated than adding image(s) here is the basic way :
<video controls>

    <source src="Type here the location of your video" />
</video>

### To video(s) you can also add a style like this :
<video controls class="Type here the name of Your style">

    <source src="Type here the location of your video" />
</video>

### If you don't know how to make a style? i will be maybe uploading a tutorial on it later 



### you can also customize the video without using a style easily
<video controls autoplay poster="Type here the location of a picture for a thumbnail if you don't want one than don't put poster here">
    
    <source src="Type here the location of your video" />
</video>

### If you want to autoplay the video than type autoplay where i put it. If you don't want autoplay just don't put it there



## Here is an example i made:
<video controls autoplay poster="/img/beach.png">
    
    <source src="/video/sea.mp4" />
</video>

_______________________________________________________________________________________

# If this code helped you please leave a like on it. If you want to see more of this follow me
# Or just take a look at another answer of my answers
#
# THIS CODE HAS BEEN MADE BY : Vast Vicuña
Posted by: Guest on September-04-2021
0

html video play

var vid = document.getElementById("myVideo");

function playVid() {
    vid.play();
}

function pauseVid() {
    vid.pause();
}
Posted by: Guest on March-13-2021

Browse Popular Code Answers by Language