Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26cf1204b5 |
@@ -6,12 +6,13 @@ import {
|
|||||||
useCallJoined,
|
useCallJoined,
|
||||||
useCallEmbedPlacementSync,
|
useCallEmbedPlacementSync,
|
||||||
useCallLoadError,
|
useCallLoadError,
|
||||||
|
useCallStart,
|
||||||
} from '../../hooks/useCallEmbed';
|
} from '../../hooks/useCallEmbed';
|
||||||
import { callEmbedAtom } from '../../state/callEmbed';
|
import { callEmbedAtom } from '../../state/callEmbed';
|
||||||
import { ContainerColor } from '../../styles/ContainerColor.css';
|
import { ContainerColor } from '../../styles/ContainerColor.css';
|
||||||
import { PrescreenControls } from './PrescreenControls';
|
import { PrescreenControls } from './PrescreenControls';
|
||||||
import { usePowerLevelsContext } from '../../hooks/usePowerLevels';
|
import { usePowerLevelsContext } from '../../hooks/usePowerLevels';
|
||||||
import { useRoom } from '../../hooks/useRoom';
|
import { useIsDirectRoom, useRoom } from '../../hooks/useRoom';
|
||||||
import { useRoomCreators } from '../../hooks/useRoomCreators';
|
import { useRoomCreators } from '../../hooks/useRoomCreators';
|
||||||
import { useRoomPermissions } from '../../hooks/useRoomPermissions';
|
import { useRoomPermissions } from '../../hooks/useRoomPermissions';
|
||||||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||||
@@ -160,6 +161,16 @@ function CallLoadErrorMessage() {
|
|||||||
// prescreen, where they can choose to join again.
|
// prescreen, where they can choose to join again.
|
||||||
const dismiss = () => setCallEmbed(undefined);
|
const dismiss = () => setCallEmbed(undefined);
|
||||||
|
|
||||||
|
// [Gitea #301] Try again: start a fresh embed for the same room with the
|
||||||
|
// same mic/camera/sound choices (starting one disposes the hung one).
|
||||||
|
const callEmbed = useCallEmbed();
|
||||||
|
const startCall = useCallStart(useIsDirectRoom());
|
||||||
|
const retry = () => {
|
||||||
|
if (!callEmbed) return;
|
||||||
|
const { room, control } = callEmbed;
|
||||||
|
startCall(room, { microphone: control.microphone, video: control.video, sound: control.sound });
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className={css.CallViewContent}
|
className={css.CallViewContent}
|
||||||
@@ -173,6 +184,9 @@ function CallLoadErrorMessage() {
|
|||||||
The call failed to load. Check your connection and try again.
|
The call failed to load. Check your connection and try again.
|
||||||
</Text>
|
</Text>
|
||||||
<Box gap="200" alignItems="Center">
|
<Box gap="200" alignItems="Center">
|
||||||
|
<Button variant="Primary" size="300" radii="400" onClick={retry} disabled={!callEmbed}>
|
||||||
|
<Text size="B400">Try again</Text>
|
||||||
|
</Button>
|
||||||
<Button variant="Secondary" fill="Soft" size="300" radii="400" onClick={dismiss}>
|
<Button variant="Secondary" fill="Soft" size="300" radii="400" onClick={dismiss}>
|
||||||
<Text size="B400">Back</Text>
|
<Text size="B400">Back</Text>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user