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

Abstracting away media player #4579

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rapterjet2004
Copy link
Contributor

@rapterjet2004 rapterjet2004 commented Jan 7, 2025

🖼️ Screenshots

Example of background play

🚧 TODO

  • Add functionality to MediaPlayerManager
  • Create Background Voice Message View
  • Rewrite ChatActivity to use MediaPlayerManager
    • play
    • stop
    • pause
    • seek
    • Bug: pausing and replaying causes the message to loop
    • Bug: On completion the message is not reset
  • Resumes playback of voice messages on screen rotation
  • Continue playing a voice message in background
    • Bug: Enter into the original conversation after lifecycle change. Seek Bar not updated.
    • Bug: After orientation change. Seek Bar not updated. Scope is canceled.
    • Add a reference to the conversation that the msg is in too. Maybe avatar or name
    • Bug: Occasionally, card shows up when played messaged is paused. Need to look into this
  • Implement Voice Message card
    • play
    • close
    • pause
    • avatar
    • animation
    • Bug: Pausing it destroys it
  • Auto play consecutive audio messages
    • prefetch audio messages
    • show fetched audio durations
    • temporarily mark as listened audio messages
    • Bug: Durations no longer count down, also they should match the playback speed
    • Bug: pausing resets the duration for some reason
  • Get playback speed controls working
    • bug: Works, but UI doesn't update ( check cycling too )
  • Bug: It crashes when playing the Voice Recording preview

🏁 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?)

@rapterjet2004 rapterjet2004 added the 2. developing Work in progress label Jan 7, 2025
@rapterjet2004 rapterjet2004 self-assigned this Jan 7, 2025
- Most code removed from ChatActivity
- Most work in MediaPlayerManager
- Added BackgroundVoiceMessageCard

Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
@rapterjet2004 rapterjet2004 force-pushed the issue-4563-abstract-away-media-player branch from 76079a6 to 034600c Compare January 29, 2025 19:09
@rapterjet2004 rapterjet2004 marked this pull request as ready for review January 29, 2025 19:09
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4579-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.

@rapterjet2004 rapterjet2004 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 30, 2025
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings104105
Errors3636

SpotBugs

CategoryBaseNew
Bad practice66
Correctness222224
Dodgy code7171
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310312

Lint increased!

SpotBugs increased!

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

Successfully merging this pull request may close these issues.

Abstract away the MediaPlayer logic in ChatActivity to MediaPlayerManager
1 participant