diff --git a/.env.example b/.env.example index 1282667..7442a1e 100644 --- a/.env.example +++ b/.env.example @@ -12,6 +12,7 @@ description: 'LiveKit Agent Playground allows you to test your LiveKit Agent int github_link: 'https://github.com/livekit/agents-playground' video_fit: 'cover' # 'contain' or 'cover' settings: + editable: true # Should the user be able to edit settings in-app theme_color: 'cyan' chat: true # Enable or disable chat feature outputs: diff --git a/src/components/playground/Playground.tsx b/src/components/playground/Playground.tsx index f02b7c2..b015b3a 100644 --- a/src/components/playground/Playground.tsx +++ b/src/components/playground/Playground.tsx @@ -36,12 +36,6 @@ import { import { QRCodeSVG } from "qrcode.react"; import { ReactNode, useCallback, useEffect, useMemo, useState } from "react"; -export enum PlaygroundOutputs { - Video, - Audio, - Chat, -} - export interface PlaygroundMeta { name: string; value: string; @@ -66,7 +60,6 @@ export default function Playground({ const [messages, setMessages] = useState([]); const [transcripts, setTranscripts] = useState([]); const { localParticipant } = useLocalParticipant(); - const [outputs, setOutputs] = useState([]); const participants = useRemoteParticipants({ updateOnlyOn: [RoomEvent.ParticipantMetadataChanged], @@ -371,7 +364,8 @@ export default function Playground({ config.description, config.settings, config.show_qr, - // metadata, + localParticipant, + name, roomState, isAgentConnected, agentState, @@ -383,7 +377,7 @@ export default function Playground({ ]); let mobileTabs: PlaygroundTab[] = []; - if (outputs?.includes(PlaygroundOutputs.Video)) { + if (config.settings.outputs.video) { mobileTabs.push({ title: "Video", content: ( @@ -397,7 +391,7 @@ export default function Playground({ }); } - if (outputs?.includes(PlaygroundOutputs.Audio)) { + if (config.settings.outputs.audio) { mobileTabs.push({ title: "Audio", content: ( @@ -411,7 +405,7 @@ export default function Playground({ }); } - if (outputs?.includes(PlaygroundOutputs.Chat)) { + if (config.settings.chat) { mobileTabs.push({ title: "Chat", content: chatTileContent, @@ -458,13 +452,12 @@ export default function Playground({