MediaSFU Shared
    Preparing search index...

    Function getSelectedDevices

    • Which camera and microphone the SDK is actually using, plus the device lists it has already enumerated.

      Unlike listMediaDevices this is synchronous and needs no permission prompt: it reads userDefaultVideoInputDevice / userDefaultAudioInputDevice and the videoInputs / audioInputs the SDK populated during setup. Use it to mark the current entry in a device picker; use listMediaDevices when you need a freshly enumerated list.

      Parameters

      Returns SelectedDevices

      const { cameras, cameraId } = getSelectedDevices({ parameters });