mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
666 lines
41 KiB
HTML
666 lines
41 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>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-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="ExoTrackSelection (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":18,"i10":6,"i11":18,"i12":18,"i13":18,"i14":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 = "../../../../../";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/trackselection/DefaultTrackSelector.VideoTrackScore.html" title="class in com.google.android.exoplayer2.trackselection"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.Definition.html" title="class in com.google.android.exoplayer2.trackselection"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" target="_top">Frames</a></li>
|
|
<li><a href="ExoTrackSelection.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><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </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 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/trackselection/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="../../../../../com/google/android/exoplayer2/trackselection/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="../../../../../com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">AdaptiveTrackSelection</a></code>, <code><a href="../../../../../com/google/android/exoplayer2/trackselection/BaseTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">BaseTrackSelection</a></code>, <code><a href="../../../../../com/google/android/exoplayer2/testutil/FakeTrackSelection.html" title="class in com.google.android.exoplayer2.testutil">FakeTrackSelection</a></code>, <code><a href="../../../../../com/google/android/exoplayer2/trackselection/FixedTrackSelection.html" title="class in com.google.android.exoplayer2.trackselection">FixedTrackSelection</a></code>, <code><a href="../../../../../com/google/android/exoplayer2/trackselection/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="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">TrackSelection</a></pre>
|
|
<div class="block">A <a href="../../../../../com/google/android/exoplayer2/trackselection/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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><code>updateSelectedTrack(long, long, long, List, MediaChunkIterator[])</code></a> or <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#evaluateQueueSize-long-java.util.List-"><code>evaluateQueueSize(long, List)</code></a>. This only happens between calls to <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#enable--"><code>enable()</code></a> and <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#disable--"><code>disable()</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="nested.class.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Nested Class Summary</h3>
|
|
<table class="memberSummary" summary="Nested Class Summary table, listing nested classes, and an explanation">
|
|
<caption><span>Nested Classes</span><span class="tabEnd"> </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="../../../../../com/google/android/exoplayer2/trackselection/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/trackselection/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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection"><code>ExoTrackSelection</code></a> instances.</div>
|
|
</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="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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/Format.html" title="class in com.google.android.exoplayer2">Format</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#getSelectedFormat--">getSelectedFormat</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="i11" class="rowColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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="i12" class="altColor">
|
|
<td class="colFirst"><code>default void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#onRebuffer--">onRebuffer</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Called to notify when a rebuffer occurred.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>default boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#shouldCancelChunkLoad-long-com.google.android.exoplayer2.source.chunk.Chunk-java.util.List-">shouldCancelChunkLoad</a></span>​(long playbackPositionUs,
|
|
<a href="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="i14" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-">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="../../../../../com/google/android/exoplayer2/source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue,
|
|
<a href="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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 name="methods.inherited.from.class.com.google.android.exoplayer2.trackselection.TrackSelection">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from interface com.google.android.exoplayer2.trackselection.<a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">TrackSelection</a></h3>
|
|
<code><a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html#getFormat-int-">getFormat</a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html#getIndexInTrackGroup-int-">getIndexInTrackGroup</a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html#getTrackGroup--">getTrackGroup</a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html#indexOf-int-">indexOf</a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html#indexOf-com.google.android.exoplayer2.Format-">indexOf</a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/TrackSelection.html#length--">length</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="enable--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>enable</h4>
|
|
<pre>void enable()</pre>
|
|
<div class="block">Enables the track selection. Dynamic changes via <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><code>updateSelectedTrack(long, long, long,
|
|
List, MediaChunkIterator[])</code></a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#evaluateQueueSize-long-java.util.List-"><code>evaluateQueueSize(long, List)</code></a> or <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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 name="disable--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>disable</h4>
|
|
<pre>void disable()</pre>
|
|
<div class="block">Disables this track selection. No further dynamic changes via <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><code>updateSelectedTrack(long,
|
|
long, long, List, MediaChunkIterator[])</code></a>, <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#evaluateQueueSize-long-java.util.List-"><code>evaluateQueueSize(long, List)</code></a> or <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#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 name="getSelectedFormat--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectedFormat</h4>
|
|
<pre><a href="../../../../../com/google/android/exoplayer2/Format.html" title="class in com.google.android.exoplayer2">Format</a> getSelectedFormat()</pre>
|
|
<div class="block">Returns the <a href="../../../../../com/google/android/exoplayer2/Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> of the individual selected track.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getSelectedIndexInTrackGroup--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectedIndexInTrackGroup</h4>
|
|
<pre>int getSelectedIndexInTrackGroup()</pre>
|
|
<div class="block">Returns the index in the track group of the individual selected track.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getSelectedIndex--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectedIndex</h4>
|
|
<pre>int getSelectedIndex()</pre>
|
|
<div class="block">Returns the index of the selected track.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getSelectionReason--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectionReason</h4>
|
|
<pre>int getSelectionReason()</pre>
|
|
<div class="block">Returns the reason for the current track selection.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="getSelectionData--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSelectionData</h4>
|
|
<pre>@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 name="onPlaybackSpeed-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onPlaybackSpeed</h4>
|
|
<pre>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 name="onDiscontinuity--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onDiscontinuity</h4>
|
|
<pre>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 name="onRebuffer--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onRebuffer</h4>
|
|
<pre>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 name="onPlayWhenReadyChanged-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>onPlayWhenReadyChanged</h4>
|
|
<pre>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 name="updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>updateSelectedTrack</h4>
|
|
<pre>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="../../../../../com/google/android/exoplayer2/source/chunk/MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk" target="_top">MediaChunk</a>> queue,
|
|
<a href="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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 name="evaluateQueueSize-long-java.util.List-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>evaluateQueueSize</h4>
|
|
<pre>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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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 name="shouldCancelChunkLoad-long-com.google.android.exoplayer2.source.chunk.Chunk-java.util.List-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>shouldCancelChunkLoad</h4>
|
|
<pre>default boolean shouldCancelChunkLoad​(long playbackPositionUs,
|
|
<a href="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#evaluateQueueSize-long-java.util.List-"><code>evaluateQueueSize(long, List)</code></a> after the cancelation finishes
|
|
to allow discarding of chunks, and <a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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="../../../../../com/google/android/exoplayer2/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 name="blacklist-int-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>blacklist</h4>
|
|
<pre>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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><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="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html#updateSelectedTrack-long-long-long-java.util.List-com.google.android.exoplayer2.source.chunk.MediaChunkIterator:A-"><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>
|
|
</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/trackselection/DefaultTrackSelector.VideoTrackScore.html" title="class in com.google.android.exoplayer2.trackselection"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.Definition.html" title="class in com.google.android.exoplayer2.trackselection"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../../index.html?com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" target="_top">Frames</a></li>
|
|
<li><a href="ExoTrackSelection.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><a href="#nested.class.summary">Nested</a> | </li>
|
|
<li>Field | </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 name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</body>
|
|
</html>
|