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

Handle audio focus and becoming noisy #3535

Merged
merged 2 commits into from
Feb 7, 2024
Merged

Handle audio focus and becoming noisy #3535

merged 2 commits into from
Feb 7, 2024

Conversation

parneet-guraya
Copy link
Contributor

@parneet-guraya parneet-guraya commented Dec 20, 2023

  • Handle Audio focus
  • Handle Audio becoming noisy

Handle audio focus -->

The player will handle the audio focus shifts. Basically It would:

  • Pause the already playing media when this player is started.
  • Or If some other media starts this player would pause itself.
    This would avoid two media's playing at the same time.
Record_2023-12-20-19-36-32.mp4
Record_2024-01-05-15-02-51.mp4

Handle audio becoming noisy -->

When a headset is unplugged or a Bluetooth device disconnected, the audio stream automatically reroutes to the built-in speaker. If you listen to music at a high volume, this can be a noisy surprise.

Users usually expect apps that include a music player with onscreen playback controls to pause playback in this case. Other apps, like games that don't include controls, should keep playing. The user can adjust the volume with the device's hardware controls.

See More

Record_2023-12-20-19-41-49.mp4

You can see here after turning of bluetooth the playback pauses.

Record_2024-01-05-15-14-52.mp4

Here after removing earphones playback pauses.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@parneet-guraya parneet-guraya marked this pull request as ready for review January 5, 2024 10:07
@parneet-guraya parneet-guraya added the 3. to review Waiting for reviews label Jan 5, 2024
@mahibi mahibi force-pushed the handle-audio-focus branch from 28e9ac8 to d65103f Compare February 7, 2024 08:37
@mahibi
Copy link
Collaborator

mahibi commented Feb 7, 2024

tested and works.
great improvements @parneet-guraya 👍 👍

@mahibi mahibi enabled auto-merge February 7, 2024 08:39
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
Copy link
Contributor

github-actions bot commented Feb 7, 2024

Codacy

Lint

TypemasterPR
Warnings8080
Errors88

SpotBugs

CategoryBaseNew
Bad practice66
Correctness88
Dodgy code112112
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total139139

Copy link
Contributor

github-actions bot commented Feb 7, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3535-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@mahibi mahibi merged commit ffdb932 into master Feb 7, 2024
15 of 16 checks passed
@mahibi mahibi deleted the handle-audio-focus branch February 7, 2024 12:02
@mahibi mahibi added this to the 18.1.0 milestone Feb 7, 2024
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants