media3/docs/doc/reference/com/google/android/exoplayer2/DefaultLoadControl.html
2021-04-21 11:00:57 +01:00

989 lines
53 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>DefaultLoadControl (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="DefaultLoadControl (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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/DefaultLivePlaybackSpeedControl.Builder.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.Builder.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/android/exoplayer2/DefaultLoadControl.html" target="_top">Frames</a></li>
<li><a href="DefaultLoadControl.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="../../../../com/google/android/exoplayer2/package-summary.html">com.google.android.exoplayer2</a></div>
<h2 title="Class DefaultLoadControl" class="title">Class DefaultLoadControl</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.DefaultLoadControl</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/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">DefaultLoadControl</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/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></pre>
<div class="block">The default <a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2"><code>LoadControl</code></a> implementation.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.Builder.html" title="class in com.google.android.exoplayer2">DefaultLoadControl.Builder</a></span></code></th>
<td class="colLast">
<div class="block">Builder for <a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html" title="class in com.google.android.exoplayer2"><code>DefaultLoadControl</code></a>.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_AUDIO_BUFFER_SIZE">DEFAULT_AUDIO_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">A default size in bytes for an audio buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_BACK_BUFFER_DURATION_MS">DEFAULT_BACK_BUFFER_DURATION_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default back buffer duration in milliseconds.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS">DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default duration of media that must be buffered for playback to resume after a rebuffer, in
milliseconds.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_BUFFER_FOR_PLAYBACK_MS">DEFAULT_BUFFER_FOR_PLAYBACK_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default duration of media that must be buffered for playback to start or resume following a
user action such as a seek, in milliseconds.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_CAMERA_MOTION_BUFFER_SIZE">DEFAULT_CAMERA_MOTION_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">A default size in bytes for a camera motion buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_MAX_BUFFER_MS">DEFAULT_MAX_BUFFER_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default maximum duration of media that the player will attempt to buffer, in milliseconds.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_METADATA_BUFFER_SIZE">DEFAULT_METADATA_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">A default size in bytes for a metadata buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_MIN_BUFFER_MS">DEFAULT_MIN_BUFFER_MS</a></span></code></th>
<td class="colLast">
<div class="block">The default minimum duration of media that the player will attempt to ensure is buffered at all
times, in milliseconds.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_MIN_BUFFER_SIZE">DEFAULT_MIN_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">The buffer size in bytes that will be used as a minimum target buffer in all cases.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_MUXED_BUFFER_SIZE">DEFAULT_MUXED_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">A default size in bytes for a muxed buffer (e.g.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS">DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS</a></span></code></th>
<td class="colLast">
<div class="block">The default prioritization of buffer time constraints over size constraints.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME">DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME</a></span></code></th>
<td class="colLast">
<div class="block">The default for whether the back buffer is retained from the previous keyframe.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_TARGET_BUFFER_BYTES">DEFAULT_TARGET_BUFFER_BYTES</a></span></code></th>
<td class="colLast">
<div class="block">The default target buffer size in bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_TEXT_BUFFER_SIZE">DEFAULT_TEXT_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">A default size in bytes for a text buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DEFAULT_VIDEO_BUFFER_SIZE">DEFAULT_VIDEO_BUFFER_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">A default size in bytes for a video buffer.</div>
</td>
</tr>
</table>
</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">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&nbsp;</code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DefaultLoadControl--">DefaultLoadControl</a></span>()</code></th>
<td class="colLast">
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#DefaultLoadControl-com.google.android.exoplayer2.upstream.DefaultAllocator-int-int-int-int-int-boolean-int-boolean-">DefaultLoadControl</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/upstream/DefaultAllocator.html" title="class in com.google.android.exoplayer2.upstream">DefaultAllocator</a>&nbsp;allocator,
int&nbsp;minBufferMs,
int&nbsp;maxBufferMs,
int&nbsp;bufferForPlaybackMs,
int&nbsp;bufferForPlaybackAfterRebufferMs,
int&nbsp;targetBufferBytes,
boolean&nbsp;prioritizeTimeOverSizeThresholds,
int&nbsp;backBufferDurationMs,
boolean&nbsp;retainBackBufferFromKeyframe)</code></th>
<td class="colLast">&nbsp;</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">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#calculateTargetBufferBytes-com.google.android.exoplayer2.Renderer:A-com.google.android.exoplayer2.trackselection.ExoTrackSelection:A-">calculateTargetBufferBytes</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[]&nbsp;renderers,
<a href="../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[]&nbsp;trackSelectionArray)</code></th>
<td class="colLast">
<div class="block">Calculate target buffer size in bytes based on the selected tracks.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/android/exoplayer2/upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#getAllocator--">getAllocator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="../../../../com/google/android/exoplayer2/upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a> that should be used to obtain media buffer allocations.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#getBackBufferDurationUs--">getBackBufferDurationUs</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the duration of media to retain in the buffer prior to the current playback position,
for fast backward seeking.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#onPrepared--">onPrepared</a></span>()</code></th>
<td class="colLast">
<div class="block">Called by the player when prepared with a new source.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#onReleased--">onReleased</a></span>()</code></th>
<td class="colLast">
<div class="block">Called by the player when released.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#onStopped--">onStopped</a></span>()</code></th>
<td class="colLast">
<div class="block">Called by the player when stopped.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#onTracksSelected-com.google.android.exoplayer2.Renderer:A-com.google.android.exoplayer2.source.TrackGroupArray-com.google.android.exoplayer2.trackselection.ExoTrackSelection:A-">onTracksSelected</a></span>&#8203;(<a href="../../../../com/google/android/exoplayer2/Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[]&nbsp;renderers,
<a href="../../../../com/google/android/exoplayer2/source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroups,
<a href="../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[]&nbsp;trackSelections)</code></th>
<td class="colLast">
<div class="block">Called by the player when a track selection occurs.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#retainBackBufferFromKeyframe--">retainBackBufferFromKeyframe</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether media should be retained from the keyframe before the current playback position
minus <a href="../../../../com/google/android/exoplayer2/LoadControl.html#getBackBufferDurationUs--"><code>LoadControl.getBackBufferDurationUs()</code></a>, rather than any sample before or at that position.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#shouldContinueLoading-long-long-float-">shouldContinueLoading</a></span>&#8203;(long&nbsp;playbackPositionUs,
long&nbsp;bufferedDurationUs,
float&nbsp;playbackSpeed)</code></th>
<td class="colLast">
<div class="block">Called by the player to determine whether it should continue to load the source.</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="../../../../com/google/android/exoplayer2/DefaultLoadControl.html#shouldStartPlayback-long-float-boolean-long-">shouldStartPlayback</a></span>&#8203;(long&nbsp;bufferedDurationUs,
float&nbsp;playbackSpeed,
boolean&nbsp;rebuffering,
long&nbsp;targetLiveOffsetUs)</code></th>
<td class="colLast">
<div class="block">Called repeatedly by the player when it's loading the source, has yet to start playback, and
has the minimum amount of data necessary for playback to be started.</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&nbsp;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>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_MIN_BUFFER_MS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MIN_BUFFER_MS</h4>
<pre>public static final&nbsp;int DEFAULT_MIN_BUFFER_MS</pre>
<div class="block">The default minimum duration of media that the player will attempt to ensure is buffered at all
times, in milliseconds.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MIN_BUFFER_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MAX_BUFFER_MS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MAX_BUFFER_MS</h4>
<pre>public static final&nbsp;int DEFAULT_MAX_BUFFER_MS</pre>
<div class="block">The default maximum duration of media that the player will attempt to buffer, in milliseconds.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MAX_BUFFER_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_BUFFER_FOR_PLAYBACK_MS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_BUFFER_FOR_PLAYBACK_MS</h4>
<pre>public static final&nbsp;int DEFAULT_BUFFER_FOR_PLAYBACK_MS</pre>
<div class="block">The default duration of media that must be buffered for playback to start or resume following a
user action such as a seek, in milliseconds.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS</h4>
<pre>public static final&nbsp;int DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS</pre>
<div class="block">The default duration of media that must be buffered for playback to resume after a rebuffer, in
milliseconds. A rebuffer is defined to be caused by buffer depletion rather than a user action.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_TARGET_BUFFER_BYTES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_TARGET_BUFFER_BYTES</h4>
<pre>public static final&nbsp;int DEFAULT_TARGET_BUFFER_BYTES</pre>
<div class="block">The default target buffer size in bytes. The value (<a href="../../../../com/google/android/exoplayer2/C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>) means that the load
control will calculate the target buffer size based on the selected tracks.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_TARGET_BUFFER_BYTES">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS</h4>
<pre>public static final&nbsp;boolean DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS</pre>
<div class="block">The default prioritization of buffer time constraints over size constraints.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_PRIORITIZE_TIME_OVER_SIZE_THRESHOLDS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_BACK_BUFFER_DURATION_MS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_BACK_BUFFER_DURATION_MS</h4>
<pre>public static final&nbsp;int DEFAULT_BACK_BUFFER_DURATION_MS</pre>
<div class="block">The default back buffer duration in milliseconds.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_BACK_BUFFER_DURATION_MS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME</h4>
<pre>public static final&nbsp;boolean DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME</pre>
<div class="block">The default for whether the back buffer is retained from the previous keyframe.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_RETAIN_BACK_BUFFER_FROM_KEYFRAME">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_VIDEO_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_VIDEO_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_VIDEO_BUFFER_SIZE</pre>
<div class="block">A default size in bytes for a video buffer.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_VIDEO_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_AUDIO_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_AUDIO_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_AUDIO_BUFFER_SIZE</pre>
<div class="block">A default size in bytes for an audio buffer.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_AUDIO_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_TEXT_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_TEXT_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_TEXT_BUFFER_SIZE</pre>
<div class="block">A default size in bytes for a text buffer.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_TEXT_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_METADATA_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_METADATA_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_METADATA_BUFFER_SIZE</pre>
<div class="block">A default size in bytes for a metadata buffer.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_METADATA_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_CAMERA_MOTION_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_CAMERA_MOTION_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_CAMERA_MOTION_BUFFER_SIZE</pre>
<div class="block">A default size in bytes for a camera motion buffer.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_CAMERA_MOTION_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MUXED_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MUXED_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_MUXED_BUFFER_SIZE</pre>
<div class="block">A default size in bytes for a muxed buffer (e.g. containing video, audio and text).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MUXED_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MIN_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_MIN_BUFFER_SIZE</h4>
<pre>public static final&nbsp;int DEFAULT_MIN_BUFFER_SIZE</pre>
<div class="block">The buffer size in bytes that will be used as a minimum target buffer in all cases. This is
also the default target buffer before tracks are selected.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#com.google.android.exoplayer2.DefaultLoadControl.DEFAULT_MIN_BUFFER_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DefaultLoadControl--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DefaultLoadControl</h4>
<pre>public&nbsp;DefaultLoadControl()</pre>
<div class="block">Constructs a new instance, using the <code>DEFAULT_*</code> constants defined in this class.</div>
</li>
</ul>
<a name="DefaultLoadControl-com.google.android.exoplayer2.upstream.DefaultAllocator-int-int-int-int-int-boolean-int-boolean-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DefaultLoadControl</h4>
<pre>protected&nbsp;DefaultLoadControl&#8203;(<a href="../../../../com/google/android/exoplayer2/upstream/DefaultAllocator.html" title="class in com.google.android.exoplayer2.upstream">DefaultAllocator</a>&nbsp;allocator,
int&nbsp;minBufferMs,
int&nbsp;maxBufferMs,
int&nbsp;bufferForPlaybackMs,
int&nbsp;bufferForPlaybackAfterRebufferMs,
int&nbsp;targetBufferBytes,
boolean&nbsp;prioritizeTimeOverSizeThresholds,
int&nbsp;backBufferDurationMs,
boolean&nbsp;retainBackBufferFromKeyframe)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="onPrepared--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPrepared</h4>
<pre>public&nbsp;void&nbsp;onPrepared()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onPrepared--">LoadControl</a></code></span></div>
<div class="block">Called by the player when prepared with a new source.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onPrepared--">onPrepared</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
</dl>
</li>
</ul>
<a name="onTracksSelected-com.google.android.exoplayer2.Renderer:A-com.google.android.exoplayer2.source.TrackGroupArray-com.google.android.exoplayer2.trackselection.ExoTrackSelection:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onTracksSelected</h4>
<pre>public&nbsp;void&nbsp;onTracksSelected&#8203;(<a href="../../../../com/google/android/exoplayer2/Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[]&nbsp;renderers,
<a href="../../../../com/google/android/exoplayer2/source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a>&nbsp;trackGroups,
<a href="../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[]&nbsp;trackSelections)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onTracksSelected-com.google.android.exoplayer2.Renderer:A-com.google.android.exoplayer2.source.TrackGroupArray-com.google.android.exoplayer2.trackselection.ExoTrackSelection:A-">LoadControl</a></code></span></div>
<div class="block">Called by the player when a track selection occurs.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onTracksSelected-com.google.android.exoplayer2.Renderer:A-com.google.android.exoplayer2.source.TrackGroupArray-com.google.android.exoplayer2.trackselection.ExoTrackSelection:A-">onTracksSelected</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>renderers</code> - The renderers.</dd>
<dd><code>trackGroups</code> - The <a href="../../../../com/google/android/exoplayer2/source/TrackGroup.html" title="class in com.google.android.exoplayer2.source"><code>TrackGroup</code></a>s from which the selection was made.</dd>
<dd><code>trackSelections</code> - The track selections that were made.</dd>
</dl>
</li>
</ul>
<a name="onStopped--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onStopped</h4>
<pre>public&nbsp;void&nbsp;onStopped()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onStopped--">LoadControl</a></code></span></div>
<div class="block">Called by the player when stopped.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onStopped--">onStopped</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
</dl>
</li>
</ul>
<a name="onReleased--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onReleased</h4>
<pre>public&nbsp;void&nbsp;onReleased()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onReleased--">LoadControl</a></code></span></div>
<div class="block">Called by the player when released.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#onReleased--">onReleased</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
</dl>
</li>
</ul>
<a name="getAllocator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllocator</h4>
<pre>public&nbsp;<a href="../../../../com/google/android/exoplayer2/upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream">Allocator</a>&nbsp;getAllocator()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#getAllocator--">LoadControl</a></code></span></div>
<div class="block">Returns the <a href="../../../../com/google/android/exoplayer2/upstream/Allocator.html" title="interface in com.google.android.exoplayer2.upstream"><code>Allocator</code></a> that should be used to obtain media buffer allocations.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#getAllocator--">getAllocator</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
</dl>
</li>
</ul>
<a name="getBackBufferDurationUs--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBackBufferDurationUs</h4>
<pre>public&nbsp;long&nbsp;getBackBufferDurationUs()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#getBackBufferDurationUs--">LoadControl</a></code></span></div>
<div class="block">Returns the duration of media to retain in the buffer prior to the current playback position,
for fast backward seeking.
<p>Note: If <a href="../../../../com/google/android/exoplayer2/LoadControl.html#retainBackBufferFromKeyframe--"><code>LoadControl.retainBackBufferFromKeyframe()</code></a> is false then seeking in the back-buffer
will only be fast if the back-buffer contains a keyframe prior to the seek position.
<p>Note: Implementations should return a single value. Dynamic changes to the back-buffer are
not currently supported.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#getBackBufferDurationUs--">getBackBufferDurationUs</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The duration of media to retain in the buffer prior to the current playback position,
in microseconds.</dd>
</dl>
</li>
</ul>
<a name="retainBackBufferFromKeyframe--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retainBackBufferFromKeyframe</h4>
<pre>public&nbsp;boolean&nbsp;retainBackBufferFromKeyframe()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#retainBackBufferFromKeyframe--">LoadControl</a></code></span></div>
<div class="block">Returns whether media should be retained from the keyframe before the current playback position
minus <a href="../../../../com/google/android/exoplayer2/LoadControl.html#getBackBufferDurationUs--"><code>LoadControl.getBackBufferDurationUs()</code></a>, rather than any sample before or at that position.
<p>Warning: Returning true will cause the back-buffer size to depend on the spacing of
keyframes in the media being played. Returning true is not recommended unless you control the
media and are comfortable with the back-buffer size exceeding <a href="../../../../com/google/android/exoplayer2/LoadControl.html#getBackBufferDurationUs--"><code>LoadControl.getBackBufferDurationUs()</code></a> by as much as the maximum duration between adjacent keyframes in
the media.
<p>Note: Implementations should return a single value. Dynamic changes to the back-buffer are
not currently supported.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#retainBackBufferFromKeyframe--">retainBackBufferFromKeyframe</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether media should be retained from the keyframe before the current playback position
minus <a href="../../../../com/google/android/exoplayer2/LoadControl.html#getBackBufferDurationUs--"><code>LoadControl.getBackBufferDurationUs()</code></a>, rather than any sample before or at that
position.</dd>
</dl>
</li>
</ul>
<a name="shouldContinueLoading-long-long-float-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldContinueLoading</h4>
<pre>public&nbsp;boolean&nbsp;shouldContinueLoading&#8203;(long&nbsp;playbackPositionUs,
long&nbsp;bufferedDurationUs,
float&nbsp;playbackSpeed)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#shouldContinueLoading-long-long-float-">LoadControl</a></code></span></div>
<div class="block">Called by the player to determine whether it should continue to load the source.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#shouldContinueLoading-long-long-float-">shouldContinueLoading</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playbackPositionUs</code> - The current playback position in microseconds, relative to the start
of the <a href="../../../../com/google/android/exoplayer2/Timeline.Period.html" title="class in com.google.android.exoplayer2"><code>period</code></a> that will continue to be loaded if this method
returns <code>true</code>. If playback of this period has not yet started, the value will be
negative and equal in magnitude to the duration of any media in previous periods still to
be played.</dd>
<dd><code>bufferedDurationUs</code> - The duration of media that's currently buffered.</dd>
<dd><code>playbackSpeed</code> - The current factor by which playback is sped up.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether the loading should continue.</dd>
</dl>
</li>
</ul>
<a name="shouldStartPlayback-long-float-boolean-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shouldStartPlayback</h4>
<pre>public&nbsp;boolean&nbsp;shouldStartPlayback&#8203;(long&nbsp;bufferedDurationUs,
float&nbsp;playbackSpeed,
boolean&nbsp;rebuffering,
long&nbsp;targetLiveOffsetUs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#shouldStartPlayback-long-float-boolean-long-">LoadControl</a></code></span></div>
<div class="block">Called repeatedly by the player when it's loading the source, has yet to start playback, and
has the minimum amount of data necessary for playback to be started. The value returned
determines whether playback is actually started. The load control may opt to return <code>
false</code> until some condition has been met (e.g. a certain amount of media is buffered).</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../com/google/android/exoplayer2/LoadControl.html#shouldStartPlayback-long-float-boolean-long-">shouldStartPlayback</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../com/google/android/exoplayer2/LoadControl.html" title="interface in com.google.android.exoplayer2">LoadControl</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bufferedDurationUs</code> - The duration of media that's currently buffered.</dd>
<dd><code>playbackSpeed</code> - The current factor by which playback is sped up.</dd>
<dd><code>rebuffering</code> - Whether the player is rebuffering. A rebuffer is defined to be caused by
buffer depletion rather than a user action. Hence this parameter is false during initial
buffering and when buffering as a result of a seek operation.</dd>
<dd><code>targetLiveOffsetUs</code> - The desired playback position offset to the live edge in
microseconds, or <a href="../../../../com/google/android/exoplayer2/C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if the media is not a live stream or no offset is
configured.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Whether playback should be allowed to start or resume.</dd>
</dl>
</li>
</ul>
<a name="calculateTargetBufferBytes-com.google.android.exoplayer2.Renderer:A-com.google.android.exoplayer2.trackselection.ExoTrackSelection:A-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>calculateTargetBufferBytes</h4>
<pre>protected&nbsp;int&nbsp;calculateTargetBufferBytes&#8203;(<a href="../../../../com/google/android/exoplayer2/Renderer.html" title="interface in com.google.android.exoplayer2">Renderer</a>[]&nbsp;renderers,
<a href="../../../../com/google/android/exoplayer2/trackselection/ExoTrackSelection.html" title="interface in com.google.android.exoplayer2.trackselection">ExoTrackSelection</a>[]&nbsp;trackSelectionArray)</pre>
<div class="block">Calculate target buffer size in bytes based on the selected tracks. The player will try not to
exceed this target buffer. Only used when <code>targetBufferBytes</code> is <a href="../../../../com/google/android/exoplayer2/C.html#LENGTH_UNSET"><code>C.LENGTH_UNSET</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>renderers</code> - The renderers for which the track were selected.</dd>
<dd><code>trackSelectionArray</code> - The selected tracks.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The target buffer size in bytes.</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/DefaultLivePlaybackSpeedControl.Builder.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../com/google/android/exoplayer2/DefaultLoadControl.Builder.html" title="class in com.google.android.exoplayer2"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/android/exoplayer2/DefaultLoadControl.html" target="_top">Frames</a></li>
<li><a href="DefaultLoadControl.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>