Convert Figma logo to code with AI

vodkabears logoVide

No longer actively maintained.

3,293
527
3,293
74

Top Related Projects

37,823

Video.js - open source HTML5 video player

26,333

A simple HTML5, YouTube and Vimeo player

HTML5 <audio> or <video> player with support for MP4, WebM, and MP3 as well as HLS, Dash, YouTube, Facebook, SoundCloud and others with a common HTML5 MediaElement API, enabling a consistent UI in all browsers.

The HTML5 video player for the web

7,076

:clapper: An extensible media player for the web.

JW Player is the world's most popular embeddable media player.

Quick Overview

Vide is a lightweight and easy-to-use jQuery plugin for video backgrounds. It allows developers to add full-screen or contained video backgrounds to their web pages with minimal effort, supporting both HTML5 video and YouTube as sources.

Pros

  • Simple and lightweight, with minimal setup required
  • Supports both HTML5 video and YouTube as background sources
  • Responsive design, adapting to different screen sizes
  • Customizable with various options for playback control and appearance

Cons

  • Depends on jQuery, which may not be ideal for modern web development practices
  • Limited to video backgrounds, not a full-featured video player
  • May impact page load times, especially with large video files

Code Examples

  1. Basic HTML5 video background:
$("#myElement").vide("path/to/video");
  1. YouTube video background with options:
$("#myElement").vide({
  mp4: "path/to/video.mp4",
  webm: "path/to/video.webm",
  poster: "path/to/poster.jpg",
  youtube: "https://www.youtube.com/watch?v=ABC123"
}, {
  volume: 0,
  playbackRate: 1,
  muted: true,
  loop: true
});
  1. Destroying the Vide instance:
$("#myElement").data("vide").destroy();

Getting Started

  1. Include jQuery and Vide in your HTML:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vide/0.5.1/jquery.vide.min.js"></script>
  1. Add a container element for the video background:
<div id="myVideoBackground"></div>
  1. Initialize Vide with JavaScript:
$(document).ready(function() {
  $("#myVideoBackground").vide("path/to/video.mp4");
});

This will create a video background using the specified video file. Adjust the path and options as needed for your project.

Competitor Comparisons

37,823

Video.js - open source HTML5 video player

Pros of video.js

  • More comprehensive and feature-rich video player solution
  • Extensive plugin ecosystem and customization options
  • Better suited for complex video playback requirements and professional applications

Cons of video.js

  • Larger file size and potentially heavier resource usage
  • Steeper learning curve due to more complex API and configuration options
  • May be overkill for simple background video implementations

Code Comparison

Vide (basic usage):

$('#myBlock').vide('path/to/video');

video.js (basic usage):

<video id="my-video" class="video-js">
  <source src="path/to/video.mp4" type="video/mp4">
</video>
<script>
  var player = videojs('my-video');
</script>

Summary

Vide is a lightweight jQuery plugin focused on easy background video implementation, while video.js is a full-featured HTML5 video player with extensive customization options. Vide is simpler to use for basic background videos, but video.js offers more control and features for complex video playback needs. The choice between them depends on the specific requirements of your project and the level of video functionality needed.

26,333

A simple HTML5, YouTube and Vimeo player

Pros of Plyr

  • More comprehensive media player with support for HTML5 video, audio, YouTube, and Vimeo
  • Extensive customization options and API for advanced control
  • Active development with regular updates and a larger community

Cons of Plyr

  • Larger file size and potentially more complex setup
  • May be overkill for simple video background implementations

Code Comparison

Plyr initialization:

const player = new Plyr('#player', {
  controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'],
  settings: ['captions', 'quality', 'speed', 'loop']
});

Vide initialization:

$('#myElement').vide('path/to/video');

Summary

Plyr is a feature-rich media player suitable for various use cases, while Vide focuses specifically on video backgrounds. Plyr offers more control and customization but may be excessive for simple background videos. Vide provides a straightforward solution for adding video backgrounds with minimal setup. The choice between the two depends on the specific requirements of your project and the level of control you need over the video playback.

