Customizable jQuery Video Lightbox Extension That Allows Playing Youtube / Vimeo Videos

Modal Video is a simple, accessible, and customizable jQuery video lightbox extension that allows playing Youtube / Vimeo videos in an animated modal window while clicking on the video link.

modal video popup, play video in modal popup, video modal popup, modal video popup html, modal video player, modal video github, video popup jquery

Features:

  • It is not affected by the DOM structure.
  • Nice transition
  • It can be accessed to navigate with keyboard and screen readers.
  • Rich options for youtube API and Vimeo API

How to make use of it:

Installation:

# Yarn
$ yarn add modal-video

# NPM
$ npm install modal-video --save

1. Put each jQuery library and the jQuery modal-video plugin’s information on the bottom of the HTML web page.

<script src="//code.jquery.com/jquery-3.6.0.slim.min.js"></script>
<script src="modal-video.min.js"></script>
<link rel="stylesheet" href="modal-video.min.css">

2. Create a video link and specify the video ID utilizing the ‘data-video-id’ attribute like this:

<a href="#" class="js-video-button" data-video-id=' '>Yotube Video</a>

3. Initialize the plugin and completed it.

$(".js-video-button").modalVideo();

4. The plugin additionally works with Vimeo videos:

<a href="#" 
   class="js-video-button" 
   data-video-id=' ' 
   data-channel="vimeo"> 
</a>
// or 
$(".js-video-button").modalVideo({
  channel:'vimeo'
});

5. Config the Youtube/Vimeo player:

$(".js-video-button").modalVideo({
  channel: 'youtube',
  youtube: {
    autoplay: 1,
    cc_load_policy: 1,
    color: null,
    controls: 1,
    disablekb: 0,
    enablejsapi: 0,
    end: null,
    fs: 1,
    h1: null,
    iv_load_policy: 1,
    list: null,
    listType: null,
    loop: 0,
    modestbranding: null,
    origin: null,
    playlist: null,
    playsinline: null,
    rel: 0,
    showinfo: 1,
    start: 0,
    wmode: 'transparent',
    theme: 'dark'
  },
  ratio: '16:9',
  vimeo: {
    api: false,
    autopause: true,
    autoplay: true,
    byline: true,
    callback: null,
    color: null,
    height: null,
    loop: false,
    maxheight: null,
    maxwidth: null,
    muted: false,
    player_id: null,
    portrait: true,
    title: true,
    width: null,
    xhtml: false
  },
});

6. Config the video modal:

$(".js-video-button").modalVideo({
  allowFullScreen: true,
  animationSpeed: 300,
  classNames: {
    modalVideo: 'modal-video',
    modalVideoClose: 'modal-video-close',
    modalVideoBody: 'modal-video-body',
    modalVideoInner: 'modal-video-inner',
    modalVideoIframeWrap: 'modal-video-movie-wrap',
    modalVideoCloseBtn: 'modal-video-close-btn'
  },
  aria: {
    openMessage: 'You just openned the modal video',
    dismissBtnMessage: 'Close the modal by clicking here'
  }
});

Minimal Youtube/Vimeo Modal Plugin, Modal Video Github


See Demo And Download

Official Website(appleple): Click Here

This superior jQuery/javascript plugin is developed by appleple. For extra Advanced Usage, please go to the official website.

Related Posts

VenoBox-Responsive-jQuery-Lightbox-Plugin

Responsive Image Gallery Lightbox jQuery Plugin | VenoBox

VenoBox is a responsive jQuery modal window plugin suitable for images, embedded content, iFrames, Google Maps, Vimeo, and YouTube videos. The big difference compared to many other…

bootstrap-dropdown-on-hover

[Animation] Bootstrap Multi-Level Responsive Dropdown Menu

Bootstrap-based multi-level dropdown navigation menu with cool animations. The dropdown on Hover is a jQuery plugin used to create Bootstrap multi-level scroll-triggered dropdown menus with CSS3 animations…

Google-Translate-Dropdown-Customize-With-Country-Flag

Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…

Bootstrap-Fileinput

HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….

Floating-Whatsapp-Chat-Button

How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Bootstrap-4-Sidebar-Menu-Responsive-Template

Bootstrap 4 Sidebar Menu Responsive Template | MDB

Bootstrap Side Navbar – Responsive sidebar template based on the Bootstrap 4 framework. An easy-to-use, totally responsive, Google Material Design impressed aspect navigation for modern web app…

Leave a Reply

Your email address will not be published. Required fields are marked *