UNPKG

dashjs

Version:

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.

10 lines 150 kB
<!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="https://dashif.org/img/favicon.ico"><link type="text/css" rel="stylesheet" href="jsdoc-custom.css"><title>Module: MediaPlayer</title><!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124    C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124    c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227    c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6    V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474    c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323    c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848    S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328    c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="light"><div class="sidebar-container"><div class="sidebar" id="sidebar"><a href="/" class="sidebar-title sidebar-title-anchor">Home</a><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-DashAdapter.html">DashAdapter</a></div><div class="sidebar-section-children"><a href="module-DashMetrics.html">DashMetrics</a></div><div class="sidebar-section-children"><a href="module-MediaPlayer.html">MediaPlayer</a></div><div class="sidebar-section-children"><a href="module-OfflineController.html">OfflineController</a></div><div class="sidebar-section-children"><a href="module-ProtectionController.html">ProtectionController</a></div><div class="sidebar-section-children"><a href="module-Settings.html">Settings</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Errors.html">Errors</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html">MediaPlayerEvents</a></div><div class="sidebar-section-children"><a href="MediaPlayerModel.html">MediaPlayerModel</a></div><div class="sidebar-section-children"><a href="MetricsReportingEvents.html">MetricsReportingEvents</a></div><div class="sidebar-section-children"><a href="MssErrors.html">MssErrors</a></div><div class="sidebar-section-children"><a href="OfflineErrors.html">OfflineErrors</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html">OfflineEvents</a></div><div class="sidebar-section-children"><a href="ProtectionErrors.html">ProtectionErrors</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html">ProtectionEvents</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:ADAPTATION_SET_REMOVED_NO_CAPABILITIES">ADAPTATION_SET_REMOVED_NO_CAPABILITIES</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:AST_IN_FUTURE">AST_IN_FUTURE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BASE_URLS_UPDATED">BASE_URLS_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_EMPTY">BUFFER_EMPTY</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_LEVEL_STATE_CHANGED">BUFFER_LEVEL_STATE_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_LEVEL_UPDATED">BUFFER_LEVEL_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_LOADED">BUFFER_LOADED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAN_PLAY">CAN_PLAY</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAN_PLAY_THROUGH">CAN_PLAY_THROUGH</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAPTION_CONTAINER_RESIZE">CAPTION_CONTAINER_RESIZE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAPTION_RENDERED">CAPTION_RENDERED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CONFORMANCE_VIOLATION">CONFORMANCE_VIOLATION</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CONTENT_STEERING_REQUEST_COMPLETED">CONTENT_STEERING_REQUEST_COMPLETED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CUE_ENTER">CUE_ENTER</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CUE_ENTER">CUE_ENTER</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DVB_FONT_DOWNLOAD_ADDED">DVB_FONT_DOWNLOAD_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DVB_FONT_DOWNLOAD_COMPLETE">DVB_FONT_DOWNLOAD_COMPLETE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DVB_FONT_DOWNLOAD_FAILED">DVB_FONT_DOWNLOAD_FAILED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DYNAMIC_TO_STATIC">DYNAMIC_TO_STATIC</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:ERROR">ERROR</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:EVENT_MODE_ON_RECEIVE">EVENT_MODE_ON_RECEIVE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:EVENT_MODE_ON_START">EVENT_MODE_ON_START</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_ABANDONED">FRAGMENT_LOADING_ABANDONED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_COMPLETED">FRAGMENT_LOADING_COMPLETED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_PROGRESS">FRAGMENT_LOADING_PROGRESS</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_STARTED">FRAGMENT_LOADING_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:INBAND_PRFT">INBAND_PRFT</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:LOG">LOG</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_LOADED">MANIFEST_LOADED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_LOADING_FINISHED">MANIFEST_LOADING_FINISHED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_LOADING_STARTED">MANIFEST_LOADING_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_VALIDITY_CHANGED">MANIFEST_VALIDITY_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRIC_ADDED">METRIC_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRIC_CHANGED">METRIC_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRIC_UPDATED">METRIC_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRICS_CHANGED">METRICS_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PERIOD_SWITCH_COMPLETED">PERIOD_SWITCH_COMPLETED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PERIOD_SWITCH_STARTED">PERIOD_SWITCH_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_ENDED">PLAYBACK_ENDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_ERROR">PLAYBACK_ERROR</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_LOADED_DATA">PLAYBACK_LOADED_DATA</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_METADATA_LOADED">PLAYBACK_METADATA_LOADED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_NOT_ALLOWED">PLAYBACK_NOT_ALLOWED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_PAUSED">PLAYBACK_PAUSED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_PLAYING">PLAYBACK_PLAYING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_PROGRESS">PLAYBACK_PROGRESS</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_RATE_CHANGED">PLAYBACK_RATE_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_SEEKED">PLAYBACK_SEEKED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_SEEKING">PLAYBACK_SEEKING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_STALLED">PLAYBACK_STALLED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_STARTED">PLAYBACK_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_TIME_UPDATED">PLAYBACK_TIME_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_VOLUME_CHANGED">PLAYBACK_VOLUME_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_WAITING">PLAYBACK_WAITING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:QUALITY_CHANGE_RENDERED">QUALITY_CHANGE_RENDERED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:QUALITY_CHANGE_REQUESTED">QUALITY_CHANGE_REQUESTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:REPRESENTATION_SWITCH">REPRESENTATION_SWITCH</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_ACTIVATED">STREAM_ACTIVATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_DEACTIVATED">STREAM_DEACTIVATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_INITIALIZED">STREAM_INITIALIZED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_INITIALIZING">STREAM_INITIALIZING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_TEARDOWN_COMPLETE">STREAM_TEARDOWN_COMPLETE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_UPDATED">STREAM_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TEXT_TRACK_ADDED">TEXT_TRACK_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TEXT_TRACKS_ADDED">TEXT_TRACKS_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:THROUGHPUT_MEASUREMENT_STORED">THROUGHPUT_MEASUREMENT_STORED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TRACK_CHANGE_RENDERED">TRACK_CHANGE_RENDERED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TTML_PARSED">TTML_PARSED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TTML_TO_PARSE">TTML_TO_PARSE</a></div><div class="sidebar-section-children"><a href="MetricsReportingEvents.html#event:CMCD_DATA_GENERATED">CMCD_DATA_GENERATED</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_FINISHED">OFFLINE_RECORD_FINISHED</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_LOADEDMETADATA">OFFLINE_RECORD_LOADEDMETADATA</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_STARTED">OFFLINE_RECORD_STARTED</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_STOPPED">OFFLINE_RECORD_STOPPED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_ADDED">KEY_ADDED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_ERROR">KEY_ERROR</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_MESSAGE">KEY_MESSAGE</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SESSION_CLOSED">KEY_SESSION_CLOSED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SESSION_CREATED">KEY_SESSION_CREATED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SESSION_REMOVED">KEY_SESSION_REMOVED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_STATUSES_CHANGED">KEY_STATUSES_CHANGED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SYSTEM_ACCESS_COMPLETE">KEY_SYSTEM_ACCESS_COMPLETE</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SYSTEM_SELECTED">KEY_SYSTEM_SELECTED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:LICENSE_REQUEST_COMPLETE">LICENSE_REQUEST_COMPLETE</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:LICENSE_REQUEST_SENDING">LICENSE_REQUEST_SENDING</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:PROTECTION_CREATED">PROTECTION_CREATED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:PROTECTION_DESTROYED">PROTECTION_DESTROYED</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#LICENSE_SERVER_MANIFEST_CONFIGURATIONS">LICENSE_SERVER_MANIFEST_CONFIGURATIONS</a></div><div class="sidebar-section-children"><a href="global.html#MediaType">MediaType</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line89">line 89</a></li></ul></dd></div></dl></div><h2 id="members" class="subsection-title has-anchor">Members</h2><h3 class="name has-anchor" id="~ELEMENT_NOT_ATTACHED_ERROR"><span class="type-signature">(inner, constant) </span>ELEMENT_NOT_ATTACHED_ERROR<span class="type-signature"> :string</span></h3><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><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line106">line 106</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="~MEDIA_PLAYER_NOT_INITIALIZED_ERROR"><span class="type-signature">(inner, constant) </span>MEDIA_PLAYER_NOT_INITIALIZED_ERROR<span class="type-signature"> :string</span></h3><div class="description"><p>error string thrown when a function is called before the dash.js has been fully initialized.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line116">line 116</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="~PLAYBACK_NOT_INITIALIZED_ERROR"><span class="type-signature">(inner, constant) </span>PLAYBACK_NOT_INITIALIZED_ERROR<span class="type-signature"> :string</span></h3><div class="description"><p>error string thrown when a function is called before the dash.js has been fully initialized</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line101">line 101</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="~SOURCE_NOT_ATTACHED_ERROR"><span class="type-signature">(inner, constant) </span>SOURCE_NOT_ATTACHED_ERROR<span class="type-signature"> :string</span></h3><div class="description"><p>error string thrown when a function is called before the dash.js has received a valid source stream.</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line111">line 111</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="~STREAMING_NOT_INITIALIZED_ERROR"><span class="type-signature">(inner, constant) </span>STREAMING_NOT_INITIALIZED_ERROR<span class="type-signature"> :string</span></h3><div class="description"><p>error string thrown when a function is called before the dash.js has been fully initialized</p></div><div class="member-item-container flex"><strong>Type:</strong><ul><li><span class="param-type">string</span></li></ul></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line96">line 96</a></li></ul></dd></div></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="addABRCustomRule"><span class="type-signature"></span>addABRCustomRule<span class="signature">(type, rulename, rule)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1102">line 1102</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="addUTCTimingSource"><span class="type-signature"></span>addUTCTimingSource<span class="signature">(schemeIdUri, value)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true"><ul><li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li><li>value:http://time.akamai.com/?iso&ms/li></li></ul></li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1163">line 1163</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#removeUTCTimingSource"><code>removeUTCTimingSource()</code></a></li></ul></dd></div></dl><h3 class="name has-anchor" id="attachProtectionController"><span class="type-signature"></span>attachProtectionController<span class="signature">(value)</span></h3><div class="description"><p>Will override dash.js protection controller.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1741">line 1741</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="attachSource"><span class="type-signature"></span>attachSource<span class="signature">(urlOrManifest, startTime)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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> |<wbr> <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> |<wbr> <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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1881">line 1881</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="attachTTMLRenderingDiv"><span class="type-signature"></span>attachTTMLRenderingDiv<span class="signature">(div)</span></h3><div class="description"><p>Use this method to attach an HTML5 div for dash.js to render rich TTML subtitles.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1462">line 1462</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="attachView"><span class="type-signature"></span>attachView<span class="signature">(element)</span></h3><div class="description"><p>Use this method to attach an HTML5 VideoElement for dash.js to operate upon.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1420">line 1420</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="clearDefaultUTCTimingSources"><span class="type-signature"></span>clearDefaultUTCTimingSources<span class="signature">()</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1192">line 1192</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#restoreDefaultUTCTimingSources"><code>restoreDefaultUTCTimingSources()</code></a></li></ul></dd></div></dl><h3 class="name has-anchor" id="convertToTimeCode"><span class="type-signature"></span>convertToTimeCode<span class="signature">(value)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>A utility method which converts seconds into TimeCode (i.e. 300 --&gt; 05:00).</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line2018">line 2018</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>A formatted time code string.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span></h3><div class="description"><p>Completely destroys the media player and frees all memory.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line468">line 468</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="duration"><span class="type-signature"></span>duration<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>Duration of the media's playback, in seconds.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line897">line 897</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><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 class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="durationAsUTC"><span class="type-signature"></span>durationAsUTC<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line939">line 939</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The current duration as UTC timestamp.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="enableForcedTextStreaming"><span class="type-signature"></span>enableForcedTextStreaming<span class="signature">(enable)</span></h3><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 &quot;hidden&quot;</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1326">line 1326</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="enableText"><span class="type-signature"></span>enableText<span class="signature">(enable)</span></h3><div class="description"><p>Enable/disable text<br>When enabling text, dash will choose the previous selected text track</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1308">line 1308</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="extend"><span class="type-signature"></span>extend<span class="signature">(parentNameString, childInstance, override)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line2052">line 2052</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#initialize"><code>initialize()</code></a></li></ul></dd></div></dl><h3 class="name has-anchor" id="formatUTC"><span class="type-signature"></span>formatUTC<span class="signature">(time, locales, hour12, withDate)</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>A utility methods which converts UTC timestamp value into a valid time and date string.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line2001">line 2001</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>A formatted time and date string.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getActiveStream"><span class="type-signature"></span>getActiveStream<span class="signature">()</span></h3><div class="description"><p>This method returns the active stream</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line2063">line 2063</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="getAutoPlay"><span class="type-signature"></span>getAutoPlay<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1069">line 1069</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The current autoPlay state.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="getAverageThroughput"><span class="type-signature"></span>getAverageThroughput<span class="signature">(type)</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>Returns the average throughput computed in the ABR logic</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1221">line 1221</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>value</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getBitrateInfoListFor"><span class="type-signature"></span>getBitrateInfoListFor<span class="signature">(type)</span><span class="type-signature"> &rarr; {Array}</span></h3><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1490">line 1490</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="getBufferLength"><span class="type-signature"></span>getBufferLength<span class="signature">(type)</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>The length of the buffer for a given media type, in seconds. Valid media<br>types are &quot;video&quot;, &quot;audio&quot; and &quot;text&quot;. 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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line781">line 781</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The length of the buffer for the given media type, in<br>seconds, or NaN</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getCurrentLiveLatency"><span class="type-signature"></span>getCurrentLiveLatency<span class="signature">()</span><span class="type-signature"> &rarr; {number|NaN}</span></h3><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1079">line 1079</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><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 class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span> |<wbr> <span class="param-type">NaN</span></dd></dl></div><h3 class="name has-anchor" id="getCurrentTrackFor"><span class="type-signature"></span>getCurrentTrackFor<span class="signature">(type)</span><span class="type-signature"> &rarr; {Object|null}</span></h3><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1562">line 1562</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p><code>MediaInfo</code></p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span> |<wbr> <span class="param-type">null</span></dd></dl></div><h3 class="name has-anchor" id="getDashAdapter"><span class="type-signature"></span>getDashAdapter<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Returns the DashAdapter.js Module.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line2079">line 2079</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-DashAdapter.html"><code>module:DashAdapter</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getDashMetrics"><span class="type-signature"></span>getDashMetrics<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1288">line 1288</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-DashMetrics.html"><code>module:DashMetrics</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getDebug"><span class="type-signature"></span>getDebug<span class="signature">()</span><span class="type-signature"> &rarr; {Debug}</span></h3><div class="description"><p>Use this method to access the dash.js logging class.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line530">line 530</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Debug</span></dd></dl></div><h3 class="name has-anchor" id="getDVRSeekOffset"><span class="type-signature"></span>getDVRSeekOffset<span class="signature">(value)</span><span class="type-signature"> &rarr; {number}</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line828">line 828</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#seek"><code>seek()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>A value that is relative the available range within the timeShiftBufferLength (DVR Window).</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getDVRWindowSize"><span class="type-signature"></span>getDVRWindowSize<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>The timeShiftBufferLength (DVR Window), in seconds.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line808">line 808</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><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 class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getInitialMediaSettingsFor"><span class="type-signature"></span>getInitialMediaSettingsFor<span class="signature">(type)</span><span class="type-signature"> &rarr; {Object}</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1608">line 1608</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getLowLatencyModeEnabled"><span class="type-signature"></span>getLowLatencyModeEnabled<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Returns a boolean that indicates whether the player is operating in low latency mode.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line693">line 693</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="getOfflineController"><span class="type-signature"></span>getOfflineController<span class="signature">()</span></h3><div class="description"><p>Detects if Offline is included and returns an instance of OfflineController.js</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1268">line 1268</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="getPlaybackRate"><span class="type-signature"></span>getPlaybackRate<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>Returns the current playback rate.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line716">line 716</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getProtectionController"><span class="type-signature"></span>getProtectionController<span class="signature">()</span></h3><div class="description"><p>Detects if Protection is included and returns an instance of ProtectionController.js</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1731">line 1731</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="getQualityFor"><span class="type-signature"></span>getQualityFor<span class="signature">(type)</span><span class="type-signature"> &rarr; {number}</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line982">line 982</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#setQualityFor"><code>setQualityFor()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>the quality index, 0 corresponding to the lowest bitrate</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getSettings"><span class="type-signature"></span>getSettings<span class="signature">()</span><span class="type-signature"> &rarr; {PlayerSettings}</span></h3><div class="description"><p>Get the current settings object being used on the player.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1953">line 1953</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The settings object being used.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">PlayerSettings</span></dd></dl></div><h3 class="name has-anchor" id="getSource"><span class="type-signature"></span>getSource<span class="signature">()</span><span class="type-signature"> &rarr; {string|manifest}</span></h3><div class="description"><p>Returns the source string or manifest that was attached by calling attachSource()</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1847">line 1847</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span> |<wbr> <span class="param-type">manifest</span></dd></dl></div><h3 class="name has-anchor" id="getStreamsFromManifest"><span class="type-signature"></span>getStreamsFromManifest<span class="signature">(manifest)</span><span class="type-signature"> &rarr; {Array}</span></h3><div class="description"><p>This method returns the list of all available streams from a given manifest</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1506">line 1506</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>list of <code>StreamInfo</code></p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="getTargetLiveDelay"><span class="type-signature"></span>getTargetLiveDelay<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>Returns the target live delay</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line852">line 852</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The target live delay</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getTopBitrateInfoFor"><span class="type-signature"></span>getTopBitrateInfoFor<span class="signature">(type)</span><span class="type-signature"> &rarr; {BitrateInfo|null}</span></h3><div class="description"><p>Gets the top quality BitrateInfo checking portal limit and max allowed.<br>It calls getMaxAllowedIndexFor internally</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line963">line 963</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">BitrateInfo</span> |<wbr> <span class="param-type">null</span></dd></dl></div><h3 class="name has-anchor" id="getTracksFor"><span class="type-signature"></span>getTracksFor<span class="signature">(type)</span><span class="type-signature"> &rarr; {Array}</span></h3><div class="description"><p>This method returns the list of all available tracks for a given media type</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1521">line 1521</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>list of <code>MediaInfo</code></p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="getTracksForTypeFromManifest"><span class="type-signature"></span>getTracksForTypeFromManifest<span class="signature">(type, manifest, streamInfo)</span><span class="type-signature"> &rarr; {Array}</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1544">line 1544</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>list of <code>MediaInfo</code></p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Array</span></dd></dl></div><h3 class="name has-anchor" id="getTTMLRenderingDiv"><span class="type-signature"></span>getTTMLRenderingDiv<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Returns instance of Div that was attached by calling attachTTMLRenderingDiv()</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1450">line 1450</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getVersion"><span class="type-signature"></span>getVersion<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h3><div class="description"><p>Current version of Dash.js</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line519">line 519</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>the current dash.js version string.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">string</span></dd></dl></div><h3 class="name has-anchor" id="getVideoElement"><span class="type-signature"></span>getVideoElement<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h3><div class="description"><p>Returns instance of Video Element that was attached by calling attachView()</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1405">line 1405</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">Object</span></dd></dl></div><h3 class="name has-anchor" id="getVolume"><span class="type-signature"></span>getVolume<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><div class="description"><p>Returns the current audio volume, from 0.0 (silent) to 1.0 (loudest).</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line762">line 762</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="getXHRWithCredentialsForType"><span class="type-signature"></span>getXHRWithCredentialsForType<span class="signature">(type)</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Gets whether withCredentials on XHR requests for a particular request<br>type is true or false</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1251">line 1251</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="initialize"><span class="type-signature"></span>initialize<span class="signature">(view<span class="signature-attributes">opt</span>, source<span class="signature-attributes">opt</span>, autoPlay<span class="signature-attributes">opt</span>, startTime)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</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">&lt;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">&lt;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">&lt;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> |<wbr> <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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line271">line 271</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">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></div></dl><h3 class="name has-anchor" id="isDynamic"><span class="type-signature"></span>isDynamic<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Returns a Boolean that indicates whether the media is in the process of dynamic.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line680">line 680</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="isMuted"><span class="type-signature"></span>isMuted<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>A Boolean that determines whether audio is muted.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line738">line 738</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="isPaused"><span class="type-signature"></span>isPaused<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Returns a Boolean that indicates whether the Video Element is paused.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line603">line 603</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="isReady"><span class="type-signature"></span>isReady<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line482">line 482</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">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></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The current ready state of the MediaPlayer</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="isSeeking"><span class="type-signature"></span>isSeeking<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line666">line 666</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="isTextEnabled"><span class="type-signature"></span>isTextEnabled<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h3><div class="description"><p>Return if text is enabled</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1343">line 1343</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>return true if text is enabled, false otherwise</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">boolean</span></dd></dl></div><h3 class="name has-anchor" id="off"><span class="type-signature"></span>off<span class="signature">(type, listener, scope)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line509">line 509</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="on"><span class="type-signature"></span>on<span class="signature">(type, listener, scope, options)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line496">line 496</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="pause"><span class="type-signature"></span>pause<span class="signature">()</span></h3><div class="description"><p>This method will call pause on the native Video Element.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line589">line 589</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="play"><span class="type-signature"></span>play<span class="signature">()</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line573">line 573</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="preload"><span class="type-signature"></span>preload<span class="signature">()</span></h3><div class="description"><p>Causes the player to begin streaming the media as set by the <a href="module-MediaPlayer.html#attachSource"><code>attachSource()</code></a><br>method in preparation for playing. It specifically does not require a view to be attached with <a href="module-MediaPlayer.html#attachSource"><code>attachView()</code></a> to begin preloading.<br>When a view is attached after preloading, the buffered data is transferred to the attached mediaSource buffers.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line553">line 553</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">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#attachView"><code>attachView()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="provideThumbnail"><span class="type-signature"></span>provideThumbnail<span class="signature">(time, callback)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1781">line 1781</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="refreshManifest"><span class="type-signature"></span>refreshManifest<span class="signature">(callback)</span></h3><div class="description"><p>Reload the manifest that the player is currently using.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th class="last">Description</th></tr></thead><tbody><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1917">line 1917</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="registerCustomCapabilitiesFilter"><span class="type-signature"></span>registerCustomCapabilitiesFilter<span class="signature">(filter)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1644">line 1644</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="registerLicenseRequestFilter"><span class="type-signature"></span>registerLicenseRequestFilter<span class="signature">(filter)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1682">line 1682</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="registerLicenseResponseFilter"><span class="type-signature"></span>registerLicenseResponseFilter<span class="signature">(filter)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1694">line 1694</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="removeABRCustomRule"><span class="type-signature"></span>removeABRCustomRule<span class="signature">(rulename)</span></h3><div class="description"><p>Remove a custom ABR Rule</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1113">line 1113</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="removeAllABRCustomRule"><span class="type-signature"></span>removeAllABRCustomRule<span class="signature">()</span></h3><div class="description"><p>Remove all ABR custom rules</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1122">line 1122</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="removeUTCTimingSource"><span class="type-signature"></span>removeUTCTimingSource<span class="signature">(schemeIdUri, value)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1177">line 1177</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#clearDefaultUTCTimingSources"><code>clearDefaultUTCTimingSources()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="reset"><span class="type-signature"></span>reset<span class="signature">()</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line438">line 438</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="resetSettings"><span class="type-signature"></span>resetSettings<span class="signature">()</span></h3><div class="description"><p>Resets the settings object back to the default.</p></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1986">line 1986</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="restoreDefaultUTCTimingSources"><span class="type-signature"></span>restoreDefaultUTCTimingSources<span class="signature">()</span></h3><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"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true"><ul><li>schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014</li><li>value:http://time.akamai.com/?iso&ms</li></ul></li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1209">line 1209</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#addUTCTimingSource"><code>addUTCTimingSource()</code></a></li></ul></dd></div></dl><h3 class="name has-anchor" id="retrieveManifest"><span class="type-signature"></span>retrieveManifest<span class="signature">(url, callback)</span></h3><div class="description"><p>Allows application to retrieve a manifest. Manifest loading is asynchronous and requires the app-provided callback function</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1820">line 1820</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="seek"><span class="type-signature"></span>seek<span class="signature">(value)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line622">line 622</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#getDVRSeekOffset"><code>getDVRSeekOffset()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setAutoPlay"><span class="type-signature"></span>setAutoPlay<span class="signature">(value)</span></h3><div class="description"><p>Set to false to prevent stream from auto-playing when the view is attached.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">true</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1059">line 1059</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#attachView"><code>attachView()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setConfig"><span class="type-signature"></span>setConfig<span class="signature">(config<span class="signature-attributes">opt</span>)</span></h3><div class="description"><p>Configure media player with customs controllers. Helpful for tests</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</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">&lt;optional><br></td><td class="description last"><p>controllers configuration</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line200">line 200</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="setCurrentTrack"><span class="type-signature"></span>setCurrentTrack<span class="signature">(track, noSettingsSave<span class="signature-attributes">opt</span>)</span></h3><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Attributes</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>track</code></td><td class="type"><span class="param-type">MediaInfo</span></td><td class="attributes"></td><td class="default"></td><td class="description last"><p>instance of <code>MediaInfo</code></p></td></tr><tr><td class="name"><code>noSettingsSave</code></td><td class="type"><span class="param-type">boolean</span></td><td class="attributes">&lt;optional><br></td><td class="default">false</td><td class="description last"><p>specify if settings from the track must not be saved for incoming track selection</p></td></tr></tbody></table></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1622">line 1622</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setInitialMediaSettingsFor"><span class="type-signature"></span>setInitialMediaSettingsFor<span class="signature">(type, value)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1586">line 1586</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setMute"><span class="type-signature"></span>setMute<span class="signature">(value)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line727">line 727</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setPlaybackRate"><span class="type-signature"></span>setPlaybackRate<span class="signature">(value)</span></h3><div class="description"><p>Use this method to set the native Video Element's playback rate.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line706">line 706</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="setProtectionData"><span class="type-signature"></span>setProtectionData<span class="signature">(value)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1756">line 1756</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">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></div></dl><h3 class="name has-anchor" id="setQualityFor"><span class="type-signature"></span>setQualityFor<span class="signature">(type, value, forceReplace)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><thead><tr><th>Name</th><th>Type</th><th>Default</th><th class="last">Description</th></tr></thead><tbody><tr><td class="name"><code>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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1010">line 1010</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="module-MediaPlayer.html#getQualityFor"><code>getQualityFor()</code></a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setTextTrack"><span class="type-signature"></span>setTextTrack<span class="signature">(idx)</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1362">line 1362</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">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></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setVolume"><span class="type-signature"></span>setVolume<span class="signature">(value)</span></h3><div class="description"><p>A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line749">line 749</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><h3 class="name has-anchor" id="setXHRWithCredentialsForType"><span class="type-signature"></span>setXHRWithCredentialsForType<span class="signature">(type, value)</span></h3><div class="description"><p>Sets whether withCredentials on XHR requests for a particular request<br>type is true or false</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-default bold">Default Value</dt><dd class="tag-default"><ul><li data-skip-pre-process="true">false</li></ul></dd></div><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1238">line 1238</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="time"><span class="type-signature"></span>time<span class="signature">(streamId)</span><span class="type-signature"> &rarr; {number}</span></h3><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line872">line 872</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The current playhead time of the media, or null.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="timeAsUTC"><span class="type-signature"></span>timeAsUTC<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line920">line 920</a></li></ul></dd></div></dl><div class="method-member-container mt-20"><strong>Throws:</strong><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></div><div class="method-member-container mt-20"><strong>Returns:</strong><div class="param-desc"><p>The current playhead time as UTC timestamp.</p></div><dl class="param-type"><dt>Type:&nbsp;</dt><dd><span class="param-type">number</span></dd></dl></div><h3 class="name has-anchor" id="unregisterCustomCapabilitiesFilter"><span class="type-signature"></span>unregisterCustomCapabilitiesFilter<span class="signature">(filter)</span></h3><div class="description"><p>Unregisters a custom capabilities filter.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1654">line 1654</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="unregisterLicenseRequestFilter"><span class="type-signature"></span>unregisterLicenseRequestFilter<span class="signature">(filter)</span></h3><div class="description"><p>Unregisters a license request filter.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1704">line 1704</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="unregisterLicenseResponseFilter"><span class="type-signature"></span>unregisterLicenseResponseFilter<span class="signature">(filter)</span></h3><div class="description"><p>Unregisters a license response filter.</p></div><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1714">line 1714</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="updatePortalSize"><span class="type-signature"></span>updatePortalSize<span class="signature">()</span></h3><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"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1036">line 1036</a></li></ul></dd></div></dl><h3 class="name has-anchor" id="updateSettings"><span class="type-signature"></span>updateSettings<span class="signature">(settingsObj)</span></h3><div class="summary"><p>Update the current settings object being used on the player. Anything left unspecified is not modified.</p></div><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><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Parameters:</strong><table class="params"><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></div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="streaming_MediaPlayer.js.html">streaming/MediaPlayer.js</a>, <a href="streaming_MediaPlayer.js.html#line1976">line 1976</a></li></ul></dd></div></dl><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Example</strong><div class="rel"><pre class="prettyprint"><code>player.updateSettings({
     streaming: {
         lowLatencyEnabled: false,
         abr: {
             maxBitrate: { audio: 100, video: 1000 }
         }
     }
 });</code></pre></div></div></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><a href="/" class="sidebar-title sidebar-title-anchor">Home</a><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-DashAdapter.html">DashAdapter</a></div><div class="sidebar-section-children"><a href="module-DashMetrics.html">DashMetrics</a></div><div class="sidebar-section-children"><a href="module-MediaPlayer.html">MediaPlayer</a></div><div class="sidebar-section-children"><a href="module-OfflineController.html">OfflineController</a></div><div class="sidebar-section-children"><a href="module-ProtectionController.html">ProtectionController</a></div><div class="sidebar-section-children"><a href="module-Settings.html">Settings</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Errors.html">Errors</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html">MediaPlayerEvents</a></div><div class="sidebar-section-children"><a href="MediaPlayerModel.html">MediaPlayerModel</a></div><div class="sidebar-section-children"><a href="MetricsReportingEvents.html">MetricsReportingEvents</a></div><div class="sidebar-section-children"><a href="MssErrors.html">MssErrors</a></div><div class="sidebar-section-children"><a href="OfflineErrors.html">OfflineErrors</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html">OfflineEvents</a></div><div class="sidebar-section-children"><a href="ProtectionErrors.html">ProtectionErrors</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html">ProtectionEvents</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-events"><div>Events</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:ADAPTATION_SET_REMOVED_NO_CAPABILITIES">ADAPTATION_SET_REMOVED_NO_CAPABILITIES</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:AST_IN_FUTURE">AST_IN_FUTURE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BASE_URLS_UPDATED">BASE_URLS_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_EMPTY">BUFFER_EMPTY</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_LEVEL_STATE_CHANGED">BUFFER_LEVEL_STATE_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_LEVEL_UPDATED">BUFFER_LEVEL_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:BUFFER_LOADED">BUFFER_LOADED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAN_PLAY">CAN_PLAY</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAN_PLAY_THROUGH">CAN_PLAY_THROUGH</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAPTION_CONTAINER_RESIZE">CAPTION_CONTAINER_RESIZE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CAPTION_RENDERED">CAPTION_RENDERED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CONFORMANCE_VIOLATION">CONFORMANCE_VIOLATION</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CONTENT_STEERING_REQUEST_COMPLETED">CONTENT_STEERING_REQUEST_COMPLETED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CUE_ENTER">CUE_ENTER</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:CUE_ENTER">CUE_ENTER</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DVB_FONT_DOWNLOAD_ADDED">DVB_FONT_DOWNLOAD_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DVB_FONT_DOWNLOAD_COMPLETE">DVB_FONT_DOWNLOAD_COMPLETE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DVB_FONT_DOWNLOAD_FAILED">DVB_FONT_DOWNLOAD_FAILED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:DYNAMIC_TO_STATIC">DYNAMIC_TO_STATIC</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:ERROR">ERROR</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:EVENT_MODE_ON_RECEIVE">EVENT_MODE_ON_RECEIVE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:EVENT_MODE_ON_START">EVENT_MODE_ON_START</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_ABANDONED">FRAGMENT_LOADING_ABANDONED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_COMPLETED">FRAGMENT_LOADING_COMPLETED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_PROGRESS">FRAGMENT_LOADING_PROGRESS</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:FRAGMENT_LOADING_STARTED">FRAGMENT_LOADING_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:INBAND_PRFT">INBAND_PRFT</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:LOG">LOG</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_LOADED">MANIFEST_LOADED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_LOADING_FINISHED">MANIFEST_LOADING_FINISHED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_LOADING_STARTED">MANIFEST_LOADING_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:MANIFEST_VALIDITY_CHANGED">MANIFEST_VALIDITY_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRIC_ADDED">METRIC_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRIC_CHANGED">METRIC_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRIC_UPDATED">METRIC_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:METRICS_CHANGED">METRICS_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PERIOD_SWITCH_COMPLETED">PERIOD_SWITCH_COMPLETED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PERIOD_SWITCH_STARTED">PERIOD_SWITCH_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_ENDED">PLAYBACK_ENDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_ERROR">PLAYBACK_ERROR</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_LOADED_DATA">PLAYBACK_LOADED_DATA</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_METADATA_LOADED">PLAYBACK_METADATA_LOADED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_NOT_ALLOWED">PLAYBACK_NOT_ALLOWED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_PAUSED">PLAYBACK_PAUSED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_PLAYING">PLAYBACK_PLAYING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_PROGRESS">PLAYBACK_PROGRESS</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_RATE_CHANGED">PLAYBACK_RATE_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_SEEKED">PLAYBACK_SEEKED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_SEEKING">PLAYBACK_SEEKING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_STALLED">PLAYBACK_STALLED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_STARTED">PLAYBACK_STARTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_TIME_UPDATED">PLAYBACK_TIME_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_VOLUME_CHANGED">PLAYBACK_VOLUME_CHANGED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:PLAYBACK_WAITING">PLAYBACK_WAITING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:QUALITY_CHANGE_RENDERED">QUALITY_CHANGE_RENDERED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:QUALITY_CHANGE_REQUESTED">QUALITY_CHANGE_REQUESTED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:REPRESENTATION_SWITCH">REPRESENTATION_SWITCH</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_ACTIVATED">STREAM_ACTIVATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_DEACTIVATED">STREAM_DEACTIVATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_INITIALIZED">STREAM_INITIALIZED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_INITIALIZING">STREAM_INITIALIZING</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_TEARDOWN_COMPLETE">STREAM_TEARDOWN_COMPLETE</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:STREAM_UPDATED">STREAM_UPDATED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TEXT_TRACK_ADDED">TEXT_TRACK_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TEXT_TRACKS_ADDED">TEXT_TRACKS_ADDED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:THROUGHPUT_MEASUREMENT_STORED">THROUGHPUT_MEASUREMENT_STORED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TRACK_CHANGE_RENDERED">TRACK_CHANGE_RENDERED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TTML_PARSED">TTML_PARSED</a></div><div class="sidebar-section-children"><a href="MediaPlayerEvents.html#event:TTML_TO_PARSE">TTML_TO_PARSE</a></div><div class="sidebar-section-children"><a href="MetricsReportingEvents.html#event:CMCD_DATA_GENERATED">CMCD_DATA_GENERATED</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_FINISHED">OFFLINE_RECORD_FINISHED</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_LOADEDMETADATA">OFFLINE_RECORD_LOADEDMETADATA</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_STARTED">OFFLINE_RECORD_STARTED</a></div><div class="sidebar-section-children"><a href="OfflineEvents.html#event:OFFLINE_RECORD_STOPPED">OFFLINE_RECORD_STOPPED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_ADDED">KEY_ADDED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_ERROR">KEY_ERROR</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_MESSAGE">KEY_MESSAGE</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SESSION_CLOSED">KEY_SESSION_CLOSED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SESSION_CREATED">KEY_SESSION_CREATED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SESSION_REMOVED">KEY_SESSION_REMOVED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_STATUSES_CHANGED">KEY_STATUSES_CHANGED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SYSTEM_ACCESS_COMPLETE">KEY_SYSTEM_ACCESS_COMPLETE</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:KEY_SYSTEM_SELECTED">KEY_SYSTEM_SELECTED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:LICENSE_REQUEST_COMPLETE">LICENSE_REQUEST_COMPLETE</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:LICENSE_REQUEST_SENDING">LICENSE_REQUEST_SENDING</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:PROTECTION_CREATED">PROTECTION_CREATED</a></div><div class="sidebar-section-children"><a href="ProtectionEvents.html#event:PROTECTION_DESTROYED">PROTECTION_DESTROYED</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#LICENSE_SERVER_MANIFEST_CONFIGURATIONS">LICENSE_SERVER_MANIFEST_CONFIGURATIONS</a></div><div class="sidebar-section-children"><a href="global.html#MediaType">MediaType</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>