HTML5 <audio> or <video> player with support for MP4, WebM, and MP3 as well as HLS, Dash, YouTube, Facebook, SoundCloud and others with a common HTML5 MediaElement API, enabling a consistent UI in all browsers.

Pros of MediaElement

  • More comprehensive media player with support for audio, video, and streaming
  • Extensive plugin system for customization and additional features
  • Wider browser and device compatibility, including legacy support

Cons of MediaElement

  • Larger file size and potentially more complex setup
  • May be overkill for simple video background implementations
  • Less focused on specific video background functionality

Code Comparison

MediaElement (basic setup):

var player = new MediaElementPlayer('player1', {
    features: ['playpause', 'progress', 'volume'],
    videoWidth: '100%',
    videoHeight: '100%'
});

Vide (basic setup):

$('#myBlock').vide('path/to/video');

Summary

MediaElement is a more feature-rich and versatile media player, suitable for various media types and complex implementations. It offers extensive customization options and wider compatibility but comes with a larger footprint.

Vide, on the other hand, is specifically designed for video backgrounds, providing a simpler and more lightweight solution for this particular use case. It offers easier implementation for basic video background needs but lacks the advanced features and flexibility of MediaElement.

The choice between the two depends on the specific requirements of the project, with MediaElement being more suitable for comprehensive media playback needs and Vide excelling in simple video background implementations.

The HTML5 video player for the web

Pros of Flowplayer

  • More comprehensive video player solution with advanced features
  • Supports multiple video formats and streaming protocols
  • Active development and regular updates

Cons of Flowplayer

  • Larger file size and potentially more complex setup
  • Commercial license required for some features
  • Steeper learning curve for customization

Code Comparison

Vide (jQuery plugin):

$('#myVideo').vide('path/to/video');

Flowplayer (JavaScript API):

flowplayer('#player', {
  clip: {
    sources: [
      { type: 'video/mp4', src: 'path/to/video.mp4' }
    ]
  }
});

Vide focuses on simplicity, allowing easy background video implementation with minimal code. Flowplayer offers more control and configuration options, suitable for complex video player requirements.

Vide is lightweight and ideal for quick background video integration, while Flowplayer provides a full-featured video player solution with extensive customization capabilities.

Choose Vide for simple background videos and Flowplayer for more advanced video playback needs. Consider project requirements, performance impact, and licensing when deciding between the two libraries.

7,076

:clapper: An extensible media player for the web.

Pros of Clappr

  • More comprehensive media player with support for various formats and streaming protocols
  • Extensive plugin ecosystem for customization and additional features
  • Active development and larger community support

Cons of Clappr

  • Larger file size and potentially more complex setup
  • May be overkill for simple video background needs

Code Comparison

Vide (jQuery plugin):

$(element).vide('path/to/video');

Clappr:

var player = new Clappr.Player({
  source: 'path/to/video',
  parentId: '#player'
});

Key Differences

Vide is specifically designed for video backgrounds, making it simpler to use for this particular purpose. It's lightweight and easy to implement with jQuery.

Clappr, on the other hand, is a full-featured media player that offers more flexibility and options for various video playback scenarios. It's not limited to background videos and can handle streaming, multiple formats, and advanced customization through plugins.

Choose Vide for quick and easy video backgrounds, especially if you're already using jQuery. Opt for Clappr if you need a more robust video player with extensive features and customization options.

JW Player is the world's most popular embeddable media player.

Pros of JW Player

  • More comprehensive media player solution with advanced features like adaptive streaming and DRM support
  • Larger community and ecosystem, with extensive documentation and support
  • Offers both open-source and commercial versions for different use cases

Cons of JW Player

  • More complex setup and configuration compared to Vide's simplicity
  • Larger file size and potentially higher resource usage
  • May be overkill for simple video background implementations

Code Comparison

Vide (basic usage):

$('#myBlock').vide('path/to/video');

JW Player (basic setup):

jwplayer("myPlayerDiv").setup({
  file: "path/to/video.mp4",
  width: "100%",
  aspectratio: "16:9"
});

Summary

