Add type assertion for codec param (#165)

This commit is contained in:
lukasIO 2023-11-30 00:37:00 +01:00 committed by GitHub
parent f795b52103
commit 70d5bf5794
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ const ActiveRoom = ({ roomName, userChoices, onLeave }: ActiveRoomProps) => {
const keyProvider = new ExternalE2EEKeyProvider();
const roomOptions = React.useMemo((): RoomOptions => {
let videoCodec: VideoCodec | undefined = codec ?? 'av1';
let videoCodec: VideoCodec | undefined = (codec as VideoCodec) ?? 'av1';
if (e2eeEnabled && (videoCodec === 'av1' || videoCodec === 'vp9')) {
videoCodec = undefined;
}