diff --git a/src/tile/GridTile.tsx b/src/tile/GridTile.tsx index 27695b656..15f7c2954 100644 --- a/src/tile/GridTile.tsx +++ b/src/tile/GridTile.tsx @@ -175,6 +175,7 @@ const UserMediaTile = forwardRef( raisedHandTime={handRaised} currentReaction={currentReaction} raisedHandOnClick={raisedHandOnClick} + localParticipant={vm.local} {...props} /> ); diff --git a/src/tile/MediaView.test.tsx b/src/tile/MediaView.test.tsx index b5d7a6713..fea4303f9 100644 --- a/src/tile/MediaView.test.tsx +++ b/src/tile/MediaView.test.tsx @@ -42,6 +42,7 @@ describe("MediaView", () => { unencryptedWarning: false, video: trackReference, member: undefined, + localParticipant: false, }; test("is accessible", async () => { @@ -60,8 +61,19 @@ describe("MediaView", () => { }); describe("with no participant", () => { - it("shows avatar", () => { - render(); + it("shows avatar for local user", () => { + render( + , + ); + expect(screen.getByRole("img", { name: "some name" })).toBeVisible(); + expect(screen.queryAllByText("video_tile.waiting_for_media").length).toBe( + 0, + ); + }); + it("shows avatar and label for remote user", () => { + render( + , + ); expect(screen.getByRole("img", { name: "some name" })).toBeVisible(); expect(screen.getByText("video_tile.waiting_for_media")).toBeVisible(); }); diff --git a/src/tile/MediaView.tsx b/src/tile/MediaView.tsx index 51da4d226..48871abdf 100644 --- a/src/tile/MediaView.tsx +++ b/src/tile/MediaView.tsx @@ -41,6 +41,7 @@ interface Props extends ComponentProps { raisedHandTime?: Date; currentReaction?: ReactionOption; raisedHandOnClick?: () => void; + localParticipant: boolean; } export const MediaView = forwardRef( @@ -63,6 +64,7 @@ export const MediaView = forwardRef( raisedHandTime, currentReaction, raisedHandOnClick, + localParticipant, ...props }, ref, @@ -118,7 +120,7 @@ export const MediaView = forwardRef( /> )} - {!video && ( + {!video && !localParticipant && (
{t("video_tile.waiting_for_media")}
diff --git a/src/tile/SpotlightTile.tsx b/src/tile/SpotlightTile.tsx index 33661c603..7f701dede 100644 --- a/src/tile/SpotlightTile.tsx +++ b/src/tile/SpotlightTile.tsx @@ -55,6 +55,7 @@ interface SpotlightItemBaseProps { encryptionStatus: EncryptionStatus; displayName: string; "aria-hidden"?: boolean; + localParticipant: boolean; } interface SpotlightUserMediaItemBaseProps extends SpotlightItemBaseProps { @@ -163,6 +164,7 @@ const SpotlightItem = forwardRef( displayName, encryptionStatus, "aria-hidden": ariaHidden, + localParticipant: vm.local, }; return vm instanceof ScreenShareViewModel ? (