Bug in "Inline-Media" Feature: Audio Playback Issue in Chat Interface
pedrolucasfv opened this issue · 2 comments
Issue Description
I've encountered a bug in the "inline-media" feature of the Twilio Flex template. The issue arises when playing audio messages in the chat interface.
Steps to Reproduce
- Send an audio message and play it.
- Continue the chat by sending several text messages until the first audio message is no longer visible on the screen.
- Send another audio message and attempt to play it.
- The new audio does not play immediately. Instead, the chat interface seems to retain focus on the first audio message, despite it being out of view.
- Repeated attempts to play the new audio message are required. The playback only starts when the chat interface's focus reaches the new audio message.
Expected Behavior
When a new audio message is sent and played, it should play immediately without the need to repeatedly press play or wait for the chat interface to focus on the new message.
Actual Behavior
The new audio message does not play immediately. The chat interface retains focus on a previous, now out-of-view audio message, requiring multiple attempts to initiate playback of the new message.
Additional Information
- This issue has been observed in the latest version of the Twilio Flex template with the "inline-media" feature.
- It affects the user experience, particularly in active chat sessions with frequent audio message exchanges.
I hope this information helps in diagnosing and resolving the issue. Thank you for your attention to this matter.
Hi @pedrolucasfv, thanks for the report!
I believe this may be a bug in Flex UI itself, but I have been testing a workaround that seems to prevent the issue. Please see this commit with the workaround. I would be interested to hear if this works well for you too!
Great! the bug has been resolved.
I think it's a Flex UI bug too, because I use a custom plugin with similar functionality to "inline-media" that has this bug, but the bug only occurs in versions greater than 2.0.0.beta-3