The AI-native screen recorder. Record your screen and talk; the people you share it with and your AI agents both get it.
Rust agent-readableai-agentsarecclaude-codecodexcursorlocal-firstmacosprivacyrustscreen-recorderscreen-recordingtauritranscriptiontypescriptwindows
import type { WebcamDeviceDto } from "./bridge";
const OBS_CAMERA_NAME = /^obs(?:[ -]virtual)?[ -]camera$/i;
export function preferredWebcamDeviceId(
devices: WebcamDeviceDto[],
currentDeviceId: string | null,
): string | null {
if (currentDeviceId && devices.some((device) => device.id === currentDeviceId)) {
return currentDeviceId;
}
return devices.find((device) => !OBS_CAMERA_NAME.test(device.name.trim()))?.id ?? devices[0]?.id ?? null;
}