ytplayer

1.0.0 • Public • Published

YTPlayer

Wrapper for YouTube iframe API

Installation

$ npm install ytplayer --save

Usage

<div id="yt-player"></div>
<script src="path/to/ytplayer.js"></script>
var player = new YTPlayer({
  el     : 'yt-player',
  videoId: 'JWSRqWpWPzE',
  vars   : {
    rel: 0
  }
});
 
player.on('ready', function () {
  player.play()
});

Dependencies (2)

Dev Dependencies (26)

Package Sidebar

Install

npm i ytplayer

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • isoden