Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d9e0b91b
authored
Jan 14, 2021
by
christosts
Committed by
Ian Baker
Jan 15, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove deprecated Player.setAudioAttributes()
PiperOrigin-RevId: 351800287
parent
a1bb89d9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
27 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/Player.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
RELEASENOTES.md
View file @
d9e0b91b
...
@@ -8,8 +8,6 @@
...
@@ -8,8 +8,6 @@
instead.
instead.
*
`DefaultAnalyticsListener`
. Use
`AnalyticsListener`
directly
*
`DefaultAnalyticsListener`
. Use
`AnalyticsListener`
directly
instead.
instead.
*
`DefaultEventListener.onTimelineChanged(Timeline, Object)`
. Use
`Player.EventListener.onTimelineChanged(Timeline, int)`
instead.
*
`DefaultLoadControl`
constructors. Use
`DefaultLoadControl.Builder`
*
`DefaultLoadControl`
constructors. Use
`DefaultLoadControl.Builder`
instead.
instead.
*
`DrmInitData.get(UUID)`
. Use
`DrmInitData.get(int)`
and
*
`DrmInitData.get(UUID)`
. Use
`DrmInitData.get(int)`
and
...
@@ -22,6 +20,11 @@
...
@@ -22,6 +20,11 @@
`MappedTrackInfo.getUnmappedTrackGroups()`
.
`MappedTrackInfo.getUnmappedTrackGroups()`
.
*
`MappedTrackInfo.length`
- Use
`MappedTrackInfo.getRendererCount()`
*
`MappedTrackInfo.length`
- Use
`MappedTrackInfo.getRendererCount()`
instead.
instead.
*
`Player.DefaultEventListener.onTimelineChanged(Timeline, Object)`
.
Use
`Player.EventListener.onTimelineChanged(Timeline, int)`
instead.
*
`Player.setAudioAttributes(AudioAttributes)`
. Use
`Player.AudioComponent.setAudioAttributes(AudioAttributes, boolean)`
instead.
*
`PlayerView.setDefaultArtwork(Bitmap)`
. Use
*
`PlayerView.setDefaultArtwork(Bitmap)`
. Use
`PlayerView.setDefaultArtwork(Drawable)`
instead.
`PlayerView.setDefaultArtwork(Drawable)`
instead.
*
`PlayerView.setShowBuffering(boolean)`
. Use
*
`PlayerView.setShowBuffering(boolean)`
. Use
...
...
library/core/src/main/java/com/google/android/exoplayer2/Player.java
View file @
d9e0b91b
...
@@ -88,26 +88,6 @@ public interface Player {
...
@@ -88,26 +88,6 @@ public interface Player {
* default audio attributes will be used. They are suitable for general media playback.
* default audio attributes will be used. They are suitable for general media playback.
*
*
* <p>Setting the audio attributes during playback may introduce a short gap in audio output as
* <p>Setting the audio attributes during playback may introduce a short gap in audio output as
* the audio track is recreated.
*
* <p>If tunneling is enabled by the track selector, the specified audio attributes will be
* ignored, but they will take effect if audio is later played without tunneling.
*
* <p>If the device is running a build before platform API version 21, audio attributes cannot
* be set directly on the underlying audio track. In this case, the usage will be mapped onto an
* equivalent stream type using {@link Util#getStreamTypeForAudioUsage(int)}.
*
* @param audioAttributes The attributes to use for audio playback.
* @deprecated Use {@link AudioComponent#setAudioAttributes(AudioAttributes, boolean)}.
*/
@Deprecated
void
setAudioAttributes
(
AudioAttributes
audioAttributes
);
/**
* Sets the attributes for audio playback, used by the underlying audio track. If not set, the
* default audio attributes will be used. They are suitable for general media playback.
*
* <p>Setting the audio attributes during playback may introduce a short gap in audio output as
* the audio track is recreated. A new audio session id will also be generated.
* the audio track is recreated. A new audio session id will also be generated.
*
*
* <p>If tunneling is enabled by the track selector, the specified audio attributes will be
* <p>If tunneling is enabled by the track selector, the specified audio attributes will be
...
...
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
d9e0b91b
...
@@ -921,11 +921,6 @@ public class SimpleExoPlayer extends BasePlayer
...
@@ -921,11 +921,6 @@ public class SimpleExoPlayer extends BasePlayer
}
}
@Override
@Override
public
void
setAudioAttributes
(
AudioAttributes
audioAttributes
)
{
setAudioAttributes
(
audioAttributes
,
/* handleAudioFocus= */
false
);
}
@Override
public
void
setAudioAttributes
(
AudioAttributes
audioAttributes
,
boolean
handleAudioFocus
)
{
public
void
setAudioAttributes
(
AudioAttributes
audioAttributes
,
boolean
handleAudioFocus
)
{
verifyApplicationThread
();
verifyApplicationThread
();
if
(
playerReleased
)
{
if
(
playerReleased
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment