Device settings

The SDK provides device settings components for audio and video selection:

  • DeviceSelectorVideo - camera selection
  • DeviceSelectorAudioInput - microphone selection
  • DeviceSelectorAudioOutput - speaker selection
  • AudioVolumeIndicator - visual audio level indicator
  • SpeakerTest - test speaker output
  • DeviceSettings - combines all selectors

Best Practices

  • Use DeviceSettings for a complete settings panel.
  • Use individual selectors for custom layouts.
  • Show device settings in a lobby/preview screen before joining calls.
Default device settings panel
Default camera device selector
Default audio input device selector
Default audio output device selector

General usage

import { Call, DeviceSettings, StreamCall } from "@stream-io/video-react-sdk";

const MyDevicePanel = () => {
  let call: Call;

  return (
    <StreamCall call={call}>
      <DeviceSettings />
    </StreamCall>
  );
};

Or use the components individually:

import {
  Call,
  DeviceSelectorAudioInput,
  DeviceSelectorVideo,
  StreamCall,
} from "@stream-io/video-react-sdk";

const MyDevicePanel = () => {
  let call: Call;

  return (
    <StreamCall call={call}>
      <DeviceSelectorVideo />
      <DeviceSelectorAudioInput />
    </StreamCall>
  );
};

Props

DeviceSettings

NameDescriptionTypeDefault
visualTypeVisually display a list or dropdown selectorlist | dropdown | undefinedlist

DeviceSelectorVideo

NameDescriptionTypeDefault
titleTitle is displayed at the top of the selector componentstring | undefinedSelect a Camera
visualTypeDisplay as a radio list, dropdown, or live device previewlist | dropdown | previewlist

DeviceSelectorAudioInput

NameDescriptionTypeDefault
titleTitle is displayed at the top of the selector componentstring | undefinedSelect a Mic
visualTypeDisplay as a radio list, dropdown, or live device previewlist | dropdown | previewlist
volumeIndicatorVisibleShow volume indicatorboolean | undefinedtrue

DeviceSelectorAudioOutput

NameDescriptionTypeDefault
titleTitle is displayed at the top of the selector componentstring | undefinedSelect a Speaker
visualTypeVisually display a list or dropdown selectorlist | dropdown | undefinedlist
speakerTestVisibleShow speaker test buttonboolean | undefinedtrue
speakerTestAudioUrlURL of the audio file to play when speaker test button is clickedstring | undefinedSDK provided audio test file

AudioVolumeIndicator

This component does not accept any props.

SpeakerTest

NameDescriptionTypeDefault
audioUrlURL of the audio file to play for the speaker test.string | undefinedSDK provided audio test file

Preview mode

Setting visualType to preview renders a live preview for each available device. For cameras, each option shows a real-time video feed. For microphones, each option shows an audio level indicator.

import {
  Call,
  DeviceSelectorAudioInput,
  DeviceSelectorVideo,
  StreamCall,
} from "@stream-io/video-react-sdk";

const MyDevicePreviewPanel = () => {
  let call: Call;

  return (
    <StreamCall call={call}>
      <DeviceSelectorVideo visualType="preview" />
      <DeviceSelectorAudioInput visualType="preview" />
    </StreamCall>
  );
};

Customization

If you want to create your own component, you can make use of Devices Management API to list and select devices.