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

Add support for playing a sound when the user exits a call. #2860

Draft
wants to merge 1 commit into
base: livekit
Choose a base branch
from

Conversation

Half-Shot
Copy link
Member

Implementation for #343 (comment)

This is the trickiest thing to get right by far. We can't use the view model as we do for the other sounds since the act of hanging up will kill that off first. The next problem is we have many states that can occur from hanging up depending on what mode the application is in:

  • For SPA mode, this is a trivial case of adding an audio element to the end call screen.
  • For video rooms / group call rooms where we surface the lobby screen, we can just play a sound when we reach that screen.
  • For 1:1 calls where the widget closes when we hangup...we have a problem. We need to keep the widget alive long enough to play the sound but without making it hang around and feel unresponsive.

One option here is that for call leaves only, we make this the client's problem. The problem with this is we'd need to provide those audio files up to Element Web / EX etc, which is a nightmare if we decide to change the sound at any point. Supposedly we could make them part of compound, but that's a whole new design thing to consider.

So, this PR does the first two trivial things and currently holds the window open for 1:1s. We could also decide that 1:1s can be different as it's more obvious you've hung up when the widget goes away, as oppose to the SPA/group call use case.

@fkwp
Copy link
Contributor

fkwp commented Dec 3, 2024

It seems that the playout device for the join/leave sounds is the OS default device rather than the configured audio device from the settings.

@Half-Shot
Copy link
Member Author

It seems that the playout device for the join/leave sounds is the OS default device rather than the configured audio device from the settings.

#2863 will fix this.

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.

2 participants