mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
709 lines
37 KiB
HTML
709 lines
37 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- 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>ExoTrackSelection (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-3.5.1.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="ExoTrackSelection (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":18,"i11":6,"i12":18,"i13":18,"i14":18,"i15":6};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],16:["t5","Default Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../../../";
|
|
var useModuleDirectories = false;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.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" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses.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><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="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>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.trackselection</a></div>
|
|
<h2 title="Interface ExoTrackSelection" class="title">Interface ExoTrackSelection</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Superinterfaces:</dt>
|
|
<dd><code><a href="TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">TrackSelection</a></code></dd>
|
|
</dl>
|
|
<dl>
|
|
<dt>All Known Implementing Classes:</dt>
|
|
<dd><code><a href="AdaptiveTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">AdaptiveTrackSelection</a></code>, <code><a href="BaseTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">BaseTrackSelection</a></code>, <code><a href="../testutil/FakeTrackSelection.html" title="class in com.google.android.exoplayer2.testutil">FakeTrackSelection</a></code>, <code><a href="FixedTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">FixedTrackSelection</a></code>, <code><a href="RandomTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">RandomTrackSelection</a></code></dd>
|
|
</dl>
|
|
<hr>
|
|
<pre>public interface <span class="typeNameLabel">ExoTrackSelection</span>
|
|
extends <a href="TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">TrackSelection</a></pre>
|
|
<div class="block">A <a href="TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection"><code>TrackSelection</code></a> that can change the individually selected track as a result of calling
|
|
<a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long, long, long, List, MediaChunkIterator[])</code></a> or <a href="#evaluateQueueSize(long,java.util.List)"><code>evaluateQueueSize(long, List)</code></a>. This only happens between calls to <a href="#enable()"><code>enable()</code></a> and <a href="#disable()"><code>disable()</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Interface</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static class </code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoTrackSelection.Definition.html" title="class in com.google.android.exoplayer2.trackselection">ExoTrackSelection.Definition</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Contains of a subset of selected tracks belonging to a <a href="../source/TrackGroup.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroup</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static interface </code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ExoTrackSelection.Factory.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection.Factory</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Factory for <a href="ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection"><code>ExoTrackSelection</code></a> instances.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.trackselection.TrackSelection">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Fields inherited from interface com.google.android.exoplayer2.trackselection.<a href="TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">TrackSelection</a></h3>
|
|
<code><a href="TrackSelection.html#TYPE_CUSTOM_BASE">TYPE_CUSTOM_BASE</a>, <a href="TrackSelection.html#TYPE_UNSET">TYPE_UNSET</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t5" class="tableTab"><span><a href="javascript:show(16);">Default 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>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#blacklist(int,long)">blacklist</a></span>​(int index,
|
|
long exclusionDurationMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Attempts to exclude the track at the specified index in the selection, making it ineligible for
|
|
selection by calls to <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long, long, long, List,
|
|
MediaChunkIterator[])</code></a> for the specified period of time.</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="#disable()">disable</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Disables this track selection.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#enable()">enable</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Enables the track selection.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#evaluateQueueSize(long,java.util.List)">evaluateQueueSize</a></span>​(long playbackPositionUs,
|
|
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the number of chunks that should be retained in the queue.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code><a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSelectedFormat()">getSelectedFormat</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> of the individual selected track.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSelectedIndex()">getSelectedIndex</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the selected track.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSelectedIndexInTrackGroup()">getSelectedIndexInTrackGroup</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index in the track group of the individual selected track.</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="#getSelectionData()">getSelectionData</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns optional data associated with the current track selection.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSelectionReason()">getSelectionReason</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the reason for the current track selection.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBlacklisted(int,long)">isBlacklisted</a></span>​(int index,
|
|
long nowMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the track at the specified index in the selection is excluded.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onDiscontinuity()">onDiscontinuity</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called to notify the selection of a position discontinuity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlaybackSpeed(float)">onPlaybackSpeed</a></span>​(float speed)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called to notify the selection of the current playback speed.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlayWhenReadyChanged(boolean)">onPlayWhenReadyChanged</a></span>​(boolean playWhenReady)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called to notify when the playback is paused or resumed.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onRebuffer()">onRebuffer</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called to notify when a rebuffer occurred.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>default boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#shouldCancelChunkLoad(long,com.google.android.exoplayer2.source.chunk.Chunk,java.util.List)">shouldCancelChunkLoad</a></span>​(long playbackPositionUs,
|
|
<a href="../source/chunk/Chunk.html" title="class in com.google.android.exoplayer2.source.chunk">Chunk</a> loadingChunk,
|
|
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether an ongoing load of a chunk should be canceled.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)">updateSelectedTrack</a></span>​(long playbackPositionUs,
|
|
long bufferedDurationUs,
|
|
long availableDurationUs,
|
|
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue,
|
|
<a href="../source/chunk/MediaChunkIterator.html" title="interface in com.google.android.exoplayer2.source.chunk">MediaChunkIterator</a>[] mediaChunkIterators)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Updates the selected track for sources that load media in discrete <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunk</code></a>s.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.trackselection.TrackSelection">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface com.google.android.exoplayer2.trackselection.<a href="TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">TrackSelection</a></h3>
|
|
<code><a href="TrackSelection.html#getFormat(int)">getFormat</a>, <a href="TrackSelection.html#getIndexInTrackGroup(int)">getIndexInTrackGroup</a>, <a href="TrackSelection.html#getTrackGroup()">getTrackGroup</a>, <a href="TrackSelection.html#getType()">getType</a>, <a href="TrackSelection.html#indexOf(int)">indexOf</a>, <a href="TrackSelection.html#indexOf(com.google.android.exoplayer2.Format)">indexOf</a>, <a href="TrackSelection.html#length()">length</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="enable()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>enable</h4>
|
|
<pre class="methodSignature">void enable()</pre>
|
|
<div class="block">Enables the track selection. Dynamic changes via <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long, long, long,
|
|
List, MediaChunkIterator[])</code></a>, <a href="#evaluateQueueSize(long,java.util.List)"><code>evaluateQueueSize(long, List)</code></a> or <a href="#shouldCancelChunkLoad(long,com.google.android.exoplayer2.source.chunk.Chunk,java.util.List)"><code>shouldCancelChunkLoad(long, Chunk, List)</code></a> will only happen after this call.
|
|
|
|
<p>This method may not be called when the track selection is already enabled.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="disable()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disable</h4>
|
|
<pre class="methodSignature">void disable()</pre>
|
|
<div class="block">Disables this track selection. No further dynamic changes via <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long,
|
|
long, long, List, MediaChunkIterator[])</code></a>, <a href="#evaluateQueueSize(long,java.util.List)"><code>evaluateQueueSize(long, List)</code></a> or <a href="#shouldCancelChunkLoad(long,com.google.android.exoplayer2.source.chunk.Chunk,java.util.List)"><code>shouldCancelChunkLoad(long, Chunk, List)</code></a> will happen after this call.
|
|
|
|
<p>This method may only be called when the track selection is already enabled.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getSelectedFormat()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectedFormat</h4>
|
|
<pre class="methodSignature"><a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> getSelectedFormat()</pre>
|
|
<div class="block">Returns the <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> of the individual selected track.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getSelectedIndexInTrackGroup()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectedIndexInTrackGroup</h4>
|
|
<pre class="methodSignature">int getSelectedIndexInTrackGroup()</pre>
|
|
<div class="block">Returns the index in the track group of the individual selected track.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getSelectedIndex()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectedIndex</h4>
|
|
<pre class="methodSignature">int getSelectedIndex()</pre>
|
|
<div class="block">Returns the index of the selected track.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getSelectionReason()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectionReason</h4>
|
|
<pre class="methodSignature">int getSelectionReason()</pre>
|
|
<div class="block">Returns the reason for the current track selection.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getSelectionData()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectionData</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> getSelectionData()</pre>
|
|
<div class="block">Returns optional data associated with the current track selection.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="onPlaybackSpeed(float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onPlaybackSpeed</h4>
|
|
<pre class="methodSignature">void onPlaybackSpeed​(float speed)</pre>
|
|
<div class="block">Called to notify the selection of the current playback speed. The playback speed may affect
|
|
adaptive track selection.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>speed</code> - The factor by which playback is sped up.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="onDiscontinuity()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onDiscontinuity</h4>
|
|
<pre class="methodSignature">default void onDiscontinuity()</pre>
|
|
<div class="block">Called to notify the selection of a position discontinuity.
|
|
|
|
<p>This happens when the playback position jumps, e.g., as a result of a seek being performed.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="onRebuffer()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onRebuffer</h4>
|
|
<pre class="methodSignature">default void onRebuffer()</pre>
|
|
<div class="block">Called to notify when a rebuffer occurred.
|
|
|
|
<p>A rebuffer is defined to be caused by buffer depletion rather than a user action. Hence this
|
|
method is not called during initial buffering or when buffering as a result of a seek
|
|
operation.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="onPlayWhenReadyChanged(boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onPlayWhenReadyChanged</h4>
|
|
<pre class="methodSignature">default void onPlayWhenReadyChanged​(boolean playWhenReady)</pre>
|
|
<div class="block">Called to notify when the playback is paused or resumed.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playWhenReady</code> - Whether playback will proceed when ready.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>updateSelectedTrack</h4>
|
|
<pre class="methodSignature">void updateSelectedTrack​(long playbackPositionUs,
|
|
long bufferedDurationUs,
|
|
long availableDurationUs,
|
|
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue,
|
|
<a href="../source/chunk/MediaChunkIterator.html" title="interface in com.google.android.exoplayer2.source.chunk">MediaChunkIterator</a>[] mediaChunkIterators)</pre>
|
|
<div class="block">Updates the selected track for sources that load media in discrete <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunk</code></a>s.
|
|
|
|
<p>This method will only be called when the selection is enabled.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playbackPositionUs</code> - The current playback position in microseconds. If playback of the
|
|
period to which this track selection belongs has not yet started, the value will be the
|
|
starting position in the period minus the duration of any media in previous periods still
|
|
to be played.</dd>
|
|
<dd><code>bufferedDurationUs</code> - The duration of media currently buffered from the current playback
|
|
position, in microseconds. Note that the next load position can be calculated as <code>
|
|
(playbackPositionUs + bufferedDurationUs)</code>.</dd>
|
|
<dd><code>availableDurationUs</code> - The duration of media available for buffering from the current
|
|
playback position, in microseconds, or <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if media can be buffered to the
|
|
end of the current period. Note that if not set to <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a>, the position up to
|
|
which media is available for buffering can be calculated as <code>(playbackPositionUs +
|
|
availableDurationUs)</code>.</dd>
|
|
<dd><code>queue</code> - The queue of already buffered <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunk</code></a>s. Must not be modified.</dd>
|
|
<dd><code>mediaChunkIterators</code> - An array of <a href="../source/chunk/MediaChunkIterator.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>MediaChunkIterator</code></a>s providing information about
|
|
the sequence of upcoming media chunks for each track in the selection. All iterators start
|
|
from the media chunk which will be loaded next if the respective track is selected. Note
|
|
that this information may not be available for all tracks, and so some iterators may be
|
|
empty.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="evaluateQueueSize(long,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>evaluateQueueSize</h4>
|
|
<pre class="methodSignature">int evaluateQueueSize​(long playbackPositionUs,
|
|
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue)</pre>
|
|
<div class="block">Returns the number of chunks that should be retained in the queue.
|
|
|
|
<p>May be called by sources that load media in discrete <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunks</code></a> and
|
|
support discarding of buffered chunks.
|
|
|
|
<p>To avoid excessive re-buffering, implementations should normally return the size of the
|
|
queue. An example of a case where a smaller value may be returned is if network conditions have
|
|
improved dramatically, allowing chunks to be discarded and re-buffered in a track of
|
|
significantly higher quality. Discarding chunks may allow faster switching to a higher quality
|
|
track in this case.
|
|
|
|
<p>Note that even if the source supports discarding of buffered chunks, the actual number of
|
|
discarded chunks is not guaranteed. The source will call <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long,
|
|
long, long, List, MediaChunkIterator[])</code></a> with the updated queue of chunks before loading a new
|
|
chunk to allow switching to another quality.
|
|
|
|
<p>This method will only be called when the selection is enabled and none of the <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunks</code></a> in the queue are currently loading.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playbackPositionUs</code> - The current playback position in microseconds. If playback of the
|
|
period to which this track selection belongs has not yet started, the value will be the
|
|
starting position in the period minus the duration of any media in previous periods still
|
|
to be played.</dd>
|
|
<dd><code>queue</code> - The queue of buffered <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunks</code></a>. Must not be modified.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The number of chunks to retain in the queue.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="shouldCancelChunkLoad(long,com.google.android.exoplayer2.source.chunk.Chunk,java.util.List)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>shouldCancelChunkLoad</h4>
|
|
<pre class="methodSignature">default boolean shouldCancelChunkLoad​(long playbackPositionUs,
|
|
<a href="../source/chunk/Chunk.html" title="class in com.google.android.exoplayer2.source.chunk">Chunk</a> loadingChunk,
|
|
<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue)</pre>
|
|
<div class="block">Returns whether an ongoing load of a chunk should be canceled.
|
|
|
|
<p>May be called by sources that load media in discrete <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunks</code></a> and
|
|
support canceling the ongoing chunk load. The ongoing chunk load is either the last <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunk</code></a> in the queue or another type of <a href="../source/chunk/Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a>, for example, if the source loads
|
|
initialization or encryption data.
|
|
|
|
<p>To avoid excessive re-buffering, implementations should normally return <code>false</code>. An
|
|
example where <code>true</code> might be returned is if a load of a high quality chunk gets stuck
|
|
and canceling this load in favor of a lower quality alternative may avoid a rebuffer.
|
|
|
|
<p>The source will call <a href="#evaluateQueueSize(long,java.util.List)"><code>evaluateQueueSize(long, List)</code></a> after the cancelation finishes
|
|
to allow discarding of chunks, and <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long, long, long, List,
|
|
MediaChunkIterator[])</code></a> before loading a new chunk to allow switching to another quality.
|
|
|
|
<p>This method will only be called when the selection is enabled.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playbackPositionUs</code> - The current playback position in microseconds. If playback of the
|
|
period to which this track selection belongs has not yet started, the value will be the
|
|
starting position in the period minus the duration of any media in previous periods still
|
|
to be played.</dd>
|
|
<dd><code>loadingChunk</code> - The currently loading <a href="../source/chunk/Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a> that will be canceled if this method
|
|
returns <code>true</code>.</dd>
|
|
<dd><code>queue</code> - The queue of buffered <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunks</code></a>, including the <code>
|
|
loadingChunk</code> if it's a <a href="../source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunk</code></a>. Must not be modified.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the ongoing load of <code>loadingChunk</code> should be canceled.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="blacklist(int,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>blacklist</h4>
|
|
<pre class="methodSignature">boolean blacklist​(int index,
|
|
long exclusionDurationMs)</pre>
|
|
<div class="block">Attempts to exclude the track at the specified index in the selection, making it ineligible for
|
|
selection by calls to <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long, long, long, List,
|
|
MediaChunkIterator[])</code></a> for the specified period of time.
|
|
|
|
<p>Exclusion will fail if all other tracks are currently excluded. If excluding the currently
|
|
selected track, note that it will remain selected until the next call to <a href="#updateSelectedTrack(long,long,long,java.util.List,com.google.android.exoplayer2.source.chunk.MediaChunkIterator%5B%5D)"><code>updateSelectedTrack(long, long, long, List, MediaChunkIterator[])</code></a>.
|
|
|
|
<p>This method will only be called when the selection is enabled.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>index</code> - The index of the track in the selection.</dd>
|
|
<dd><code>exclusionDurationMs</code> - The duration of time for which the track should be excluded, in
|
|
milliseconds.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether exclusion was successful.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isBlacklisted(int,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>isBlacklisted</h4>
|
|
<pre class="methodSignature">boolean isBlacklisted​(int index,
|
|
long nowMs)</pre>
|
|
<div class="block">Returns whether the track at the specified index in the selection is excluded.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>index</code> - The index of the track in the selection.</dd>
|
|
<dd><code>nowMs</code> - The current time in the timebase of <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.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" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses.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><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|