1<!DOCTYPE HTML> 2<!-- NewPage --> 3<html lang="en"> 4<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 --> 5<title>Player.EventListener (ExoPlayer library)</title> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> 8<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> 9<script type="text/javascript" src="../../../../script.js"></script> 10<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> 11<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> 12<!--[if IE]> 13<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> 14<![endif]--> 15<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script> 16<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> 17</head> 18<body> 19<script type="text/javascript"><!-- 20 try { 21 if (location.href.indexOf('is-external=true') == -1) { 22 parent.document.title="Player.EventListener (ExoPlayer library)"; 23 } 24 } 25 catch(err) { 26 } 27//--> 28var data = {"i0":50,"i1":50,"i2":50,"i3":50,"i4":50,"i5":50,"i6":50,"i7":50,"i8":50,"i9":50,"i10":50,"i11":50,"i12":50,"i13":50,"i14":50,"i15":50,"i16":50,"i17":50,"i18":50,"i19":50,"i20":50,"i21":50,"i22":50,"i23":50,"i24":50,"i25":50,"i26":50}; 29var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],16:["t5","Default Methods"],32:["t6","Deprecated Methods"]}; 30var altColor = "altColor"; 31var rowColor = "rowColor"; 32var tableTab = "tableTab"; 33var activeTableTab = "activeTableTab"; 34var pathtoroot = "../../../../"; 35var useModuleDirectories = false; 36loadScripts(document, 'script');</script> 37<noscript> 38<div>JavaScript is disabled on your browser.</div> 39</noscript> 40<header role="banner"> 41<nav role="navigation"> 42<div class="fixedNav"> 43<!-- ========= START OF TOP NAVBAR ======= --> 44<div class="topNav"><a id="navbar.top"> 45<!-- --> 46</a> 47<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> 48<a id="navbar.top.firstrow"> 49<!-- --> 50</a> 51<ul class="navList" title="Navigation"> 52<li><a href="../../../../index.html">Overview</a></li> 53<li><a href="package-summary.html">Package</a></li> 54<li class="navBarCell1Rev">Class</li> 55<li><a href="package-tree.html">Tree</a></li> 56<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 57<li><a href="../../../../index-all.html">Index</a></li> 58<li><a href="../../../../help-doc.html">Help</a></li> 59</ul> 60</div> 61<div class="subNav"> 62<ul class="navList" id="allclasses_navbar_top"> 63<li><a href="../../../../allclasses.html">All Classes</a></li> 64</ul> 65<ul class="navListSearch"> 66<li><label for="search">SEARCH:</label> 67<input type="text" id="search" value="search" disabled="disabled"> 68<input type="reset" id="reset" value="reset" disabled="disabled"> 69</li> 70</ul> 71<div> 72<script type="text/javascript"><!-- 73 allClassesLink = document.getElementById("allclasses_navbar_top"); 74 if(window==top) { 75 allClassesLink.style.display = "block"; 76 } 77 else { 78 allClassesLink.style.display = "none"; 79 } 80 //--> 81</script> 82<noscript> 83<div>JavaScript is disabled on your browser.</div> 84</noscript> 85</div> 86<div> 87<ul class="subNavList"> 88<li>Summary: </li> 89<li>Nested | </li> 90<li>Field | </li> 91<li>Constr | </li> 92<li><a href="#method.summary">Method</a></li> 93</ul> 94<ul class="subNavList"> 95<li>Detail: </li> 96<li>Field | </li> 97<li>Constr | </li> 98<li><a href="#method.detail">Method</a></li> 99</ul> 100</div> 101<a id="skip.navbar.top"> 102<!-- --> 103</a></div> 104<!-- ========= END OF TOP NAVBAR ========= --> 105</div> 106<div class="navPadding"> </div> 107<script type="text/javascript"><!-- 108$('.navPadding').css('padding-top', $('.fixedNav').css("height")); 109//--> 110</script> 111</nav> 112</header> 113<!-- ======== START OF CLASS DATA ======== --> 114<main role="main"> 115<div class="header"> 116<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2</a></div> 117<h2 title="Interface Player.EventListener" class="title">Interface Player.EventListener</h2> 118</div> 119<div class="contentContainer"> 120<div class="description"> 121<ul class="blockList"> 122<li class="blockList"> 123<dl> 124<dt>All Known Subinterfaces:</dt> 125<dd><code><a href="Player.Listener.html" title="interface in com.google.android.exoplayer2">Player.Listener</a></code></dd> 126</dl> 127<dl> 128<dt>All Known Implementing Classes:</dt> 129<dd><code><a href="analytics/AnalyticsCollector.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsCollector</a></code>, <code><a href="util/DebugTextViewHelper.html" title="class in com.google.android.exoplayer2.util">DebugTextViewHelper</a></code>, <code><a href="testutil/ExoPlayerTestRunner.html" title="class in com.google.android.exoplayer2.testutil">ExoPlayerTestRunner</a></code>, <code><a href="ext/ima/ImaAdsLoader.html" title="class in com.google.android.exoplayer2.ext.ima">ImaAdsLoader</a></code>, <code><a href="ui/SubtitleView.html" title="class in com.google.android.exoplayer2.ui">SubtitleView</a></code></dd> 130</dl> 131<dl> 132<dt>Enclosing interface:</dt> 133<dd><a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a></dd> 134</dl> 135<hr> 136<pre><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a> 137public static interface <span class="typeNameLabel">Player.EventListener</span></pre> 138<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> 139<div class="deprecationComment">Use <a href="Player.Listener.html" title="interface in com.google.android.exoplayer2"><code>Player.Listener</code></a>.</div> 140</div> 141<div class="block">Listener of changes in player state. 142 143 <p>All methods have no-op default implementations to allow selective overrides. 144 145 <p>Listeners can choose to implement individual events (e.g. <a href="#onIsPlayingChanged(boolean)"><code>onIsPlayingChanged(boolean)</code></a>) or <a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a>, which is called after one 146 or more events occurred together.</div> 147</li> 148</ul> 149</div> 150<div class="summary"> 151<ul class="blockList"> 152<li class="blockList"> 153<!-- ========== METHOD SUMMARY =========== --> 154<section role="region"> 155<ul class="blockList"> 156<li class="blockList"><a id="method.summary"> 157<!-- --> 158</a> 159<h3>Method Summary</h3> 160<table class="memberSummary"> 161<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="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> 162<tr> 163<th class="colFirst" scope="col">Modifier and Type</th> 164<th class="colSecond" scope="col">Method</th> 165<th class="colLast" scope="col">Description</th> 166</tr> 167<tr id="i0" class="altColor"> 168<td class="colFirst"><code>default void</code></td> 169<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onAvailableCommandsChanged(com.google.android.exoplayer2.Player.Commands)">onAvailableCommandsChanged</a></span>​(<a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a> availableCommands)</code></th> 170<td class="colLast"> 171<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 172<div class="block">Called when the value returned from <a href="Player.html#isCommandAvailable(@com.google.android.exoplayer2.Player.Commandint)"><code>Player.isCommandAvailable(int)</code></a> changes for at least one 173 <a href="Player.Command.html" title="annotation in com.google.android.exoplayer2"><code>Player.Command</code></a>.</div> 174</td> 175</tr> 176<tr id="i1" class="rowColor"> 177<td class="colFirst"><code>default void</code></td> 178<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)">onEvents</a></span>​(<a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a> player, 179 <a href="Player.Events.html" title="class in com.google.android.exoplayer2">Player.Events</a> events)</code></th> 180<td class="colLast"> 181<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 182<div class="block">Called when one or more player states changed.</div> 183</td> 184</tr> 185<tr id="i2" class="altColor"> 186<td class="colFirst"><code>default void</code></td> 187<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onIsLoadingChanged(boolean)">onIsLoadingChanged</a></span>​(boolean isLoading)</code></th> 188<td class="colLast"> 189<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 190<div class="block">Called when the player starts or stops loading the source.</div> 191</td> 192</tr> 193<tr id="i3" class="rowColor"> 194<td class="colFirst"><code>default void</code></td> 195<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onIsPlayingChanged(boolean)">onIsPlayingChanged</a></span>​(boolean isPlaying)</code></th> 196<td class="colLast"> 197<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 198<div class="block">Called when the value of <a href="Player.html#isPlaying()"><code>Player.isPlaying()</code></a> changes.</div> 199</td> 200</tr> 201<tr id="i4" class="altColor"> 202<td class="colFirst"><code>default void</code></td> 203<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onLoadingChanged(boolean)">onLoadingChanged</a></span>​(boolean isLoading)</code></th> 204<td class="colLast"> 205<div class="block"><span class="deprecatedLabel">Deprecated.</span> 206<div class="deprecationComment">Use <a href="#onIsLoadingChanged(boolean)"><code>onIsLoadingChanged(boolean)</code></a> instead.</div> 207</div> 208</td> 209</tr> 210<tr id="i5" class="rowColor"> 211<td class="colFirst"><code>default void</code></td> 212<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onMaxSeekToPreviousPositionChanged(long)">onMaxSeekToPreviousPositionChanged</a></span>​(long maxSeekToPreviousPositionMs)</code></th> 213<td class="colLast"> 214<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 215<div class="block">Called when the value of <a href="Player.html#getMaxSeekToPreviousPosition()"><code>Player.getMaxSeekToPreviousPosition()</code></a> changes.</div> 216</td> 217</tr> 218<tr id="i6" class="altColor"> 219<td class="colFirst"><code>default void</code></td> 220<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onMediaItemTransition(com.google.android.exoplayer2.MediaItem,@com.google.android.exoplayer2.Player.MediaItemTransitionReasonint)">onMediaItemTransition</a></span>​(<a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem, 221 @com.google.android.exoplayer2.Player.MediaItemTransitionReason int reason)</code></th> 222<td class="colLast"> 223<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 224<div class="block">Called when playback transitions to a media item or starts repeating a media item according 225 to the current <a href="Player.html#getRepeatMode()"><code>repeat mode</code></a>.</div> 226</td> 227</tr> 228<tr id="i7" class="rowColor"> 229<td class="colFirst"><code>default void</code></td> 230<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onMediaMetadataChanged(com.google.android.exoplayer2.MediaMetadata)">onMediaMetadataChanged</a></span>​(<a href="MediaMetadata.html" title="class in com.google.android.exoplayer2">MediaMetadata</a> mediaMetadata)</code></th> 231<td class="colLast"> 232<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 233<div class="block">Called when the combined <a href="MediaMetadata.html" title="class in com.google.android.exoplayer2"><code>MediaMetadata</code></a> changes.</div> 234</td> 235</tr> 236<tr id="i8" class="altColor"> 237<td class="colFirst"><code>default void</code></td> 238<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlaybackParametersChanged(com.google.android.exoplayer2.PlaybackParameters)">onPlaybackParametersChanged</a></span>​(<a href="PlaybackParameters.html" title="class in com.google.android.exoplayer2">PlaybackParameters</a> playbackParameters)</code></th> 239<td class="colLast"> 240<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 241<div class="block">Called when the current playback parameters change.</div> 242</td> 243</tr> 244<tr id="i9" class="rowColor"> 245<td class="colFirst"><code>default void</code></td> 246<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlaybackStateChanged(@com.google.android.exoplayer2.Player.Stateint)">onPlaybackStateChanged</a></span>​(@com.google.android.exoplayer2.Player.State int playbackState)</code></th> 247<td class="colLast"> 248<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 249<div class="block">Called when the value returned from <a href="Player.html#getPlaybackState()"><code>Player.getPlaybackState()</code></a> changes.</div> 250</td> 251</tr> 252<tr id="i10" class="altColor"> 253<td class="colFirst"><code>default void</code></td> 254<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlaybackSuppressionReasonChanged(@com.google.android.exoplayer2.Player.PlaybackSuppressionReasonint)">onPlaybackSuppressionReasonChanged</a></span>​(@com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)</code></th> 255<td class="colLast"> 256<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 257<div class="block">Called when the value returned from <a href="Player.html#getPlaybackSuppressionReason()"><code>Player.getPlaybackSuppressionReason()</code></a> changes.</div> 258</td> 259</tr> 260<tr id="i11" class="rowColor"> 261<td class="colFirst"><code>default void</code></td> 262<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlayerError(com.google.android.exoplayer2.PlaybackException)">onPlayerError</a></span>​(<a href="PlaybackException.html" title="class in com.google.android.exoplayer2">PlaybackException</a> error)</code></th> 263<td class="colLast"> 264<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 265<div class="block">Called when an error occurs.</div> 266</td> 267</tr> 268<tr id="i12" class="altColor"> 269<td class="colFirst"><code>default void</code></td> 270<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlayerErrorChanged(com.google.android.exoplayer2.PlaybackException)">onPlayerErrorChanged</a></span>​(<a href="PlaybackException.html" title="class in com.google.android.exoplayer2">PlaybackException</a> error)</code></th> 271<td class="colLast"> 272<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 273<div class="block">Called when the <a href="PlaybackException.html" title="class in com.google.android.exoplayer2"><code>PlaybackException</code></a> returned by <a href="Player.html#getPlayerError()"><code>Player.getPlayerError()</code></a> changes.</div> 274</td> 275</tr> 276<tr id="i13" class="rowColor"> 277<td class="colFirst"><code>default void</code></td> 278<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlayerStateChanged(boolean,@com.google.android.exoplayer2.Player.Stateint)">onPlayerStateChanged</a></span>​(boolean playWhenReady, 279 @com.google.android.exoplayer2.Player.State int playbackState)</code></th> 280<td class="colLast"> 281<div class="block"><span class="deprecatedLabel">Deprecated.</span> 282<div class="deprecationComment">Use <a href="#onPlaybackStateChanged(@com.google.android.exoplayer2.Player.Stateint)"><code>onPlaybackStateChanged(int)</code></a> and <a href="#onPlayWhenReadyChanged(boolean,@com.google.android.exoplayer2.Player.PlayWhenReadyChangeReasonint)"><code>onPlayWhenReadyChanged(boolean, int)</code></a> instead.</div> 283</div> 284</td> 285</tr> 286<tr id="i14" class="altColor"> 287<td class="colFirst"><code>default void</code></td> 288<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlaylistMetadataChanged(com.google.android.exoplayer2.MediaMetadata)">onPlaylistMetadataChanged</a></span>​(<a href="MediaMetadata.html" title="class in com.google.android.exoplayer2">MediaMetadata</a> mediaMetadata)</code></th> 289<td class="colLast"> 290<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 291<div class="block">Called when the playlist <a href="MediaMetadata.html" title="class in com.google.android.exoplayer2"><code>MediaMetadata</code></a> changes.</div> 292</td> 293</tr> 294<tr id="i15" class="rowColor"> 295<td class="colFirst"><code>default void</code></td> 296<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPlayWhenReadyChanged(boolean,@com.google.android.exoplayer2.Player.PlayWhenReadyChangeReasonint)">onPlayWhenReadyChanged</a></span>​(boolean playWhenReady, 297 @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)</code></th> 298<td class="colLast"> 299<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 300<div class="block">Called when the value returned from <a href="Player.html#getPlayWhenReady()"><code>Player.getPlayWhenReady()</code></a> changes.</div> 301</td> 302</tr> 303<tr id="i16" class="altColor"> 304<td class="colFirst"><code>default void</code></td> 305<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPositionDiscontinuity(@com.google.android.exoplayer2.Player.DiscontinuityReasonint)">onPositionDiscontinuity</a></span>​(@com.google.android.exoplayer2.Player.DiscontinuityReason int reason)</code></th> 306<td class="colLast"> 307<div class="block"><span class="deprecatedLabel">Deprecated.</span> 308<div class="deprecationComment">Use <a href="#onPositionDiscontinuity(com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,@com.google.android.exoplayer2.Player.DiscontinuityReasonint)"><code>onPositionDiscontinuity(PositionInfo, PositionInfo, int)</code></a> instead.</div> 309</div> 310</td> 311</tr> 312<tr id="i17" class="rowColor"> 313<td class="colFirst"><code>default void</code></td> 314<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPositionDiscontinuity(com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,@com.google.android.exoplayer2.Player.DiscontinuityReasonint)">onPositionDiscontinuity</a></span>​(<a href="Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a> oldPosition, 315 <a href="Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a> newPosition, 316 @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)</code></th> 317<td class="colLast"> 318<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 319<div class="block">Called when a position discontinuity occurs.</div> 320</td> 321</tr> 322<tr id="i18" class="altColor"> 323<td class="colFirst"><code>default void</code></td> 324<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onRepeatModeChanged(@com.google.android.exoplayer2.Player.RepeatModeint)">onRepeatModeChanged</a></span>​(@com.google.android.exoplayer2.Player.RepeatMode int repeatMode)</code></th> 325<td class="colLast"> 326<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 327<div class="block">Called when the value of <a href="Player.html#getRepeatMode()"><code>Player.getRepeatMode()</code></a> changes.</div> 328</td> 329</tr> 330<tr id="i19" class="rowColor"> 331<td class="colFirst"><code>default void</code></td> 332<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onSeekBackIncrementChanged(long)">onSeekBackIncrementChanged</a></span>​(long seekBackIncrementMs)</code></th> 333<td class="colLast"> 334<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 335<div class="block">Called when the value of <a href="Player.html#getSeekBackIncrement()"><code>Player.getSeekBackIncrement()</code></a> changes.</div> 336</td> 337</tr> 338<tr id="i20" class="altColor"> 339<td class="colFirst"><code>default void</code></td> 340<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onSeekForwardIncrementChanged(long)">onSeekForwardIncrementChanged</a></span>​(long seekForwardIncrementMs)</code></th> 341<td class="colLast"> 342<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 343<div class="block">Called when the value of <a href="Player.html#getSeekForwardIncrement()"><code>Player.getSeekForwardIncrement()</code></a> changes.</div> 344</td> 345</tr> 346<tr id="i21" class="rowColor"> 347<td class="colFirst"><code>default void</code></td> 348<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onSeekProcessed()">onSeekProcessed</a></span>()</code></th> 349<td class="colLast"> 350<div class="block"><span class="deprecatedLabel">Deprecated.</span> 351<div class="deprecationComment">Seeks are processed without delay.</div> 352</div> 353</td> 354</tr> 355<tr id="i22" class="altColor"> 356<td class="colFirst"><code>default void</code></td> 357<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onShuffleModeEnabledChanged(boolean)">onShuffleModeEnabledChanged</a></span>​(boolean shuffleModeEnabled)</code></th> 358<td class="colLast"> 359<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 360<div class="block">Called when the value of <a href="Player.html#getShuffleModeEnabled()"><code>Player.getShuffleModeEnabled()</code></a> changes.</div> 361</td> 362</tr> 363<tr id="i23" class="rowColor"> 364<td class="colFirst"><code>default void</code></td> 365<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onTimelineChanged(com.google.android.exoplayer2.Timeline,@com.google.android.exoplayer2.Player.TimelineChangeReasonint)">onTimelineChanged</a></span>​(<a href="Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a> timeline, 366 @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)</code></th> 367<td class="colLast"> 368<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 369<div class="block">Called when the timeline has been refreshed.</div> 370</td> 371</tr> 372<tr id="i24" class="altColor"> 373<td class="colFirst"><code>default void</code></td> 374<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onTracksChanged(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.TrackSelectionArray)">onTracksChanged</a></span>​(<a href="source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a> trackGroups, 375 <a href="trackselection/TrackSelectionArray.html" title="class in com.google.android.exoplayer2.trackselection">TrackSelectionArray</a> trackSelections)</code></th> 376<td class="colLast"> 377<div class="block"><span class="deprecatedLabel">Deprecated.</span> 378<div class="deprecationComment">Use <a href="#onTracksInfoChanged(com.google.android.exoplayer2.TracksInfo)"><code>onTracksInfoChanged(TracksInfo)</code></a> instead.</div> 379</div> 380</td> 381</tr> 382<tr id="i25" class="rowColor"> 383<td class="colFirst"><code>default void</code></td> 384<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onTrackSelectionParametersChanged(com.google.android.exoplayer2.trackselection.TrackSelectionParameters)">onTrackSelectionParametersChanged</a></span>​(<a href="trackselection/TrackSelectionParameters.html" title="class in com.google.android.exoplayer2.trackselection">TrackSelectionParameters</a> parameters)</code></th> 385<td class="colLast"> 386<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 387<div class="block">Called when the value returned from <a href="Player.html#getTrackSelectionParameters()"><code>Player.getTrackSelectionParameters()</code></a> changes.</div> 388</td> 389</tr> 390<tr id="i26" class="altColor"> 391<td class="colFirst"><code>default void</code></td> 392<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onTracksInfoChanged(com.google.android.exoplayer2.TracksInfo)">onTracksInfoChanged</a></span>​(<a href="TracksInfo.html" title="class in com.google.android.exoplayer2">TracksInfo</a> tracksInfo)</code></th> 393<td class="colLast"> 394<div class="block"><span class="deprecatedLabel">Deprecated.</span></div> 395<div class="block">Called when the available or selected tracks change.</div> 396</td> 397</tr> 398</table> 399</li> 400</ul> 401</section> 402</li> 403</ul> 404</div> 405<div class="details"> 406<ul class="blockList"> 407<li class="blockList"> 408<!-- ============ METHOD DETAIL ========== --> 409<section role="region"> 410<ul class="blockList"> 411<li class="blockList"><a id="method.detail"> 412<!-- --> 413</a> 414<h3>Method Detail</h3> 415<a id="onTimelineChanged(com.google.android.exoplayer2.Timeline,@com.google.android.exoplayer2.Player.TimelineChangeReasonint)"> 416<!-- --> 417</a> 418<ul class="blockList"> 419<li class="blockList"> 420<h4>onTimelineChanged</h4> 421<pre class="methodSignature">default void onTimelineChanged​(<a href="Timeline.html" title="class in com.google.android.exoplayer2">Timeline</a> timeline, 422 <a href="Player.TimelineChangeReason.html" title="annotation in com.google.android.exoplayer2">@TimelineChangeReason</a> 423 @com.google.android.exoplayer2.Player.TimelineChangeReason int reason)</pre> 424<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 425<div class="block">Called when the timeline has been refreshed. 426 427 <p>Note that the current <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a> or playback position may change as a result of a 428 timeline change. If playback can't continue smoothly because of this timeline change, a 429 separate <a href="#onPositionDiscontinuity(com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,@com.google.android.exoplayer2.Player.DiscontinuityReasonint)"><code>onPositionDiscontinuity(PositionInfo, PositionInfo, int)</code></a> callback will be 430 triggered. 431 432 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 433 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 434<dl> 435<dt><span class="paramLabel">Parameters:</span></dt> 436<dd><code>timeline</code> - The latest timeline. Never null, but may be empty.</dd> 437<dd><code>reason</code> - The <a href="Player.TimelineChangeReason.html" title="annotation in com.google.android.exoplayer2"><code>Player.TimelineChangeReason</code></a> responsible for this timeline change.</dd> 438</dl> 439</li> 440</ul> 441<a id="onMediaItemTransition(com.google.android.exoplayer2.MediaItem,@com.google.android.exoplayer2.Player.MediaItemTransitionReasonint)"> 442<!-- --> 443</a> 444<ul class="blockList"> 445<li class="blockList"> 446<h4>onMediaItemTransition</h4> 447<pre class="methodSignature">default void onMediaItemTransition​(@Nullable 448 <a href="MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a> mediaItem, 449 <a href="Player.MediaItemTransitionReason.html" title="annotation in com.google.android.exoplayer2">@MediaItemTransitionReason</a> 450 @com.google.android.exoplayer2.Player.MediaItemTransitionReason int reason)</pre> 451<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 452<div class="block">Called when playback transitions to a media item or starts repeating a media item according 453 to the current <a href="Player.html#getRepeatMode()"><code>repeat mode</code></a>. 454 455 <p>Note that this callback is also called when the playlist becomes non-empty or empty as a 456 consequence of a playlist change. 457 458 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 459 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 460<dl> 461<dt><span class="paramLabel">Parameters:</span></dt> 462<dd><code>mediaItem</code> - The <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>MediaItem</code></a>. May be null if the playlist becomes empty.</dd> 463<dd><code>reason</code> - The reason for the transition.</dd> 464</dl> 465</li> 466</ul> 467<a id="onTracksChanged(com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.TrackSelectionArray)"> 468<!-- --> 469</a> 470<ul class="blockList"> 471<li class="blockList"> 472<h4>onTracksChanged</h4> 473<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a> 474default void onTracksChanged​(<a href="source/TrackGroupArray.html" title="class in com.google.android.exoplayer2.source">TrackGroupArray</a> trackGroups, 475 <a href="trackselection/TrackSelectionArray.html" title="class in com.google.android.exoplayer2.trackselection">TrackSelectionArray</a> trackSelections)</pre> 476<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> 477<div class="deprecationComment">Use <a href="#onTracksInfoChanged(com.google.android.exoplayer2.TracksInfo)"><code>onTracksInfoChanged(TracksInfo)</code></a> instead.</div> 478</div> 479<div class="block">Called when the available or selected tracks change. 480 481 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 482 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 483<dl> 484<dt><span class="paramLabel">Parameters:</span></dt> 485<dd><code>trackGroups</code> - The available tracks. Never null, but may be of length zero.</dd> 486<dd><code>trackSelections</code> - The selected tracks. Never null, but may contain null elements. A 487 concrete implementation may include null elements if it has a fixed number of renderer 488 components, wishes to report a TrackSelection for each of them, and has one or more 489 renderer components that is not assigned any selected tracks.</dd> 490</dl> 491</li> 492</ul> 493<a id="onTracksInfoChanged(com.google.android.exoplayer2.TracksInfo)"> 494<!-- --> 495</a> 496<ul class="blockList"> 497<li class="blockList"> 498<h4>onTracksInfoChanged</h4> 499<pre class="methodSignature">default void onTracksInfoChanged​(<a href="TracksInfo.html" title="class in com.google.android.exoplayer2">TracksInfo</a> tracksInfo)</pre> 500<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 501<div class="block">Called when the available or selected tracks change. 502 503 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 504 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 505<dl> 506<dt><span class="paramLabel">Parameters:</span></dt> 507<dd><code>tracksInfo</code> - The available tracks information. Never null, but may be of length zero.</dd> 508</dl> 509</li> 510</ul> 511<a id="onMediaMetadataChanged(com.google.android.exoplayer2.MediaMetadata)"> 512<!-- --> 513</a> 514<ul class="blockList"> 515<li class="blockList"> 516<h4>onMediaMetadataChanged</h4> 517<pre class="methodSignature">default void onMediaMetadataChanged​(<a href="MediaMetadata.html" title="class in com.google.android.exoplayer2">MediaMetadata</a> mediaMetadata)</pre> 518<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 519<div class="block">Called when the combined <a href="MediaMetadata.html" title="class in com.google.android.exoplayer2"><code>MediaMetadata</code></a> changes. 520 521 <p>The provided <a href="MediaMetadata.html" title="class in com.google.android.exoplayer2"><code>MediaMetadata</code></a> is a combination of the <a href="MediaItem.html#mediaMetadata"><code>MediaItem.mediaMetadata</code></a> 522 and the static and dynamic metadata from the <a href="trackselection/TrackSelection.html#getFormat(int)"><code>track 523 selections' formats</code></a> and <a href="Player.Listener.html#onMetadata(com.google.android.exoplayer2.metadata.Metadata)"><code>Player.Listener.onMetadata(Metadata)</code></a>. If a field is populated in 524 the <a href="MediaItem.html#mediaMetadata"><code>MediaItem.mediaMetadata</code></a>, it will be prioritised above the same field coming from 525 static or dynamic metadata. 526 527 <p>This method may be called multiple times in quick succession. 528 529 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 530 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 531<dl> 532<dt><span class="paramLabel">Parameters:</span></dt> 533<dd><code>mediaMetadata</code> - The combined <a href="MediaMetadata.html" title="class in com.google.android.exoplayer2"><code>MediaMetadata</code></a>.</dd> 534</dl> 535</li> 536</ul> 537<a id="onPlaylistMetadataChanged(com.google.android.exoplayer2.MediaMetadata)"> 538<!-- --> 539</a> 540<ul class="blockList"> 541<li class="blockList"> 542<h4>onPlaylistMetadataChanged</h4> 543<pre class="methodSignature">default void onPlaylistMetadataChanged​(<a href="MediaMetadata.html" title="class in com.google.android.exoplayer2">MediaMetadata</a> mediaMetadata)</pre> 544<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 545<div class="block">Called when the playlist <a href="MediaMetadata.html" title="class in com.google.android.exoplayer2"><code>MediaMetadata</code></a> changes.</div> 546</li> 547</ul> 548<a id="onIsLoadingChanged(boolean)"> 549<!-- --> 550</a> 551<ul class="blockList"> 552<li class="blockList"> 553<h4>onIsLoadingChanged</h4> 554<pre class="methodSignature">default void onIsLoadingChanged​(boolean isLoading)</pre> 555<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 556<div class="block">Called when the player starts or stops loading the source. 557 558 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 559 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 560<dl> 561<dt><span class="paramLabel">Parameters:</span></dt> 562<dd><code>isLoading</code> - Whether the source is currently being loaded.</dd> 563</dl> 564</li> 565</ul> 566<a id="onLoadingChanged(boolean)"> 567<!-- --> 568</a> 569<ul class="blockList"> 570<li class="blockList"> 571<h4>onLoadingChanged</h4> 572<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a> 573default void onLoadingChanged​(boolean isLoading)</pre> 574<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> 575<div class="deprecationComment">Use <a href="#onIsLoadingChanged(boolean)"><code>onIsLoadingChanged(boolean)</code></a> instead.</div> 576</div> 577</li> 578</ul> 579<a id="onAvailableCommandsChanged(com.google.android.exoplayer2.Player.Commands)"> 580<!-- --> 581</a> 582<ul class="blockList"> 583<li class="blockList"> 584<h4>onAvailableCommandsChanged</h4> 585<pre class="methodSignature">default void onAvailableCommandsChanged​(<a href="Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a> availableCommands)</pre> 586<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 587<div class="block">Called when the value returned from <a href="Player.html#isCommandAvailable(@com.google.android.exoplayer2.Player.Commandint)"><code>Player.isCommandAvailable(int)</code></a> changes for at least one 588 <a href="Player.Command.html" title="annotation in com.google.android.exoplayer2"><code>Player.Command</code></a>. 589 590 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 591 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 592<dl> 593<dt><span class="paramLabel">Parameters:</span></dt> 594<dd><code>availableCommands</code> - The available <a href="Player.Commands.html" title="class in com.google.android.exoplayer2"><code>Player.Commands</code></a>.</dd> 595</dl> 596</li> 597</ul> 598<a id="onTrackSelectionParametersChanged(com.google.android.exoplayer2.trackselection.TrackSelectionParameters)"> 599<!-- --> 600</a> 601<ul class="blockList"> 602<li class="blockList"> 603<h4>onTrackSelectionParametersChanged</h4> 604<pre class="methodSignature">default void onTrackSelectionParametersChanged​(<a href="trackselection/TrackSelectionParameters.html" title="class in com.google.android.exoplayer2.trackselection">TrackSelectionParameters</a> parameters)</pre> 605<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 606<div class="block">Called when the value returned from <a href="Player.html#getTrackSelectionParameters()"><code>Player.getTrackSelectionParameters()</code></a> changes. 607 608 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 609 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 610<dl> 611<dt><span class="paramLabel">Parameters:</span></dt> 612<dd><code>parameters</code> - The new <a href="trackselection/TrackSelectionParameters.html" title="class in com.google.android.exoplayer2.trackselection"><code>TrackSelectionParameters</code></a>.</dd> 613</dl> 614</li> 615</ul> 616<a id="onPlayerStateChanged(boolean,@com.google.android.exoplayer2.Player.Stateint)"> 617<!-- --> 618</a> 619<ul class="blockList"> 620<li class="blockList"> 621<h4>onPlayerStateChanged</h4> 622<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a> 623default void onPlayerStateChanged​(boolean playWhenReady, 624 <a href="Player.State.html" title="annotation in com.google.android.exoplayer2">@State</a> 625 @com.google.android.exoplayer2.Player.State int playbackState)</pre> 626<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> 627<div class="deprecationComment">Use <a href="#onPlaybackStateChanged(@com.google.android.exoplayer2.Player.Stateint)"><code>onPlaybackStateChanged(int)</code></a> and <a href="#onPlayWhenReadyChanged(boolean,@com.google.android.exoplayer2.Player.PlayWhenReadyChangeReasonint)"><code>onPlayWhenReadyChanged(boolean, int)</code></a> instead.</div> 628</div> 629</li> 630</ul> 631<a id="onPlaybackStateChanged(@com.google.android.exoplayer2.Player.Stateint)"> 632<!-- --> 633</a> 634<ul class="blockList"> 635<li class="blockList"> 636<h4>onPlaybackStateChanged</h4> 637<pre class="methodSignature">default void onPlaybackStateChanged​(<a href="Player.State.html" title="annotation in com.google.android.exoplayer2">@State</a> 638 @com.google.android.exoplayer2.Player.State int playbackState)</pre> 639<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 640<div class="block">Called when the value returned from <a href="Player.html#getPlaybackState()"><code>Player.getPlaybackState()</code></a> changes. 641 642 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 643 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 644<dl> 645<dt><span class="paramLabel">Parameters:</span></dt> 646<dd><code>playbackState</code> - The new playback <a href="Player.State.html" title="annotation in com.google.android.exoplayer2"><code>state</code></a>.</dd> 647</dl> 648</li> 649</ul> 650<a id="onPlayWhenReadyChanged(boolean,@com.google.android.exoplayer2.Player.PlayWhenReadyChangeReasonint)"> 651<!-- --> 652</a> 653<ul class="blockList"> 654<li class="blockList"> 655<h4>onPlayWhenReadyChanged</h4> 656<pre class="methodSignature">default void onPlayWhenReadyChanged​(boolean playWhenReady, 657 <a href="Player.PlayWhenReadyChangeReason.html" title="annotation in com.google.android.exoplayer2">@PlayWhenReadyChangeReason</a> 658 @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int reason)</pre> 659<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 660<div class="block">Called when the value returned from <a href="Player.html#getPlayWhenReady()"><code>Player.getPlayWhenReady()</code></a> changes. 661 662 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 663 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 664<dl> 665<dt><span class="paramLabel">Parameters:</span></dt> 666<dd><code>playWhenReady</code> - Whether playback will proceed when ready.</dd> 667<dd><code>reason</code> - The <a href="Player.PlayWhenReadyChangeReason.html" title="annotation in com.google.android.exoplayer2"><code>reason</code></a> for the change.</dd> 668</dl> 669</li> 670</ul> 671<a id="onPlaybackSuppressionReasonChanged(@com.google.android.exoplayer2.Player.PlaybackSuppressionReasonint)"> 672<!-- --> 673</a> 674<ul class="blockList"> 675<li class="blockList"> 676<h4>onPlaybackSuppressionReasonChanged</h4> 677<pre class="methodSignature">default void onPlaybackSuppressionReasonChanged​(<a href="Player.PlaybackSuppressionReason.html" title="annotation in com.google.android.exoplayer2">@PlaybackSuppressionReason</a> 678 @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason)</pre> 679<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 680<div class="block">Called when the value returned from <a href="Player.html#getPlaybackSuppressionReason()"><code>Player.getPlaybackSuppressionReason()</code></a> changes. 681 682 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 683 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 684<dl> 685<dt><span class="paramLabel">Parameters:</span></dt> 686<dd><code>playbackSuppressionReason</code> - The current <a href="Player.PlaybackSuppressionReason.html" title="annotation in com.google.android.exoplayer2"><code>Player.PlaybackSuppressionReason</code></a>.</dd> 687</dl> 688</li> 689</ul> 690<a id="onIsPlayingChanged(boolean)"> 691<!-- --> 692</a> 693<ul class="blockList"> 694<li class="blockList"> 695<h4>onIsPlayingChanged</h4> 696<pre class="methodSignature">default void onIsPlayingChanged​(boolean isPlaying)</pre> 697<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 698<div class="block">Called when the value of <a href="Player.html#isPlaying()"><code>Player.isPlaying()</code></a> changes. 699 700 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 701 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 702<dl> 703<dt><span class="paramLabel">Parameters:</span></dt> 704<dd><code>isPlaying</code> - Whether the player is playing.</dd> 705</dl> 706</li> 707</ul> 708<a id="onRepeatModeChanged(@com.google.android.exoplayer2.Player.RepeatModeint)"> 709<!-- --> 710</a> 711<ul class="blockList"> 712<li class="blockList"> 713<h4>onRepeatModeChanged</h4> 714<pre class="methodSignature">default void onRepeatModeChanged​(<a href="Player.RepeatMode.html" title="annotation in com.google.android.exoplayer2">@RepeatMode</a> 715 @com.google.android.exoplayer2.Player.RepeatMode int repeatMode)</pre> 716<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 717<div class="block">Called when the value of <a href="Player.html#getRepeatMode()"><code>Player.getRepeatMode()</code></a> changes. 718 719 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 720 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 721<dl> 722<dt><span class="paramLabel">Parameters:</span></dt> 723<dd><code>repeatMode</code> - The <a href="Player.RepeatMode.html" title="annotation in com.google.android.exoplayer2"><code>Player.RepeatMode</code></a> used for playback.</dd> 724</dl> 725</li> 726</ul> 727<a id="onShuffleModeEnabledChanged(boolean)"> 728<!-- --> 729</a> 730<ul class="blockList"> 731<li class="blockList"> 732<h4>onShuffleModeEnabledChanged</h4> 733<pre class="methodSignature">default void onShuffleModeEnabledChanged​(boolean shuffleModeEnabled)</pre> 734<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 735<div class="block">Called when the value of <a href="Player.html#getShuffleModeEnabled()"><code>Player.getShuffleModeEnabled()</code></a> changes. 736 737 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 738 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 739<dl> 740<dt><span class="paramLabel">Parameters:</span></dt> 741<dd><code>shuffleModeEnabled</code> - Whether shuffling of <a href="MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a> is enabled.</dd> 742</dl> 743</li> 744</ul> 745<a id="onPlayerError(com.google.android.exoplayer2.PlaybackException)"> 746<!-- --> 747</a> 748<ul class="blockList"> 749<li class="blockList"> 750<h4>onPlayerError</h4> 751<pre class="methodSignature">default void onPlayerError​(<a href="PlaybackException.html" title="class in com.google.android.exoplayer2">PlaybackException</a> error)</pre> 752<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 753<div class="block">Called when an error occurs. The playback state will transition to <a href="Player.html#STATE_IDLE"><code>Player.STATE_IDLE</code></a> 754 immediately after this method is called. The player instance can still be used, and <a href="Player.html#release()"><code>Player.release()</code></a> must still be called on the player should it no longer be required. 755 756 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 757 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration. 758 759 <p>Implementations of Player may pass an instance of a subclass of <a href="PlaybackException.html" title="class in com.google.android.exoplayer2"><code>PlaybackException</code></a> 760 to this method in order to include more information about the error.</div> 761<dl> 762<dt><span class="paramLabel">Parameters:</span></dt> 763<dd><code>error</code> - The error.</dd> 764</dl> 765</li> 766</ul> 767<a id="onPlayerErrorChanged(com.google.android.exoplayer2.PlaybackException)"> 768<!-- --> 769</a> 770<ul class="blockList"> 771<li class="blockList"> 772<h4>onPlayerErrorChanged</h4> 773<pre class="methodSignature">default void onPlayerErrorChanged​(@Nullable 774 <a href="PlaybackException.html" title="class in com.google.android.exoplayer2">PlaybackException</a> error)</pre> 775<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 776<div class="block">Called when the <a href="PlaybackException.html" title="class in com.google.android.exoplayer2"><code>PlaybackException</code></a> returned by <a href="Player.html#getPlayerError()"><code>Player.getPlayerError()</code></a> changes. 777 778 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 779 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration. 780 781 <p>Implementations of Player may pass an instance of a subclass of <a href="PlaybackException.html" title="class in com.google.android.exoplayer2"><code>PlaybackException</code></a> 782 to this method in order to include more information about the error.</div> 783<dl> 784<dt><span class="paramLabel">Parameters:</span></dt> 785<dd><code>error</code> - The new error, or null if the error is being cleared.</dd> 786</dl> 787</li> 788</ul> 789<a id="onPositionDiscontinuity(@com.google.android.exoplayer2.Player.DiscontinuityReasonint)"> 790<!-- --> 791</a> 792<ul class="blockList"> 793<li class="blockList"> 794<h4>onPositionDiscontinuity</h4> 795<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a> 796default void onPositionDiscontinuity​(<a href="Player.DiscontinuityReason.html" title="annotation in com.google.android.exoplayer2">@DiscontinuityReason</a> 797 @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)</pre> 798<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> 799<div class="deprecationComment">Use <a href="#onPositionDiscontinuity(com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,@com.google.android.exoplayer2.Player.DiscontinuityReasonint)"><code>onPositionDiscontinuity(PositionInfo, PositionInfo, int)</code></a> instead.</div> 800</div> 801</li> 802</ul> 803<a id="onPositionDiscontinuity(com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,@com.google.android.exoplayer2.Player.DiscontinuityReasonint)"> 804<!-- --> 805</a> 806<ul class="blockList"> 807<li class="blockList"> 808<h4>onPositionDiscontinuity</h4> 809<pre class="methodSignature">default void onPositionDiscontinuity​(<a href="Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a> oldPosition, 810 <a href="Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a> newPosition, 811 <a href="Player.DiscontinuityReason.html" title="annotation in com.google.android.exoplayer2">@DiscontinuityReason</a> 812 @com.google.android.exoplayer2.Player.DiscontinuityReason int reason)</pre> 813<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 814<div class="block">Called when a position discontinuity occurs. 815 816 <p>A position discontinuity occurs when the playing period changes, the playback position 817 jumps within the period currently being played, or when the playing period has been skipped 818 or removed. 819 820 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 821 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 822<dl> 823<dt><span class="paramLabel">Parameters:</span></dt> 824<dd><code>oldPosition</code> - The position before the discontinuity.</dd> 825<dd><code>newPosition</code> - The position after the discontinuity.</dd> 826<dd><code>reason</code> - The <a href="Player.DiscontinuityReason.html" title="annotation in com.google.android.exoplayer2"><code>Player.DiscontinuityReason</code></a> responsible for the discontinuity.</dd> 827</dl> 828</li> 829</ul> 830<a id="onPlaybackParametersChanged(com.google.android.exoplayer2.PlaybackParameters)"> 831<!-- --> 832</a> 833<ul class="blockList"> 834<li class="blockList"> 835<h4>onPlaybackParametersChanged</h4> 836<pre class="methodSignature">default void onPlaybackParametersChanged​(<a href="PlaybackParameters.html" title="class in com.google.android.exoplayer2">PlaybackParameters</a> playbackParameters)</pre> 837<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 838<div class="block">Called when the current playback parameters change. The playback parameters may change due to 839 a call to <a href="Player.html#setPlaybackParameters(com.google.android.exoplayer2.PlaybackParameters)"><code>Player.setPlaybackParameters(PlaybackParameters)</code></a>, or the player itself may change 840 them (for example, if audio playback switches to passthrough or offload mode, where speed 841 adjustment is no longer possible). 842 843 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 844 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 845<dl> 846<dt><span class="paramLabel">Parameters:</span></dt> 847<dd><code>playbackParameters</code> - The playback parameters.</dd> 848</dl> 849</li> 850</ul> 851<a id="onSeekBackIncrementChanged(long)"> 852<!-- --> 853</a> 854<ul class="blockList"> 855<li class="blockList"> 856<h4>onSeekBackIncrementChanged</h4> 857<pre class="methodSignature">default void onSeekBackIncrementChanged​(long seekBackIncrementMs)</pre> 858<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 859<div class="block">Called when the value of <a href="Player.html#getSeekBackIncrement()"><code>Player.getSeekBackIncrement()</code></a> changes. 860 861 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 862 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 863<dl> 864<dt><span class="paramLabel">Parameters:</span></dt> 865<dd><code>seekBackIncrementMs</code> - The <a href="Player.html#seekBack()"><code>Player.seekBack()</code></a> increment, in milliseconds.</dd> 866</dl> 867</li> 868</ul> 869<a id="onSeekForwardIncrementChanged(long)"> 870<!-- --> 871</a> 872<ul class="blockList"> 873<li class="blockList"> 874<h4>onSeekForwardIncrementChanged</h4> 875<pre class="methodSignature">default void onSeekForwardIncrementChanged​(long seekForwardIncrementMs)</pre> 876<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 877<div class="block">Called when the value of <a href="Player.html#getSeekForwardIncrement()"><code>Player.getSeekForwardIncrement()</code></a> changes. 878 879 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 880 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 881<dl> 882<dt><span class="paramLabel">Parameters:</span></dt> 883<dd><code>seekForwardIncrementMs</code> - The <a href="Player.html#seekForward()"><code>Player.seekForward()</code></a> increment, in milliseconds.</dd> 884</dl> 885</li> 886</ul> 887<a id="onMaxSeekToPreviousPositionChanged(long)"> 888<!-- --> 889</a> 890<ul class="blockList"> 891<li class="blockList"> 892<h4>onMaxSeekToPreviousPositionChanged</h4> 893<pre class="methodSignature">default void onMaxSeekToPreviousPositionChanged​(long maxSeekToPreviousPositionMs)</pre> 894<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 895<div class="block">Called when the value of <a href="Player.html#getMaxSeekToPreviousPosition()"><code>Player.getMaxSeekToPreviousPosition()</code></a> changes. 896 897 <p><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"><code>onEvents(Player, Events)</code></a> will also be called to report this event along with 898 other events that happen in the same <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration.</div> 899<dl> 900<dt><span class="paramLabel">Parameters:</span></dt> 901<dd><code>maxSeekToPreviousPositionMs</code> - The maximum position for which <a href="Player.html#seekToPrevious()"><code>Player.seekToPrevious()</code></a> 902 seeks to the previous position, in milliseconds.</dd> 903</dl> 904</li> 905</ul> 906<a id="onSeekProcessed()"> 907<!-- --> 908</a> 909<ul class="blockList"> 910<li class="blockList"> 911<h4>onSeekProcessed</h4> 912<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a> 913default void onSeekProcessed()</pre> 914<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span> 915<div class="deprecationComment">Seeks are processed without delay. Listen to <a href="#onPositionDiscontinuity(com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,@com.google.android.exoplayer2.Player.DiscontinuityReasonint)"><code>onPositionDiscontinuity(PositionInfo, PositionInfo, int)</code></a> with reason <a href="Player.html#DISCONTINUITY_REASON_SEEK"><code>Player.DISCONTINUITY_REASON_SEEK</code></a> instead.</div> 916</div> 917</li> 918</ul> 919<a id="onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Events)"> 920<!-- --> 921</a> 922<ul class="blockListLast"> 923<li class="blockList"> 924<h4>onEvents</h4> 925<pre class="methodSignature">default void onEvents​(<a href="Player.html" title="interface in com.google.android.exoplayer2">Player</a> player, 926 <a href="Player.Events.html" title="class in com.google.android.exoplayer2">Player.Events</a> events)</pre> 927<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span></div> 928<div class="block">Called when one or more player states changed. 929 930 <p>State changes and events that happen within one <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration are 931 reported together and only after all individual callbacks were triggered. 932 933 <p>Only state changes represented by <a href="Player.Event.html" title="annotation in com.google.android.exoplayer2"><code>events</code></a> are reported through this method. 934 935 <p>Listeners should prefer this method over individual callbacks in the following cases: 936 937 <ul> 938 <li>They intend to trigger the same logic for multiple events (e.g. when updating a UI for 939 both <a href="#onPlaybackStateChanged(@com.google.android.exoplayer2.Player.Stateint)"><code>onPlaybackStateChanged(int)</code></a> and <a href="#onPlayWhenReadyChanged(boolean,@com.google.android.exoplayer2.Player.PlayWhenReadyChangeReasonint)"><code>onPlayWhenReadyChanged(boolean, 940 int)</code></a>). 941 <li>They need access to the <a href="Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> object to trigger further events (e.g. to call 942 <a href="Player.html#seekTo(long)"><code>Player.seekTo(long)</code></a> after a <a href="#onMediaItemTransition(com.google.android.exoplayer2.MediaItem,@com.google.android.exoplayer2.Player.MediaItemTransitionReasonint)"><code>onMediaItemTransition(MediaItem, int)</code></a>). 943 <li>They intend to use multiple state values together or in combination with <a href="Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> 944 getter methods. For example using <a href="Player.html#getCurrentMediaItemIndex()"><code>Player.getCurrentMediaItemIndex()</code></a> with the <code> 945 timeline</code> provided in <a href="#onTimelineChanged(com.google.android.exoplayer2.Timeline,@com.google.android.exoplayer2.Player.TimelineChangeReasonint)"><code>onTimelineChanged(Timeline, int)</code></a> is only safe from 946 within this method. 947 <li>They are interested in events that logically happened together (e.g <a href="#onPlaybackStateChanged(@com.google.android.exoplayer2.Player.Stateint)"><code>onPlaybackStateChanged(int)</code></a> to <a href="Player.html#STATE_BUFFERING"><code>Player.STATE_BUFFERING</code></a> because of <a href="#onMediaItemTransition(com.google.android.exoplayer2.MediaItem,@com.google.android.exoplayer2.Player.MediaItemTransitionReasonint)"><code>onMediaItemTransition(MediaItem, int)</code></a>). 948 </ul></div> 949<dl> 950<dt><span class="paramLabel">Parameters:</span></dt> 951<dd><code>player</code> - The <a href="Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> whose state changed. Use the getters to obtain the latest 952 states.</dd> 953<dd><code>events</code> - The <a href="Player.Events.html" title="class in com.google.android.exoplayer2"><code>Player.Events</code></a> that happened in this iteration, indicating which player 954 states changed.</dd> 955</dl> 956</li> 957</ul> 958</li> 959</ul> 960</section> 961</li> 962</ul> 963</div> 964</div> 965</main> 966<!-- ========= END OF CLASS DATA ========= --> 967<footer role="contentinfo"> 968<nav role="navigation"> 969<!-- ======= START OF BOTTOM NAVBAR ====== --> 970<div class="bottomNav"><a id="navbar.bottom"> 971<!-- --> 972</a> 973<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> 974<a id="navbar.bottom.firstrow"> 975<!-- --> 976</a> 977<ul class="navList" title="Navigation"> 978<li><a href="../../../../index.html">Overview</a></li> 979<li><a href="package-summary.html">Package</a></li> 980<li class="navBarCell1Rev">Class</li> 981<li><a href="package-tree.html">Tree</a></li> 982<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 983<li><a href="../../../../index-all.html">Index</a></li> 984<li><a href="../../../../help-doc.html">Help</a></li> 985</ul> 986</div> 987<div class="subNav"> 988<ul class="navList" id="allclasses_navbar_bottom"> 989<li><a href="../../../../allclasses.html">All Classes</a></li> 990</ul> 991<div> 992<script type="text/javascript"><!-- 993 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 994 if(window==top) { 995 allClassesLink.style.display = "block"; 996 } 997 else { 998 allClassesLink.style.display = "none"; 999 } 1000 //--> 1001</script> 1002<noscript> 1003<div>JavaScript is disabled on your browser.</div> 1004</noscript> 1005</div> 1006<div> 1007<ul class="subNavList"> 1008<li>Summary: </li> 1009<li>Nested | </li> 1010<li>Field | </li> 1011<li>Constr | </li> 1012<li><a href="#method.summary">Method</a></li> 1013</ul> 1014<ul class="subNavList"> 1015<li>Detail: </li> 1016<li>Field | </li> 1017<li>Constr | </li> 1018<li><a href="#method.detail">Method</a></li> 1019</ul> 1020</div> 1021<a id="skip.navbar.bottom"> 1022<!-- --> 1023</a></div> 1024<!-- ======== END OF BOTTOM NAVBAR ======= --> 1025</nav> 1026</footer> 1027</body> 1028</html> 1029