mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 09:31:17 -08:00
fix(call): show your own avatar on the local tile
The local tile rendered a generic person icon while remote tiles resolved a Matrix profile, so with the camera off your own tile was the only one without an avatar. The profile hook already resolves the local user from its isLocal argument whatever identity the SFU handed us.
This commit is contained in:
3 files changed
+9
-4
No files matched your search
Generated
+1
-1
@@ -6721,7 +6721,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-livekit-mobile"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/SableClient/tauri-plugin-livekit-mobile.git?rev=993518e5eb9427af3ddaf5b91db78effe59c452e#993518e5eb9427af3ddaf5b91db78effe59c452e"
|
||||
source = "git+https://github.com/SableClient/tauri-plugin-livekit-mobile.git?rev=b936c9ca87b2b845e4cfff8cd846028e45005d95#b936c9ca87b2b845e4cfff8cd846028e45005d95"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"serde",
|
||||
|
||||
@@ -124,7 +124,7 @@ tauri-plugin-notifications = { git = "https://github.com/SableClient/tauri-plugi
|
||||
] }
|
||||
tauri-plugin-edge-to-edge = { git = "https://github.com/SableClient/tauri-plugin-edge-to-edge.git", rev = "33c6116c27be28c06df5a9d02231ecc5fdeb93c5" }
|
||||
tauri-plugin-sharekit = { git = "https://github.com/Choochmeque/tauri-plugin-sharekit", rev = "9f2b4c5d8a4f0ab910d900ba234ed8bae0ab854b" }
|
||||
tauri-plugin-livekit-mobile = { git = "https://github.com/SableClient/tauri-plugin-livekit-mobile.git", rev = "993518e5eb9427af3ddaf5b91db78effe59c452e" }
|
||||
tauri-plugin-livekit-mobile = { git = "https://github.com/SableClient/tauri-plugin-livekit-mobile.git", rev = "b936c9ca87b2b845e4cfff8cd846028e45005d95" }
|
||||
|
||||
[target.'cfg(target_os = "ios")'.dependencies]
|
||||
objc2 = "0.6"
|
||||
|
||||
@@ -299,23 +299,27 @@ function useNativeLocalVideoOverlay(
|
||||
|
||||
function LocalTile({
|
||||
session,
|
||||
userIdByIdentity,
|
||||
slotRef,
|
||||
fixed,
|
||||
}: {
|
||||
session: NativeCallSession;
|
||||
userIdByIdentity: UserIdByRtcIdentity;
|
||||
slotRef?: (node: HTMLDivElement | null) => void;
|
||||
fixed?: boolean;
|
||||
}) {
|
||||
const profile = useCallParticipantProfile('', true, userIdByIdentity);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={fixed ? `${css.Tile} ${css.TileFixed}` : css.Tile}
|
||||
data-video-bound={session.cameraEnabled || undefined}
|
||||
>
|
||||
{/* When the camera is on, the native local preview renders over this
|
||||
slot; the user icon stays mounted underneath as the placeholder. */}
|
||||
slot; the avatar stays mounted underneath as the placeholder. */}
|
||||
<div className={css.TileSlot} ref={slotRef}>
|
||||
<div className={css.InitialsBadge} aria-hidden>
|
||||
{sizedIcon(User, '400')}
|
||||
<CallParticipantAvatar profile={profile} size="100%" />
|
||||
</div>
|
||||
</div>
|
||||
<div className={css.TileLabel}>
|
||||
@@ -679,6 +683,7 @@ export function NativeCallSurface({ session, onHangup }: NativeCallSurfaceProps)
|
||||
})}
|
||||
<LocalTile
|
||||
session={session}
|
||||
userIdByIdentity={userIdByIdentity}
|
||||
slotRef={connected && session.cameraEnabled ? setLocalSlotNode : undefined}
|
||||
fixed={compactGrid}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user