Compare commits

..

No commits in common. "1f0365e7165fabd0401282c17058287c73609d49" and "a6b98e41001db0b14e761258f60cf8533c5dd877" have entirely different histories.

View File

@ -75,7 +75,6 @@ export default function Playground({
const [rpcMethod, setRpcMethod] = useState(""); const [rpcMethod, setRpcMethod] = useState("");
const [rpcPayload, setRpcPayload] = useState(""); const [rpcPayload, setRpcPayload] = useState("");
const [showRpc, setShowRpc] = useState(false); const [showRpc, setShowRpc] = useState(false);
const [qrCodeUrl, setQrCodeUrl] = useState<string>("");
// Clean up RPC resolvers before disconnecting to prevent errors // Clean up RPC resolvers before disconnecting to prevent errors
const cleanupRpcResolvers = useCallback(() => { const cleanupRpcResolvers = useCallback(() => {
@ -407,25 +406,17 @@ export default function Playground({
}, [agentVideoTrack, config, roomState]); }, [agentVideoTrack, config, roomState]);
useEffect(() => { useEffect(() => {
if (typeof document !== "undefined") { document.body.style.setProperty(
document.body.style.setProperty( "--lk-theme-color",
"--lk-theme-color", // @ts-ignore
// @ts-ignore tailwindTheme.colors[config.settings.theme_color]["500"],
tailwindTheme.colors[config.settings.theme_color]["500"], );
); document.body.style.setProperty(
document.body.style.setProperty( "--lk-drop-shadow",
"--lk-drop-shadow", `var(--lk-theme-color) 0px 0px 18px`,
`var(--lk-theme-color) 0px 0px 18px`, );
);
}
}, [config.settings.theme_color]); }, [config.settings.theme_color]);
useEffect(() => {
if (typeof window !== "undefined") {
setQrCodeUrl(window.location.href);
}
}, []);
const audioTileContent = useMemo(() => { const audioTileContent = useMemo(() => {
const disconnectedContent = ( const disconnectedContent = (
<div className="flex flex-col items-center justify-center gap-2 text-gray-700 text-center w-full"> <div className="flex flex-col items-center justify-center gap-2 text-gray-700 text-center w-full">
@ -747,10 +738,10 @@ export default function Playground({
<AudioInputTile trackRef={localMicTrack} /> <AudioInputTile trackRef={localMicTrack} />
</ConfigurationPanelItem> </ConfigurationPanelItem>
)} )}
{config.show_qr && qrCodeUrl && ( {config.show_qr && (
<div className="w-full"> <div className="w-full">
<ConfigurationPanelItem title="QR Code"> <ConfigurationPanelItem title="QR Code">
<QRCodeSVG value={qrCodeUrl} width="128" /> <QRCodeSVG value={window.location.href} width="128" />
</ConfigurationPanelItem> </ConfigurationPanelItem>
</div> </div>
)} )}