videojs-contrib-eme
Version:
Supports Encrypted Media Extensions for playback of encrypted content in Video.js
922 lines (236 loc) • 11.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Global</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">Global</h1>
<section>
<header>
<h2></h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="getMessageContents"><span class="type-signature">(constant) </span>getMessageContents<span class="type-signature"></span></h4>
<div class="description">
<p>Parses the EME key message XML to extract HTTP headers and the Challenge element to use
in the PlayReady license request.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="playready.js.html">playready.js</a>, <a href="playready.js.html#line12">line 12</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="eme"><span class="type-signature"></span>eme<span class="signature">(player<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
<p>A video.js plugin.</p>
<p>In the plugin function, the value of <code>this</code> is a video.js <code>Player</code>
instance. You cannot rely on the player being in a "ready" state here,
depending on how the plugin is invoked. This may or may not be important
to you; if not, remove the wait for "ready"!</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>player</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>A player object.</p></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{}
</td>
<td class="description last"><p>An object of options left to the plugin author to define.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin.js.html">plugin.js</a>, <a href="plugin.js.html#line254">line 254</a>
</li></ul></dd>
</dl>
<h4 class="name" id="initializeMediaKeys"><span class="type-signature"></span>initializeMediaKeys<span class="signature">(player<span class="signature-attributes">opt</span>, emeOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets up MediaKeys on demand</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>player</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>A player object.</p></td>
</tr>
<tr>
<td class="name"><code>emeOptions</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{}
</td>
<td class="description last"><p>An object of eme plugin options.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin.js.html">plugin.js</a>, <a href="plugin.js.html#line225">line 225</a>
</li></ul></dd>
</dl>
<h4 class="name" id="onPlayerReady"><span class="type-signature"></span>onPlayerReady<span class="signature">(player, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Function to invoke when the player is ready.</p>
<p>This is a great place for your plugin to initialize itself. When this
function is called, the player will have its DOM and child components
in place.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>player</code></td>
<td class="type">
<span class="param-type">Player</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{}
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin.js.html">plugin.js</a>, <a href="plugin.js.html#line170">line 170</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setupSessions"><span class="type-signature"></span>setupSessions<span class="signature">(player)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Configure a persistent sessions array and activeSrc property to ensure we properly
handle each independent source's events. Should be run on any encrypted or needkey
style event to ensure that the sessions reflect the active source.</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>player</code></td>
<td class="type">
<span class="param-type">Player</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin.js.html">plugin.js</a>, <a href="plugin.js.html#line153">line 153</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#eme">eme</a></li><li><a href="global.html#getMessageContents">getMessageContents</a></li><li><a href="global.html#initializeMediaKeys">initializeMediaKeys</a></li><li><a href="global.html#onPlayerReady">onPlayerReady</a></li><li><a href="global.html#setupSessions">setupSessions</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0-dev</a> on Tue Oct 16 2018 18:15:17 GMT-0400 (EDT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>