<html>
<body>
<div style = "text-align:center">
<button onclick="playPause()">Play/Pause</button>
<button onclick="makeBig()">Big</button>
<button onclick="makeSmall()">Small</button>
<button onclick="makeNormal()">Normal</button>
<br>
<video id="video1" width="420">
<source src ="sponge.mp4"type="video/mp4">
</video>
<script>
var myVideo=document.getElementById("video1");
function playPause()
{
if(myVideo.paused)
myVideo.play();
else
myVideo.spause();
}
function makeBig()
{
myVideo.width=760;
}
function makeSmall()
{
myVideo.width=520;
}
function makeNormal()
{
myVideo.width=620;
}
</script>
</body>
</html>
GUIDE:
* Use notepad.
* Save all file in One folder.
* Video must save as MP4.
* Save notepad as (filename.html)
note: If it wont work try to SAVE AS and name it a new name.
No comments:
Post a Comment