Gigasavvy VideoFrame jQuery Plugin

Iframe embedded popups for common Video providers

Examples

YouTube.com YouTu.be Vimeo.com

 

Installation

 

NPM

npm install gsvideoframe --save

Yarn

yarn add gsvideoframe --save

 


 

Usage

Include jQuery:

<script type="text/javascript" src="http://code.jquery.com/jquery-3.3.1.min.js"></script>

Include gsVideoFrame:

<script type="text/javascript" src="./dist/scripts/gsVideoFrame.min.js"></script>

Optionally include default skin:

<link rel="stylesheet" src="./dist/styles/default.css">

 


 

Options

 

Example:

$('#element').gsVideoFrame({
  params: {
    api: {
      color: 'white'
    }
  },
  class: {
    iframe: 'video-player'
  },
  src: 'https://www.youtube.com/watch?v=Rk6_hdRtJOE',
  autoplay: 1
});

 


 

Events

 

Example:

$('#element').on('gsvf:ready', function(event, options) {
  if (options.type == 'vimeo') {
    options.player.on('timeupdate', function(data) {
      console.log('Time Update:');
      console.log(data);
    })
  }
});

 


 

Accessing the Player

The player can be accessed via the player property of the gsvideoframe object. The player object will vary depending on which video provider the video is initialized with.

Example:

$('#element').data('gsvideoframe').player.pauseVideo()

 


 

API

 

Example:

$('#element').gsVideoFrame({ ...options });
$('#element').data('gsvideoframe').close();
$('#element').data('gsvideoframe').seek(123);

 


 

Issues

Please feel free to submit any issues you encounter or share your ideas

Submit Issues / Give Feedback