Fix joining calls with no media permission

You can still try to unmute your media in the preview screen and
the button will show unmuted, but then mute again once you actually
join, so not 100% perfect but better.

Fixes https://github.com/vector-im/element-call/issues/1907
Fixes https://github.com/vector-im/element-call/issues/1661
This commit is contained in:
David Baker
2023-11-20 18:49:08 +00:00
parent 85250e6ea3
commit 861d8ec016
3 changed files with 39 additions and 21 deletions

View File

@@ -82,6 +82,8 @@ export const VideoPreview: FC<Props> = ({
},
(error) => {
logger.error("Error while creating preview Tracks:", error);
muteStates.audio.setEnabled?.(false);
muteStates.video.setEnabled?.(false);
},
);
const videoTrack = useMemo(