|
2 | 2 | // Licensed under the MIT License.
|
3 | 3 |
|
4 | 4 | import { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';
|
5 |
| -import { Dropdown, IDropdownOption, Label, mergeStyles, Stack } from '@fluentui/react'; |
| 5 | +import { Dropdown, IButton, IDropdownOption, Label, mergeStyles, Stack } from '@fluentui/react'; |
6 | 6 |
|
7 | 7 | import { DefaultButton } from '@fluentui/react';
|
8 |
| -import { useEffect } from 'react'; |
9 |
| -import { useTheme, VideoStreamOptions, _DevicePermissionDropdown } from '@internal/react-components'; |
| 8 | +import { useEffect, useRef } from 'react'; |
| 9 | +import { useTheme, VideoStreamOptions, _DevicePermissionDropdown, useAccessibility } from '@internal/react-components'; |
10 | 10 | import React from 'react';
|
11 | 11 | import { CallCompositeIcon } from '../../common/icons';
|
12 | 12 | import { useLocale } from '../../localization';
|
@@ -105,6 +105,8 @@ export const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element
|
105 | 105 | const theme = useTheme();
|
106 | 106 | const locale = useLocale();
|
107 | 107 | const adapter = useAdapter();
|
| 108 | + const accessibility = useAccessibility(); |
| 109 | + const videoEffectsButtonRef = useRef<IButton | null>(null); |
108 | 110 |
|
109 | 111 | const onResolveVideoEffectDependency = useSelector(getVideoEffectsDependency);
|
110 | 112 | const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;
|
@@ -255,8 +257,14 @@ export const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element
|
255 | 257 | <DefaultButton
|
256 | 258 | iconProps={{ iconName: 'ConfigurationScreenVideoEffectsButton' }}
|
257 | 259 | styles={effectsButtonStyles(theme, !cameraPermissionGranted)}
|
258 |
| - onClick={props.onClickVideoEffects} |
| 260 | + onClick={() => { |
| 261 | + if (props.onClickVideoEffects) { |
| 262 | + accessibility.setComponentRef(videoEffectsButtonRef.current); |
| 263 | + props.onClickVideoEffects(); |
| 264 | + } |
| 265 | + }} |
259 | 266 | disabled={!cameraPermissionGranted}
|
| 267 | + componentRef={videoEffectsButtonRef} |
260 | 268 | data-ui-id={'call-config-video-effects-button'}
|
261 | 269 | >
|
262 | 270 | {locale.strings.call.configurationPageVideoEffectsButtonLabel}
|
|
0 commit comments