rapid-van-16677
10/24/2025, 7:07 PMtall-airline-16756
10/24/2025, 7:07 PMtall-airline-16756
10/24/2025, 7:07 PMRoomOptions when connecting to a room. Just set the videoCodec parameter within publishDefaults to one of the supported codecs: VP8, H.264, VP9, or AV1.
Here's a friendly example using the LiveKit JavaScript SDK to help you get started:
const roomOpts: RoomOptions = {
publishDefaults: {
videoCodec: 'vp9', // Options: 'vp8', 'h264', 'vp9', 'av1'
scalabilityMode: 'L3T3_KEY', // Required for VP9 and AV1 with SVC
simulcast: true,
videoSimulcastLayers: [VideoPresets.h180, VideoPresets.h360], // Ignored for VP9/AV1
},
dynacast: true,
};
// Connect to the room with these options
await room.connect(url, token, roomOpts);
If you'd like, I can also provide code examples for mobile SDKs like Swift or Android, or even guide you on how to detect codec support at runtime. Just let me know what would be most helpful for you!
Sources: Configuring the Client SDK for Optimal Video Quality | WebRTC Codecs Guide - LiveKit | pkg/clientconfiguration/conf.go | Codecs and more | LiveKit Docs | Web Applications & Integration Examples | livekit/livekit_composite | DeepW...rapid-van-16677
10/27/2025, 12:45 PMtall-airline-16756
10/27/2025, 12:46 PM