diff --git a/src/room/GroupCallLoader.jsx b/src/room/GroupCallLoader.jsx index dd327f9..f074128 100644 --- a/src/room/GroupCallLoader.jsx +++ b/src/room/GroupCallLoader.jsx @@ -19,12 +19,19 @@ import { useLoadGroupCall } from "./useLoadGroupCall"; import { ErrorView, FullScreenView } from "../FullScreenView"; import { usePageTitle } from "../usePageTitle"; -export function GroupCallLoader({ client, roomId, viaServers, children }) { +export function GroupCallLoader({ + client, + roomId, + viaServers, + createPtt, + children, +}) { const { loading, error, groupCall } = useLoadGroupCall( client, roomId, viaServers, - true + true, + createPtt ); usePageTitle(groupCall ? groupCall.room.name : "Loading..."); diff --git a/src/room/RoomPage.jsx b/src/room/RoomPage.jsx index ae3c927..1fe7eea 100644 --- a/src/room/RoomPage.jsx +++ b/src/room/RoomPage.jsx @@ -29,9 +29,13 @@ export function RoomPage() { const { roomId: maybeRoomId } = useParams(); const { hash, search } = useLocation(); - const [viaServers, isEmbedded] = useMemo(() => { + const [viaServers, isEmbedded, isPtt] = useMemo(() => { const params = new URLSearchParams(search); - return [params.getAll("via"), params.has("embed")]; + return [ + params.getAll("via"), + params.has("embed"), + params.get("ptt") === "true", + ]; }, [search]); const roomId = (maybeRoomId || hash || "").toLowerCase(); @@ -49,7 +53,12 @@ export function RoomPage() { return ( - + {(groupCall) => ( setState((prevState) => ({ ...prevState, loading: false, error })) ); - }, [client, roomId, state.reloadId, createIfNotFound, viaServers]); + }, [client, roomId, state.reloadId, createIfNotFound, viaServers, createPtt]); return state; }