dashjs
Version:
A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
2,146 lines (800 loc) • 144 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>dash.js Module: Settings</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: Settings</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description"><p>Define the configuration parameters of Dash.js MediaPlayer.</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="core_Settings.js.html">core/Settings.js</a>,
<a href="core_Settings.js.html#sunlight-1-line-39">line 39</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-Settings.html#~PlayerSettings"><code>PlayerSettings</code></a> for further information about the supported configuration properties.</li>
</ul>
</dd>
</dl>
</div>
<h3 class="subsection-title">Type Definitions</h3>
<dl>
<hr>
<dt class="name" id="~AbrSettings">
<h4 id="~AbrSettings">AbrSettings</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>movingAverageMethod</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
"slidingWindow"
</td>
<td class="description last"><p>Sets the moving average method used for smoothing throughput estimates.</p>
<p>Valid methods are "slidingWindow" and "ewma".</p>
<p>The call has no effect if an invalid method is passed.</p>
<p>The sliding window moving average method computes the average throughput using the last four segments downloaded.</p>
<p>If the stream is live (as opposed to VOD), then only the last three segments are used.</p>
<p>If wide variations in throughput are detected, the number of segments can be dynamically increased to avoid oscillations.</p>
<p>The exponentially weighted moving average (EWMA) method computes the average using exponential smoothing.</p>
<p>Two separate estimates are maintained, a fast one with a three-second half life and a slow one with an eight-second half life.</p>
<p>The throughput estimate at any time is the minimum of the fast and slow estimates.</p>
<p>This allows a fast reaction to a bandwidth drop and prevents oscillations on bandwidth spikes.</p></td>
</tr>
<tr>
<td class="name"><code>ABRStrategy</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
"abrDynamic"
</td>
<td class="description last"><p>Returns the current ABR strategy being used: "abrDynamic", "abrBola" or "abrThroughput".</p></td>
</tr>
<tr>
<td class="name"><code>trackSwitchMode</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{video: "neverReplace", audio: "alwaysReplace"}
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>additionalAbrRules</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{insufficientBufferRule: false,switchHistoryRule: true,droppedFramesRule: true,abandonRequestsRule: false}
</td>
<td class="description last"><p>Enable/Disable additional ABR rules in case ABRStrategy is set to "abrDynamic", "abrBola" or "abrThroughput".</p></td>
</tr>
<tr>
<td class="name"><code>bandwidthSafetyFactor</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
0.9
</td>
<td class="description last"><p>Standard ABR throughput rules multiply the throughput by this value.</p>
<p>It should be between 0 and 1, with lower values giving less rebuffering (but also lower quality).</p></td>
</tr>
<tr>
<td class="name"><code>useDefaultABRRules</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Should the default ABR rules be used, or the custom ones added.</p></td>
</tr>
<tr>
<td class="name"><code>useDeadTimeLatency</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>If true, only the download portion will be considered part of the download bitrate and latency will be regarded as static.</p>
<p>If false, the reciprocal of the whole transfer time will be used.</p></td>
</tr>
<tr>
<td class="name"><code>limitBitrateByPortal</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If true, the size of the video portal will limit the max chosen video resolution.</p></td>
</tr>
<tr>
<td class="name"><code>usePixelRatioInLimitBitrateByPortal</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Sets whether to take into account the device's pixel ratio when defining the portal dimensions.</p>
<p>Useful on, for example, retina displays.</p></td>
</tr>
<tr>
<td class="name"><code>maxBitrate</code></td>
<td class="type">
<span class="param-type"><a href="module-Settings.html#~AudioVideoSettings">module:Settings~AudioVideoSettings</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{audio: -1, video: -1}
</td>
<td class="description last"><p>The maximum bitrate that the ABR algorithms will choose. This value is specified in kbps.</p>
<p>Use -1 for no limit.</p></td>
</tr>
<tr>
<td class="name"><code>minBitrate</code></td>
<td class="type">
<span class="param-type"><a href="module-Settings.html#~AudioVideoSettings">module:Settings~AudioVideoSettings</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{audio: -1, video: -1}
</td>
<td class="description last"><p>The minimum bitrate that the ABR algorithms will choose. This value is specified in kbps.</p>
<p>Use -1 for no limit.</p></td>
</tr>
<tr>
<td class="name"><code>maxRepresentationRatio</code></td>
<td class="type">
<span class="param-type"><a href="module-Settings.html#~AudioVideoSettings">module:Settings~AudioVideoSettings</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{audio: 1, video: 1}
</td>
<td class="description last"><p>When switching multi-bitrate content (auto or manual mode) this property specifies the maximum representation allowed, as a proportion of the size of the representation set.</p>
<p>You can set or remove this cap at anytime before or during playback.</p>
<p>To clear this setting you set the value to 1.</p>
<p>If both this and maxAllowedBitrate are defined, maxAllowedBitrate is evaluated first, then maxAllowedRepresentation, i.e. the lowest value from executing these rules is used.</p>
<p>This feature is typically used to reserve higher representations for playback only when connected over a fast connection.</p></td>
</tr>
<tr>
<td class="name"><code>initialBitrate</code></td>
<td class="type">
<span class="param-type"><a href="module-Settings.html#~AudioVideoSettings">module:Settings~AudioVideoSettings</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{audio: -1, video: -1}
</td>
<td class="description last"><p>Explicitly set the starting bitrate for audio or video. This value is specified in kbps.</p>
<p>Use -1 to let the player decide.</p></td>
</tr>
<tr>
<td class="name"><code>initialRepresentationRatio</code></td>
<td class="type">
<span class="param-type"><a href="module-Settings.html#~AudioVideoSettings">module:Settings~AudioVideoSettings</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{audio: -1, video: -1}
</td>
<td class="description last"><p>Explicitly set the initial representation ratio.</p>
<p>If initalBitrate is specified, this is ignored.</p></td>
</tr>
<tr>
<td class="name"><code>autoSwitchBitrate</code></td>
<td class="type">
<span class="param-type"><a href="module-Settings.html#~AudioVideoSettings">module:Settings~AudioVideoSettings</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
{audio: true, video: true}
</td>
<td class="description last"><p>Indicates whether the player should enable ABR algorithms to switch the bitrate.</p></td>
</tr>
<tr>
<td class="name"><code>fetchThroughputCalculationMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
"abrFetchThroughputCalculationDownloadedData"
</td>
<td class="description last"><p>Algorithm to determine the throughput in case the Fetch API is used for low latency streaming.</p>
<p>For details please check the samples section and FetchLoader.js.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_Settings.js.html">core/Settings.js</a>,
<a href="core_Settings.js.html#sunlight-1-line-534">line 534</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~AudioVideoSettings">
<h4 id="~AudioVideoSettings">AudioVideoSettings</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props 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>audio</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">boolean</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Configuration for audio media type of tracks.</p></td>
</tr>
<tr>
<td class="name"><code>video</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">boolean</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Configuration for video media type of tracks.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_Settings.js.html">core/Settings.js</a>,
<a href="core_Settings.js.html#sunlight-1-line-314">line 314</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~Buffer">
<h4 id="~Buffer">Buffer</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enableSeekDecorrelationFix</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Enables a workaround for playback start on some devices, e.g. WebOS 4.9.<br>
It is necessary because some browsers do not support setting currentTime on video element to a value that is outside of current buffer.</p>
<p>If you experience unexpected seeking triggered by BufferController, you can try setting this value to false.</p></td>
</tr>
<tr>
<td class="name"><code>fastSwitchEnabled</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>When enabled, after an ABR up-switch in quality, instead of requesting and appending the next fragment at the end of the current buffer range it is requested and appended closer to the current time.</p>
<p>When enabled, The maximum time to render a higher quality is current time + (1.5 * fragment duration).</p>
<p>Note, When ABR down-switch is detected, we appended the lower quality at the end of the buffer range to preserve the<br>
higher quality media for as long as possible.</p>
<p>If enabled, it should be noted there are a few cases when the client will not replace inside buffer range but rather just append at the end.</p>
<ol>
<li>When the buffer level is less than one fragment duration.</li>
<li>The client is in an Abandonment State due to recent fragment abandonment event.</li>
</ol>
<p>Known issues:</p>
<ol>
<li>In IE11 with auto switching off, if a user switches to a quality they can not download in time the fragment may be appended in the same range as the playhead or even in the past, in IE11 it may cause a stutter or stall in playback.</li>
</ol></td>
</tr>
<tr>
<td class="name"><code>flushBufferAtTrackSwitch</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>When enabled, after a track switch and in case buffer is being replaced, the video element is flushed (seek at current playback time) once a segment of the new track is appended in buffer in order to force video decoder to play new track.</p>
<p>This can be required on some devices like GoogleCast devices to make track switching functional.</p>
<p>Otherwise track switching will be effective only once after previous buffered track is fully consumed.</p></td>
</tr>
<tr>
<td class="name"><code>reuseExistingSourceBuffers</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Enable reuse of existing MediaSource Sourcebuffers during period transition.</p></td>
</tr>
<tr>
<td class="name"><code>bufferPruningInterval</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
10
</td>
<td class="description last"><p>The interval of pruning buffer in seconds.</p></td>
</tr>
<tr>
<td class="name"><code>bufferToKeep</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
20
</td>
<td class="description last"><p>This value influences the buffer pruning logic.</p>
<p>Allows you to modify the buffer that is kept in source buffer in seconds.<br>
0|-----------bufferToPrune-----------|-----bufferToKeep-----|currentTime|</p></td>
</tr>
<tr>
<td class="name"><code>bufferTimeAtTopQuality</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
30
</td>
<td class="description last"><p>The time that the internal buffer target will be set to once playing the top quality.</p>
<p>If there are multiple bitrates in your adaptation, and the media is playing at the highest bitrate, then we try to build a larger buffer at the top quality to increase stability and to maintain media quality.</p></td>
</tr>
<tr>
<td class="name"><code>bufferTimeAtTopQualityLongForm</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
60
</td>
<td class="description last"><p>The time that the internal buffer target will be set to once playing the top quality for long form content.</p></td>
</tr>
<tr>
<td class="name"><code>longFormContentDurationThreshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
600
</td>
<td class="description last"><p>The threshold which defines if the media is considered long form content.</p>
<p>This will directly affect the buffer targets when playing back at the top quality.</p></td>
</tr>
<tr>
<td class="name"><code>initialBufferLevel</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
NaN
</td>
<td class="description last"><p>Initial buffer level before playback starts</p></td>
</tr>
<tr>
<td class="name"><code>stableBufferTime</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
12
</td>
<td class="description last"><p>The time that the internal buffer target will be set to post startup/seeks (NOT top quality).</p>
<p>When the time is set higher than the default you will have to wait longer to see automatic bitrate switches but will have a larger buffer which will increase stability.</p></td>
</tr>
<tr>
<td class="name"><code>stallThreshold</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
0.3
</td>
<td class="description last"><p>Stall threshold used in BufferController.js to determine whether a track should still be changed and which buffer range to prune.</p></td>
</tr>
<tr>
<td class="name"><code>useAppendWindow</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Specifies if the appendWindow attributes of the MSE SourceBuffers should be set according to content duration from manifest.</p></td>
</tr>
<tr>
<td class="name"><code>setStallState</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Specifies if we fire manual waiting events once the stall threshold is reached</p></td>
</tr>
<tr>
<td class="name"><code>avoidCurrentTimeRangePruning</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Avoids pruning of the buffered range that contains the current playback time.</p>
<p>That buffered range is likely to have been enqueued for playback. Pruning it causes a flush and reenqueue in WPE and WebKitGTK based browsers. This stresses the video decoder and can cause stuttering on embedded platforms.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_Settings.js.html">core/Settings.js</a>,
<a href="core_Settings.js.html#sunlight-1-line-249">line 249</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~CachingInfoSettings">
<h4 id="~CachingInfoSettings">CachingInfoSettings</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props 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>enable</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Enable or disable the caching feature.</p></td>
</tr>
<tr>
<td class="name"><code>ttl</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"><p>Time to live.</p>
<p>A value defined in milliseconds representing how log to cache the settings for.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="core_Settings.js.html">core/Settings.js</a>,
<a href="core_Settings.js.html#sunlight-1-line-363">line 363</a>
</li>
</ul>
</dd>
</dl>
</dd>
<hr>
<dt class="name" id="~Capabilities">
<h4 id="~Capabilities">Capabilities</h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>filterUnsupportedEssentialProperties</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Enable to filter all the AdaptationSets and Representations which contain an unsupported <EssentialProperty> element.</p></td>
</tr>
<tr>
<td class="name"><code>useMediaCapabilitiesApi</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Enable to use the MediaCapabilities API to check whether codecs are supported. If disabled MSE.isTypeSupported will be used instead.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dumm