fix(voice): keep LiveKit TTS tracks alive

This commit is contained in:
Yahya Alhinai
2026-06-28 07:20:54 +00:00
parent 46d277d203
commit c4c65f8802
91 changed files with 16863 additions and 21 deletions
@@ -0,0 +1,59 @@
'use client';
import { useTheme } from 'next-themes';
import { MonitorIcon, MoonIcon, SunIcon } from '@phosphor-icons/react';
import { cn } from '@/lib/shadcn/utils';
interface ThemeToggleProps {
className?: string;
}
export function ThemeToggle({ className }: ThemeToggleProps) {
const { theme, setTheme } = useTheme();
return (
<div
className={cn(
'text-foreground bg-background flex w-full flex-row justify-end divide-x overflow-hidden rounded-full border',
className
)}
>
<span className="sr-only">Color scheme toggle</span>
<button type="button" onClick={() => setTheme('dark')} className="cursor-pointer p-1 pl-1.5">
<span className="sr-only">Enable dark color scheme</span>
<MoonIcon
suppressHydrationWarning
size={16}
weight="bold"
className={cn(theme !== 'dark' && 'opacity-25')}
/>
</button>
<button
type="button"
onClick={() => setTheme('light')}
className="cursor-pointer px-1.5 py-1"
>
<span className="sr-only">Enable light color scheme</span>
<SunIcon
suppressHydrationWarning
size={16}
weight="bold"
className={cn(theme !== 'light' && 'opacity-25')}
/>
</button>
<button
type="button"
onClick={() => setTheme('system')}
className="cursor-pointer p-1 pr-1.5"
>
<span className="sr-only">Enable system color scheme</span>
<MonitorIcon
suppressHydrationWarning
size={16}
weight="bold"
className={cn(theme !== 'system' && 'opacity-25')}
/>
</button>
</div>
);
}