UNPKG

videojs-playlist

Version:
75 lines (52 loc) 2.05 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: plugin.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: plugin.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>import videojs from 'video.js'; import playlistMaker from './playlist-maker'; // Video.js 5/6 cross-compatible. const registerPlugin = videojs.registerPlugin || videojs.plugin; /** * The video.js playlist plugin. Invokes the playlist-maker to create a * playlist function on the specific player. * * @param {Array} list * a list of sources * * @param {number} item * The index to start at */ const plugin = function(list, item) { playlistMaker(this, list, item); }; registerPlugin('playlist', plugin); export default plugin; </code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Events</h3><ul><li><a href="global.html#event:playlistsorted">playlistsorted</a></li></ul><h3>Global</h3><ul><li><a href="global.html#clearTracks">clearTracks</a></li><li><a href="global.html#playItem">playItem</a></li><li><a href="global.html#plugin">plugin</a></li><li><a href="global.html#reset">reset</a></li><li><a href="global.html#setReset_">setReset_</a></li><li><a href="global.html#setup">setup</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Jan 25 2018 13:27:02 GMT-0500 (EST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>