Voice message scrubbing improvements (#1847)

- Voice messages can be scrubbed (i.e. seeked to) even when they have not been played yet..
- The progress bar is displayed also when paused.
- Multiple voice messages can keep their state when paused.
- Tries to adhere as much as possible at the detailed "green cursor" behavior in the story (but might not be 100% compliant).

Story: https://github.com/vector-im/element-meta/issues/2113
This commit is contained in:
Marco Romano 2023-11-21 20:48:08 +01:00 committed by GitHub
parent 0649cf1706
commit de646e4e5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 381 additions and 208 deletions

View file

@ -38,6 +38,7 @@ interface MediaPlayer : AutoCloseable {
uri: String,
mediaId: String,
mimeType: String,
startPositionMs: Long = 0,
): State
/**
@ -69,6 +70,10 @@ interface MediaPlayer : AutoCloseable {
* Whether the player is currently playing.
*/
val isPlaying: Boolean,
/**
* Whether the player has reached the end of the current media.
*/
val isEnded: Boolean,
/**
* The id of the media which is currently playing.
*