https://github.com/samrap/gsvideoframe
Iframe embedded popups for common Video providers
https://github.com/samrap/gsvideoframe
Last synced: 10 months ago
JSON representation
Iframe embedded popups for common Video providers
- Host: GitHub
- URL: https://github.com/samrap/gsvideoframe
- Owner: samrap
- Created: 2016-07-13T18:03:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T18:07:00.000Z (almost 10 years ago)
- Last Synced: 2025-06-11T20:13:28.726Z (about 1 year ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gigasavvy VideoFrame jQuery Plugin
Iframe embedded popups for common Video providers
## Install with Bower
```bower install --save gsVideoFrame```
## Usage
Include jQuery
``````
Include gsVideoFrame
``````
## Options
- **src** ([string](http://api.jquery.com/Types/#String))
- The `src` attribute is the URL to view the video.
- The script will parse YouTube and Vimeo URL's and will create an iFrame embed from them.
- _**Note:**_ YouTube URL's with `.com` and `.be` are currently supported.
- **type** ([string](http://api.jquery.com/Types/#String))
- The video type. Accepted values are: `youtube` and `vimeo`
- **target** ([string](http://api.jquery.com/Types/#String) | jQuery [object](http://api.jquery.com/Types/#Object)) [Default `false`]
- The target where the video should be embedded.
- This can be a selector string (ex: `"#gsVideoFrame"`)
- Or this can be a jQuery object (ex: `$('#gsVideoFrame')`).
- In the default case `false` or if the target cannot be found, the video will be appended to the `body` element.
- **container** ([string](http://api.jquery.com/Types/#String)) [Default `div`]
- The type of element the iFrame should be wrapped in.
- **containerClass** ([string](http://api.jquery.com/Types/#String))
- Class to be assigned to the container element.
- **closeButton** ([string](http://api.jquery.com/Types/#String) | jQuery [object](http://api.jquery.com/Types/#Object))
- A jQuery object to be appended to the iFrames container.
- Example: `$('a.gsVideoFrame').gsVideoFrame({'closeButton': $('
').addClass('close')});`
- **closeButtonClass** ([string](http://api.jquery.com/Types/#String))
- Class to be added to closeButton element.
- **autoplay** ([boolean](http://api.jquery.com/Types/#Boolean))
- This parameter determines whether or not the video automatically plays once it is opened
## Events
- **onBeforeOpen()** ([function](http://api.jquery.com/Types/#Function))
- Called before the frame is embedded.
- **onOpen()** ([function](http://api.jquery.com/Types/#Function))
- Called when the frame is embedded.
- **onPlay()** ([function](http://api.jquery.com/Types/#Function))
- Called when the video is played
- **onPause()** ([function](http://api.jquery.com/Types/#Function))
- Called when the video is paused
- **onBeforeClose()** ([function](http://api.jquery.com/Types/#Function))
- Called before the video is closed
- **onClose()** ([function](http://api.jquery.com/Types/#Function))
- Called when the video is closed