Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleExoPlayer: Cannot disable audio focus handling after enabling it #5055

Closed
ojw28 opened this issue Nov 5, 2018 · 1 comment
Closed
Assignees
Labels

Comments

@ojw28
Copy link
Contributor

ojw28 commented Nov 5, 2018

I think there's a problem with the way this returns without doing anything:

https://github.com/google/ExoPlayer/blob/release-v2/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioFocusManager.java#L145

It probably needs to reset some state, and abandon audio focus if it was previously held. I actually wonder whether just deleting this if (null) { return } will result in the right thing happening? @nic0lette - Could you take a look? Thanks!

@ojw28 ojw28 added the bug label Nov 5, 2018
ojw28 pushed a commit that referenced this issue Nov 7, 2018
This fixes an issue where disabling audio focus handling
while audio focus is held would not release audio focus.

A new test was added for this situation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220316866
ojw28 pushed a commit that referenced this issue Nov 7, 2018
This fixes an issue where disabling audio focus handling
while audio focus is held would not release audio focus.

A new test was added for this situation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220316866
@ojw28 ojw28 closed this as completed Nov 7, 2018
@ojw28
Copy link
Contributor Author

ojw28 commented Nov 7, 2018

This will be fixed in 2.9.1.

Khang-NT added a commit to Khang-NT/ExoPlayer that referenced this issue Nov 12, 2018
* commit 'b5beb32618ac99adc58b537031a6f7c3dd761b9a': (61 commits)
  Fix audio focus
  Fix BasePlayer.next()
  Make BasePlayer.get[Next/Previous]WindowIndex more useful
  Make TimelineQueueNavigator shuffle aware
  Add missing update on repeat toggle mode change
  Fix for google#5055 - Cannot disable audio focus after enabled.
  Remove executable bit from some resources
  Work around non-empty EoS buffers with timestamp 0
  Document error case for generateAudioSessionIdV21
  Tweak dev guide / readme
  Add support for .cmf* extension in DefaultHlsExtractorFactory
  Update the DefaultExtractorInput's peek buffer length on each write
  Double the buffer duration for AC3
  Remove methods now in BasePlayer
  Add constructor for adding payload reader factory flags
  Bump version to 2.9.1
  Fix extended service number calculation
  Add convenience methods player.next() and player.previous()
  Add BasePlayer to avoid code duplication for common convenience methods.
  Fix release notes typo
  ...

# Conflicts:
#	extensions/cast/build.gradle
#	extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java
@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants