Add support for playing a sound when the user exits a call. #2860
+70
−26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.