* Migrate Home Page to App Router * Update themeColor from layout.tsx * port room page to app router * small changes * port custom page to app router * port token and url api routes * port start stop routes * Refactor error handling in GET function * delete pages folder * remove unused function * remove deprecated field from docs: @deprecated — will be enabled by default and removed in Next.js 15 * wrap useSearchParams in Suspense * split up custom page into server and client component * update imports * simplify * Refactor error handling in GET function * refactor to use props for components * Refactor video codec validation and handling * Refactor LiveKitRoom component to handle null liveKitUrl * refactor: improve video codec validation and handling * add video codec typeguard * fix isVideoCodec
22 lines
535 B
TypeScript
22 lines
535 B
TypeScript
import { LocalAudioTrack, LocalVideoTrack, videoCodecs } from 'livekit-client';
|
|
import { VideoCodec } from 'livekit-client';
|
|
|
|
export interface SessionProps {
|
|
roomName: string;
|
|
identity: string;
|
|
audioTrack?: LocalAudioTrack;
|
|
videoTrack?: LocalVideoTrack;
|
|
region?: string;
|
|
turnServer?: RTCIceServer;
|
|
forceRelay?: boolean;
|
|
}
|
|
|
|
export interface TokenResult {
|
|
identity: string;
|
|
accessToken: string;
|
|
}
|
|
|
|
export function isVideoCodec(codec: string): codec is VideoCodec {
|
|
return videoCodecs.includes(codec as VideoCodec);
|
|
}
|