@mastashake08/dash-manifest-creator
Version:
A pure javascript package for creating MPEG-DASH manifests in the browser.
1,271 lines (296 loc) • 13.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: MPD</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: MPD</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>MPD<span class="signature">(config)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="MPD"><span class="type-signature"></span>new MPD<span class="signature">(config)</span><span class="type-signature"></span></h4>
<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>config</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">configuration object for the manifest</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line6">line 6</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="createAdaptationSet"><span class="type-signature">(generator) </span>createAdaptationSet<span class="signature">(mimetype)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>mimetype</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
video/webm
</td>
<td class="description last">The MIME type of the stream</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line81">line 81</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a yielded mimeType attribute
</div>
<h4 class="name" id="createContentComponent"><span class="type-signature">(generator) </span>createContentComponent<span class="signature">(contentType, id)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>contentType</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
video
</td>
<td class="description last">The content type of the media being streams</td>
</tr>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="default">
1
</td>
<td class="description last">The id of the content component</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line94">line 94</a>
</li></ul></dd>
</dl>
<h4 class="name" id="createMpd"><span class="type-signature">(generator) </span>createMpd<span class="signature">(videoData)</span><span class="type-signature"></span></h4>
<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>videoData</code></td>
<td class="type">
<span class="param-type">Buffer</span>
</td>
<td class="description last">initial video data for the stream, must be less than 100kb</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line28">line 28</a>
</li></ul></dd>
</dl>
<h4 class="name" id="createPeriod"><span class="type-signature">(generator) </span>createPeriod<span class="signature">(id)</span><span class="type-signature"></span></h4>
<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>id</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="description last">the id of the period</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line66">line 66</a>
</li></ul></dd>
</dl>
<h4 class="name" id="createSegmentTemplate"><span class="type-signature">(generator) </span>createSegmentTemplate<span class="signature">(videoData, timescale, duration, startNumber, media)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>videoData</code></td>
<td class="type">
<span class="param-type">Buffer</span>
</td>
<td class="default">
</td>
<td class="description last">videoData to be streamed for initialization</td>
</tr>
<tr>
<td class="name"><code>timescale</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="default">
1000
</td>
<td class="description last">The timescale of the media in microseconds</td>
</tr>
<tr>
<td class="name"><code>duration</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="default">
2000
</td>
<td class="description last">The duration of the media in microseconds</td>
</tr>
<tr>
<td class="name"><code>startNumber</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="default">
1
</td>
<td class="description last">The start number of the media content</td>
</tr>
<tr>
<td class="name"><code>media</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
</td>
<td class="description last">The media URL for update PUTs</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line114">line 114</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getXMLFile"><span class="type-signature"></span>getXMLFile<span class="signature">()</span><span class="type-signature"> → {File}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line139">line 139</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
file - A new File named init.mpd which contains the manifest XML
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">File</span>
</dd>
</dl>
<h4 class="name" id="getXMLString"><span class="type-signature"></span>getXMLString<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="MPD.js.html">MPD.js</a>, <a href="MPD.js.html#line130">line 130</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
str - XML string representation of the manifest
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="MPD.html">MPD</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Wed Nov 22 2023 11:33:51 GMT-0500 (Eastern Standard Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>