import { Meta } from '@storybook/blocks'; # useAttendeeStatus The `useAttendeeStatus` hook returns the mute, video enabled, content sharing, and signal strength state for a given attendee ID. You can use this state to then build out a roster to reflect each attendee's meeting state. ### Return Value ```javascript { // Whether or not the user is sharing their local video videoEnabled: boolean; // Whether or not the user is content sharing sharingContent: boolean; // Whether or not the user is muted muted: boolean; // Available values are 0 (no signal), 0.5 (weak signal), or 1 (good signal) signalStrength: number; } ``` ## Importing ```javascript import { useAttendeeStatus } from 'amazon-chime-sdk-component-library-react'; ``` ## Usage The hook depends on the `AudioVideoProvider`. If you are using `MeetingProvider`, it is rendered by default. ```jsx import React from 'react'; import { MeetingProvider, useAttendeeStatus } from 'amazon-chime-sdk-component-library-react'; const App = () => ( ); const MyChild = () => { const { muted, videoEnabled, sharingContent, signalStrength } = useAttendeeStatus('chime-attendee-id-1234'); return ( <>

chime-attendee-id-1234 is {muted ? 'muted' : 'unmuted'}

{videoEnabled ? 'Sharing local video' : 'Not sharing local video'}

{sharingContent ? 'Sharing content' : 'Not sharing content'}

signal strength: {signalStrength}

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