All Projects → souravm84 → vidbacking

souravm84 / vidbacking

Licence: MIT license
vidbacking is a jQuery plugin to create HTML5 / Youtube video as background on webpage with fallback image support. It supports mp4 and webm files as well as Youtube video.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to vidbacking

Magnify
A lightweight jQuery magnifying glass zoom plugin.
Stars: ✭ 218 (+296.36%)
Mutual labels:  jquery-plugin
ferris-wheel-jquery-plugin
A jquery plugin that adds a cool button to your web page.
Stars: ✭ 13 (-76.36%)
Mutual labels:  jquery-plugin
Modern.JS
모던 자바스크립트 라이브러리/프레임워크 × KIPFA(한국인터넷전문가협회)
Stars: ✭ 16 (-70.91%)
Mutual labels:  jquery-plugin
Roundslider
roundSlider - A free jQuery plugin
Stars: ✭ 232 (+321.82%)
Mutual labels:  jquery-plugin
Ziptastic Jquery Plugin
This is a jQuery plugin that shows how Ziptastic could be used.
Stars: ✭ 244 (+343.64%)
Mutual labels:  jquery-plugin
table2csv
A simple jQuery plugin to convert HTML tables to CSV
Stars: ✭ 32 (-41.82%)
Mutual labels:  jquery-plugin
Bootstrap Checkbox
A checkbox component based on Bootstrap framework.
Stars: ✭ 214 (+289.09%)
Mutual labels:  jquery-plugin
jquery-tree
jQuery-tree is a jQuery plugin to make an HTML unorder list (ul) in a tree.
Stars: ✭ 29 (-47.27%)
Mutual labels:  jquery-plugin
Modaal
An accessible dialog window library for all humans.
Stars: ✭ 2,702 (+4812.73%)
Mutual labels:  jquery-plugin
Blapy
jQuery plugin that helps you to create and manage ajax and single page web applications (SPA) with almost no javascript coding to do it
Stars: ✭ 30 (-45.45%)
Mutual labels:  jquery-plugin
Liteaccordion
A lightweight horizontal accordion plugin for jQuery.
Stars: ✭ 234 (+325.45%)
Mutual labels:  jquery-plugin
Ajax Live Search
AJAX Live Search is a PHP search form that similar to Google Autocomplete feature displays the result as you type.
Stars: ✭ 238 (+332.73%)
Mutual labels:  jquery-plugin
SyoTimer
jQuery plugin of countdown on html-page
Stars: ✭ 18 (-67.27%)
Mutual labels:  jquery-plugin
Jquery Multiselect
Turn a multiselect list into a nice and easy to use list with checkboxes.
Stars: ✭ 221 (+301.82%)
Mutual labels:  jquery-plugin
youtube discussion tree
This is a python API that allows you to obtain the discusion that occurs on the comments of a Youtube video as a tree structure. It also controls the quota usage that consumes your implementation over Youtube Data Api through this library, and allows you to represent and serialize the discusion tree.
Stars: ✭ 16 (-70.91%)
Mutual labels:  youtube-video
Percircle
⭕️ CSS percentage circle built with jQuery
Stars: ✭ 217 (+294.55%)
Mutual labels:  jquery-plugin
vicopo
API HTTP et Script pour trouver les villes à partir d'un code postal et code postaux à partir d'une ville
Stars: ✭ 27 (-50.91%)
Mutual labels:  jquery-plugin
jquery-jside-menu
jSide Menu is a well designed, simple and clean side navigation menu with dropdowns.
Stars: ✭ 23 (-58.18%)
Mutual labels:  jquery-plugin
twitchtube
Twitch YouTube bot. Automatically make video compilations of the most viewed Twitch clips and upload them to YouTube using Python 3.
Stars: ✭ 398 (+623.64%)
Mutual labels:  youtube-video
scalem
A jQuery plugin to make any element scalable (responsive).
Stars: ✭ 33 (-40%)
Mutual labels:  jquery-plugin

Video Background Plugin with Support for Youtube Video

vidbacking is an attempt to make HTML5 video-background easy. Support video files and Youtube video

GitHub license

This is a small jQuery plugin to simplify the process of showing HTML5 video as background. You can use this for showing a video file or Youtube video on whole page background or to show the video as the background of a <div>, <section>, like elements.

Features:

  • Cross Browser Video Background Plugin.
  • Support mp4, webm video files.
  • Support Youtube video.
  • Very small file size (4kb total).
  • Easy to use.
  • Can be used for both page background or for an element background.
  • Image fallback when video not supported.
  • Pause video when out of viewport.
  • Multiple instances on same page possible.
  • Device friendly, responsive.
  • Tested on all modern browsers.

Demo

Check few demos in action.

Full page background example with mp4, webm video files

Video as a <div> background with mp4, webm video files

Full page background example with Youtube video

Video as a <div> background with Youtube video

Dependency

