GitHub

Source

useMediaDevices

The useMediaDevices hook returns the list of media devices of a given kind.

Import

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

Usage

const videoDevices = useMediaDevices({ kind: "videoinput" });
const audioDevices = useMediaDevices({ kind: "audioinput" });

Properties

Returns

MediaDeviceInfo[]