78 lines
2.1 KiB
HTML
78 lines
2.1 KiB
HTML
|
<!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';
|
||
|
import {version as VERSION} from '../package.json';
|
||
|
|
||
|
// 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);
|
||
|
|
||
|
plugin.VERSION = VERSION;
|
||
|
|
||
|
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 Fri Jan 26 2018 12:37:44 GMT-0500 (EST)
|
||
|
</footer>
|
||
|
|
||
|
<script> prettyPrint(); </script>
|
||
|
<script src="scripts/linenumber.js"> </script>
|
||
|
</body>
|
||
|
</html>
|