The vidbacking depends on jQuery 2.x or higher. No other files required for it to work properly. Also, it requires HTML5 video tag support in the browser(This is a common feature in all major browsers).

How to Install

You can clone/download it from github.com directly. This plugin is also available through npm. In order to download this from npm use the following command

npm install vidbacking

How to use

You can use this video-background plugin in two different way. Either for video as page background, or for the background of a <div>, <section>, or some other block level elements.

For full page background with mp4, or webm video file:

You need to add the HTML5 video tag next to your HTML body tag. Don't forget to add the class="vidbacking" in your video tag.

<video poster="screenshot1.jpg" autoplay muted loop class="vidbacking">
	<source src="video1.mp4" type="video/mp4">
	<source src="video1.webm" type="video/webm">
</video>

Link the css file jquery.vidbacking.min.css provided under the dist folder under your <head /> tag.

<link rel="stylesheet" href="dist/jquery.vidbacking.css" type="text/css">

Then import the script after importing jQuery file, and write a little script as described in following section.

<script type="text/javascript" src="dist/jquery.vidbacking.js"></script>
<script type="text/javascript">
	$(function(){
    		$('body').vidbacking();
	});
</script>

For <div> or other block level elements' background with mp4, or webm video file:

You need to add the HTML5 video tag under the <div> or block level element for which you want to set a video-background. Don't forget to add the class="vidbacking" in your video tag.

<div id="video-back">
	<video poster="screenshot1.jpg" autoplay muted loop class="vidbacking">
		<source src="video1.mp4" type="video/mp4">
		<source src="video1.webm" type="video/webm">
	</video>
    <!-- html content of the div -->
    <h1>Vidbacking Demo of &lt;div&gt; Background</h1>
</div>

Link the css file jquery.vidbacking.min.css provided under the dist folder under your <head /> tag.

<link rel="stylesheet" href="dist/jquery.vidbacking.css" type="text/css">

Then import the script after importing jQuery file, and write a little script as described in following section.

<script type="text/javascript" src="dist/jquery.vidbacking.js"></script>
<script type="text/javascript">
	$(function(){
    		$('#video-back').vidbacking();
	});
</script>

Note: don't forget to import jQuery before adding the above script.

For full page background with Youtube Video:

You need to add the <iframe> tag next to your HTML body tag. You can get that iframe code under Youtube video's share -> Embed section. Copy the entire iframe tag provided there. Paste it in your HTML and add the class="vidbacking" in that iframe tag.

<iframe width="560" height="315" src="https://www.youtube.com/embed/2NYwewKYHB4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen  class="vidbacking"></iframe>

Link the css file jquery.vidbacking.min.css provided under the dist folder under your <head /> tag.

<link rel="stylesheet" href="dist/jquery.vidbacking.css" type="text/css">

Then import the script after importing jQuery file, and write a little script as described in following section.

<script type="text/javascript" src="dist/jquery.vidbacking.js"></script>
<script type="text/javascript">
	$(function(){
    		$('body').vidbacking();
	});
</script>

For <div> or other block level elements' background with Youtube video:

You need to add the <iframe> tag under the <div> or block level element for which you want to set a video-background. You can get that iframe code under Youtube video's share -> Embed section. Copy the entire iframe tag provided there. Paste it in your HTML and add the class="vidbacking" in that iframe tag.

<div id="video-back">
	<iframe width="560" height="315" src="https://www.youtube.com/embed/2NYwewKYHB4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen  class="vidbacking"></iframe>
    <!-- html content of the div -->
    <h1>Vidbacking Demo of &lt;div&gt; Background</h1>
</div>

Link the css file jquery.vidbacking.min.css provided under the dist folder under your <head /> tag.

<link rel="stylesheet" href="dist/jquery.vidbacking.css" type="text/css">

Then import the script after importing jQuery file, and write a little script as described in following section.

<script type="text/javascript" src="dist/jquery.vidbacking.js"></script>
<script type="text/javascript">
	$(function(){
    		$('#video-back').vidbacking({
	    		'masked': true
    		});
	});
</script>

Note: don't forget to import jQuery before adding the above script.

Plugin parameters

This plugin support following parameters. You can change the output of vidbacking by setting these parameters.

masked: This parameter can have two possible values true or false. If set to true will masked the video with a png image overlay. Default Value false.

mask-opacity: If masked is true then by setting this parameter you can change the opacity of the mask image. Possible value ranged between 1 to 0, for example mask-opacity: 0.25. Default value 1

video-opacity: You can set the video opacity using this parameter. Possible value ranged between 1 to 0, for example video-opacity: 0.5. This option doesn't work on Youtube videos. Default value 1

youtube-mute-video: Setting this parameter to true makes the Youtube video muted. Default value is true.

youtube-loop: Set this parameter "true" to loop the YouTube video. Possible values are true and false. Default value is true.

I have plans for upgrading this plugin with more functionalities. If you found any issues please report in this repo, I will try to fix them in next release.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].