diff --git a/packages/client/components/rtc/state.tsx b/packages/client/components/rtc/state.tsx
index 35ef7923ce..f76ca752b2 100644
--- a/packages/client/components/rtc/state.tsx
+++ b/packages/client/components/rtc/state.tsx
@@ -176,27 +176,32 @@ class Voice {
this.#setSpotlightActive(false);
this.#setVideoWatchDisabled({});
this.#setScreenshareWatch({});
+ });
- if (this.speakingPermission && !isMock)
- room.localParticipant
- .setMicrophoneEnabled(true)
- .then((track) => this.#setMicrophone(typeof track !== "undefined"));
+ if (this.speakingPermission && !isMock)
+ room.localParticipant.setMicrophoneEnabled(true).then((track) => {
+ if (this.room() === room)
+ this.#setMicrophone(typeof track !== "undefined");
+ });
- if (isMock) {
- // Instant mock connection
- setTimeout(() => {
+ if (isMock) {
+ // Instant mock connection
+ setTimeout(() => {
+ if (this.room() === room) {
this.#setState("CONNECTED");
if (this.speakingPermission) {
void room.localParticipant.setMicrophoneEnabled(true).then(() => {
- this.#setMicrophone(true);
+ if (this.room() === room) this.#setMicrophone(true);
});
}
- }, 10);
- }
- });
+ }
+ }, 10);
+ }
if (!isMock) {
room.addListener("connected", () => this.#setState("CONNECTED"));
+ room.addListener("reconnecting", () => this.#setState("RECONNECTING"));
+ room.addListener("reconnected", () => this.#setState("CONNECTED"));
room.addListener("disconnected", () => this.#setState("DISCONNECTED"));
if (!auth) {
diff --git a/packages/client/components/ui/components/features/voice/VoiceStatefulUserIcons.tsx b/packages/client/components/ui/components/features/voice/VoiceStatefulUserIcons.tsx
index 9276e161c8..b652ce36eb 100644
--- a/packages/client/components/ui/components/features/voice/VoiceStatefulUserIcons.tsx
+++ b/packages/client/components/ui/components/features/voice/VoiceStatefulUserIcons.tsx
@@ -47,7 +47,7 @@ export function VoiceStatefulUserIcons(props: {
headset_off
- camera_video
+ videocam
screen_share
diff --git a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx
index 601bbe1e37..d9e275860d 100644
--- a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx
+++ b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCard.tsx
@@ -113,8 +113,8 @@ export function VoiceCallCardContext(props: { children: JSX.Element }) {
batch(() => {
setMoving(false);
- const left = event.clientX < window.outerWidth / 2;
- const top = event.clientY < window.outerHeight / 2;
+ const left = event.clientX < window.innerWidth / 2;
+ const top = event.clientY < window.innerHeight / 2;
setState({
type: "floating",
diff --git a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActions.tsx b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActions.tsx
index 6ced7d59df..708e49e7da 100644
--- a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActions.tsx
+++ b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActions.tsx
@@ -110,7 +110,7 @@ export function VoiceCallCardActions(props: { size: "xs" | "sm" }) {
onPress={() => voice.toggleCamera()}
>
videocam_off}>
- camera_video
+ videocam
diff --git a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActiveRoom.tsx b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActiveRoom.tsx
index d4cb81b495..0f86d26888 100644
--- a/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActiveRoom.tsx
+++ b/packages/client/components/ui/components/features/voice/callCard/VoiceCallCardActiveRoom.tsx
@@ -517,13 +517,21 @@ function UserTile(props: { tileId: string; isMaximized: boolean }) {
data-spotlighted={props.isMaximized}
onDblClick={() => toggleSpotlight()}
use:floating={{
- userCard: {
- user: user().user!,
- member: user().member,
- },
- contextMenu: () => (
-
- ),
+ ...(user().user
+ ? {
+ userCard: {
+ user: user().user,
+ member: user().member,
+ },
+ contextMenu: () => (
+
+ ),
+ }
+ : {}),
}}
>