import { Meta, ArgTypes } from '@storybook/blocks'; import { DevicesProvider } from '../'; # DevicesProvider The `DevicesProvider` renders the audio and video providers, which provide state around the available and currently selected audio and video devices. ## Props ## Importing ```jsx import { DevicesProvider } from 'amazon-chime-sdk-component-library-react'; ``` ## Usage If you are using `MeetingProvider`, `DevicesProvider` is rendered by default. ```jsx import React from 'react'; import { MeetingProvider, useVideoInputs, } from 'amazon-chime-sdk-component-library-react'; const App = () => ( ); const MyChild = () => { const { devices, selectedDevice } = useVideoInputs(); const items = devices.map((device) =>
  • {device.label}
  • ); return (

    Current Selected Device: {selectedDevice}

    Devices

    ); }; ``` ### Dependencies - `AudioVideoProvider` - `MeetingProvider`