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

Fix: volume should not change on onAudioFocusChange event #1327

Merged
merged 3 commits into from
Nov 19, 2018

Conversation

ddudek
Copy link
Contributor

@ddudek ddudek commented Nov 14, 2018

Update the documentation

Not a new feature

Update the changelog

Updated.

Provide an example of how to test the change

  1. Set muted property to "true" or volume to anything other than 1.f
  2. Play the video, make the audio focus change (e.g. other notification sound playing)
    Result: volume is set to 0.8f for a while and then resets to 1.0f
    Expected: volume should set to 0.8 of current volume, and then get back to previous volume

Describe the changes

I'm saving current volume in a field, and make audio focus change listener use the current volume value instead of harcoded levels.

@ddudek ddudek changed the title Fixed volume change when audio focus change Fix: volume changes on onAudioFocusChange event Nov 14, 2018
@ddudek ddudek changed the title Fix: volume changes on onAudioFocusChange event Fix: volume should not change on onAudioFocusChange event Nov 14, 2018
@cobarx
Copy link
Contributor

cobarx commented Nov 19, 2018

Well done! Nice diagnosis and fix.

When muting, we should save the current volume and restore it when unmuting, but that can be a separate fix. Feel free to push a separate PR for that.

@cobarx cobarx merged commit 1207d45 into TheWidlarzGroup:master Nov 19, 2018
beauner69 pushed a commit to beauner69/react-native-video that referenced this pull request Oct 10, 2019
…e_focus_change

Fix: volume should not change on onAudioFocusChange event

(rebased from commit 1207d45)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants