GitHub

Source

usePreviewDevice

Caution

This API is deprecated: use usePreviewTracks instead

Import

import { usePreviewDevice } from "@livekit/components-react";

Properties

deviceIdstringRequired
enabledbooleanRequired
kind'videoinput' | 'audioinput'Required

Returns

{
selectedDevice: MediaDeviceInfo | undefined;
localTrack: T | undefined;
deviceError: Error | null;
}