Add embed mode

2db23e4110
from postmessage_ptt branch done in a slightly nicer way
This commit is contained in:
David Baker
2022-06-28 15:08:14 +01:00
parent 5ced94755b
commit 7dc6fb27ea
4 changed files with 24 additions and 4 deletions

View File

@@ -29,9 +29,9 @@ export function RoomPage() {
const { roomId: maybeRoomId } = useParams();
const { hash, search } = useLocation();
const [viaServers] = useMemo(() => {
const [viaServers, isEmbedded] = useMemo(() => {
const params = new URLSearchParams(search);
return [params.getAll("via")];
return [params.getAll("via"), params.get("embed") !== null];
}, [search]);
const roomId = (maybeRoomId || hash || "").toLowerCase();
@@ -56,6 +56,7 @@ export function RoomPage() {
roomId={roomId}
groupCall={groupCall}
isPasswordlessUser={isPasswordlessUser}
isEmbedded={isEmbedded}
/>
)}
</GroupCallLoader>