Fullscreen Video Background

Posted By : Vijendra Kumar | 27-Dec-2017

User interfaces and experiences are more important than ever. If you are going to create a digital identity, somehow it's a website or an app, "See and Feel" plays a very important role. Using Flash plugin and third-party, such as QuickTime, enables the quick exit from the browser as well as video and placement tracks are difficult to define and implement from the outside Do you want, who want to implement media Can there be a developer way I'm touching the head.


Fortunately for us, the media is making a breakthrough in HTML5. Different types of media available to us, including video.
And now, I'm describing the use of HTML5 video and deploy it to your site's background. All do not use plug-ins. We also see some native video controls to ensure a complete improvement in user experience.

HTML5 Video in pre

Compatibilities of HTML5 video is really high. HTML5 video is supported in all present days browsers (IE8 higher). In general, the internal functionality of a video can be complex, mostly in case when you try to start to check tracks, multiple formats, containers, and creations.
 

You should be known of that when you are creating the video online, you need to take care of these three formats:


MP4 – for H.264 video / AAC audio 
Ogg – for Theora video /
Vorbis audio
WebM: This for HTML5 video tags and it originally composed of VP8 video / Vorbis audio. and the most recent VP9 video / Opus audio

For checking the formats of the videos you should be use the robust ffmpeg tool. If you want to apply this and check for now, then mp4 formats should be helpful.

Step (1) - Add HTML:

Heading of the overlay content

Description text of the overlay content

Step (2) - Add CSS:

/* Video style: Width 100% and height to cover the entire window */
#myBackgroundVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%; 
    min-height: 100%;
}
/* Some content at the bottom of the video(page) */
.content {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 18px;
    color: #f2f2f2;
    background: rgba(0, 0, 0, 0.7);
}
/* Button style used to play/pause the video */
#playPauseBtn {
    width: 180px;
    padding: 12px;
    font-size: 20px;
    color: #ffffff;
    border: none;
    background: #000000;
    cursor: pointer;
}
#playPauseBtn:hover {
    color: #000000;
    background: #dddddd;
}

Step (3) - Add JS to start action:

Optionally, here's a JS code to play/pause video with button click:

 


About Author

Author Image
Vijendra Kumar

Vijendra is a creative UI developer with experience and capabilities to build compelling UI designs for Web and Mobile Applications. Vijendra likes playing video games and soccer.

Request for Proposal

Name is required

Comment is required

Sending message..