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

feat: add a focus state to audio player #5491

Merged
merged 5 commits into from
Jan 22, 2024

Conversation

reinaldonetof
Copy link
Contributor

@reinaldonetof reinaldonetof commented Jan 17, 2024

Proposed changes

I opted to use the event listener because it's easier to maintain and has more predictable side effects. I tried working with another variable in the AudioPlayer class, but changing that variable would require calling another function just to force the Audio component to render, and the maintenance and predictability of side effects were worse. I also considered using MMKV, as we are doing for the playback speed, but in the case of focus, it's not necessary to save locally the last focused audio value. If that value were still saved and the component was remounted, it would appear as if it were in focus again, which wouldn't be as pleasant for the user experience.

  • when an audio is playing then the user stop it, the rate button should stay there, allowing the user to change the rate even the audio is paused.
  • fix the size and color of activity indicator

Issue(s)

How to test or reproduce

Screenshots

Before

Screen.Recording.2024-01-17.at.19.11.24.mov

After

Screen.Recording.2024-01-17.at.18.49.45.mov

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

TC-1034

@reinaldonetof reinaldonetof self-assigned this Jan 17, 2024
@reinaldonetof reinaldonetof merged commit c265645 into develop Jan 22, 2024
3 of 8 checks passed
@reinaldonetof reinaldonetof deleted the feature.improve-ux-audio branch January 22, 2024 21:39
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.

None yet

2 participants