element-web
element-web copied to clipboard
Voice message is paused when clicking "reply" or "reply in a thread"
Steps to reproduce
- Where are you starting? What can you see? Considering two voice message (A and B).
- What do you click? Playing A and clicking "reply" or "reply in a thread" button in any message's action bar
Outcome
What did you expect?
Nothing except for the reply panel to appear on top of the composer.
What happened instead?
Message A is paused, message B start (due to playback queue behavior) and the reply panel appear
Additional context
This does not happen when there is only one voice message (so no queue). The others buttons in the action bar have no effect.
Operating system
Windows
Application version
Element version: 1.11.0 Olm version: 3.2.8
How did you install the app?
https://element.io/get-started
Homeserver
custom
Will you send logs?
No
I cannot reproduce. Can you reproduce on the latest version of Element?
Hi, thank you for looking into this @SimonBrandner.
I was able to reproduce on Element version: 1.11.0 Olm version: 3.2.8.
https://user-images.githubusercontent.com/107760093/180772360-bf559f91-9834-4092-ae92-fcf74290d8dc.mp4
This video has been taken on https://develop.element.io, the "test" message seems to be necessary, else I cannot reproduce. PS: this video has no sound.
Ah, can repro now - this does not happen if the user who sent the message is also trying to repro the bug
This is caused by the construction of AudioPlayerBase
when rendering the reply-tile above the composer or the event-tile in the thread timeline. AudioPlayerBase
's constructor()
calls Playback::prepare()
which then emits PlaybackState.Stopped
.
Apparently, emitting PlaybackState.Stopped
is necessary though I am lacking the knowledge of this area of the codebase to know why exactly. @turt2live, is there are any chance you could provide some info on how to resolve this?
It seems to me it is necessary as there is a new component using this playback, it create a new "instance" and this one need to be stopped for not having both instances of this playback playing. The behavior described above also occurs when sending the message which reply to a voice message (new "instance" for the reply Tile" ?).
new "instance" for the reply Tile" ?
Yes
https://github.com/matrix-org/matrix-react-sdk/pull/9069 partially fixes this issue as it excludes vm in reply of the playback system.
Cannot reproduce anymore. Closing this issue
https://user-images.githubusercontent.com/769871/207009105-10332eb9-1928-4d73-843f-e1ecbc1c0658.mov
Hi @gsouquet, thank you for looking into this and sorry for the delay. I'm still able to reproduce. The voice message is paused when it is played and is part of a playback queue and already in the timeline. Here you are recording it, which is why you cannot reproduce it.