1206 lines
89 KiB
HTML
1206 lines
89 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>BasePlayer (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="BasePlayer (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":42,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/AbstractConcatenatedTimeline.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer2/BaseRenderer.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/google/android/exoplayer2/BasePlayer.html" target="_top">Frames</a></li>
|
|
<li><a href="BasePlayer.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </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"> </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> <a href="../../../../com/google/android/exoplayer2/package-summary.html">com.google.android.exoplayer2</a></div>
|
|
<h2 title="Class BasePlayer" class="title">Class BasePlayer</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.google.android.exoplayer2.BasePlayer</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</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>Direct Known Subclasses:</dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/ext/cast/CastPlayer.html" title="class in com.google.android.exoplayer2.ext.cast">CastPlayer</a></code>, <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 abstract class <span class="typeNameLabel">BasePlayer</span>
|
|
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
|
|
implements <a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></pre>
|
|
<div class="block">Abstract base <a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> which implements common implementation independent methods.</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>
|
|
<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 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"> </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>protected <a href="../../../../com/google/android/exoplayer2/Timeline.Window.html" title="class in com.google.android.exoplayer2">Timeline.Window</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#window">window</a></span></code></th>
|
|
<td class="colLast"> </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 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>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Constructor</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#BasePlayer--">BasePlayer</a></span>()</code></th>
|
|
<td class="colLast"> </td>
|
|
</tr>
|
|
</table>
|
|
</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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </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/BasePlayer.html#addMediaItem-int-com.google.android.exoplayer2.MediaItem-">addMediaItem</a></span>​(int index,
|
|
<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds a media item 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/BasePlayer.html#addMediaItem-com.google.android.exoplayer2.MediaItem-">addMediaItem</a></span>​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Adds a media item to the end of the playlist.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getBufferedPercentage--">getBufferedPercentage</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns an estimate of the percentage in the current content window or ad up to which data is
|
|
buffered, or 0 if no estimate is available.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getContentDuration--">getContentDuration</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">If <a href="../../../../com/google/android/exoplayer2/Player.html#isPlayingAd--"><code>Player.isPlayingAd()</code></a> returns <code>true</code>, returns the duration of the current content
|
|
window in milliseconds, or <a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the duration is not known.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getCurrentLiveOffset--">getCurrentLiveOffset</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the offset of the current playback position from the live edge in milliseconds, or
|
|
<a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the current window <a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowLive--"><code>isn't live</code></a> or the
|
|
offset is unknown.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getCurrentManifest--">getCurrentManifest</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the current manifest.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getCurrentMediaItem--">getCurrentMediaItem</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the media item of the current window in the timeline.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getCurrentTag--">getCurrentTag</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/BasePlayer.html#getCurrentMediaItem--"><code>getCurrentMediaItem()</code></a> and <a href="../../../../com/google/android/exoplayer2/MediaItem.PlaybackProperties.html#tag"><code>MediaItem.PlaybackProperties.tag</code></a>
|
|
instead.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getMediaItemAt-int-">getMediaItemAt</a></span>​(int index)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> at the given index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getMediaItemCount--">getMediaItemCount</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the number of <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a> in the playlist.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getNextWindowIndex--">getNextWindowIndex</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the window that will be played if <a href="../../../../com/google/android/exoplayer2/Player.html#next--"><code>Player.next()</code></a> is called, which may
|
|
depend on the current repeat mode and whether shuffle mode is enabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getPreviousWindowIndex--">getPreviousWindowIndex</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the window that will be played if <a href="../../../../com/google/android/exoplayer2/Player.html#previous--"><code>Player.previous()</code></a> is called, which may
|
|
depend on the current repeat mode and whether shuffle mode is enabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#hasNext--">hasNext</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether a next window exists, which may depend on the current repeat mode and whether
|
|
shuffle mode is enabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#hasPrevious--">hasPrevious</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether a previous window exists, which may depend on the current repeat mode and
|
|
whether shuffle mode is enabled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#isCurrentWindowDynamic--">isCurrentWindowDynamic</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the current window is dynamic, or <code>false</code> if the <a href="../../../../com/google/android/exoplayer2/Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
|
|
empty.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#isCurrentWindowLive--">isCurrentWindowLive</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the current window is live, or <code>false</code> if the <a href="../../../../com/google/android/exoplayer2/Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is empty.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#isCurrentWindowSeekable--">isCurrentWindowSeekable</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the current window is seekable, or <code>false</code> if the <a href="../../../../com/google/android/exoplayer2/Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
|
|
empty.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#isPlaying--">isPlaying</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the player is playing, i.e.</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/BasePlayer.html#moveMediaItem-int-int-">moveMediaItem</a></span>​(int currentIndex,
|
|
int newIndex)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Moves the media item at the current index to the new index.</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/BasePlayer.html#next--">next</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Seeks to the default position of the next window, which may depend on the current repeat mode
|
|
and whether shuffle mode is enabled.</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/BasePlayer.html#pause--">pause</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Pauses playback.</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/BasePlayer.html#play--">play</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Resumes playback as soon as <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackState--"><code>Player.getPlaybackState()</code></a> == <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_READY"><code>Player.STATE_READY</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/BasePlayer.html#previous--">previous</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Seeks to the default position of the previous window, which may depend on the current repeat
|
|
mode and whether shuffle mode is enabled.</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/BasePlayer.html#removeMediaItem-int-">removeMediaItem</a></span>​(int index)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Removes the media item at the given index of the playlist.</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/BasePlayer.html#seekTo-long-">seekTo</a></span>​(long positionMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Seeks to a position specified in milliseconds in the current window.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#seekToDefaultPosition--">seekToDefaultPosition</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Seeks to the default position associated with the current window.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#seekToDefaultPosition-int-">seekToDefaultPosition</a></span>​(int windowIndex)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Seeks to the default position associated with the specified window.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#setMediaItem-com.google.android.exoplayer2.MediaItem-">setMediaItem</a></span>​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> and resets the position to the
|
|
default position.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#setMediaItem-com.google.android.exoplayer2.MediaItem-boolean-">setMediaItem</a></span>​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem,
|
|
boolean resetPosition)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#setMediaItem-com.google.android.exoplayer2.MediaItem-long-">setMediaItem</a></span>​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem,
|
|
long startPositionMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#setMediaItems-java.util.List-">setMediaItems</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2" target="_top">MediaItem</a>> mediaItems)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a> and resets the position to
|
|
the default position.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/BasePlayer.html#stop--">stop</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Stops playback without resetting the player.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
|
|
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone--" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.com.google.android.exoplayer2.Player">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface 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#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#getBufferedPosition--">getBufferedPosition</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#getContentBufferedPosition--">getContentBufferedPosition</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#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#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#getMetadataComponent--">getMetadataComponent</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#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#isLoading--">isLoading</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#isPlayingAd--">isPlayingAd</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#moveMediaItems-int-int-int-">moveMediaItems</a>, <a href="../../../../com/google/android/exoplayer2/Player.html#prepare--">prepare</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#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#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-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="window">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>window</h4>
|
|
<pre>protected final <a href="../../../../com/google/android/exoplayer2/Timeline.Window.html" title="class in com.google.android.exoplayer2">Timeline.Window</a> window</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="BasePlayer--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>BasePlayer</h4>
|
|
<pre>public BasePlayer()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="setMediaItem-com.google.android.exoplayer2.MediaItem-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMediaItem</h4>
|
|
<pre>public void setMediaItem​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-">Player</a></code></span></div>
|
|
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> and resets the position to the
|
|
default position.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-">setMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaItem</code> - The new <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setMediaItem-com.google.android.exoplayer2.MediaItem-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMediaItem</h4>
|
|
<pre>public void setMediaItem​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem,
|
|
long startPositionMs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-long-">Player</a></code></span></div>
|
|
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-long-">setMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaItem</code> - The new <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</dd>
|
|
<dd><code>startPositionMs</code> - The position in milliseconds to start playback from.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setMediaItem-com.google.android.exoplayer2.MediaItem-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMediaItem</h4>
|
|
<pre>public void setMediaItem​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem,
|
|
boolean resetPosition)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-boolean-">Player</a></code></span></div>
|
|
<div class="block">Clears the playlist and adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItem-com.google.android.exoplayer2.MediaItem-boolean-">setMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaItem</code> - The new <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</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="setMediaItems-java.util.List-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setMediaItems</h4>
|
|
<pre>public void setMediaItems​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2" target="_top">MediaItem</a>> mediaItems)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItems-java.util.List-">Player</a></code></span></div>
|
|
<div class="block">Clears the playlist, adds the specified <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a> and resets the position to
|
|
the default position.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#setMediaItems-java.util.List-">setMediaItems</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaItems</code> - The new <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItems</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addMediaItem-int-com.google.android.exoplayer2.MediaItem-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addMediaItem</h4>
|
|
<pre>public void addMediaItem​(int index,
|
|
<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItem-int-com.google.android.exoplayer2.MediaItem-">Player</a></code></span></div>
|
|
<div class="block">Adds a media item at the given index of the playlist.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItem-int-com.google.android.exoplayer2.MediaItem-">addMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>index</code> - The index at which to add the item.</dd>
|
|
<dd><code>mediaItem</code> - The <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> to add.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addMediaItem-com.google.android.exoplayer2.MediaItem-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addMediaItem</h4>
|
|
<pre>public void addMediaItem​(<a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItem-com.google.android.exoplayer2.MediaItem-">Player</a></code></span></div>
|
|
<div class="block">Adds a media item to the end of the playlist.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#addMediaItem-com.google.android.exoplayer2.MediaItem-">addMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaItem</code> - The <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> to add.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="moveMediaItem-int-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>moveMediaItem</h4>
|
|
<pre>public void moveMediaItem​(int currentIndex,
|
|
int newIndex)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#moveMediaItem-int-int-">Player</a></code></span></div>
|
|
<div class="block">Moves the media item at the current index to the new index.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#moveMediaItem-int-int-">moveMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>currentIndex</code> - The current index of the media item to move.</dd>
|
|
<dd><code>newIndex</code> - The new index of the media item. If the new index is larger than the size of
|
|
the playlist the item is moved to the end of the playlist.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeMediaItem-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeMediaItem</h4>
|
|
<pre>public void removeMediaItem​(int index)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#removeMediaItem-int-">Player</a></code></span></div>
|
|
<div class="block">Removes the media item at the given index of the playlist.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#removeMediaItem-int-">removeMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>index</code> - The index at which to remove the media item.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="play--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>play</h4>
|
|
<pre>public final void play()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#play--">Player</a></code></span></div>
|
|
<div class="block">Resumes playback as soon as <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackState--"><code>Player.getPlaybackState()</code></a> == <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_READY"><code>Player.STATE_READY</code></a>. Equivalent to
|
|
<code>setPlayWhenReady(true)</code>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#play--">play</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="pause--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>pause</h4>
|
|
<pre>public final void pause()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#pause--">Player</a></code></span></div>
|
|
<div class="block">Pauses playback. Equivalent to <code>setPlayWhenReady(false)</code>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#pause--">pause</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isPlaying--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isPlaying</h4>
|
|
<pre>public final boolean isPlaying()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#isPlaying--">Player</a></code></span></div>
|
|
<div class="block">Returns whether the player is playing, i.e. <a href="../../../../com/google/android/exoplayer2/Player.html#getContentPosition--"><code>Player.getContentPosition()</code></a> is advancing.
|
|
|
|
<p>If <code>false</code>, then at least one of the following is true:
|
|
|
|
<ul>
|
|
<li>The <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackState--"><code>playback state</code></a> is not <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_READY"><code>ready</code></a>.
|
|
<li>There is no <a href="../../../../com/google/android/exoplayer2/Player.html#getPlayWhenReady--"><code>intention to play</code></a>.
|
|
<li>Playback is <a href="../../../../com/google/android/exoplayer2/Player.html#getPlaybackSuppressionReason--"><code>suppressed for other reasons</code></a>.
|
|
</ul></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#isPlaying--">isPlaying</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the player is playing.</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer2/Player.EventListener.html#onIsPlayingChanged-boolean-"><code>Player.EventListener.onIsPlayingChanged(boolean)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="seekToDefaultPosition--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>seekToDefaultPosition</h4>
|
|
<pre>public final void seekToDefaultPosition()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#seekToDefaultPosition--">Player</a></code></span></div>
|
|
<div class="block">Seeks to the default position associated with the current window. The position can depend on
|
|
the type of media being played. For live streams it will typically be the live edge of the
|
|
window. For other streams it will typically be the start of the window.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#seekToDefaultPosition--">seekToDefaultPosition</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="seekToDefaultPosition-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>seekToDefaultPosition</h4>
|
|
<pre>public final void seekToDefaultPosition​(int windowIndex)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#seekToDefaultPosition-int-">Player</a></code></span></div>
|
|
<div class="block">Seeks to the default position associated with the specified window. The position can depend on
|
|
the type of media being played. For live streams it will typically be the live edge of the
|
|
window. For other streams it will typically be the start of the window.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#seekToDefaultPosition-int-">seekToDefaultPosition</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>windowIndex</code> - The index of the window whose associated default position should be seeked
|
|
to.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="seekTo-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>seekTo</h4>
|
|
<pre>public final void seekTo​(long positionMs)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#seekTo-long-">Player</a></code></span></div>
|
|
<div class="block">Seeks to a position specified in milliseconds in the current window.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#seekTo-long-">seekTo</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>positionMs</code> - The seek position in the current window, or <a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> to seek to
|
|
the window's default position.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hasPrevious--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hasPrevious</h4>
|
|
<pre>public final boolean hasPrevious()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#hasPrevious--">Player</a></code></span></div>
|
|
<div class="block">Returns whether a previous window exists, which may depend on the current repeat mode and
|
|
whether shuffle mode is enabled.
|
|
|
|
<p>Note: When the repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
|
|
the current repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
|
|
details.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#hasPrevious--">hasPrevious</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="previous--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>previous</h4>
|
|
<pre>public final void previous()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#previous--">Player</a></code></span></div>
|
|
<div class="block">Seeks to the default position of the previous window, which may depend on the current repeat
|
|
mode and whether shuffle mode is enabled. Does nothing if <a href="../../../../com/google/android/exoplayer2/Player.html#hasPrevious--"><code>Player.hasPrevious()</code></a> is <code>
|
|
false</code>.
|
|
|
|
<p>Note: When the repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
|
|
the current repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
|
|
details.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#previous--">previous</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hasNext--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hasNext</h4>
|
|
<pre>public final boolean hasNext()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#hasNext--">Player</a></code></span></div>
|
|
<div class="block">Returns whether a next window exists, which may depend on the current repeat mode and whether
|
|
shuffle mode is enabled.
|
|
|
|
<p>Note: When the repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
|
|
the current repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
|
|
details.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#hasNext--">hasNext</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="next--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>next</h4>
|
|
<pre>public final void next()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#next--">Player</a></code></span></div>
|
|
<div class="block">Seeks to the default position of the next window, which may depend on the current repeat mode
|
|
and whether shuffle mode is enabled. Does nothing if <a href="../../../../com/google/android/exoplayer2/Player.html#hasNext--"><code>Player.hasNext()</code></a> is <code>false</code>.
|
|
|
|
<p>Note: When the repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
|
|
the current repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
|
|
details.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#next--">next</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="stop--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>stop</h4>
|
|
<pre>public final void stop()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#stop--">Player</a></code></span></div>
|
|
<div class="block">Stops playback without resetting the player. Use <a href="../../../../com/google/android/exoplayer2/Player.html#pause--"><code>Player.pause()</code></a> rather than this method if
|
|
the intention is to pause playback.
|
|
|
|
<p>Calling this method will cause the playback state to transition to <a href="../../../../com/google/android/exoplayer2/Player.html#STATE_IDLE"><code>Player.STATE_IDLE</code></a>. The
|
|
player instance can still be used, and <a href="../../../../com/google/android/exoplayer2/Player.html#release--"><code>Player.release()</code></a> must still be called on the player if
|
|
it's no longer required.
|
|
|
|
<p>Calling this method does not clear the playlist, reset the playback position or the playback
|
|
error.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#stop--">stop</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getNextWindowIndex--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getNextWindowIndex</h4>
|
|
<pre>public final int getNextWindowIndex()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getNextWindowIndex--">Player</a></code></span></div>
|
|
<div class="block">Returns the index of the window that will be played if <a href="../../../../com/google/android/exoplayer2/Player.html#next--"><code>Player.next()</code></a> is called, which may
|
|
depend on the current repeat mode and whether shuffle mode is enabled. Returns <a href="../../../../com/google/android/exoplayer2/C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <a href="../../../../com/google/android/exoplayer2/Player.html#hasNext--"><code>Player.hasNext()</code></a> is <code>false</code>.
|
|
|
|
<p>Note: When the repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
|
|
the current repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
|
|
details.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getNextWindowIndex--">getNextWindowIndex</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPreviousWindowIndex--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPreviousWindowIndex</h4>
|
|
<pre>public final int getPreviousWindowIndex()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getPreviousWindowIndex--">Player</a></code></span></div>
|
|
<div class="block">Returns the index of the window that will be played if <a href="../../../../com/google/android/exoplayer2/Player.html#previous--"><code>Player.previous()</code></a> is called, which may
|
|
depend on the current repeat mode and whether shuffle mode is enabled. Returns <a href="../../../../com/google/android/exoplayer2/C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <a href="../../../../com/google/android/exoplayer2/Player.html#hasPrevious--"><code>Player.hasPrevious()</code></a> is <code>false</code>.
|
|
|
|
<p>Note: When the repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a>, this method behaves the same as when
|
|
the current repeat mode is <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_OFF"><code>Player.REPEAT_MODE_OFF</code></a>. See <a href="../../../../com/google/android/exoplayer2/Player.html#REPEAT_MODE_ONE"><code>Player.REPEAT_MODE_ONE</code></a> for more
|
|
details.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getPreviousWindowIndex--">getPreviousWindowIndex</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getCurrentTag--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentTag</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>
|
|
@Nullable
|
|
public final <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> getCurrentTag()</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="../../../../com/google/android/exoplayer2/BasePlayer.html#getCurrentMediaItem--"><code>getCurrentMediaItem()</code></a> and <a href="../../../../com/google/android/exoplayer2/MediaItem.PlaybackProperties.html#tag"><code>MediaItem.PlaybackProperties.tag</code></a>
|
|
instead.</div>
|
|
</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentTag--">getCurrentTag</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getCurrentMediaItem--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentMediaItem</h4>
|
|
<pre>@Nullable
|
|
public final <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> getCurrentMediaItem()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentMediaItem--">Player</a></code></span></div>
|
|
<div class="block">Returns the media item of the current window in the timeline. May be null if the timeline is
|
|
empty.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentMediaItem--">getCurrentMediaItem</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer2/Player.EventListener.html#onMediaItemTransition-com.google.android.exoplayer2.MediaItem-int-"><code>Player.EventListener.onMediaItemTransition(MediaItem, int)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getMediaItemCount--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMediaItemCount</h4>
|
|
<pre>public int getMediaItemCount()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getMediaItemCount--">Player</a></code></span></div>
|
|
<div class="block">Returns the number of <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a> in the playlist.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getMediaItemCount--">getMediaItemCount</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getMediaItemAt-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMediaItemAt</h4>
|
|
<pre>public <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> getMediaItemAt​(int index)</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getMediaItemAt-int-">Player</a></code></span></div>
|
|
<div class="block">Returns the <a href="../../../../com/google/android/exoplayer2/MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> at the given index.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getMediaItemAt-int-">getMediaItemAt</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getCurrentManifest--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentManifest</h4>
|
|
<pre>@Nullable
|
|
public final <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> getCurrentManifest()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentManifest--">Player</a></code></span></div>
|
|
<div class="block">Returns the current manifest. The type depends on the type of media being played. May be null.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentManifest--">getCurrentManifest</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getBufferedPercentage--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBufferedPercentage</h4>
|
|
<pre>public final int getBufferedPercentage()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getBufferedPercentage--">Player</a></code></span></div>
|
|
<div class="block">Returns an estimate of the percentage in the current content window or ad up to which data is
|
|
buffered, or 0 if no estimate is available.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getBufferedPercentage--">getBufferedPercentage</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCurrentWindowDynamic--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCurrentWindowDynamic</h4>
|
|
<pre>public final boolean isCurrentWindowDynamic()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowDynamic--">Player</a></code></span></div>
|
|
<div class="block">Returns whether the current window is dynamic, or <code>false</code> if the <a href="../../../../com/google/android/exoplayer2/Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
|
|
empty.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowDynamic--">isCurrentWindowDynamic</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer2/Timeline.Window.html#isDynamic"><code>Timeline.Window.isDynamic</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCurrentWindowLive--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCurrentWindowLive</h4>
|
|
<pre>public final boolean isCurrentWindowLive()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowLive--">Player</a></code></span></div>
|
|
<div class="block">Returns whether the current window is live, or <code>false</code> if the <a href="../../../../com/google/android/exoplayer2/Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is empty.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowLive--">isCurrentWindowLive</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer2/Timeline.Window.html#isLive--"><code>Timeline.Window.isLive()</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getCurrentLiveOffset--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentLiveOffset</h4>
|
|
<pre>public final long getCurrentLiveOffset()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentLiveOffset--">Player</a></code></span></div>
|
|
<div class="block">Returns the offset of the current playback position from the live edge in milliseconds, or
|
|
<a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the current window <a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowLive--"><code>isn't live</code></a> or the
|
|
offset is unknown.
|
|
|
|
<p>The offset is calculated as <code>currentTime - playbackPosition</code>, so should usually be
|
|
positive.
|
|
|
|
<p>Note that this offset may rely on an accurate local time, so this method may return an
|
|
incorrect value if the difference between system clock and server clock is unknown.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getCurrentLiveOffset--">getCurrentLiveOffset</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="isCurrentWindowSeekable--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isCurrentWindowSeekable</h4>
|
|
<pre>public final boolean isCurrentWindowSeekable()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowSeekable--">Player</a></code></span></div>
|
|
<div class="block">Returns whether the current window is seekable, or <code>false</code> if the <a href="../../../../com/google/android/exoplayer2/Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> is
|
|
empty.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#isCurrentWindowSeekable--">isCurrentWindowSeekable</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../com/google/android/exoplayer2/Timeline.Window.html#isSeekable"><code>Timeline.Window.isSeekable</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getContentDuration--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getContentDuration</h4>
|
|
<pre>public final long getContentDuration()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../../com/google/android/exoplayer2/Player.html#getContentDuration--">Player</a></code></span></div>
|
|
<div class="block">If <a href="../../../../com/google/android/exoplayer2/Player.html#isPlayingAd--"><code>Player.isPlayingAd()</code></a> returns <code>true</code>, returns the duration of the current content
|
|
window in milliseconds, or <a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the duration is not known. If there is no ad
|
|
playing, the returned duration is the same as that returned by <a href="../../../../com/google/android/exoplayer2/Player.html#getDuration--"><code>Player.getDuration()</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../../com/google/android/exoplayer2/Player.html#getContentDuration--">getContentDuration</a></code> in interface <code><a href="../../../../com/google/android/exoplayer2/Player.html" title="interface in com.google.android.exoplayer2">Player</a></code></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/AbstractConcatenatedTimeline.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/google/android/exoplayer2/BaseRenderer.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/google/android/exoplayer2/BasePlayer.html" target="_top">Frames</a></li>
|
|
<li><a href="BasePlayer.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|