dashjs
Version:
A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
13,114 lines • 168 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>dash.js Module: MediaPlayer</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.spacelab.css">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">dash.js</a>
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="topNavigation">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="module-DashAdapter.html">DashAdapter</a></li><li><a href="module-DashMetrics.html">DashMetrics</a></li><li><a href="module-MediaPlayer.html">MediaPlayer</a></li><li><a href="module-OfflineController.html">OfflineController</a></li><li><a href="module-ProtectionController.html">ProtectionController</a></li><li><a href="module-Settings.html">Settings</a></li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="Errors.html">Errors</a></li><li><a href="MediaPlayerEvents.html">MediaPlayerEvents</a></li><li><a href="MediaPlayerModel.html">MediaPlayerModel</a></li><li><a href="MetricsReportingEvents.html">MetricsReportingEvents</a></li><li><a href="MssErrors.html">MssErrors</a></li><li><a href="OfflineErrors.html">OfflineErrors</a></li><li><a href="OfflineEvents.html">OfflineEvents</a></li><li><a href="ProtectionErrors.html">ProtectionErrors</a></li><li><a href="ProtectionEvents.html">ProtectionEvents</a></li>
</ul>
</li>
<li class="dropdown">
<a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="MediaPlayerEvents.html#event:ADAPTATION_SET_REMOVED_NO_CAPABILITIES">MediaPlayerEvents#event:ADAPTATION_SET_REMOVED_NO_CAPABILITIES</a></li><li><a href="MediaPlayerEvents.html#event:AST_IN_FUTURE">MediaPlayerEvents#event:AST_IN_FUTURE</a></li><li><a href="MediaPlayerEvents.html#event:BUFFER_EMPTY">MediaPlayerEvents#event:BUFFER_EMPTY</a></li><li><a href="MediaPlayerEvents.html#event:BUFFER_LEVEL_STATE_CHANGED">MediaPlayerEvents#event:BUFFER_LEVEL_STATE_CHANGED</a></li><li><a href="MediaPlayerEvents.html#event:BUFFER_LEVEL_UPDATED">MediaPlayerEvents#event:BUFFER_LEVEL_UPDATED</a></li><li><a href="MediaPlayerEvents.html#event:BUFFER_LOADED">MediaPlayerEvents#event:BUFFER_LOADED</a></li><li><a href="MediaPlayerEvents.html#event:CAN_PLAY">MediaPlayerEvents#event:CAN_PLAY</a></li><li><a href="MediaPlayerEvents.html#event:CAN_PLAY_THROUGH">MediaPlayerEvents#event:CAN_PLAY_THROUGH</a></li><li><a href="MediaPlayerEvents.html#event:CAPTION_CONTAINER_RESIZE">MediaPlayerEvents#event:CAPTION_CONTAINER_RESIZE</a></li><li><a href="MediaPlayerEvents.html#event:CAPTION_RENDERED">MediaPlayerEvents#event:CAPTION_RENDERED</a></li><li><a href="MediaPlayerEvents.html#event:CONFORMANCE_VIOLATION">MediaPlayerEvents#event:CONFORMANCE_VIOLATION</a></li><li><a href="MediaPlayerEvents.html#event:CONTENT_STEERING_REQUEST_COMPLETED">MediaPlayerEvents#event:CONTENT_STEERING_REQUEST_COMPLETED</a></li><li><a href="MediaPlayerEvents.html#event:DYNAMIC_TO_STATIC">MediaPlayerEvents#event:DYNAMIC_TO_STATIC</a></li><li><a href="MediaPlayerEvents.html#event:ERROR">MediaPlayerEvents#event:ERROR</a></li><li><a href="MediaPlayerEvents.html#event:EVENT_MODE_ON_RECEIVE">MediaPlayerEvents#event:EVENT_MODE_ON_RECEIVE</a></li><li><a href="MediaPlayerEvents.html#event:EVENT_MODE_ON_START">MediaPlayerEvents#event:EVENT_MODE_ON_START</a></li><li><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_ABANDONED">MediaPlayerEvents#event:FRAGMENT_LOADING_ABANDONED</a></li><li><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_COMPLETED">MediaPlayerEvents#event:FRAGMENT_LOADING_COMPLETED</a></li><li><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_PROGRESS">MediaPlayerEvents#event:FRAGMENT_LOADING_PROGRESS</a></li><li><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_STARTED">MediaPlayerEvents#event:FRAGMENT_LOADING_STARTED</a></li><li><a href="MediaPlayerEvents.html#event:LOG">MediaPlayerEvents#event:LOG</a></li><li><a href="MediaPlayerEvents.html#event:MANIFEST_LOADED">MediaPlayerEvents#event:MANIFEST_LOADED</a></li><li><a href="MediaPlayerEvents.html#event:MANIFEST_VALIDITY_CHANGED">MediaPlayerEvents#event:MANIFEST_VALIDITY_CHANGED</a></li><li><a href="MediaPlayerEvents.html#event:METRIC_ADDED">MediaPlayerEvents#event:METRIC_ADDED</a></li><li><a href="MediaPlayerEvents.html#event:METRIC_CHANGED">MediaPlayerEvents#event:METRIC_CHANGED</a></li><li><a href="MediaPlayerEvents.html#event:METRIC_UPDATED">MediaPlayerEvents#event:METRIC_UPDATED</a></li><li><a href="MediaPlayerEvents.html#event:METRICS_CHANGED">MediaPlayerEvents#event:METRICS_CHANGED</a></li><li><a href="MediaPlayerEvents.html#event:PERIOD_SWITCH_COMPLETED">MediaPlayerEvents#event:PERIOD_SWITCH_COMPLETED</a></li><li><a href="MediaPlayerEvents.html#event:PERIOD_SWITCH_STARTED">MediaPlayerEvents#event:PERIOD_SWITCH_STARTED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_ENDED">MediaPlayerEvents#event:PLAYBACK_ENDED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_ERROR">MediaPlayerEvents#event:PLAYBACK_ERROR</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_LOADED_DATA">MediaPlayerEvents#event:PLAYBACK_LOADED_DATA</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_METADATA_LOADED">MediaPlayerEvents#event:PLAYBACK_METADATA_LOADED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_NOT_ALLOWED">MediaPlayerEvents#event:PLAYBACK_NOT_ALLOWED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_PAUSED">MediaPlayerEvents#event:PLAYBACK_PAUSED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_PLAYING">MediaPlayerEvents#event:PLAYBACK_PLAYING</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_PROGRESS">MediaPlayerEvents#event:PLAYBACK_PROGRESS</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_RATE_CHANGED">MediaPlayerEvents#event:PLAYBACK_RATE_CHANGED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_SEEKED">MediaPlayerEvents#event:PLAYBACK_SEEKED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_SEEKING">MediaPlayerEvents#event:PLAYBACK_SEEKING</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_STALLED">MediaPlayerEvents#event:PLAYBACK_STALLED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_STARTED">MediaPlayerEvents#event:PLAYBACK_STARTED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_TIME_UPDATED">MediaPlayerEvents#event:PLAYBACK_TIME_UPDATED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_VOLUME_CHANGED">MediaPlayerEvents#event:PLAYBACK_VOLUME_CHANGED</a></li><li><a href="MediaPlayerEvents.html#event:PLAYBACK_WAITING">MediaPlayerEvents#event:PLAYBACK_WAITING</a></li><li><a href="MediaPlayerEvents.html#event:QUALITY_CHANGE_RENDERED">MediaPlayerEvents#event:QUALITY_CHANGE_RENDERED</a></li><li><a href="MediaPlayerEvents.html#event:QUALITY_CHANGE_REQUESTED">MediaPlayerEvents#event:QUALITY_CHANGE_REQUESTED</a></li><li><a href="MediaPlayerEvents.html#event:REPRESENTATION_SWITCH">MediaPlayerEvents#event:REPRESENTATION_SWITCH</a></li><li><a href="MediaPlayerEvents.html#event:STREAM_ACTIVATED">MediaPlayerEvents#event:STREAM_ACTIVATED</a></li><li><a href="MediaPlayerEvents.html#event:STREAM_DEACTIVATED">MediaPlayerEvents#event:STREAM_DEACTIVATED</a></li><li><a href="MediaPlayerEvents.html#event:STREAM_INITIALIZED">MediaPlayerEvents#event:STREAM_INITIALIZED</a></li><li><a href="MediaPlayerEvents.html#event:STREAM_INITIALIZING">MediaPlayerEvents#event:STREAM_INITIALIZING</a></li><li><a href="MediaPlayerEvents.html#event:STREAM_TEARDOWN_COMPLETE">MediaPlayerEvents#event:STREAM_TEARDOWN_COMPLETE</a></li><li><a href="MediaPlayerEvents.html#event:STREAM_UPDATED">MediaPlayerEvents#event:STREAM_UPDATED</a></li><li><a href="MediaPlayerEvents.html#event:TEXT_TRACK_ADDED">MediaPlayerEvents#event:TEXT_TRACK_ADDED</a></li><li><a href="MediaPlayerEvents.html#event:TEXT_TRACKS_ADDED">MediaPlayerEvents#event:TEXT_TRACKS_ADDED</a></li><li><a href="MediaPlayerEvents.html#event:TRACK_CHANGE_RENDERED">MediaPlayerEvents#event:TRACK_CHANGE_RENDERED</a></li><li><a href="MediaPlayerEvents.html#event:TTML_PARSED">MediaPlayerEvents#event:TTML_PARSED</a></li><li><a href="MediaPlayerEvents.html#event:TTML_TO_PARSE">MediaPlayerEvents#event:TTML_TO_PARSE</a></li><li><a href="MetricsReportingEvents.html#event:CMCD_DATA_GENERATED">MetricsReportingEvents#event:CMCD_DATA_GENERATED</a></li><li><a href="OfflineEvents.html#event:OFFLINE_RECORD_FINISHED">OfflineEvents#event:OFFLINE_RECORD_FINISHED</a></li><li><a href="OfflineEvents.html#event:OFFLINE_RECORD_LOADEDMETADATA">OfflineEvents#event:OFFLINE_RECORD_LOADEDMETADATA</a></li><li><a href="OfflineEvents.html#event:OFFLINE_RECORD_STARTED">OfflineEvents#event:OFFLINE_RECORD_STARTED</a></li><li><a href="OfflineEvents.html#event:OFFLINE_RECORD_STOPPED">OfflineEvents#event:OFFLINE_RECORD_STOPPED</a></li><li><a href="ProtectionEvents.html#event:KEY_ADDED">ProtectionEvents#event:KEY_ADDED</a></li><li><a href="ProtectionEvents.html#event:KEY_ERROR">ProtectionEvents#event:KEY_ERROR</a></li><li><a href="ProtectionEvents.html#event:KEY_MESSAGE">ProtectionEvents#event:KEY_MESSAGE</a></li><li><a href="ProtectionEvents.html#event:KEY_SESSION_CLOSED">ProtectionEvents#event:KEY_SESSION_CLOSED</a></li><li><a href="ProtectionEvents.html#event:KEY_SESSION_CREATED">ProtectionEvents#event:KEY_SESSION_CREATED</a></li><li><a href="ProtectionEvents.html#event:KEY_SESSION_REMOVED">ProtectionEvents#event:KEY_SESSION_REMOVED</a></li><li><a href="ProtectionEvents.html#event:KEY_STATUSES_CHANGED">ProtectionEvents#event:KEY_STATUSES_CHANGED</a></li><li><a href="ProtectionEvents.html#event:KEY_SYSTEM_SELECTED">ProtectionEvents#event:KEY_SYSTEM_SELECTED</a></li><li><a href="ProtectionEvents.html#event:LICENSE_REQUEST_COMPLETE">ProtectionEvents#event:LICENSE_REQUEST_COMPLETE</a></li><li><a href="ProtectionEvents.html#event:LICENSE_REQUEST_SENDING">ProtectionEvents#event:LICENSE_REQUEST_SENDING</a></li><li><a href="ProtectionEvents.html#event:PROTECTION_CREATED">ProtectionEvents#event:PROTECTION_CREATED</a></li><li><a href="ProtectionEvents.html#event:PROTECTION_DESTROYED">ProtectionEvents#event:PROTECTION_DESTROYED</a></li>
</ul>
</li>
<li class="dropdown">
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li><a href="global.html#LICENSE_SERVER_MANIFEST_CONFIGURATIONS">LICENSE_SERVER_MANIFEST_CONFIGURATIONS</a></li>
</ul>
</li>
</ul>
<div class="col-sm-3 col-md-3">
<form class="navbar-form" role="search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
<div class="input-group-btn">
<button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="container" id="toc-content">
<div class="row">
<div class="col-md-8">
<div id="main">
<h1 class="page-title">Module: MediaPlayer</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description"><p>The MediaPlayer is the primary dash.js Module and a Facade to build your player around.<br>
It will allow you access to all the important dash.js properties/methods via the public API and all the<br>
events to build a robust DASH media player.</p></div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-91">line 91</a>
</li>
</ul>
</dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<hr>
<dt class="name" id="~ELEMENT_NOT_ATTACHED_ERROR">
<h4 id="~ELEMENT_NOT_ATTACHED_ERROR"><span class="type-signature"><inner, constant> </span>ELEMENT_NOT_ATTACHED_ERROR<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>error string thrown when a function is called before the dash.js has received a reference of an HTML5 video element</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-108">line 108</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~MEDIA_PLAYER_NOT_INITIALIZED_ERROR">
<h4 id="~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><span class="type-signature"><inner, constant> </span>MEDIA_PLAYER_NOT_INITIALIZED_ERROR<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>error string thrown when a function is called before the dash.js has been fully initialized.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-118">line 118</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~PLAYBACK_NOT_INITIALIZED_ERROR">
<h4 id="~PLAYBACK_NOT_INITIALIZED_ERROR"><span class="type-signature"><inner, constant> </span>PLAYBACK_NOT_INITIALIZED_ERROR<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>error string thrown when a function is called before the dash.js has been fully initialized</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-103">line 103</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~SOURCE_NOT_ATTACHED_ERROR">
<h4 id="~SOURCE_NOT_ATTACHED_ERROR"><span class="type-signature"><inner, constant> </span>SOURCE_NOT_ATTACHED_ERROR<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>error string thrown when a function is called before the dash.js has received a valid source stream.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-113">line 113</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~STREAMING_NOT_INITIALIZED_ERROR">
<h4 id="~STREAMING_NOT_INITIALIZED_ERROR"><span class="type-signature"><inner, constant> </span>STREAMING_NOT_INITIALIZED_ERROR<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>error string thrown when a function is called before the dash.js has been fully initialized</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-98">line 98</a>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<hr>
<dt>
<h4 class="name" id="addABRCustomRule"><span class="type-signature"></span>addABRCustomRule(type, rulename, rule)</h4>
</dt>
<dd>
<div class="description">
<p>Add a custom ABR Rule<br>
Rule will be apply on next stream if a stream is being played</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>rule type (one of ['qualitySwitchRules','abandonFragmentRules'])</p></td>
</tr>
<tr>
<td class="name"><code>rulename</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>name of rule (used to identify custom rule). If one rule of same name has been added, then existing rule will be updated</p></td>
</tr>
<tr>
<td class="name"><code>rule</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>the rule object instance</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1054">line 1054</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="Constants.html#BAD_ARGUMENT_ERROR"><code>BAD_ARGUMENT_ERROR</code></a> if called with invalid arguments.</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="addUTCTimingSource"><span class="type-signature"></span>addUTCTimingSource(schemeIdUri, value)</h4>
</dt>
<dd>
<div class="description">
<p>Allows you to set a scheme and server source for UTC live edge detection for dynamic streams.
If UTCTiming is defined in the manifest, it will take precedence over any time source manually added.</p>
<p>If you have exposed the Date header, use the method <a href="module-MediaPlayer.html#clearDefaultUTCTimingSources"><code>clearDefaultUTCTimingSources()</code></a>.
This will allow the date header on the manifest to be used instead of a time server</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>schemeIdUri</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><ul>
<li>urn:mpeg:dash:utc:http-head:2014</li>
<li>urn:mpeg:dash:utc:http-xsdate:2014</li>
<li>urn:mpeg:dash:utc:http-iso:2014</li>
<li>urn:mpeg:dash:utc:direct:2014</li>
</ul>
<p>Some specs referencing early ISO23009-1 drafts incorrectly use
2012 in the URI, rather than 2014. support these for now.</p>
<ul>
<li>urn:mpeg:dash:utc:http-head:2012</li>
<li>urn:mpeg:dash:utc:http-xsdate:2012</li>
<li>urn:mpeg:dash:utc:http-iso:2012</li>
<li>urn:mpeg:dash:utc:direct:2012</li>
</ul></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>Path to a time source.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li><ul>
<li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li>
<li>value:http://time.akamai.com/?iso&ms/li>
</ul></li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1115">line 1115</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#removeUTCTimingSource"><code>removeUTCTimingSource()</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="attachProtectionController"><span class="type-signature"></span>attachProtectionController(value)</h4>
</dt>
<dd>
<div class="description">
<p>Will override dash.js protection controller.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">ProtectionController</span>
</td>
<td class="description last"><p>valid protection controller instance.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1685">line 1685</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="attachSource"><span class="type-signature"></span>attachSource(urlOrManifest, startTime)</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to set a source URL to a valid MPD manifest file OR<br>
a previously downloaded and parsed manifest object. Optionally, can<br>
also provide protection information</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>urlOrManifest</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">Object</span>
</td>
<td class="description last"><p>A URL to a valid MPD manifest file, or a<br>
parsed manifest object.</p></td>
</tr>
<tr>
<td class="name"><code>startTime</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">string</span>
</td>
<td class="description last"><p>For VoD content the start time is relative to the start time of the first period.<br>
For live content<br>
If the parameter starts from prefix posix: it signifies the absolute time range defined in seconds of Coordinated Universal Time (ITU-R TF.460-6). This is the number of seconds since 01-01-1970 00:00:00 UTC. Fractions of seconds may be optionally specified down to the millisecond level.<br>
If no posix prefix is used the starttime is relative to MPD@availabilityStartTime</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1827">line 1827</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><code>MEDIA_PLAYER_NOT_INITIALIZED_ERROR</code></a> if called before initialize function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="attachTTMLRenderingDiv"><span class="type-signature"></span>attachTTMLRenderingDiv(div)</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to attach an HTML5 div for dash.js to render rich TTML subtitles.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>div</code></td>
<td class="type">
<span class="param-type">HTMLDivElement</span>
</td>
<td class="description last"><p>An unstyled div placed after the video element. It will be styled to match the video size and overlay z-order.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1414">line 1414</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~ELEMENT_NOT_ATTACHED_ERROR"><code>ELEMENT_NOT_ATTACHED_ERROR</code></a> if called before attachView function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="attachView"><span class="type-signature"></span>attachView(element)</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to attach an HTML5 VideoElement for dash.js to operate upon.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>element</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>An HTMLMediaElement that has already been defined in the DOM (or equivalent stub).</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1372">line 1372</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><code>MEDIA_PLAYER_NOT_INITIALIZED_ERROR</code></a> if called before initialize function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="clearDefaultUTCTimingSources"><span class="type-signature"></span>clearDefaultUTCTimingSources()</h4>
</dt>
<dd>
<div class="description">
<p>Allows you to clear the stored array of time sources.</p>
<p>Example use: If you have exposed the Date header, calling this method
will allow the date header on the manifest to be used instead of the time server.</p>
<p>Example use: Calling this method, assuming there is not an exposed date header on the manifest, will default back
to using a binary search to discover the live edge</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1144">line 1144</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#restoreDefaultUTCTimingSources"><code>restoreDefaultUTCTimingSources()</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="convertToTimeCode"><span class="type-signature"></span>convertToTimeCode(value)</h4>
</dt>
<dd>
<div class="description">
<p>A utility method which converts seconds into TimeCode (i.e. 300 --> 05:00).</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>A number in seconds to be converted into a formatted time code.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1919">line 1919</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>A formatted time code string.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy()</h4>
</dt>
<dd>
<div class="description">
<p>Completely destroys the media player and frees all memory.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-453">line 453</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="duration"><span class="type-signature"></span>duration()</h4>
</dt>
<dd>
<div class="description">
<p>Duration of the media's playback, in seconds.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-849">line 849</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current duration of the media. For a dynamic stream this will return DVRWindow.end - DVRWindow.start</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="durationAsUTC"><span class="type-signature"></span>durationAsUTC()</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to get the current duration as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.<br>
Note - this property only has meaning for live streams.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-891">line 891</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current duration as UTC timestamp.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="enableForcedTextStreaming"><span class="type-signature"></span>enableForcedTextStreaming(enable)</h4>
</dt>
<dd>
<div class="description">
<p>Enable/disable text<br>
When enabling dash will keep downloading and process fragmented text tracks even if all tracks are in mode "hidden"</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enable</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>true to enable text streaming even if all text tracks are hidden.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1278">line 1278</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="enableText"><span class="type-signature"></span>enableText(enable)</h4>
</dt>
<dd>
<div class="description">
<p>Enable/disable text<br>
When enabling text, dash will choose the previous selected text track</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enable</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>true to enable text, false otherwise (same as setTextTrack(-1))</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1260">line 1260</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="extend"><span class="type-signature"></span>extend(parentNameString, childInstance, override)</h4>
</dt>
<dd>
<div class="description">
<p>This method should be used to extend or replace internal dash.js objects.<br>
There are two ways to extend dash.js (determined by the override argument):</p>
<ol>
<li>If you set override to true any public method or property in your custom object will
override the dash.js parent object's property(ies) and will be used instead but the
dash.js parent module will still be created.</li>
<li>If you set override to false your object will completely replace the dash.js object.
(Note: This is how it was in 1.x of Dash.js with Dijon).</li>
</ol>
<b>When you extend you get access to this.context, this.factory and this.parent to operate with in your custom object.</b>
<ul>
<li><b>this.context</b> - can be used to pass context for singleton access.</li>
<li><b>this.factory</b> - can be used to call factory.getSingletonInstance().</li>
<li><b>this.parent</b> - is the reference of the parent object to call other public methods. (this.parent is excluded if you extend with override set to false or option 2)</li>
</ul>
<b>You must call extend before you call initialize</b>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>parentNameString</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>name of parent module</p></td>
</tr>
<tr>
<td class="name"><code>childInstance</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>overriding object</p></td>
</tr>
<tr>
<td class="name"><code>override</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>replace only some methods (true) or the whole object (false)</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1953">line 1953</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#initialize"><code>initialize()</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="formatUTC"><span class="type-signature"></span>formatUTC(time, locales, hour12, withDate)</h4>
</dt>
<dd>
<div class="description">
<p>A utility methods which converts UTC timestamp value into a valid time and date string.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>time</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
</td>
<td class="description last"><p>UTC timestamp to be converted into date and time.</p></td>
</tr>
<tr>
<td class="name"><code>locales</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="default">
</td>
<td class="description last"><p>a region identifier (i.e. en_US).</p></td>
</tr>
<tr>
<td class="name"><code>hour12</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
</td>
<td class="description last"><p>12 vs 24 hour. Set to true for 12 hour time formatting.</p></td>
</tr>
<tr>
<td class="name"><code>withDate</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>default is false. Set to true to append current date to UTC time format.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1902">line 1902</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>A formatted time and date string.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getActiveStream"><span class="type-signature"></span>getActiveStream()</h4>
</dt>
<dd>
<div class="description">
<p>This method returns the active stream</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1964">line 1964</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="getAutoPlay"><span class="type-signature"></span>getAutoPlay()</h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1021">line 1021</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current autoPlay state.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getAverageThroughput"><span class="type-signature"></span>getAverageThroughput(type)</h4>
</dt>
<dd>
<div class="description">
<p>Returns the average throughput computed in the ABR logic</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1173">line 1173</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>value</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getBitrateInfoListFor"><span class="type-signature"></span>getBitrateInfoListFor(type)</h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1435">line 1435</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getBufferLength"><span class="type-signature"></span>getBufferLength(type)</h4>
</dt>
<dd>
<div class="description">
<p>The length of the buffer for a given media type, in seconds. Valid media<br>
types are "video", "audio" and "text". If no type is passed<br>
in, then the minimum of video, audio and text buffer length is<br>
returned. NaN is returned if an invalid type is requested, the<br>
presentation does not contain that type, or if no arguments are passed<br>
and the presentation does not include any adaption sets of valid media<br>
type.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"><p>'video', 'audio' or 'text'</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-733">line 733</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The length of the buffer for the given media type, in<br>
seconds, or NaN</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getCurrentLiveLatency"><span class="type-signature"></span>getCurrentLiveLatency()</h4>
</dt>
<dd>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1031">line 1031</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><code>MEDIA_PLAYER_NOT_INITIALIZED_ERROR</code></a> if called before initialize function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>Current live stream latency in seconds. It is the difference between now time and time position at the playback head.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
|
<span class="param-type">NaN</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getCurrentTrackFor"><span class="type-signature"></span>getCurrentTrackFor(type)</h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1507">line 1507</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p><code>MediaInfo</code></p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
|
<span class="param-type">null</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getDashAdapter"><span class="type-signature"></span>getDashAdapter()</h4>
</dt>
<dd>
<div class="description">
<p>Returns the DashAdapter.js Module.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1980">line 1980</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-DashAdapter.html"><code>module:DashAdapter</code></a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getDashMetrics"><span class="type-signature"></span>getDashMetrics()</h4>
</dt>
<dd>
<div class="description">
<p>Returns the DashMetrics.js Module. You use this Module to get access to all the public metrics<br>
stored in dash.js</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1240">line 1240</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-DashMetrics.html"><code>module:DashMetrics</code></a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getDebug"><span class="type-signature"></span>getDebug()</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to access the dash.js logging class.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-515">line 515</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Debug</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getDVRSeekOffset"><span class="type-signature"></span>getDVRSeekOffset(value)</h4>
</dt>
<dd>
<div class="description">
<p>This method should only be used with a live stream that has a valid timeShiftBufferLength (DVR Window).<br>
NOTE - If you do not need the raw offset value (i.e. media analytics, tracking, etc) consider using the <a href="module-MediaPlayer.html#seek"><code>seek()</code></a> method<br>
which will calculate this value for you and set the video element's currentTime property all in one simple call.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>A relative time, in seconds, based on the return value of the <a href="module-MediaPlayer.html#duration"><code>duration()</code></a> method is expected.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-780">line 780</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#seek"><code>seek()</code></a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>A value that is relative the available range within the timeShiftBufferLength (DVR Window).</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getDVRWindowSize"><span class="type-signature"></span>getDVRWindowSize()</h4>
</dt>
<dd>
<div class="description">
<p>The timeShiftBufferLength (DVR Window), in seconds.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-760">line 760</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The window of allowable play time behind the live point of a live stream as defined in the manifest.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getInitialMediaSettingsFor"><span class="type-signature"></span>getInitialMediaSettingsFor(type)</h4>
</dt>
<dd>
<div class="description">
<p>This method returns media settings that is used to pick the initial track. Format of the settings<br>
is following:<br>
{lang: langValue,<br>
index: indexValue,<br>
viewpoint: viewpointValue,<br>
audioChannelConfiguration: audioChannelConfigurationValue,<br>
accessibility: accessibilityValue,<br>
role: roleValue}</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1553">line 1553</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><code>MEDIA_PLAYER_NOT_INITIALIZED_ERROR</code></a> if called before initialize function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getLowLatencyModeEnabled"><span class="type-signature"></span>getLowLatencyModeEnabled()</h4>
</dt>
<dd>
<div class="description">
<p>Returns a boolean that indicates whether the player is operating in low latency mode.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-645">line 645</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getOfflineController"><span class="type-signature"></span>getOfflineController()</h4>
</dt>
<dd>
<div class="description">
<p>Detects if Offline is included and returns an instance of OfflineController.js</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1220">line 1220</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getPlaybackRate"><span class="type-signature"></span>getPlaybackRate()</h4>
</dt>
<dd>
<div class="description">
<p>Returns the current playback rate.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-668">line 668</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getProtectionController"><span class="type-signature"></span>getProtectionController()</h4>
</dt>
<dd>
<div class="description">
<p>Detects if Protection is included and returns an instance of ProtectionController.js</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1675">line 1675</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getQualityFor"><span class="type-signature"></span>getQualityFor(type)</h4>
</dt>
<dd>
<div class="description">
<p>Gets the current download quality for media type video, audio or images. For video and audio types the ABR<br>
rules update this value before every new download unless autoSwitchBitrate is set to false. For 'image'<br>
type, thumbnails, there is no ABR algorithm and quality is set manually.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"><p>'video', 'audio' or 'image' (thumbnails)</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-934">line 934</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#setQualityFor"><code>setQualityFor()</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>the quality index, 0 corresponding to the lowest bitrate</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getSettings"><span class="type-signature"></span>getSettings()</h4>
</dt>
<dd>
<div class="description">
<p>Get the current settings object being used on the player.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1854">line 1854</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The settings object being used.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">PlayerSettings</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getSource"><span class="type-signature"></span>getSource()</h4>
</dt>
<dd>
<div class="description">
<p>Returns the source string or manifest that was attached by calling attachSource()</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1793">line 1793</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~SOURCE_NOT_ATTACHED_ERROR"><code>SOURCE_NOT_ATTACHED_ERROR</code></a> if called before attachSource function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
|
<span class="param-type">manifest</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getStreamsFromManifest"><span class="type-signature"></span>getStreamsFromManifest(manifest)</h4>
</dt>
<dd>
<div class="description">
<p>This method returns the list of all available streams from a given manifest</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>manifest</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1451">line 1451</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>list of <code>StreamInfo</code></p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getTargetLiveDelay"><span class="type-signature"></span>getTargetLiveDelay()</h4>
</dt>
<dd>
<div class="description">
<p>Returns the target live delay</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-804">line 804</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The target live delay</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getTopBitrateInfoFor"><span class="type-signature"></span>getTopBitrateInfoFor(type)</h4>
</dt>
<dd>
<div class="description">
<p>Gets the top quality BitrateInfo checking portal limit and max allowed.<br>
It calls getMaxAllowedIndexFor internally</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"><p>'video' or 'audio'</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-915">line 915</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">BitrateInfo</span>
|
<span class="param-type">null</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getTracksFor"><span class="type-signature"></span>getTracksFor(type)</h4>
</dt>
<dd>
<div class="description">
<p>This method returns the list of all available tracks for a given media type</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1466">line 1466</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>list of <code>MediaInfo</code></p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getTracksForTypeFromManifest"><span class="type-signature"></span>getTracksForTypeFromManifest(type, manifest, streamInfo)</h4>
</dt>
<dd>
<div class="description">
<p>This method returns the list of all available tracks for a given media type and streamInfo from a given manifest</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>manifest</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>streamInfo</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1489">line 1489</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>list of <code>MediaInfo</code></p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getTTMLRenderingDiv"><span class="type-signature"></span>getTTMLRenderingDiv()</h4>
</dt>
<dd>
<div class="description">
<p>Returns instance of Div that was attached by calling attachTTMLRenderingDiv()</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1402">line 1402</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getVersion"><span class="type-signature"></span>getVersion()</h4>
</dt>
<dd>
<div class="description">
<p>Current version of Dash.js</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-504">line 504</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>the current dash.js version string.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getVideoElement"><span class="type-signature"></span>getVideoElement()</h4>
</dt>
<dd>
<div class="description">
<p>Returns instance of Video Element that was attached by calling attachView()</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1357">line 1357</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~ELEMENT_NOT_ATTACHED_ERROR"><code>ELEMENT_NOT_ATTACHED_ERROR</code></a> if called before attachView function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getVolume"><span class="type-signature"></span>getVolume()</h4>
</dt>
<dd>
<div class="description">
<p>Returns the current audio volume, from 0.0 (silent) to 1.0 (loudest).</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-714">line 714</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getXHRWithCredentialsForType"><span class="type-signature"></span>getXHRWithCredentialsForType(type)</h4>
</dt>
<dd>
<div class="description">
<p>Gets whether withCredentials on XHR requests for a particular request<br>
type is true or false</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>one of HTTPRequest.*_TYPE</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1203">line 1203</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="initialize"><span class="type-signature"></span>initialize( [view] [, source] [, autoPlay], startTime)</h4>
</dt>
<dd>
<div class="description">
<p>Upon creating the MediaPlayer you must call initialize before you call anything else.<br>
There is one exception to this rule. It is crucial to call <a href="module-MediaPlayer.html#extend"><code>extend()</code></a><br>
with all your extensions prior to calling initialize.</p>
<p>ALL arguments are optional and there are individual methods to set each argument later on.<br>
The args in this method are just for convenience and should only be used for a simple player setup.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>view</code></td>
<td class="type">
<span class="param-type">HTML5MediaElement</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Optional arg to set the video element. <a href="module-MediaPlayer.html#attachView"><code>attachView()</code></a></p></td>
</tr>
<tr>
<td class="name"><code>source</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Optional arg to set the media source. <a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a></p></td>
</tr>
<tr>
<td class="name"><code>autoPlay</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Optional arg to set auto play. <a href="module-MediaPlayer.html#setAutoPlay"><code>setAutoPlay()</code></a></p></td>
</tr>
<tr>
<td class="name"><code>startTime</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>For VoD content the start time is relative to the start time of the first period.<br>
For live content<br>
If the parameter starts from prefix posix: it signifies the absolute time range defined in seconds of Coordinated Universal Time (ITU-R TF.460-6). This is the number of seconds since 01-01-1970 00:00:00 UTC. Fractions of seconds may be optionally specified down to the millisecond level.<br>
If no posix prefix is used the starttime is relative to MPD@availabilityStartTime</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-270">line 270</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a></li>
<li><a href="module-MediaPlayer.html#setAutoPlay"><code>setAutoPlay()</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="isDynamic"><span class="type-signature"></span>isDynamic()</h4>
</dt>
<dd>
<div class="description">
<p>Returns a Boolean that indicates whether the media is in the process of dynamic.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-632">line 632</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="isMuted"><span class="type-signature"></span>isMuted()</h4>
</dt>
<dd>
<div class="description">
<p>A Boolean that determines whether audio is muted.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-690">line 690</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="isPaused"><span class="type-signature"></span>isPaused()</h4>
</dt>
<dd>
<div class="description">
<p>Returns a Boolean that indicates whether the Video Element is paused.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-566">line 566</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="isReady"><span class="type-signature"></span>isReady()</h4>
</dt>
<dd>
<div class="description">
<p>The ready state of the MediaPlayer based on both the video element and MPD source being defined.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-467">line 467</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#attachView"><code>attachView()</code></a></li>
<li><a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current ready state of the MediaPlayer</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="isSeeking"><span class="type-signature"></span>isSeeking()</h4>
</dt>
<dd>
<div class="description">
<p>Returns a Boolean that indicates whether the media is in the process of seeking to a new position.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-618">line 618</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="isTextEnabled"><span class="type-signature"></span>isTextEnabled()</h4>
</dt>
<dd>
<div class="description">
<p>Return if text is enabled</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1295">line 1295</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>return true if text is enabled, false otherwise</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="off"><span class="type-signature"></span>off(type, listener, scope)</h4>
</dt>
<dd>
<div class="description">
<p>Use the off method to remove listeners for public events found in MediaPlayer.events. <a href="MediaPlayerEvents.html"><code>MediaPlayerEvents</code></a></p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p><a href="MediaPlayerEvents.html"><code>MediaPlayerEvents</code></a></p></td>
</tr>
<tr>
<td class="name"><code>listener</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>callback method when the event fires.</p></td>
</tr>
<tr>
<td class="name"><code>scope</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>context of the listener so it can be removed properly.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-494">line 494</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="on"><span class="type-signature"></span>on(type, listener, scope, options)</h4>
</dt>
<dd>
<div class="description">
<p>Use the on method to listen for public events found in MediaPlayer.events. <a href="MediaPlayerEvents.html"><code>MediaPlayerEvents</code></a></p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p><a href="MediaPlayerEvents.html"><code>MediaPlayerEvents</code></a></p></td>
</tr>
<tr>
<td class="name"><code>listener</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>callback method when the event fires.</p></td>
</tr>
<tr>
<td class="name"><code>scope</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>context of the listener so it can be removed properly.</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>object to define various options such as priority and mode</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-481">line 481</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="pause"><span class="type-signature"></span>pause()</h4>
</dt>
<dd>
<div class="description">
<p>This method will call pause on the native Video Element.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-552">line 552</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="play"><span class="type-signature"></span>play()</h4>
</dt>
<dd>
<div class="description">
<p>The play method initiates playback of the media defined by the <a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a> method.<br>
This method will call play on the native Video Element.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-536">line 536</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="provideThumbnail"><span class="type-signature"></span>provideThumbnail(time, callback)</h4>
</dt>
<dd>
<div class="description">
<p>Provide the thumbnail at time position. This can be asynchronous, so you must provide a callback ro retrieve thumbnails informations</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>time</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>A relative time, in seconds, based on the return value of the <a href="module-MediaPlayer.html#duration"><code>duration()</code></a> method is expected</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>A Callback function provided when retrieving thumbnail the given time position. Thumbnail object is null in case there are is not a thumbnails representation or<br>
if it doesn't contain a thumbnail for the given time position.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1725">line 1725</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="registerCustomCapabilitiesFilter"><span class="type-signature"></span>registerCustomCapabilitiesFilter(filter)</h4>
</dt>
<dd>
<div class="description">
<p>Registers a custom capabilities filter. This enables application to filter representations to use.<br>
The provided callback function shall return a boolean based on whether or not to use the representation.<br>
The filters are applied in the order they are registered.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>the custom capabilities filter callback</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1588">line 1588</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="registerLicenseRequestFilter"><span class="type-signature"></span>registerLicenseRequestFilter(filter)</h4>
</dt>
<dd>
<div class="description">
<p>Registers a license request filter. This enables application to manipulate/overwrite any request parameter and/or request data.<br>
The provided callback function shall return a promise that shall be resolved once the filter process is completed.<br>
The filters are applied in the order they are registered.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>the license request filter callback</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1626">line 1626</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="registerLicenseResponseFilter"><span class="type-signature"></span>registerLicenseResponseFilter(filter)</h4>
</dt>
<dd>
<div class="description">
<p>Registers a license response filter. This enables application to manipulate/overwrite the response data<br>
The provided callback function shall return a promise that shall be resolved once the filter process is completed.<br>
The filters are applied in the order they are registered.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>the license response filter callback</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1638">line 1638</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="removeABRCustomRule"><span class="type-signature"></span>removeABRCustomRule(rulename)</h4>
</dt>
<dd>
<div class="description">
<p>Remove a custom ABR Rule</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rulename</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>name of the rule to be removed</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1065">line 1065</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="removeAllABRCustomRule"><span class="type-signature"></span>removeAllABRCustomRule()</h4>
</dt>
<dd>
<div class="description">
<p>Remove all ABR custom rules</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1074">line 1074</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="removeUTCTimingSource"><span class="type-signature"></span>removeUTCTimingSource(schemeIdUri, value)</h4>
</dt>
<dd>
<div class="description">
<p>Allows you to remove a UTC time source. Both schemeIdUri and value need to match the Dash.vo.UTCTiming properties in order for the
entry to be removed from the array</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>schemeIdUri</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>see <a href="module-MediaPlayer.html#addUTCTimingSource"><code>addUTCTimingSource()</code></a></p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>see <a href="module-MediaPlayer.html#addUTCTimingSource"><code>addUTCTimingSource()</code></a></p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1129">line 1129</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#clearDefaultUTCTimingSources"><code>clearDefaultUTCTimingSources()</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="Constants.html#BAD_ARGUMENT_ERROR"><code>BAD_ARGUMENT_ERROR</code></a> if called with invalid arguments, schemeIdUri and value are not string type.</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="reset"><span class="type-signature"></span>reset()</h4>
</dt>
<dd>
<div class="description">
<p>Sets the MPD source and the video element to null. You can also reset the MediaPlayer by<br>
calling attachSource with a new source file.</p>
<p>This call does not destroy the MediaPlayer. To destroy the MediaPlayer and free all of its<br>
memory, call destroy().</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-423">line 423</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="resetSettings"><span class="type-signature"></span>resetSettings()</h4>
</dt>
<dd>
<div class="description">
<p>Resets the settings object back to the default.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1887">line 1887</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="restoreDefaultUTCTimingSources"><span class="type-signature"></span>restoreDefaultUTCTimingSources()</h4>
</dt>
<dd>
<div class="description">
<p>Allows you to restore the default time sources after calling <a href="module-MediaPlayer.html#clearDefaultUTCTimingSources"><code>clearDefaultUTCTimingSources()</code></a></p>
</div>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li><ul>
<li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li>
<li>value:http://time.akamai.com/?iso&ms</li>
</ul></li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1161">line 1161</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#addUTCTimingSource"><code>addUTCTimingSource()</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="retrieveManifest"><span class="type-signature"></span>retrieveManifest(url, callback)</h4>
</dt>
<dd>
<div class="description">
<p>Allows application to retrieve a manifest. Manifest loading is asynchro<br>
nous and<br>
requires the app-provided callback function</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>url</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>url the manifest url</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>A Callback function provided when retrieving manifests</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1766">line 1766</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="seek"><span class="type-signature"></span>seek(value)</h4>
</dt>
<dd>
<div class="description">
<p>Sets the currentTime property of the attached video element. If it is a live stream with a<br>
timeShiftBufferLength, then the DVR window offset will be automatically calculated.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>A relative time, in seconds, based on the return value of the <a href="module-MediaPlayer.html#duration"><code>duration()</code></a> method is expected.<br>
For dynamic streams duration() returns DVRWindow.end - DVRWindow.start. Consequently, the value provided to this function should be relative to DVRWindow.start.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-585">line 585</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#getDVRSeekOffset"><code>getDVRSeekOffset()</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<ul>
<li>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</li>
<li>
<div class="param-desc">
<p><a href="Constants.html#BAD_ARGUMENT_ERROR"><code>BAD_ARGUMENT_ERROR</code></a> if called with an invalid argument, not number type or is NaN.</p>
</div>
</li>
</ul>
</dd>
<hr>
<dt>
<h4 class="name" id="setAutoPlay"><span class="type-signature"></span>setAutoPlay(value)</h4>
</dt>
<dd>
<div class="description">
<p>Set to false to prevent stream from auto-playing when the view is attached.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li>true</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1011">line 1011</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#attachView"><code>attachView()</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="Constants.html#BAD_ARGUMENT_ERROR"><code>BAD_ARGUMENT_ERROR</code></a> if called with an invalid argument, not boolean type.</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setConfig"><span class="type-signature"></span>setConfig( [config])</h4>
</dt>
<dd>
<div class="description">
<p>Configure media player with customs controllers. Helpful for tests</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</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="attributes">
<optional><br>
</td>
<td class="description last"><p>controllers configuration</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-199">line 199</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="setCurrentTrack"><span class="type-signature"></span>setCurrentTrack(track)</h4>
</dt>
<dd>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>track</code></td>
<td class="type">
<span class="param-type">MediaInfo</span>
</td>
<td class="description last"><p>instance of <code>MediaInfo</code></p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1566">line 1566</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setInitialMediaSettingsFor"><span class="type-signature"></span>setInitialMediaSettingsFor(type, value)</h4>
</dt>
<dd>
<div class="description">
<p>This method allows to set media settings that will be used to pick the initial track. Format of the settings<br>
is following: <br /><br>
{lang: langValue (can be either a string primitive, a string object, or a RegExp object to match),<br>
index: indexValue,<br>
viewpoint: viewpointValue,<br>
audioChannelConfiguration: audioChannelConfigurationValue,<br>
accessibility: accessibilityValue,<br>
role: roleValue}</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1531">line 1531</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><code>MEDIA_PLAYER_NOT_INITIALIZED_ERROR</code></a> if called before initialize function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setMute"><span class="type-signature"></span>setMute(value)</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to set the native Video Element's muted state. Takes a Boolean that determines whether audio is muted. true if the audio is muted and false otherwise.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-679">line 679</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="Constants.html#BAD_ARGUMENT_ERROR"><code>BAD_ARGUMENT_ERROR</code></a> if called with an invalid argument, not boolean type.</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setPlaybackRate"><span class="type-signature"></span>setPlaybackRate(value)</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to set the native Video Element's playback rate.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-658">line 658</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="setProtectionData"><span class="type-signature"></span>setProtectionData(value)</h4>
</dt>
<dd>
<div class="description">
<p>Sets Protection Data required to setup the Protection Module (DRM). Protection Data must<br>
be set before initializing MediaPlayer or, once initialized, before PROTECTION_CREATED event is fired.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">ProtectionDataSet</span>
</td>
<td class="description last"><p>object containing<br>
property names corresponding to key system name strings and associated<br>
values being instances of.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1700">line 1700</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#initialize"><code>initialize()</code></a></li>
<li><a href="ProtectionEvents.html#event:PROTECTION_CREATED"><code>dashjs.Protection.events.PROTECTION_CREATED</code></a></li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="setQualityFor"><span class="type-signature"></span>setQualityFor(type, value, forceReplace)</h4>
</dt>
<dd>
<div class="description">
<p>Sets the current quality for media type instead of letting the ABR Heuristics automatically selecting it.<br>
This value will be overwritten by the ABR rules unless autoSwitchBitrate is set to false.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type"><a href="global.html#MediaType">MediaType</a></span>
</td>
<td class="default">
</td>
<td class="description last"><p>'video', 'audio' or 'image'</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="default">
</td>
<td class="description last"><p>the quality index, 0 corresponding to the lowest bitrate</p></td>
</tr>
<tr>
<td class="name"><code>forceReplace</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="default">
false
</td>
<td class="description last"><p>true if segments have to be replaced by segments of the new quality</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-962">line 962</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="module-MediaPlayer.html#getQualityFor"><code>getQualityFor()</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~STREAMING_NOT_INITIALIZED_ERROR"><code>STREAMING_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setTextTrack"><span class="type-signature"></span>setTextTrack(idx)</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to change the current text track for both external time text files and fragmented text tracks. There is no need to<br>
set the track mode on the video object to switch a track when using this method.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>idx</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Index of track based on the order of the order the tracks are added Use -1 to disable all tracks. (turn captions off). Use module:MediaPlayer#dashjs.MediaPlayer.events.TEXT_TRACK_ADDED.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1314">line 1314</a>
</li>
</ul>
</dd>
<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="MediaPlayerEvents.html#event:TEXT_TRACK_ADDED"><code>dashjs.MediaPlayer.events.TEXT_TRACK_ADDED</code></a></li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setVolume"><span class="type-signature"></span>setVolume(value)</h4>
</dt>
<dd>
<div class="description">
<p>A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-701">line 701</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="Constants.html#BAD_ARGUMENT_ERROR"><code>BAD_ARGUMENT_ERROR</code></a> if called with an invalid argument, not number type, or is NaN or not between 0 and 1.</p>
</div>
</dd>
<hr>
<dt>
<h4 class="name" id="setXHRWithCredentialsForType"><span class="type-signature"></span>setXHRWithCredentialsForType(type, value)</h4>
</dt>
<dd>
<div class="description">
<p>Sets whether withCredentials on XHR requests for a particular request<br>
type is true or false</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>one of HTTPRequest.*_TYPE</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
<dd class="tag-default">
<ul class="dummy">
<li>false</li>
</ul>
</dd>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1190">line 1190</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="time"><span class="type-signature"></span>time(streamId)</h4>
</dt>
<dd>
<div class="description">
<p>Current time of the playhead, in seconds.</p>
<p>If called with no arguments then the returned time value is time elapsed since the start point of the first stream, or if it is a live stream, then the time will be based on the return value of the <a href="module-MediaPlayer.html#duration"><code>duration()</code></a> method.<br>
However if a stream ID is supplied then time is relative to the start of that stream, or is null if there is no such stream id in the manifest.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>streamId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The ID of a stream that the returned playhead time must be relative to the start of. If undefined, then playhead time is relative to the first stream.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-824">line 824</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current playhead time of the media, or null.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="timeAsUTC"><span class="type-signature"></span>timeAsUTC()</h4>
</dt>
<dd>
<div class="description">
<p>Use this method to get the current playhead time as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.<br>
Note - this property only has meaning for live streams. If called before play() has begun, it will return a value of NaN.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-872">line 872</a>
</li>
</ul>
</dd>
</dl>
<h5>Throws:</h5>
<div class="param-desc">
<p><a href="module-MediaPlayer.html#~PLAYBACK_NOT_INITIALIZED_ERROR"><code>PLAYBACK_NOT_INITIALIZED_ERROR</code></a> if called before initializePlayback function</p>
</div>
<h5>Returns:</h5>
<div class="param-desc">
<p>The current playhead time as UTC timestamp.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="unregisterCustomCapabilitiesFilter"><span class="type-signature"></span>unregisterCustomCapabilitiesFilter(filter)</h4>
</dt>
<dd>
<div class="description">
<p>Unregisters a custom capabilities filter.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>the custom capabilities filter callback</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1598">line 1598</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="unregisterLicenseRequestFilter"><span class="type-signature"></span>unregisterLicenseRequestFilter(filter)</h4>
</dt>
<dd>
<div class="description">
<p>Unregisters a license request filter.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>the license request filter callback</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1648">line 1648</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="unregisterLicenseResponseFilter"><span class="type-signature"></span>unregisterLicenseResponseFilter(filter)</h4>
</dt>
<dd>
<div class="description">
<p>Unregisters a license response filter.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filter</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>the license response filter callback</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1658">line 1658</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="updatePortalSize"><span class="type-signature"></span>updatePortalSize()</h4>
</dt>
<dd>
<div class="description">
<p>Update the video element size variables<br>
Should be called on window resize (or any other time player is resized). Fullscreen does trigger a window resize event.</p>
<p>Once windowResizeEventCalled = true, abrController.checkPortalSize() will use element size variables rather than querying clientWidth every time.</p>
</div>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-988">line 988</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="updateSettings"><span class="type-signature"></span>updateSettings(settingsObj)</h4>
<p class="summary"><p>Update the current settings object being used on the player. Anything left unspecified is not modified.</p></p>
</dt>
<dd>
<div class="description">
<p>This function does not update the entire object, only properties in the passed in object are updated.</p>
<p>This means that updateSettings({a: x}) and updateSettings({b: y}) are functionally equivalent to<br>
updateSettings({a: x, b: y}). If the default values are required again, @see<code>resetSettings</code>.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>settingsObj</code></td>
<td class="type">
<span class="param-type">PlayerSettings</span>
</td>
<td class="description last"><p>An object corresponding to the settings definition.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>,
<a href="streaming_MediaPlayer.js.html#sunlight-1-line-1877">line 1877</a>
</li>
</ul>
</dd>
</dl>
<h5>Example</h5>
<pre class="sunlight-highlight-javascript">player.updateSettings({
streaming: {
lowLatencyEnabled: false,
abr: {
maxBitrate: { audio: 100, video: 1000 }
}
}
});</pre>
</dd>
</dl>
</article>
</section>
</div>
</div>
<div class="clearfix"></div>
<div class="col-md-3">
<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
</div>
</div>
</div>
<div class="modal fade" id="searchResults">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Search results</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
<footer>
<span class="copyright">
<h3>DASH Industry Forum</h3>
</span>
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a>
on Wed Sep 28th 2022
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>
<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>
<script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
<script>
$( function () {
$( "[id*='$']" ).each( function () {
var $this = $( this );
$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
} );
$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
var $this = $( this );
var example = $this.find( "code" );
exampleText = example.html();
var lang = /{@lang (.*?)}/.exec( exampleText );
if ( lang && lang[1] ) {
exampleText = exampleText.replace( lang[0], "" );
example.html( exampleText );
lang = lang[1];
} else {
var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
lang = langClassMatch ? langClassMatch[1] : "javascript";
}
if ( lang ) {
$this
.addClass( "sunlight-highlight-" + lang )
.addClass( "linenums" )
.html( example.html() );
}
} );
Sunlight.highlightAll( {
lineNumbers : true,
showMenu : true,
enableDoclinks : true
} );
$.catchAnchorLinks( {
navbarOffset: 10
} );
$( "#toc" ).toc( {
anchorName : function ( i, heading, prefix ) {
return $( heading ).attr( "id" ) || ( prefix + i );
},
selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
showAndHide : false,
smoothScrolling: true
} );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
$( '.dropdown-toggle' ).dropdown();
$( "table" ).each( function () {
var $this = $( this );
$this.addClass('table');
} );
} );
</script>
<!--Navigation and Symbol Display-->
<script>
$( function () {
$( '#main' ).localScroll( {
offset : { top : 60 } //offset by the height of your header (give or take a few px, see what works for you)
} );
$( "dt.name" ).each( function () {
var $this = $( this ).find("h4");
var icon = $( "<i/>" ).addClass( "icon-plus-sign" ).addClass( "pull-right" ).addClass( "icon-white" );
var dt = $(this);
var children = dt.next( "dd" );
dt.prepend( icon ).css( {cursor : "pointer"} );
dt.addClass( "member-collapsed" ).addClass( "member" );
children.hide();
dt.children().on( "click", function () {
children = dt.next( "dd" );
children.slideToggle( "fast", function () {
if ( children.is( ":visible" ) ) {
icon.addClass( "icon-minus-sign" ).removeClass( "icon-plus-sign" ).removeClass( "icon-white" );
dt.addClass( "member-open" ).animate( "member-collapsed" );
} else {
icon.addClass( "icon-plus-sign" ).removeClass( "icon-minus-sign" ).addClass( "icon-white" );
dt.addClass( "member-collapsed" ).removeClass( "member-open" );
}
} );
} );
} );
} );
</script>
<!--Google Analytics-->
<script type="text/javascript">
$(document).ready(function() {
SearcherDisplay.init();
});
</script>
</body>
</html>