2021-04-21 11:00:57 +01:00

1015 lines
82 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>ExoPlayer (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ExoPlayer (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":38,"i13":38,"i14":38,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/android/exoplayer2/ExoPlaybackException.Type.html" title="annotation in com.google.android.exoplayer2"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../com/google/android/exoplayer2/ExoPlayer.Builder.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/android/exoplayer2/ExoPlayer.html" target="_top">Frames</a></li>
<li><a href="ExoPlayer.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../../com/google/android/exoplayer2/package-summary.html">com.google.android.exoplayer2</a></div>
<h2 title="Interface ExoPlayer" class="title">Interface ExoPlayer</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/SimpleExoPlayer.html" title="class in com.google.android.exoplayer2">SimpleExoPlayer</a></code>, <code><a href="../../../../com/google/android/exoplayer2/testutil/StubExoPlayer.html" title="class in com.google.android.exoplayer2.testutil">StubExoPlayer</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">ExoPlayer</span>
extends <a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></pre>
<div class="block">An extensible media player that plays <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>s. Instances can be obtained from <a href="../../../../com/google/android/exoplayer2/SimpleExoPlayer.Builder.html" title="class in com.google.android.exoplayer2"><code>SimpleExoPlayer.Builder</code></a> or <a href="../../../../com/google/android/exoplayer2/ExoPlayer.Builder.html" title="class in com.google.android.exoplayer2"><code>ExoPlayer.Builder</code></a>.
<h3>Player components</h3>
<p>ExoPlayer is designed to make few assumptions about (and hence impose few restrictions on) the
type of the media being played, how and where it is stored, and how it is rendered. Rather than
implementing the loading and rendering of media directly, ExoPlayer implementations delegate this
work to components that are injected when a player is created or when it's prepared for playback.
Components common to all ExoPlayer implementations are:
<ul>
<li>A <b><a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a></b> that defines the media to be played, loads the media, and from
which the loaded media can be read. A MediaSource is injected via <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-"><code>setMediaSource(MediaSource)</code></a> at the start of playback. The library modules provide default
implementations for progressive media files (<a href="../../../../com/google/android/exoplayer2/source/ProgressiveMediaSource.html" title="class in com.google.android.exoplayer2.source"><code>ProgressiveMediaSource</code></a>), DASH
(DashMediaSource), SmoothStreaming (SsMediaSource) and HLS (HlsMediaSource), an
implementation for loading single media samples (<a href="../../../../com/google/android/exoplayer2/source/SingleSampleMediaSource.html" title="class in com.google.android.exoplayer2.source"><code>SingleSampleMediaSource</code></a>) that's
most often used for side-loaded subtitle files, and implementations for building more
complex MediaSources from simpler ones (<a href="../../../../com/google/android/exoplayer2/source/MergingMediaSource.html" title="class in com.google.android.exoplayer2.source"><code>MergingMediaSource</code></a>, <a href="../../../../com/google/android/exoplayer2/source/ConcatenatingMediaSource.html" title="class in com.google.android.exoplayer2.source"><code>ConcatenatingMediaSource</code></a>, <a href="../../../../com/google/android/exoplayer2/source/LoopingMediaSource.html" title="class in com.google.android.exoplayer2.source"><code>LoopingMediaSource</code></a> and <a href="../../../../com/google/android/exoplayer2/source/ClippingMediaSource.html" title="class in com.google.android.exoplayer2.source"><code>ClippingMediaSource</code></a>).
<li><b><a href="../../../../com/google/android/exoplayer2/Renderer.html" title="interface in com.google.android.exoplayer2"><code>Renderer</code></a></b>s that render individual components of the media. The library
provides default implementations for common media types (<a href="../../../../com/google/android/exoplayer2/video/MediaCodecVideoRenderer.html" title="class in com.google.android.exoplayer2.video"><code>MediaCodecVideoRenderer</code></a>,
<a href="../../../../com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.html" title="class in com.google.android.exoplayer2.audio"><code>MediaCodecAudioRenderer</code></a>, <a href="../../../../com/google/android/exoplayer2/text/TextRenderer.html" title="class in com.google.android.exoplayer2.text"><code>TextRenderer</code></a> and <a href="../../../../com/google/android/exoplayer2/metadata/MetadataRenderer.html" title="class in com.google.android.exoplayer2.metadata"><code>MetadataRenderer</code></a>). A
Renderer consumes media from the MediaSource being played. Renderers are injected when the
player is created.
<li>A <b><a href="../../../../com/google/android/exoplayer2/trackselection/TrackSelector.html" title="class in com.google.android.exoplayer2.trackselection"><code>TrackSelector</code></a></b> that selects tracks provided by the MediaSource to be
consumed by each of the available Renderers. The library provides a default implementation
(<a href="../../../../com/google/android/exoplayer2/trackselection/DefaultTrackSelector.html" title="class in com.google.android.exoplayer2.trackselection"><code>DefaultTrackSelector</code></a>) suitable for most use cases. A TrackSelector is injected
when the player is created.
<li>A <b><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2"><code>LoadControl</code></a></b> that controls when the MediaSource buffers more media, and how
much media is buffered. The library provides a default implementation (<a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html" title="class in com.google.android.exoplayer2"><code>DefaultLoadControl</code></a>) suitable for most use cases. A LoadControl is injected when the player
is created.
</ul>
<p>An ExoPlayer can be built using the default components provided by the library, but may also
be built using custom implementations if non-standard behaviors are required. For example a
custom LoadControl could be injected to change the player's buffering strategy, or a custom
Renderer could be injected to add support for a video codec not supported natively by Android.
<p>The concept of injecting components that implement pieces of player functionality is present
throughout the library. The default component implementations listed above delegate work to
further injected components. This allows many sub-components to be individually replaced with
custom implementations. For example the default MediaSource implementations require one or more
<a href="../../../../com/google/android/exoplayer2/upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> factories to be injected via their constructors. By providing a custom factory
it's possible to load data from a non-standard source, or through a different network stack.
<h3>Threading model</h3>
<p>The figure below shows ExoPlayer's threading model.
<p style="align:center"><img src="doc-files/exoplayer-threading-model.svg" alt="ExoPlayer's
threading model">
<ul>
<li>ExoPlayer instances must be accessed from a single application thread. For the vast
majority of cases this should be the application's main thread. Using the application's
main thread is also a requirement when using ExoPlayer's UI components or the IMA
extension. The thread on which an ExoPlayer instance must be accessed can be explicitly
specified by passing a `Looper` when creating the player. If no `Looper` is specified, then
the `Looper` of the thread that the player is created on is used, or if that thread does
not have a `Looper`, the `Looper` of the application's main thread is used. In all cases
the `Looper` of the thread from which the player must be accessed can be queried using
<a href="../../../../com/google/android/exoplayer2/Player.html#getApplicationLooper--"><code>Player.getApplicationLooper()</code></a>.
<li>Registered listeners are called on the thread associated with <a href="../../../../com/google/android/exoplayer2/Player.html#getApplicationLooper--"><code>Player.getApplicationLooper()</code></a>. Note that this means registered listeners are called on the same
thread which must be used to access the player.
<li>An internal playback thread is responsible for playback. Injected player components such as
Renderers, MediaSources, TrackSelectors and LoadControls are called by the player on this
thread.
<li>When the application performs an operation on the player, for example a seek, a message is
delivered to the internal playback thread via a message queue. The internal playback thread
consumes messages from the queue and performs the corresponding operations. Similarly, when
a playback event occurs on the internal playback thread, a message is delivered to the
application thread via a second message queue. The application thread consumes messages
from the queue, updating the application visible state and calling corresponding listener
methods.
<li>Injected player components may use additional background threads. For example a MediaSource
may use background threads to load data. These are implementation specific.
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.Builder.html" title="class in com.google.android.exoplayer2">ExoPlayer.Builder</a></span></code></th>
<td class="colLast">
<div class="block">A builder for <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html" title="interface in com.google.android.exoplayer2"><code>ExoPlayer</code></a> instances.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.com.google.android.exoplayer2.Player">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></h3>
<code><a href="../../../../com/google/android/exoplayer2/Player.AudioComponent.html" title="interface in com.google.android.exoplayer2">Player.AudioComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.DefaultEventListener.html" title="class in com.google.android.exoplayer2">Player.DefaultEventListener</a>, <a href="../../../../com/google/android/exoplayer2/Player.DeviceComponent.html" title="interface in com.google.android.exoplayer2">Player.DeviceComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.DiscontinuityReason.html" title="annotation in com.google.android.exoplayer2">Player.DiscontinuityReason</a>, <a href="../../../../com/google/android/exoplayer2/Player.EventFlags.html" title="annotation in com.google.android.exoplayer2">Player.EventFlags</a>, <a href="../../../../com/google/android/exoplayer2/Player.EventListener.html" title="interface in com.google.android.exoplayer2">Player.EventListener</a>, <a href="../../../../com/google/android/exoplayer2/Player.Events.html" title="class in com.google.android.exoplayer2">Player.Events</a>, <a href="../../../../com/google/android/exoplayer2/Player.MediaItemTransitionReason.html" title="annotation in com.google.android.exoplayer2">Player.MediaItemTransitionReason</a>, <a href="../../../../com/google/android/exoplayer2/Player.MetadataComponent.html" title="interface in com.google.android.exoplayer2">Player.MetadataComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.PlaybackSuppressionReason.html" title="annotation in com.google.android.exoplayer2">Player.PlaybackSuppressionReason</a>, <a href="../../../../com/google/android/exoplayer2/Player.PlayWhenReadyChangeReason.html" title="annotation in com.google.android.exoplayer2">Player.PlayWhenReadyChangeReason</a>, <a href="../../../../com/google/android/exoplayer2/Player.RepeatMode.html" title="annotation in com.google.android.exoplayer2">Player.RepeatMode</a>, <a href="../../../../com/google/android/exoplayer2/Player.State.html" title="annotation in com.google.android.exoplayer2">Player.State</a>, <a href="../../../../com/google/android/exoplayer2/Player.TextComponent.html" title="interface in com.google.android.exoplayer2">Player.TextComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.TimelineChangeReason.html" title="annotation in com.google.android.exoplayer2">Player.TimelineChangeReason</a>, <a href="../../../../com/google/android/exoplayer2/Player.VideoComponent.html" title="interface in com.google.android.exoplayer2">Player.VideoComponent</a></code></li>
</ul>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#DEFAULT_RELEASE_TIMEOUT_MS">DEFAULT_RELEASE_TIMEOUT_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default timeout for calls to <a href="../../../../com/google/android/exoplayer2/Player.html#release--"><code>Player.release()</code></a> and <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setForegroundMode-boolean-"><code>setForegroundMode(boolean)</code></a>, in
milliseconds.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.com.google.android.exoplayer2.Player">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></h3>
<code><a href="../../../../com/google/android/exoplayer2/Player.html#DISCONTINUITY_REASON_AD_INSERTION">DISCONTINUITY_REASON_AD_INSERTION</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#DISCONTINUITY_REASON_INTERNAL">DISCONTINUITY_REASON_INTERNAL</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#DISCONTINUITY_REASON_PERIOD_TRANSITION">DISCONTINUITY_REASON_PERIOD_TRANSITION</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#DISCONTINUITY_REASON_SEEK">DISCONTINUITY_REASON_SEEK</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#DISCONTINUITY_REASON_SEEK_ADJUSTMENT">DISCONTINUITY_REASON_SEEK_ADJUSTMENT</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_IS_LOADING_CHANGED">EVENT_IS_LOADING_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_IS_PLAYING_CHANGED">EVENT_IS_PLAYING_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_MEDIA_ITEM_TRANSITION">EVENT_MEDIA_ITEM_TRANSITION</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_PLAY_WHEN_READY_CHANGED">EVENT_PLAY_WHEN_READY_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_PLAYBACK_PARAMETERS_CHANGED">EVENT_PLAYBACK_PARAMETERS_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_PLAYBACK_STATE_CHANGED">EVENT_PLAYBACK_STATE_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED">EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_PLAYER_ERROR">EVENT_PLAYER_ERROR</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_POSITION_DISCONTINUITY">EVENT_POSITION_DISCONTINUITY</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_REPEAT_MODE_CHANGED">EVENT_REPEAT_MODE_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_SHUFFLE_MODE_ENABLED_CHANGED">EVENT_SHUFFLE_MODE_ENABLED_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_STATIC_METADATA_CHANGED">EVENT_STATIC_METADATA_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_TIMELINE_CHANGED">EVENT_TIMELINE_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#EVENT_TRACKS_CHANGED">EVENT_TRACKS_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#MEDIA_ITEM_TRANSITION_REASON_AUTO">MEDIA_ITEM_TRANSITION_REASON_AUTO</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED">MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#MEDIA_ITEM_TRANSITION_REASON_REPEAT">MEDIA_ITEM_TRANSITION_REASON_REPEAT</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#MEDIA_ITEM_TRANSITION_REASON_SEEK">MEDIA_ITEM_TRANSITION_REASON_SEEK</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY">PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS">PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM">PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAY_WHEN_READY_CHANGE_REASON_REMOTE">PLAY_WHEN_READY_CHANGE_REASON_REMOTE</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST">PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAYBACK_SUPPRESSION_REASON_NONE">PLAYBACK_SUPPRESSION_REASON_NONE</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS">PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ALL">REPEAT_MODE_ALL</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF">REPEAT_MODE_OFF</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE">REPEAT_MODE_ONE</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_BUFFERING">STATE_BUFFERING</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_ENDED">STATE_ENDED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_IDLE">STATE_IDLE</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_READY">STATE_READY</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED">TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#TIMELINE_CHANGE_REASON_SOURCE_UPDATE">TIMELINE_CHANGE_REASON_SOURCE_UPDATE</a></code></li>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#addMediaSource-int-com.google.android.exoplayer2.source.MediaSource-">addMediaSource</a></span>&#8203;(int&nbsp;index,
<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</code></th>
<td class="colLast">
<div class="block">Adds a media source at the given index of the playlist.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#addMediaSource-com.google.android.exoplayer2.source.MediaSource-">addMediaSource</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</code></th>
<td class="colLast">
<div class="block">Adds a media source to the end of the playlist.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#addMediaSources-int-java.util.List-">addMediaSources</a></span>&#8203;(int&nbsp;index,
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources)</code></th>
<td class="colLast">
<div class="block">Adds a list of media sources at the given index of the playlist.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#addMediaSources-java.util.List-">addMediaSources</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources)</code></th>
<td class="colLast">
<div class="block">Adds a list of media sources to the end of the playlist.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/PlayerMessage.html" title="class in com.google.android.exoplayer2">PlayerMessage</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#createMessage-com.google.android.exoplayer2.PlayerMessage.Target-">createMessage</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/PlayerMessage.Target.html" title="interface in com.google.android.exoplayer2">PlayerMessage.Target</a>&nbsp;target)</code></th>
<td class="colLast">
<div class="block">Creates a message that can be sent to a <a href="../../../../com/google/android/exoplayer2/PlayerMessage.Target.html" title="interface in com.google.android.exoplayer2"><code>PlayerMessage.Target</code></a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#experimentalIsSleepingForOffload--">experimentalIsSleepingForOffload</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the player has paused its main loop to save power in offload scheduling mode.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#experimentalSetOffloadSchedulingEnabled-boolean-">experimentalSetOffloadSchedulingEnabled</a></span>&#8203;(boolean&nbsp;offloadSchedulingEnabled)</code></th>
<td class="colLast">
<div class="block">Sets whether audio offload scheduling is enabled.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/util/Clock.html" title="interface in com.google.android.exoplayer2.util">Clock</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#getClock--">getClock</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="../../../../com/google/android/exoplayer2/util/Clock.html" title="interface in com.google.android.exoplayer2.util"><code>Clock</code></a> used for playback.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#getPauseAtEndOfMediaItems--">getPauseAtEndOfMediaItems</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the player pauses playback at the end of each media item.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#getPlaybackLooper--">getPlaybackLooper</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> associated with the playback thread.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/SeekParameters.html" title="class in com.google.android.exoplayer2">SeekParameters</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#getSeekParameters--">getSeekParameters</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the currently active <a href="../../../../com/google/android/exoplayer2/SeekParameters.html" title="class in com.google.android.exoplayer2"><code>SeekParameters</code></a> of the player.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/trackselection/TrackSelector.html" title="class in com.google.android.exoplayer2.trackselection">TrackSelector</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#getTrackSelector--">getTrackSelector</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the track selector that this player uses, or null if track selection is not supported.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#prepare-com.google.android.exoplayer2.source.MediaSource-">prepare</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-"><code>setMediaSource(MediaSource)</code></a> and <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--"><code>Player.prepare()</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#prepare-com.google.android.exoplayer2.source.MediaSource-boolean-boolean-">prepare</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
boolean&nbsp;resetPosition,
boolean&nbsp;resetState)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-boolean-"><code>setMediaSource(MediaSource, boolean)</code></a> and <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--"><code>Player.prepare()</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#retry--">retry</a></span>()</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--"><code>Player.prepare()</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setForegroundMode-boolean-">setForegroundMode</a></span>&#8203;(boolean&nbsp;foregroundMode)</code></th>
<td class="colLast">
<div class="block">Sets whether the player is allowed to keep holding limited resources such as video decoders,
even when in the idle state.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-">setMediaSource</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</code></th>
<td class="colLast">
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a> and resets the position to the
default position.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-boolean-">setMediaSource</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
boolean&nbsp;resetPosition)</code></th>
<td class="colLast">
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-long-">setMediaSource</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
long&nbsp;startPositionMs)</code></th>
<td class="colLast">
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSources-java.util.List-">setMediaSources</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources)</code></th>
<td class="colLast">
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a> and resets the
position to the default position.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSources-java.util.List-boolean-">setMediaSources</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources,
boolean&nbsp;resetPosition)</code></th>
<td class="colLast">
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSources-java.util.List-int-long-">setMediaSources</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources,
int&nbsp;startWindowIndex,
long&nbsp;startPositionMs)</code></th>
<td class="colLast">
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setPauseAtEndOfMediaItems-boolean-">setPauseAtEndOfMediaItems</a></span>&#8203;(boolean&nbsp;pauseAtEndOfMediaItems)</code></th>
<td class="colLast">
<div class="block">Sets whether to pause playback at the end of each media item.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setSeekParameters-com.google.android.exoplayer2.SeekParameters-">setSeekParameters</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/SeekParameters.html" title="class in com.google.android.exoplayer2">SeekParameters</a>&nbsp;seekParameters)</code></th>
<td class="colLast">
<div class="block">Sets the parameters that control how seek operations are performed.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setShuffleOrder-com.google.android.exoplayer2.source.ShuffleOrder-">setShuffleOrder</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/source/ShuffleOrder.html" title="interface in com.google.android.exoplayer2.source">ShuffleOrder</a>&nbsp;shuffleOrder)</code></th>
<td class="colLast">
<div class="block">Sets the shuffle order.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.com.google.android.exoplayer2.Player">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;com.google.android.exoplayer2.<a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></h3>
<code><a href="../../../../com/google/android/exoplayer2/Player.html#addListener-com.google.android.exoplayer2.Player.EventListener-">addListener</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItem-int-com.google.android.exoplayer2.MediaItem-">addMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItem-com.google.android.exoplayer2.MediaItem-">addMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItems-int-java.util.List-">addMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItems-java.util.List-">addMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#clearMediaItems--">clearMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getApplicationLooper--">getApplicationLooper</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getAudioComponent--">getAudioComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getBufferedPercentage--">getBufferedPercentage</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getBufferedPosition--">getBufferedPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getContentBufferedPosition--">getContentBufferedPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getContentDuration--">getContentDuration</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getContentPosition--">getContentPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentAdGroupIndex--">getCurrentAdGroupIndex</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentAdIndexInAdGroup--">getCurrentAdIndexInAdGroup</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentLiveOffset--">getCurrentLiveOffset</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentManifest--">getCurrentManifest</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentMediaItem--">getCurrentMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentPeriodIndex--">getCurrentPeriodIndex</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentPosition--">getCurrentPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentStaticMetadata--">getCurrentStaticMetadata</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentTag--">getCurrentTag</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentTimeline--">getCurrentTimeline</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentTrackGroups--">getCurrentTrackGroups</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentTrackSelections--">getCurrentTrackSelections</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentWindowIndex--">getCurrentWindowIndex</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getDeviceComponent--">getDeviceComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getDuration--">getDuration</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getMediaItemAt-int-">getMediaItemAt</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getMediaItemCount--">getMediaItemCount</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getMetadataComponent--">getMetadataComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getNextWindowIndex--">getNextWindowIndex</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackError--">getPlaybackError</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackParameters--">getPlaybackParameters</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackState--">getPlaybackState</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackSuppressionReason--">getPlaybackSuppressionReason</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPlayerError--">getPlayerError</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPlayWhenReady--">getPlayWhenReady</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getPreviousWindowIndex--">getPreviousWindowIndex</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getRendererCount--">getRendererCount</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getRendererType-int-">getRendererType</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getRepeatMode--">getRepeatMode</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getShuffleModeEnabled--">getShuffleModeEnabled</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getTextComponent--">getTextComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getTotalBufferedDuration--">getTotalBufferedDuration</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getVideoComponent--">getVideoComponent</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#hasNext--">hasNext</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#hasPrevious--">hasPrevious</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowDynamic--">isCurrentWindowDynamic</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowLive--">isCurrentWindowLive</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowSeekable--">isCurrentWindowSeekable</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isLoading--">isLoading</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isPlaying--">isPlaying</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isPlayingAd--">isPlayingAd</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#moveMediaItem-int-int-">moveMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#moveMediaItems-int-int-int-">moveMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#next--">next</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#pause--">pause</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#play--">play</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--">prepare</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#previous--">previous</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#release--">release</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#removeListener-com.google.android.exoplayer2.Player.EventListener-">removeListener</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#removeMediaItem-int-">removeMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#removeMediaItems-int-int-">removeMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#seekTo-int-long-">seekTo</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#seekTo-long-">seekTo</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#seekToDefaultPosition--">seekToDefaultPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#seekToDefaultPosition-int-">seekToDefaultPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-">setMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-boolean-">setMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-long-">setMediaItem</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItems-java.util.List-">setMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItems-java.util.List-boolean-">setMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItems-java.util.List-int-long-">setMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setPlaybackParameters-com.google.android.exoplayer2.PlaybackParameters-">setPlaybackParameters</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setPlayWhenReady-boolean-">setPlayWhenReady</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setRepeatMode-int-">setRepeatMode</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#setShuffleModeEnabled-boolean-">setShuffleModeEnabled</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#stop--">stop</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#stop-boolean-">stop</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_RELEASE_TIMEOUT_MS">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_RELEASE_TIMEOUT_MS</h4>
<pre>static final&nbsp;long DEFAULT_RELEASE_TIMEOUT_MS</pre>
<div class="block">The default timeout for calls to <a href="../../../../com/google/android/exoplayer2/Player.html#release--"><code>Player.release()</code></a> and <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setForegroundMode-boolean-"><code>setForegroundMode(boolean)</code></a>, in
milliseconds.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.ExoPlayer.DEFAULT_RELEASE_TIMEOUT_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getTrackSelector--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTrackSelector</h4>
<pre>@Nullable
<a href="../../../../com/google/android/exoplayer2/trackselection/TrackSelector.html" title="class in com.google.android.exoplayer2.trackselection">TrackSelector</a>&nbsp;getTrackSelector()</pre>
<div class="block">Returns the track selector that this player uses, or null if track selection is not supported.</div>
</li>
</ul>
<a name="getPlaybackLooper--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlaybackLooper</h4>
<pre><a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a>&nbsp;getPlaybackLooper()</pre>
<div class="block">Returns the <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> associated with the playback thread.</div>
</li>
</ul>
<a name="getClock--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClock</h4>
<pre><a href="../../../../com/google/android/exoplayer2/util/Clock.html" title="interface in com.google.android.exoplayer2.util">Clock</a>&nbsp;getClock()</pre>
<div class="block">Returns the <a href="../../../../com/google/android/exoplayer2/util/Clock.html" title="interface in com.google.android.exoplayer2.util"><code>Clock</code></a> used for playback.</div>
</li>
</ul>
<a name="retry--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retry</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
void&nbsp;retry()</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--"><code>Player.prepare()</code></a> instead.</div>
</div>
</li>
</ul>
<a name="prepare-com.google.android.exoplayer2.source.MediaSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepare</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
void&nbsp;prepare&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-"><code>setMediaSource(MediaSource)</code></a> and <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--"><code>Player.prepare()</code></a> instead.</div>
</div>
</li>
</ul>
<a name="prepare-com.google.android.exoplayer2.source.MediaSource-boolean-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prepare</h4>
<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
void&nbsp;prepare&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
boolean&nbsp;resetPosition,
boolean&nbsp;resetState)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setMediaSource-com.google.android.exoplayer2.source.MediaSource-boolean-"><code>setMediaSource(MediaSource, boolean)</code></a> and <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--"><code>Player.prepare()</code></a> instead.</div>
</div>
</li>
</ul>
<a name="setMediaSources-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaSources</h4>
<pre>void&nbsp;setMediaSources&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources)</pre>
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a> and resets the
position to the default position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSources</code> - The new <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</dd>
</dl>
</li>
</ul>
<a name="setMediaSources-java.util.List-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaSources</h4>
<pre>void&nbsp;setMediaSources&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources,
boolean&nbsp;resetPosition)</pre>
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSources</code> - The new <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</dd>
<dd><code>resetPosition</code> - Whether the playback position should be reset to the default position in
the first <a href="../../../../com/google/android/exoplayer2/Timeline.Window.html" title="class in com.google.android.exoplayer2"><code>Timeline.Window</code></a>. If false, playback will start from the position defined
by <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentWindowIndex--"><code>Player.getCurrentWindowIndex()</code></a> and <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentPosition--"><code>Player.getCurrentPosition()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="setMediaSources-java.util.List-int-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaSources</h4>
<pre>void&nbsp;setMediaSources&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources,
int&nbsp;startWindowIndex,
long&nbsp;startPositionMs)</pre>
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSources</code> - The new <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a>.</dd>
<dd><code>startWindowIndex</code> - The window index to start playback from. If <a href="../../../../com/google/android/exoplayer2/C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> is
passed, the current position is not reset.</dd>
<dd><code>startPositionMs</code> - The position in milliseconds to start playback from. If <a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> is passed, the default position of the given window is used. In any case, if
<code>startWindowIndex</code> is set to <a href="../../../../com/google/android/exoplayer2/C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a>, this parameter is ignored and the
position is not reset at all.</dd>
</dl>
</li>
</ul>
<a name="setMediaSource-com.google.android.exoplayer2.source.MediaSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaSource</h4>
<pre>void&nbsp;setMediaSource&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</pre>
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a> and resets the position to the
default position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSource</code> - The new <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</dd>
</dl>
</li>
</ul>
<a name="setMediaSource-com.google.android.exoplayer2.source.MediaSource-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaSource</h4>
<pre>void&nbsp;setMediaSource&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
long&nbsp;startPositionMs)</pre>
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSource</code> - The new <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</dd>
<dd><code>startPositionMs</code> - The position in milliseconds to start playback from.</dd>
</dl>
</li>
</ul>
<a name="setMediaSource-com.google.android.exoplayer2.source.MediaSource-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaSource</h4>
<pre>void&nbsp;setMediaSource&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource,
boolean&nbsp;resetPosition)</pre>
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSource</code> - The new <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a>.</dd>
<dd><code>resetPosition</code> - Whether the playback position should be reset to the default position. If
false, playback will start from the position defined by <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentWindowIndex--"><code>Player.getCurrentWindowIndex()</code></a>
and <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentPosition--"><code>Player.getCurrentPosition()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="addMediaSource-com.google.android.exoplayer2.source.MediaSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaSource</h4>
<pre>void&nbsp;addMediaSource&#8203;(<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</pre>
<div class="block">Adds a media source to the end of the playlist.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSource</code> - The <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a> to add.</dd>
</dl>
</li>
</ul>
<a name="addMediaSource-int-com.google.android.exoplayer2.source.MediaSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaSource</h4>
<pre>void&nbsp;addMediaSource&#8203;(int&nbsp;index,
<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source">MediaSource</a>&nbsp;mediaSource)</pre>
<div class="block">Adds a media source at the given index of the playlist.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index at which to add the source.</dd>
<dd><code>mediaSource</code> - The <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSource</code></a> to add.</dd>
</dl>
</li>
</ul>
<a name="addMediaSources-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaSources</h4>
<pre>void&nbsp;addMediaSources&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources)</pre>
<div class="block">Adds a list of media sources to the end of the playlist.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSources</code> - The <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a> to add.</dd>
</dl>
</li>
</ul>
<a name="addMediaSources-int-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addMediaSources</h4>
<pre>void&nbsp;addMediaSources&#8203;(int&nbsp;index,
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source" target="_top">MediaSource</a>&gt;&nbsp;mediaSources)</pre>
<div class="block">Adds a list of media sources at the given index of the playlist.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - The index at which to add the media sources.</dd>
<dd><code>mediaSources</code> - The <a href="../../../../com/google/android/exoplayer2/source/MediaSource.html" title="interface in com.google.android.exoplayer2.source"><code>MediaSources</code></a> to add.</dd>
</dl>
</li>
</ul>
<a name="setShuffleOrder-com.google.android.exoplayer2.source.ShuffleOrder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setShuffleOrder</h4>
<pre>void&nbsp;setShuffleOrder&#8203;(<a href="../../../../com/google/android/exoplayer2/source/ShuffleOrder.html" title="interface in com.google.android.exoplayer2.source">ShuffleOrder</a>&nbsp;shuffleOrder)</pre>
<div class="block">Sets the shuffle order.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>shuffleOrder</code> - The shuffle order.</dd>
</dl>
</li>
</ul>
<a name="createMessage-com.google.android.exoplayer2.PlayerMessage.Target-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createMessage</h4>
<pre><a href="../../../../com/google/android/exoplayer2/PlayerMessage.html" title="class in com.google.android.exoplayer2">PlayerMessage</a>&nbsp;createMessage&#8203;(<a href="../../../../com/google/android/exoplayer2/PlayerMessage.Target.html" title="interface in com.google.android.exoplayer2">PlayerMessage.Target</a>&nbsp;target)</pre>
<div class="block">Creates a message that can be sent to a <a href="../../../../com/google/android/exoplayer2/PlayerMessage.Target.html" title="interface in com.google.android.exoplayer2"><code>PlayerMessage.Target</code></a>. By default, the message
will be delivered immediately without blocking on the playback thread. The default <a href="../../../../com/google/android/exoplayer2/PlayerMessage.html#getType--"><code>PlayerMessage.getType()</code></a> is 0 and the default <a href="../../../../com/google/android/exoplayer2/PlayerMessage.html#getPayload--"><code>PlayerMessage.getPayload()</code></a> is null. If a
position is specified with <a href="../../../../com/google/android/exoplayer2/PlayerMessage.html#setPosition-long-"><code>PlayerMessage.setPosition(long)</code></a>, the message will be
delivered at this position in the current window defined by <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentWindowIndex--"><code>Player.getCurrentWindowIndex()</code></a>.
Alternatively, the message can be sent at a specific window using <a href="../../../../com/google/android/exoplayer2/PlayerMessage.html#setPosition-int-long-"><code>PlayerMessage.setPosition(int, long)</code></a>.</div>
</li>
</ul>
<a name="setSeekParameters-com.google.android.exoplayer2.SeekParameters-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSeekParameters</h4>
<pre>void&nbsp;setSeekParameters&#8203;(@Nullable
<a href="../../../../com/google/android/exoplayer2/SeekParameters.html" title="class in com.google.android.exoplayer2">SeekParameters</a>&nbsp;seekParameters)</pre>
<div class="block">Sets the parameters that control how seek operations are performed.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>seekParameters</code> - The seek parameters, or <code>null</code> to use the defaults.</dd>
</dl>
</li>
</ul>
<a name="getSeekParameters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSeekParameters</h4>
<pre><a href="../../../../com/google/android/exoplayer2/SeekParameters.html" title="class in com.google.android.exoplayer2">SeekParameters</a>&nbsp;getSeekParameters()</pre>
<div class="block">Returns the currently active <a href="../../../../com/google/android/exoplayer2/SeekParameters.html" title="class in com.google.android.exoplayer2"><code>SeekParameters</code></a> of the player.</div>
</li>
</ul>
<a name="setForegroundMode-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setForegroundMode</h4>
<pre>void&nbsp;setForegroundMode&#8203;(boolean&nbsp;foregroundMode)</pre>
<div class="block">Sets whether the player is allowed to keep holding limited resources such as video decoders,
even when in the idle state. By doing so, the player may be able to reduce latency when
starting to play another piece of content for which the same resources are required.
<p>This mode should be used with caution, since holding limited resources may prevent other
players of media components from acquiring them. It should only be enabled when <em>both</em>
of the following conditions are true:
<ul>
<li>The application that owns the player is in the foreground.
<li>The player is used in a way that may benefit from foreground mode. For this to be true,
the same player instance must be used to play multiple pieces of content, and there must
be gaps between the playbacks (i.e. <a href="../../../../com/google/android/exoplayer2/Player.html#stop--"><code>Player.stop()</code></a> is called to halt one playback, and
<a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#prepare-com.google.android.exoplayer2.source.MediaSource-"><code>prepare(com.google.android.exoplayer2.source.MediaSource)</code></a> is called some time later to start a new one).
</ul>
<p>Note that foreground mode is <em>not</em> useful for switching between content without gaps
between the playbacks. For this use case <a href="../../../../com/google/android/exoplayer2/Player.html#stop--"><code>Player.stop()</code></a> does not need to be called, and simply
calling <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#prepare-com.google.android.exoplayer2.source.MediaSource-"><code>prepare(com.google.android.exoplayer2.source.MediaSource)</code></a> for the new media will cause limited resources to be retained even if
foreground mode is not enabled.
<p>If foreground mode is enabled, it's the application's responsibility to disable it when the
conditions described above no longer hold.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>foregroundMode</code> - Whether the player is allowed to keep limited resources even when in the
idle state.</dd>
</dl>
</li>
</ul>
<a name="setPauseAtEndOfMediaItems-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPauseAtEndOfMediaItems</h4>
<pre>void&nbsp;setPauseAtEndOfMediaItems&#8203;(boolean&nbsp;pauseAtEndOfMediaItems)</pre>
<div class="block">Sets whether to pause playback at the end of each media item.
<p>This means the player will pause at the end of each window in the current <a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentTimeline--"><code>timeline</code></a>. Listeners will be informed by a call to <a href="../../../../com/google/android/exoplayer2/Player.EventListener.html#onPlayWhenReadyChanged-boolean-int-"><code>Player.EventListener.onPlayWhenReadyChanged(boolean, int)</code></a> with the reason <a href="../../../../com/google/android/exoplayer2/Player.html#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM"><code>Player.PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM</code></a> when this happens.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pauseAtEndOfMediaItems</code> - Whether to pause playback at the end of each media item.</dd>
</dl>
</li>
</ul>
<a name="getPauseAtEndOfMediaItems--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPauseAtEndOfMediaItems</h4>
<pre>boolean&nbsp;getPauseAtEndOfMediaItems()</pre>
<div class="block">Returns whether the player pauses playback at the end of each media item.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#setPauseAtEndOfMediaItems-boolean-"><code>setPauseAtEndOfMediaItems(boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="experimentalSetOffloadSchedulingEnabled-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>experimentalSetOffloadSchedulingEnabled</h4>
<pre>void&nbsp;experimentalSetOffloadSchedulingEnabled&#8203;(boolean&nbsp;offloadSchedulingEnabled)</pre>
<div class="block">Sets whether audio offload scheduling is enabled. If enabled, ExoPlayer's main loop will run as
rarely as possible when playing an audio stream using audio offload.
<p>Only use this scheduling mode if the player is not displaying anything to the user. For
example when the application is in the background, or the screen is off. The player state
(including position) is rarely updated (roughly between every 10 seconds and 1 minute).
<p>While offload scheduling is enabled, player events may be delivered severely delayed and
apps should not interact with the player. When returning to the foreground, disable offload
scheduling and wait for <a href="../../../../com/google/android/exoplayer2/Player.EventListener.html#onExperimentalOffloadSchedulingEnabledChanged-boolean-"><code>Player.EventListener.onExperimentalOffloadSchedulingEnabledChanged(boolean)</code></a> to be called with
<code>offloadSchedulingEnabled = false</code> before interacting with the player.
<p>This mode should save significant power when the phone is playing offload audio with the
screen off.
<p>This mode only has an effect when playing an audio track in offload mode, which requires all
the following:
<ul>
<li>Audio offload rendering is enabled in <a href="../../../../com/google/android/exoplayer2/DefaultRenderersFactory.html#setEnableAudioOffload-boolean-"><code>DefaultRenderersFactory.setEnableAudioOffload(boolean)</code></a> or the equivalent option passed to <a href="../../../../com/google/android/exoplayer2/audio/DefaultAudioSink.html#DefaultAudioSink-com.google.android.exoplayer2.audio.AudioCapabilities-com.google.android.exoplayer2.audio.DefaultAudioSink.AudioProcessorChain-boolean-boolean-boolean-"><code>DefaultAudioSink(AudioCapabilities,
DefaultAudioSink.AudioProcessorChain, boolean, boolean, boolean)</code></a>.
<li>An audio track is playing in a format that the device supports offloading (for example,
MP3 or AAC).
<li>The <a href="../../../../com/google/android/exoplayer2/audio/AudioSink.html" title="interface in com.google.android.exoplayer2.audio"><code>AudioSink</code></a> is playing with an offload <a href="https://developer.android.com/reference/android/media/AudioTrack.html" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioTrack</code></a>.
</ul>
<p>The state where ExoPlayer main loop has been paused to save power during offload playback
can be queried with <a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#experimentalIsSleepingForOffload--"><code>experimentalIsSleepingForOffload()</code></a>.
<p>This method is experimental, and will be renamed or removed in a future release.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>offloadSchedulingEnabled</code> - Whether to enable offload scheduling.</dd>
</dl>
</li>
</ul>
<a name="experimentalIsSleepingForOffload--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>experimentalIsSleepingForOffload</h4>
<pre>boolean&nbsp;experimentalIsSleepingForOffload()</pre>
<div class="block">Returns whether the player has paused its main loop to save power in offload scheduling mode.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/google/android/exoplayer2/ExoPlayer.html#experimentalSetOffloadSchedulingEnabled-boolean-"><code>experimentalSetOffloadSchedulingEnabled(boolean)</code></a>,
<a href="../../../../com/google/android/exoplayer2/Player.EventListener.html#onExperimentalSleepingForOffloadChanged-boolean-"><code>Player.EventListener.onExperimentalSleepingForOffloadChanged(boolean)</code></a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/android/exoplayer2/ExoPlaybackException.Type.html" title="annotation in com.google.android.exoplayer2"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../com/google/android/exoplayer2/ExoPlayer.Builder.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/android/exoplayer2/ExoPlayer.html" target="_top">Frames</a></li>
<li><a href="ExoPlayer.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>