Today I am going to tell you how can you use your web browser as a video player. No need of any software, just by using HTML 5 video tag you can convert your browser to an amazing video player. You just need to have a HTML5 supporting browser. Latest versions of Firefox and Google Chrome supports HTML5.
2. Use <video> tag to play video
<html>
<body>
<script type="text/javascript">
function play1(){
document.getElementById("Video1").src=document.getElementById("theFile").value;
document.getElementById("Video1").load();
document.getElementById("Video1").play();
}
function makeBlank(){
if(document.getElementById("theFile").value=="Enter file path..."){
document.getElementById("theFile").value="";
}
}
function enterPath(){
if(document.getElementById("theFile").value.length==0){
document.getElementById("theFile").value="Enter file path...";
}
}
</script>
<video id="Video1" controls="controls" preload="auto" width="640" height="264">
<source src="D:Example.mp4" type='video/mp4'>
</video>
<br><br>
<input type="text" id="theFile" value="Enter file path..." onclick="makeBlank()" onblur="enterPath()"/>
<input type="button" onclick="play1()" value="Play">
<br><br>
</body>
</html>
<html>
<head>
<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
<video id="my_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="264" poster="my_video_poster.png"
data-setup="{}">
<source src="D:Example.mp4" type='video/mp4'>
</video>
</body>
</html>
