media3/docs/doc/reference/com/google/android/exoplayer2/ExoPlayer.DeviceComponent.html
olly 936fa7cc15 Update Javadoc for 2.14.0
#minor-release

PiperOrigin-RevId: 373351935
2021-05-17 16:37:39 +01:00

419 lines
16 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>ExoPlayer.DeviceComponent (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ExoPlayer.DeviceComponent (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var data = {"i0":38,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":38,"i7":6,"i8":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2</a></div>
<h2 title="Interface ExoPlayer.DeviceComponent" class="title">Interface ExoPlayer.DeviceComponent</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="SimpleExoPlayer.html" title="class in com.google.android.exoplayer2">SimpleExoPlayer</a></code></dd>
</dl>
<dl>
<dt>Enclosing interface:</dt>
<dd><a href="ExoPlayer.html" title="interface in com.google.android.exoplayer2">ExoPlayer</a></dd>
</dl>
<hr>
<pre>public static interface <span class="typeNameLabel">ExoPlayer.DeviceComponent</span></pre>
<div class="block">The device component of an <a href="ExoPlayer.html" title="interface in com.google.android.exoplayer2"><code>ExoPlayer</code></a>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDeviceListener(com.google.android.exoplayer2.device.DeviceListener)">addDeviceListener</a></span>&#8203;(<a href="device/DeviceListener.html" title="interface in com.google.android.exoplayer2.device">DeviceListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="Player.html#addListener(com.google.android.exoplayer2.Player.Listener)"><code>Player.addListener(Listener)</code></a>.</div>
</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decreaseDeviceVolume()">decreaseDeviceVolume</a></span>()</code></th>
<td class="colLast">
<div class="block">Decreases the volume of the device.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="device/DeviceInfo.html" title="class in com.google.android.exoplayer2.device">DeviceInfo</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDeviceInfo()">getDeviceInfo</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the device information.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDeviceVolume()">getDeviceVolume</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the current volume of the device.</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="#increaseDeviceVolume()">increaseDeviceVolume</a></span>()</code></th>
<td class="colLast">
<div class="block">Increases the volume of the device.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDeviceMuted()">isDeviceMuted</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets whether the device is muted or not.</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="#removeDeviceListener(com.google.android.exoplayer2.device.DeviceListener)">removeDeviceListener</a></span>&#8203;(<a href="device/DeviceListener.html" title="interface in com.google.android.exoplayer2.device">DeviceListener</a>&nbsp;listener)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="Player.html#removeListener(com.google.android.exoplayer2.Player.Listener)"><code>Player.removeListener(Listener)</code></a>.</div>
</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDeviceMuted(boolean)">setDeviceMuted</a></span>&#8203;(boolean&nbsp;muted)</code></th>
<td class="colLast">
<div class="block">Sets the mute state of the device.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDeviceVolume(int)">setDeviceVolume</a></span>&#8203;(int&nbsp;volume)</code></th>
<td class="colLast">
<div class="block">Sets the volume of the device.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="addDeviceListener(com.google.android.exoplayer2.device.DeviceListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDeviceListener</h4>
<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>
void&nbsp;addDeviceListener&#8203;(<a href="device/DeviceListener.html" title="interface in com.google.android.exoplayer2.device">DeviceListener</a>&nbsp;listener)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="Player.html#addListener(com.google.android.exoplayer2.Player.Listener)"><code>Player.addListener(Listener)</code></a>.</div>
</div>
<div class="block">Adds a listener to receive device events.</div>
</li>
</ul>
<a id="removeDeviceListener(com.google.android.exoplayer2.device.DeviceListener)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeDeviceListener</h4>
<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>
void&nbsp;removeDeviceListener&#8203;(<a href="device/DeviceListener.html" title="interface in com.google.android.exoplayer2.device">DeviceListener</a>&nbsp;listener)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="Player.html#removeListener(com.google.android.exoplayer2.Player.Listener)"><code>Player.removeListener(Listener)</code></a>.</div>
</div>
<div class="block">Removes a listener of device events.</div>
</li>
</ul>
<a id="getDeviceInfo()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeviceInfo</h4>
<pre class="methodSignature"><a href="device/DeviceInfo.html" title="class in com.google.android.exoplayer2.device">DeviceInfo</a>&nbsp;getDeviceInfo()</pre>
<div class="block">Gets the device information.</div>
</li>
</ul>
<a id="getDeviceVolume()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeviceVolume</h4>
<pre class="methodSignature">int&nbsp;getDeviceVolume()</pre>
<div class="block">Gets the current volume of the device.
<p>For devices with <a href="device/DeviceInfo.html#PLAYBACK_TYPE_LOCAL"><code>local playback</code></a>, the volume
returned by this method varies according to the current <a href="C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>stream type</code></a>. The
stream type is determined by <a href="audio/AudioAttributes.html#usage"><code>AudioAttributes.usage</code></a> which can be converted to stream
type with <a href="util/Util.html#getStreamTypeForAudioUsage(int)"><code>Util.getStreamTypeForAudioUsage(int)</code></a>.
<p>For devices with <a href="device/DeviceInfo.html#PLAYBACK_TYPE_REMOTE"><code>remote playback</code></a>, the volume of
the remote device is returned.</div>
</li>
</ul>
<a id="isDeviceMuted()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDeviceMuted</h4>
<pre class="methodSignature">boolean&nbsp;isDeviceMuted()</pre>
<div class="block">Gets whether the device is muted or not.</div>
</li>
</ul>
<a id="setDeviceVolume(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDeviceVolume</h4>
<pre class="methodSignature">void&nbsp;setDeviceVolume&#8203;(int&nbsp;volume)</pre>
<div class="block">Sets the volume of the device.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>volume</code> - The volume to set.</dd>
</dl>
</li>
</ul>
<a id="increaseDeviceVolume()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>increaseDeviceVolume</h4>
<pre class="methodSignature">void&nbsp;increaseDeviceVolume()</pre>
<div class="block">Increases the volume of the device.</div>
</li>
</ul>
<a id="decreaseDeviceVolume()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decreaseDeviceVolume</h4>
<pre class="methodSignature">void&nbsp;decreaseDeviceVolume()</pre>
<div class="block">Decreases the volume of the device.</div>
</li>
</ul>
<a id="setDeviceMuted(boolean)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setDeviceMuted</h4>
<pre class="methodSignature">void&nbsp;setDeviceMuted&#8203;(boolean&nbsp;muted)</pre>
<div class="block">Sets the mute state of the device.</div>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>