diff --git a/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx b/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx index ee7c8c8..91dce29 100644 --- a/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx +++ b/apps/web/src/app/(ui)/(protected)/settings/channel/[channelName]/page.client.tsx @@ -53,6 +53,7 @@ import { ChannelSelect } from '@/components/app/ChannelSelect/ChannelSelect'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { useConfirm } from '@omit/react-confirm-dialog'; +import { MEDIAMTX_INGEST_ROUTE } from '@/lib/env'; interface ChannelSettingsClientProps { channel: Channel & { @@ -136,7 +137,7 @@ export default function ChannelSettingsClient({ toast.error('Stream key not available'); return ''; } - return `srt://${process.env.NEXT_PUBLIC_MEDIAMTX_INGEST_ROUTE}?streamid=publish:${channel.name}:thisusernameislongonpurposesoyoudontaccidentallyleakyourstreamkey:${streamKey}&pkt_size=1316`; + return `srt://${MEDIAMTX_INGEST_ROUTE}?streamid=publish:${channel.name}:thisusernameislongonpurposesoyoudontaccidentallyleakyourstreamkey:${streamKey}&pkt_size=1316`; }; const copyStreamUrl = async () => { diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 3546aad..dcc986e 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -2,8 +2,22 @@ import { NuqsAdapter } from 'nuqs/adapters/next/app'; import './globals.css'; export default function Layout({ children }: { children: React.ReactNode }) { + const publicEnv = Object.keys(process.env).reduce((acc, key) => { + if (key.startsWith('NEXT_PUBLIC_')) { + acc[key] = process.env[key]; + } + return acc; + }, {} as Record); + return ( + +