diff --git a/app/api/connection-details/route.ts b/app/api/connection-details/route.ts index fc6ca29..93fbfa0 100644 --- a/app/api/connection-details/route.ts +++ b/app/api/connection-details/route.ts @@ -2,8 +2,6 @@ import { ConnectionDetails } from '@/lib/types'; import { AccessToken, AccessTokenOptions, VideoGrant } from 'livekit-server-sdk'; import { NextRequest, NextResponse } from 'next/server'; -export const runtime = 'edge'; - const API_KEY = process.env.LIVEKIT_API_KEY; const API_SECRET = process.env.LIVEKIT_API_SECRET; const LIVEKIT_URL = process.env.LIVEKIT_URL; @@ -69,3 +67,5 @@ function pseudoRandomParticipantId(participantName: string): string { }); return `${participantName}_${randomPart}`; } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes diff --git a/app/api/record/start/route.ts b/app/api/record/start/route.ts index be09561..0e6512d 100644 --- a/app/api/record/start/route.ts +++ b/app/api/record/start/route.ts @@ -1,8 +1,6 @@ import { EgressClient, EncodedFileOutput, S3Upload } from 'livekit-server-sdk'; import { NextRequest, NextResponse } from 'next/server'; -export const runtime = 'edge'; - export async function GET(req: NextRequest) { try { const roomName = req.nextUrl.searchParams.get('roomName'); @@ -70,3 +68,5 @@ export async function GET(req: NextRequest) { } } } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes diff --git a/app/api/record/stop/route.ts b/app/api/record/stop/route.ts index 07e9da3..7e6849b 100644 --- a/app/api/record/stop/route.ts +++ b/app/api/record/stop/route.ts @@ -1,8 +1,6 @@ import { EgressClient } from 'livekit-server-sdk'; import { NextRequest, NextResponse } from 'next/server'; -export const runtime = 'edge'; - export async function GET(req: NextRequest) { try { const roomName = req.nextUrl.searchParams.get('roomName'); @@ -39,3 +37,5 @@ export async function GET(req: NextRequest) { } } } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes diff --git a/app/api/url/route.ts b/app/api/url/route.ts index 0c688d7..724b61f 100644 --- a/app/api/url/route.ts +++ b/app/api/url/route.ts @@ -1,8 +1,6 @@ import { getLiveKitURL } from '@/lib/server-utils'; import { NextRequest, NextResponse } from 'next/server'; -export const runtime = 'edge'; - export async function GET(req: NextRequest) { try { const region = req.nextUrl.searchParams.get('region'); @@ -14,3 +12,5 @@ export async function GET(req: NextRequest) { } } } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes diff --git a/app/custom/page.tsx b/app/custom/page.tsx index 3c8d9dd..df0afb0 100644 --- a/app/custom/page.tsx +++ b/app/custom/page.tsx @@ -2,8 +2,6 @@ import { videoCodecs } from 'livekit-client'; import { VideoConferenceClientImpl } from './VideoConferenceClientImpl'; import { isVideoCodec } from '@/lib/types'; -export const runtime = 'edge'; - export default function CustomRoomConnection(props: { searchParams: { liveKitUrl?: string; @@ -28,3 +26,5 @@ export default function CustomRoomConnection(props: { ); } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes diff --git a/app/page.tsx b/app/page.tsx index ba10abf..7f26c18 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -5,8 +5,6 @@ import React, { Suspense, useState } from 'react'; import { encodePassphrase, generateRoomId, randomString } from '@/lib/client-utils'; import styles from '../styles/Home.module.css'; -export const runtime = 'edge'; - function Tabs(props: React.PropsWithChildren<{}>) { const searchParams = useSearchParams(); const tabIndex = searchParams?.get('tab') === 'custom' ? 1 : 0; @@ -201,3 +199,5 @@ export default function Page() { ); } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes diff --git a/app/rooms/[roomName]/page.tsx b/app/rooms/[roomName]/page.tsx index b9f5d76..2623b81 100644 --- a/app/rooms/[roomName]/page.tsx +++ b/app/rooms/[roomName]/page.tsx @@ -2,8 +2,6 @@ import * as React from 'react'; import { PageClientImpl } from './PageClientImpl'; import { isVideoCodec } from '@/lib/types'; -export const runtime = 'edge'; - export default function Page({ params, searchParams, @@ -26,3 +24,5 @@ export default function Page({ ); } + +export const runtime = 'edge'; // Can be removed if not deploying to Edge Runtime. See https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes