127 | No agent video track. Connect to get started.
128 |
129 | );
130 |
131 | const loadingContent = (
132 |
176 | No agent audio track. Connect to get started.
177 |
178 | );
179 |
180 | const waitingContent = (
181 |
252 | {config.description && (
253 |
254 | {config.description}
255 |
256 | )}
257 |
258 |
259 |
260 | {
269 | const newSettings = { ...config.settings };
270 | newSettings.room_name = value;
271 | setUserSettings(newSettings);
272 | }}
273 | placeholder="Auto"
274 | editable={roomState !== ConnectionState.Connected}
275 | />
276 |
281 | ) : (
282 | roomState.charAt(0).toUpperCase() + roomState.slice(1)
283 | )
284 | }
285 | valueColor={
286 | roomState === ConnectionState.Connected
287 | ? `${config.settings.theme_color}-500`
288 | : "gray-500"
289 | }
290 | />
291 |
292 |
293 |
294 |
295 |
296 |
{
305 | const newSettings = { ...config.settings };
306 | newSettings.agent_name = value;
307 | setUserSettings(newSettings);
308 | }}
309 | placeholder="None"
310 | editable={roomState !== ConnectionState.Connected}
311 | />
312 |
319 | ) : (
320 | "No agent connected"
321 | )
322 | }
323 | valueColor={
324 | voiceAssistant.agent
325 | ? `${config.settings.theme_color}-500`
326 | : "gray-500"
327 | }
328 | />
329 | {roomState === ConnectionState.Connected &&
330 | voiceAssistant.agent && (
331 | ({
335 | id: `agent-attr-${index}`,
336 | key,
337 | value: String(value),
338 | }))}
339 | onAttributesChange={() => {}}
340 | themeColor={config.settings.theme_color}
341 | disabled={true}
342 | />
343 | )}
344 |
345 | Set an agent name to use{" "}
346 |
352 | explicit dispatch
353 |
354 | .
355 |
356 |
357 |
358 |
359 |
360 |
361 |
{
370 | const newSettings = { ...config.settings };
371 | newSettings.participant_name = value;
372 | setUserSettings(newSettings);
373 | }}
374 | placeholder="Auto"
375 | editable={roomState !== ConnectionState.Connected}
376 | />
377 | {
386 | const newSettings = { ...config.settings };
387 | newSettings.participant_id = value;
388 | setUserSettings(newSettings);
389 | }}
390 | placeholder="Auto"
391 | editable={roomState !== ConnectionState.Connected}
392 | />
393 | {
396 | const newSettings = { ...config.settings };
397 | newSettings.attributes = newAttributes;
398 | setUserSettings(newSettings);
399 | }}
400 | metadata={config.settings.metadata}
401 | onMetadataChange={(metadata) => {
402 | const newSettings = { ...config.settings };
403 | newSettings.metadata = metadata;
404 | setUserSettings(newSettings);
405 | }}
406 | themeColor={config.settings.theme_color}
407 | disabled={false}
408 | connectionState={roomState}
409 | />
410 |
411 |
412 |
413 | {roomState === ConnectionState.Connected &&
414 | config.settings.inputs.screen && (
415 |
419 | {localScreenTrack ? (
420 |
421 |
425 |
426 | ) : (
427 |
428 | Press the button above to share your screen.
429 |
430 | )}
431 |
432 | )}
433 | {roomState === ConnectionState.Connected && voiceAssistant.agent && (
434 |
442 | )}
443 | {localCameraTrack && (
444 |
445 |
446 |
450 |
451 |
452 | )}
453 | {localMicTrack && (
454 |
458 |
459 |
460 | )}
461 |
462 |
463 | {
467 | const userSettings = { ...config.settings };
468 | userSettings.theme_color = color;
469 | setUserSettings(userSettings);
470 | }}
471 | />
472 |
473 |
474 | {config.show_qr && (
475 |
476 |
477 |
478 |
479 |
480 | )}
481 |
482 | );
483 | }, [
484 | config.description,
485 | config.settings,
486 | config.show_qr,
487 | localParticipant,
488 | name,
489 | roomState,
490 | localCameraTrack,
491 | localScreenTrack,
492 | localMicTrack,
493 | themeColors,
494 | setUserSettings,
495 | voiceAssistant.agent,
496 | rpcMethod,
497 | rpcPayload,
498 | handleRpcCall,
499 | showRpc,
500 | setShowRpc,
501 | ]);
502 |
503 | let mobileTabs: PlaygroundTab[] = [];
504 | if (config.settings.outputs.video) {
505 | mobileTabs.push({
506 | title: "Video",
507 | content: (
508 |