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

Allow to seek a voice message before playing it #1780

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

julioromano
Copy link

Previously the only way to start interacting with a voice message was to play it. This change makes it possible to start interacting also with a seek.

@julioromano julioromano self-assigned this Nov 9, 2023
Copy link
Contributor

github-actions bot commented Nov 9, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/1WcgH1

@julioromano julioromano force-pushed the julioromano/vmp_seek_before_play_PHASE2 branch 2 times, most recently from a2dda13 to 6c5b9b2 Compare November 9, 2023 14:31
@julioromano julioromano marked this pull request as ready for review November 9, 2023 14:33
@julioromano julioromano requested a review from a team as a code owner November 9, 2023 14:33
@julioromano julioromano requested review from bmarty and jonnyandrew and removed request for a team and bmarty November 9, 2023 14:33
Base automatically changed from julioromano/vmp_seek_before_play to develop November 9, 2023 14:34
@julioromano julioromano force-pushed the julioromano/vmp_seek_before_play_PHASE2 branch from 6c5b9b2 to d9e0ca5 Compare November 9, 2023 14:44
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2c25e69) 63.34% compared to head (d97bc3c) 63.34%.
Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1780   +/-   ##
========================================
  Coverage    63.34%   63.34%           
========================================
  Files         1290     1290           
  Lines        33502    33505    +3     
  Branches      6962     6962           
========================================
+ Hits         21221    21224    +3     
  Misses        9107     9107           
  Partials      3174     3174           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jonnyandrew jonnyandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good!

Just a few issues I noticed while testing which may or may not be related to the changes:

  • The progress bar flickers down on first seeking. This video shows it but you may need to play it frame by frame to see:
Screencast.from.10-11-23.11.32.21.webm
  • After clearing the app cache to test, I couldn't play any voice messages:
Screencast.from.10-11-23.11.40.57.webm

@julioromano julioromano force-pushed the julioromano/vmp_seek_before_play_PHASE2 branch from d9e0ca5 to 1682b0b Compare November 10, 2023 12:47
@julioromano
Copy link
Author

  • After clearing the app cache to test, I couldn't play any voice messages:

Could you please double check this after the latest rebase? I've just cleared the cache dir twice and this didn't happen.

@jonnyandrew
Copy link
Contributor

jonnyandrew commented Nov 10, 2023

I just tested and can still reproduce at 1682b0b but actually, I can also repro on develop so I don't think it should block this PR.

I raised a separate bug about it with steps to reproduce: #1788

@julioromano
Copy link
Author

I just tested and can still reproduce at 1682b0b but actually, I can also repro on develop so I don't think it should block this PR.

I raised a separate bug about it with steps to reproduce: #1788

After seeing exactly what you do in the video I can reproduce.

@julioromano
Copy link
Author

  • The progress bar flickers down on first seeking. This video shows it but you may need to play it frame by frame to see:

This is because the call to VoiceMessagePlayer.seekTo() is suspend due to MediaPlayer.setMedia() being suspend in turn.
We must wait for the media player to be ready before we can call seek on it so that it actually updates the player progress.
In the time until the player is ready the progress will still show 0 hence the flicker.
If you insert an artificial delay in the first line of MediaPlayer.setMedia() you can see this glitch even more prominently.

@julioromano julioromano force-pushed the julioromano/vmp_seek_before_play_PHASE2 branch from 1682b0b to 5bc61e3 Compare November 13, 2023 15:00
@julioromano
Copy link
Author

@jonnyandrew waiting to merge this because I'd like #1795 to land before it.

Previously the only way to start interacting with a voice message was to play it.
This change makes it possible to start interacting also with a seek.
@julioromano julioromano force-pushed the julioromano/vmp_seek_before_play_PHASE2 branch from 5bc61e3 to d97bc3c Compare November 14, 2023 14:33
@julioromano julioromano enabled auto-merge (squash) November 14, 2023 14:34
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@julioromano julioromano disabled auto-merge November 14, 2023 15:22
@jmartinesp jmartinesp merged commit 96e4106 into develop Nov 14, 2023
14 checks passed
@jmartinesp jmartinesp deleted the julioromano/vmp_seek_before_play_PHASE2 branch November 14, 2023 15:23
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.

3 participants