Hello Friends My Name Is Viraj,Today I Will Display Fullscreen Video On Your Web Page.
In previous years all the video you have ever watched online has been channeled through a third party plugin such as QuickTime, Flash, or RealPlayer. With these plugins integrating into the various web browsers almost invisibly the viewer didn’t really need to know or care about how they were seeing the video. Problems arise however when the user suddenly tries to view a video on a platform that is not supported.With an ever growing audience viewing video content on portable devices the problem of ensuring video can be seen on any device with any browser is of growing concern to web developers. Compounding the problem is a lack of support for many of the plugins on many of the portable browser versions such as iOS, Android, and Windows Phones – with a lack of support for Flash on all the major platforms being a major issue for many users and developers especially.The HTML5 video specification has been trying to change all that but it is still an uphill battle. Modern browsers in conjunction with new specifications in HTML5 have made adding video to a web page a much simpler affair than it used to be. No longer do web developers need to rely on third party plug-ins, add-ons, or even embedded code copied from other sites. A video on your page should be just one simple video tag away… at least in theory.The video tag is compatible with all modern browsers including IE 9+, Firefox 3.5+, Safari 3.0+ Opera 10.5+ iPhone1.0+ and Android 2.0+. However, support for the video element is only one piece of the puzzle, as adding video to a webpage which can be viewable everywhere is still regarded as somewhat of a challenge.The blame for the complexity rests on browser support and codec licensing. Web developers are used to navigating around the shortcomings of browser compatibility but codecs from the various vendors create a greater level of complexity when building a successful HTML5 site which requires video as part of its content.The Limitations HTML 5 Video and Full Screen Issues.Most modern browsers have full screen support for HTML 5 video but there is still the issue of the various flavors of codecs found out in the wild. Plus, with the ever growing number of portable devices including iOS, Android, and now Windows phones, the problem is just growing in complexity. In short, not all browsers are going to be able to play all of the codecs, so if you want to ensure your video can be played almost everywhere then you are going to have to encode it more than once.
Your best bet is to encode one version using the WebM format, another in H.264 baseline video and AAC audio, and a third using Theora video and Vorbis audio in an .MP4 container. To insert the video into the web page you use the video tag and then link to the various source files. Whichever web browser is being used will simply play the first file it comes across that it is compatible with.A full screen background video has the issue of bandwidth which is of big concern to users on mobile Internet plans due to the expense of data. For this reason the video should be compressed as efficiently as possible in order to minimize data usage. It also needs to be able to scale across the varying screen sizes it will be viewed on. A placeholder image should also be included should the browser not be compatible.Converting video is not the chore that it once was as many developers have stepped up to the plate to provide video converters which make the job a fairly simplified affair. The converter at http://easyhtml5video.com/ is one such program designed to make the task of converting any video format into compatible versions for the majority of platforms – including Android, iOS, and Windows. Simply drag and drop your video, select the desired poster image, select your codecs, tune the settings to suit your audience, press start and then watch the magic happen.Here In This Html Tutorial We Will Display Fullscreen Video In Html/Css/Javascript Code.Here In This We Will Display Fullscreen Video In Html/Css/Javascript Code.
Here Is An Example Related To Topic................
Step 1 :
<!DOCTYPE html>
<html>
<head>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Arial;
font-size: 17px;
}
#myVideo {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
}
.content {
position: fixed;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
color: #f1f1f1;
width: 100%;
padding: 20px;
}
#myBtn {
width: 200px;
font-size: 18px;
padding: 10px;
border: none;
background: #000;
color: #fff;
cursor: pointer;
}
#myBtn:hover {
background: #ddd;
color: black;
}
</style>
</head>
<body>
<video autoplay muted loop id="myVideo">
<source src="C:\Users\Viraj\Desktop\New folder (6)\One Bottle Down - Yo Yo Honey Singh (Video Song) - MP4.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<div class="content">
<button id="myBtn" onclick="myFunction()">Pause</button>
</div>
<script>
var video = document.getElementById("myVideo");
var btn = document.getElementById("myBtn");
function myFunction() {
if (video.paused) {
video.play();
btn.innerHTML = "Pause";
} else {
video.pause();
btn.innerHTML = "Play";
}
}
</script>
</body>
</html>
In previous years all the video you have ever watched online has been channeled through a third party plugin such as QuickTime, Flash, or RealPlayer. With these plugins integrating into the various web browsers almost invisibly the viewer didn’t really need to know or care about how they were seeing the video. Problems arise however when the user suddenly tries to view a video on a platform that is not supported.With an ever growing audience viewing video content on portable devices the problem of ensuring video can be seen on any device with any browser is of growing concern to web developers. Compounding the problem is a lack of support for many of the plugins on many of the portable browser versions such as iOS, Android, and Windows Phones – with a lack of support for Flash on all the major platforms being a major issue for many users and developers especially.The HTML5 video specification has been trying to change all that but it is still an uphill battle. Modern browsers in conjunction with new specifications in HTML5 have made adding video to a web page a much simpler affair than it used to be. No longer do web developers need to rely on third party plug-ins, add-ons, or even embedded code copied from other sites. A video on your page should be just one simple video tag away… at least in theory.The video tag is compatible with all modern browsers including IE 9+, Firefox 3.5+, Safari 3.0+ Opera 10.5+ iPhone1.0+ and Android 2.0+. However, support for the video element is only one piece of the puzzle, as adding video to a webpage which can be viewable everywhere is still regarded as somewhat of a challenge.The blame for the complexity rests on browser support and codec licensing. Web developers are used to navigating around the shortcomings of browser compatibility but codecs from the various vendors create a greater level of complexity when building a successful HTML5 site which requires video as part of its content.The Limitations HTML 5 Video and Full Screen Issues.Most modern browsers have full screen support for HTML 5 video but there is still the issue of the various flavors of codecs found out in the wild. Plus, with the ever growing number of portable devices including iOS, Android, and now Windows phones, the problem is just growing in complexity. In short, not all browsers are going to be able to play all of the codecs, so if you want to ensure your video can be played almost everywhere then you are going to have to encode it more than once.
Your best bet is to encode one version using the WebM format, another in H.264 baseline video and AAC audio, and a third using Theora video and Vorbis audio in an .MP4 container. To insert the video into the web page you use the video tag and then link to the various source files. Whichever web browser is being used will simply play the first file it comes across that it is compatible with.A full screen background video has the issue of bandwidth which is of big concern to users on mobile Internet plans due to the expense of data. For this reason the video should be compressed as efficiently as possible in order to minimize data usage. It also needs to be able to scale across the varying screen sizes it will be viewed on. A placeholder image should also be included should the browser not be compatible.Converting video is not the chore that it once was as many developers have stepped up to the plate to provide video converters which make the job a fairly simplified affair. The converter at http://easyhtml5video.com/ is one such program designed to make the task of converting any video format into compatible versions for the majority of platforms – including Android, iOS, and Windows. Simply drag and drop your video, select the desired poster image, select your codecs, tune the settings to suit your audience, press start and then watch the magic happen.Here In This Html Tutorial We Will Display Fullscreen Video In Html/Css/Javascript Code.Here In This We Will Display Fullscreen Video In Html/Css/Javascript Code.
Here Is An Example Related To Topic................
Step 1 :
<!DOCTYPE html>
<html>
<head>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Arial;
font-size: 17px;
}
#myVideo {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
}
.content {
position: fixed;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
color: #f1f1f1;
width: 100%;
padding: 20px;
}
#myBtn {
width: 200px;
font-size: 18px;
padding: 10px;
border: none;
background: #000;
color: #fff;
cursor: pointer;
}
#myBtn:hover {
background: #ddd;
color: black;
}
</style>
</head>
<body>
<video autoplay muted loop id="myVideo">
<source src="C:\Users\Viraj\Desktop\New folder (6)\One Bottle Down - Yo Yo Honey Singh (Video Song) - MP4.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<div class="content">
<button id="myBtn" onclick="myFunction()">Pause</button>
</div>
<script>
var video = document.getElementById("myVideo");
var btn = document.getElementById("myBtn");
function myFunction() {
if (video.paused) {
video.play();
btn.innerHTML = "Pause";
} else {
video.pause();
btn.innerHTML = "Play";
}
}
</script>
</body>
</html>
Output :
No comments:
Post a Comment