UNPKG

vlitejs

Version:

vLitejs is a fast and lightweight Javascript library for customizing HTML5 and Youtube video players in Javascript with a minimalist theme

1,687 lines (331 loc) 16.4 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: module:vLite/Player/PlayerYoutube</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">Class: module:vLite/Player/PlayerYoutube</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>module:vLite/Player/PlayerYoutube<span class="signature">(selector, options, callback)</span><span class="type-signature"></span></h2> </header> <article> <div class="container-overview"> <h4 class="name" id="module:vLite/Player/PlayerYoutube"><span class="type-signature"></span>new module:vLite/Player/PlayerYoutube<span class="signature">(selector, options, callback)</span><span class="type-signature"></span></h4> <div class="description"> <p>Instanciate the constructor</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>selector</code></td> <td class="type"> <span class="param-type">String</span> | <span class="param-type">Object</span> </td> <td class="description last"><p>CSS selector or query selector</p></td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Player options</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last"><p>Callback function executed when the player is ready</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line16">line 16</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="getCurrentTime"><span class="type-signature"></span>getCurrentTime<span class="signature">()</span><span class="type-signature"> &rarr; {Float|Integer}</span></h4> <div class="description"> <p>Get the player current time</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line127">line 127</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Current time of the video</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Float</span> | <span class="param-type">Integer</span> </dd> </dl> <h4 class="name" id="getDuration"><span class="type-signature"></span>getDuration<span class="signature">()</span><span class="type-signature"> &rarr; {Float|Integer}</span></h4> <div class="description"> <p>Get the player duration</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line135">line 135</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Duration of the video</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Float</span> | <span class="param-type">Integer</span> </dd> </dl> <h4 class="name" id="getInstance"><span class="type-signature"></span>getInstance<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4> <div class="description"> <p>Get the player instance</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line70">line 70</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Youtube API instance</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Object</span> </dd> </dl> <h4 class="name" id="initYoutubePlayer"><span class="type-signature"></span>initYoutubePlayer<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Initialize the Youtube player</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line33">line 33</a> </li></ul></dd> </dl> <h4 class="name" id="methodMute"><span class="type-signature"></span>methodMute<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Mute method of the player</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line164">line 164</a> </li></ul></dd> </dl> <h4 class="name" id="methodPause"><span class="type-signature"></span>methodPause<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Pause method of the player</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line157">line 157</a> </li></ul></dd> </dl> <h4 class="name" id="methodPlay"><span class="type-signature"></span>methodPlay<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Play method of the player</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line150">line 150</a> </li></ul></dd> </dl> <h4 class="name" id="methodUnMute"><span class="type-signature"></span>methodUnMute<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Unmute method of the player</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line171">line 171</a> </li></ul></dd> </dl> <h4 class="name" id="onPlayerReady"><span class="type-signature"></span>onPlayerReady<span class="signature">(data)</span><span class="type-signature"></span></h4> <div class="description"> <p>Function executed when the player is ready</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>data</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Youtube datas from the player API</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line61">line 61</a> </li></ul></dd> </dl> <h4 class="name" id="onPlayerStateChange"><span class="type-signature"></span>onPlayerStateChange<span class="signature">(e)</span><span class="type-signature"></span></h4> <div class="description"> <p>Function executed when the player state changed</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>e</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Event listener datas</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line78">line 78</a> </li></ul></dd> </dl> <h4 class="name" id="onProgressChanged"><span class="type-signature"></span>onProgressChanged<span class="signature">(e)</span><span class="type-signature"></span></h4> <div class="description"> <p>Function executed on the video progress changed</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>e</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>Event listener datas</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line143">line 143</a> </li></ul></dd> </dl> <h4 class="name" id="removeInstance"><span class="type-signature"></span>removeInstance<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Remove the Youtube instance</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line178">line 178</a> </li></ul></dd> </dl> <h4 class="name" id="setCurrentTime"><span class="type-signature"></span>setCurrentTime<span class="signature">(Current)</span><span class="type-signature"></span></h4> <div class="description"> <p>Set the new current time for the player</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>Current</code></td> <td class="type"> <span class="param-type">Float</span> | <span class="param-type">Integer</span> </td> <td class="description last"><p>time video</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="player-youtube.js.html">player-youtube.js</a>, <a href="player-youtube.js.html#line119">line 119</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-vLite_entrypoint.html">vLite/entrypoint</a></li><li><a href="module-vLite_Player.html">vLite/Player</a></li><li><a href="module-vLite_Player_PlayerHtml5.html">vLite/Player/PlayerHtml5</a></li><li><a href="module-vLite_Player_PlayerYoutube.html">vLite/Player/PlayerYoutube</a></li></ul><h3>Classes</h3><ul><li><a href="module-vLite_entrypoint.html">vLite/entrypoint</a></li><li><a href="module-vLite_Player.html">vLite/Player</a></li><li><a href="module-vLite_Player_PlayerHtml5.html">vLite/Player/PlayerHtml5</a></li><li><a href="module-vLite_Player_PlayerYoutube.html">vLite/Player/PlayerYoutube</a></li></ul><h3>Global</h3><ul><li><a href="global.html#vLitejs">vLitejs</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Tue Nov 19 2019 00:24:53 GMT+0100 (CET) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>