Vide is a lightweight jQuery plugin specifically designed for video backgrounds, offering simplicity and ease of use. JW Player, on the other hand, is a full-featured media player with extensive capabilities beyond just video backgrounds. While Vide excels in its specific use case, JW Player provides a more robust solution for complex video playback needs. The choice between the two depends on the project requirements, with Vide being ideal for simple video backgrounds and JW Player better suited for more advanced video implementations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

NPM version Bower version Travis Vide

No longer actively maintained. I am not interested to maintain jQuery plugins anymore. If you have some fixes, feel free to make PR.

Easy as hell jQuery plugin for video backgrounds.

Notes

  • All modern desktop browsers are supported.
  • IE9+
  • iOS plays video from a browser only in the native player. So video for iOS is disabled, only fullscreen poster will be used.
  • Some android devices play video, some not — go figure. So video for android is disabled, only fullscreen poster will be used.

Instructions

Download it from GitHub or via Bower: bower install vide

Include plugin: <script src="js/jquery.vide.min.js"></script>

Prepare your video in several formats like '.webm', '.mp4' for cross browser compatibility, also add a poster with .jpg, .png or .gif extension:

path/
├── to/
│   ├── video.mp4
│   ├── video.ogv
│   ├── video.webm
│   └── video.jpg

Add data-vide-bg attribute with a path to the video and poster without extension, video and poster must have the same name. Add data-vide-options to pass vide options, if you need it. By default video is muted, looped and starts automatically.

<div style="width: 1000px; height: 500px;"
  data-vide-bg="path/to/video" data-vide-options="loop: false, muted: false, position: 0% 0%">
</div>

Also you can set extended path:

<div style="width: 1000px; height: 500px;"
  data-vide-bg="mp4: path/to/video1, webm: path/to/video2, ogv: path/to/video3, poster: path/to/poster"
  data-vide-options="posterType: jpg, loop: false, muted: false, position: 0% 0%">
</div>

In some situations it can be helpful to initialize it with JS because Vide doesn't have mutation observers:

$('#myBlock').vide('path/to/video');
$('#myBlock').vide('path/to/video', {
...options...
});
$('#myBlock').vide({
  mp4: path/to/video1,
  webm: path/to/video2,
  ogv: path/to/video3,
  poster: path/to/poster
}, {
...options...
});
$('#myBlock').vide('extended path as a string', 'options as a string');

Easy as hell.

Options

Below is a complete list of options and matching default values:

{
  volume: 1,
  playbackRate: 1,
  muted: true,
  loop: true,
  autoplay: true,
  position: '50% 50%', // Similar to the CSS `background-position` property.
  posterType: 'detect', // Poster image type. "detect" — auto-detection; "none" — no poster; "jpg", "png", "gif",... - extensions.
  resizing: true, // Auto-resizing, read: https://github.com/VodkaBears/Vide#resizing
  bgColor: 'transparent', // Allow custom background-color for Vide div,
  className: '' // Add custom CSS class to Vide div
}

Methods

Below is a complete list of methods:

// Get instance of the plugin
var instance = $('#yourElement').data('vide');

// Get video element of the background. Do what you want.
instance.getVideoObject();

// Resize video background.
// It calls automatically, if window resize (or element, if you will use something like https://github.com/cowboy/jquery-resize).
instance.resize();

// Destroy plugin instance
instance.destroy();

Resizing

The Vide plugin resizes if the window resizes. If you will use something like https://github.com/cowboy/jquery-resize, it will resize automatically when the container resizes. Or simply use resize() method whenever you need.

Set the resizing option to false to disable auto-resizing.

Encoding video

http://diveintohtml5.info/video.html#miro

Meteor

Install

meteor add vodkabears:vide

Usage

Because of how meteor renders templates reactively you will need to initialize manually for the templates you want to use vide in.

Template.templateName.onRendered(function() {
  this.$('#elementName').vide('fileNameWithoutExtension');
});

Meteor integration by zimme.

Ruby Gem

Vider by Islam Wazery.

License

The MIT License (MIT)

Copyright (c) 2015 Ilya Makarov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

NPM DownloadsLast 30 Days