-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Waveform SeekBar for Voice Messages #3202
Conversation
f867e79
to
94ced56
Compare
94ced56
to
bd157eb
Compare
Currently, to process a voice message takes a non-trivial time of about 1-5 seconds, at least in my emulator. I didn't test it with large audio files, nor on a physical device, but I assume it might take some time. To work around this, I have a time limit of 5 seconds, else canceling the process and just showing a regular SeekBar. |
bd157eb
to
851b5b7
Compare
|
||
companion object { | ||
private val TAG: String? = WaveformSeekBar::class.simpleName | ||
private const val DEFAULT_BAR_WIDTH: Int = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change this to 2, we get many more "bars"? I would prefer to have much more, on your video it looks like we have 20 bars while the telegram screenshot is around 50 or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest slightly wider and also higher -comparing it to the seekbar's "nob" if that is doable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1cd1e4d
to
d556dd1
Compare
5e09eae
to
9e32c1f
Compare
@rapterjet2004 can you
|
@AndyScherzinger
|
@rapterjet2004 looks good 👍 Nice polishing. I tend to say let's put the voice message time below the bar at the end so it finds its place between the bar and the message timestamp. Having it next to the message timestamp kind of links it to it while it is related to the voice message. Then I think we are good to go. Might need to optimize the colors in the future to ensure the contrast is high enough between the 2 bar colors. |
f2bb3b0
to
e595e64
Compare
@AndyScherzinger |
e595e64
to
44130a7
Compare
- Created AudioUtils for processing audio messages - Created Waveform Seekbar, for visualizing a FloatArray - Time limit of about 5 seconds, else shows regular seekbar - Also made mediaPlayer smoother - Fixed time discontinuity bug when playing voice messages, but only on API 28 or higher Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
44130a7
to
2430f72
Compare
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3202-talk.apk |
Merged to not keep it open for longer, since it works fine 👍 Really nice work! 🎉 @rapterjet2004 could you maybe do some additional polishing:
|
Hello there, 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! |
Signed-off-by: Julius Linus julius.linus@nextcloud.com
All the other messenger apps have a custom component when viewing voice messages. It creatively represents the message's audio data in the form of an audio sampling graph.
Here are some examples:
Telegram
Whatsapp
This PR introduces two new files
🖼️ Screenshots
Current demo
waveform-seekbar-demo-5.webm
🚧 TODO
🏁 Checklist
/backport to stable-xx.x