custom-youtube-player

0.0.7 • Public • Published

Custom YouTube Player

This jQuery plugin augments the YouTube Iframe API with additional capabilities like adaptive sizing, video event callbacks, and custom appearance for player controls.

Getting Started

Requirements

The following elements are required on your page:

<!-- JQUERY IS THE ONLY HARD EXTERNAL REQUIREMENT -->
<script src="jquery.js"></script>
<script src="CustomYouTubePlayer.js"></script>
<div id="youtube-player-iframe" class="youtube-player-iframe"></div>

Initialization

Then initialize your Custom YouTube Player. Below are some example options. The native object accepts any options listed in the (YouTube Iframe API)[https://developers.google.com/youtube/iframe_api_reference]. The extend object holds options for augmented video capabilities like adaptive sizing, video event callbacks, and custom appearance for player controls.

var newCustomYouTubePlayer = new CustomYouTubePlayer({
    native: {
        videoId: 'F-eMt3SrfFU',
    },
    extend: {
        adaptiveVid: true,
        adaptiveVidParent: window,
        adaptiveVidDimensions: 0.9,
        onVidEnd: function() {
            $('.easy-peasy-modal').removeClass('is-visible');
        }
    }
});

Licensing

The Custom YouTube Player project is released under the "Be Chill" license. There are no restrictions on this plugin so long as you're chill.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.7
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.7
    1
  • 0.0.6
    1
  • 0.0.5
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i custom-youtube-player

Weekly Downloads

4

Version

0.0.7

License

ISC

Unpacked Size

34 kB

Total Files

12

Last publish

Collaborators

  • ozywuli