element-web icon indicating copy to clipboard operation
element-web copied to clipboard

Voice message is paused when clicking "reply" or "reply in a thread"

Open grimhilt opened this issue 2 years ago • 7 comments

Steps to reproduce

  1. Where are you starting? What can you see? Considering two voice message (A and B).
  2. 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

grimhilt avatar Jul 21 '22 16:07 grimhilt

I cannot reproduce. Can you reproduce on the latest version of Element?

SimonBrandner avatar Jul 25 '22 07:07 SimonBrandner

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.

grimhilt avatar Jul 25 '22 11:07 grimhilt

Ah, can repro now - this does not happen if the user who sent the message is also trying to repro the bug

SimonBrandner avatar Jul 25 '22 13:07 SimonBrandner

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?

SimonBrandner avatar Jul 25 '22 13:07 SimonBrandner

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" ?).

grimhilt avatar Jul 30 '22 22:07 grimhilt

new "instance" for the reply Tile" ?

Yes

SimonBrandner avatar Jul 31 '22 05:07 SimonBrandner

https://github.com/matrix-org/matrix-react-sdk/pull/9069 partially fixes this issue as it excludes vm in reply of the playback system.

grimhilt avatar Aug 05 '22 15:08 grimhilt

Cannot reproduce anymore. Closing this issue

https://user-images.githubusercontent.com/769871/207009105-10332eb9-1928-4d73-843f-e1ecbc1c0658.mov

germain-gg avatar Dec 12 '22 09:12 germain-gg

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.

grimhilt avatar Jan 04 '23 19:01 grimhilt