mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-27 00:48:06 +08:00
Merge pull request #1094 from robintown/widget-join-delay
Don't prematurely claim that we've joined the call in widget mode
This commit is contained in:
commit
1bfbb80f6d
@ -65,7 +65,7 @@ export interface UseGroupCallReturnType {
|
||||
localVideoMuted: boolean;
|
||||
error: TranslatedError | null;
|
||||
initLocalCallFeed: () => void;
|
||||
enter: () => void;
|
||||
enter: () => Promise<void>;
|
||||
leave: () => void;
|
||||
toggleLocalVideoMuted: () => void;
|
||||
toggleMicrophoneMuted: () => void;
|
||||
@ -483,7 +483,7 @@ export function useGroupCall(
|
||||
[groupCall]
|
||||
);
|
||||
|
||||
const enter = useCallback(() => {
|
||||
const enter = useCallback(async () => {
|
||||
if (
|
||||
groupCall.state !== GroupCallState.LocalCallFeedUninitialized &&
|
||||
groupCall.state !== GroupCallState.LocalCallFeedInitialized
|
||||
@ -498,7 +498,7 @@ export function useGroupCall(
|
||||
// have started tracking by the time calls start getting created.
|
||||
groupCallOTelMembership?.onJoinCall();
|
||||
|
||||
groupCall.enter().catch((error) => {
|
||||
await groupCall.enter().catch((error) => {
|
||||
console.error(error);
|
||||
updateState({ error });
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user