// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React, { forwardRef, HTMLAttributes, Ref } from 'react'; import { BaseProps } from '../Base'; import Microphone from '../icons/Microphone'; import { StyledMicVolumeIndicator } from './Styled'; export interface MicVolumeIndicatorProps extends Omit, 'css'>, BaseProps { /* Whether or not the attendee is muted */ muted?: boolean | undefined; /* The measure of an attendee's network connection on a scale of 0 to 1. A bad connection is .5 or below. */ signalStrength: number | undefined; } export const MicVolumeIndicator = forwardRef( ( { muted = false, signalStrength, className: propClassName, ...rest }: MicVolumeIndicatorProps, bgRef: Ref ) => { const poorConnection = signalStrength !== undefined && signalStrength <= 0.5; const className = propClassName ? `${propClassName} ch-mic-volume-indicator` : 'ch-mic-volume-indicator'; return (
); } ); export default MicVolumeIndicator;