Fix active speaker and speaking

This commit is contained in:
Robert Long
2021-09-10 16:05:57 -07:00
parent d813509541
commit 01d2a7136c
3 changed files with 15 additions and 17 deletions

View File

@@ -167,6 +167,10 @@ export function EnteringRoomView() {
}
export function LoadingErrorView({ error }) {
useEffect(() => {
console.error(error);
}, [error]);
return (
<>
<div className={styles.centerMessage}>
@@ -190,7 +194,6 @@ function RoomSetupView({
localVideoMuted,
toggleLocalVideoMuted,
toggleMicrophoneMuted,
groupCall,
}) {
const videoRef = useRef();
const [permissionState, setPermissionState] = useState(
@@ -206,7 +209,9 @@ function RoomSetupView({
setPermissionState(PermissionState.Granted);
}
})
.catch(() => {
.catch((error) => {
console.error(error);
if (videoRef.current) {
setPermissionState(PermissionState.Denied);
}