@@ -50,18 +50,6 @@ const getDropDownList = (list: Array<VideoDeviceInfo | AudioDeviceInfo>): IDropd
5050 return dropdownList ;
5151} ;
5252
53- // This helper function is used to prepend a header item to the dropdown list.
54- // Allows Dropdowns to have a name for the list of options when first being actioned (a11y requirement).
55- const prependHeaderDropdownItem = ( list : IDropdownOption [ ] , headerTitle : string ) : IDropdownOption [ ] => {
56- const headerItem : IDropdownOption = {
57- key : headerTitle ,
58- text : headerTitle ,
59- itemType : 2 ,
60- hidden : true
61- } ;
62- return [ headerItem , ...list ] ;
63- } ;
64-
6553const getOptionIcon = ( type : iconType ) : JSX . Element | undefined => {
6654 if ( type === 'Camera' ) {
6755 return < CallCompositeIcon iconName = "LocalDeviceSettingsCamera" className = { optionIconStyles } /> ;
@@ -163,11 +151,7 @@ export const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element
163151 data-ui-id = "call-composite-local-camera-settings"
164152 aria-labelledby = { cameraLabelId }
165153 placeholder = { hasCameras ? defaultPlaceHolder : noCameraLabel }
166- options = {
167- cameraPermissionGranted
168- ? prependHeaderDropdownItem ( getDropDownList ( props . cameras ) , cameraLabel )
169- : [ { key : 'deniedOrUnknown' , text : '' } ]
170- }
154+ options = { cameraPermissionGranted ? getDropDownList ( props . cameras ) : [ { key : 'deniedOrUnknown' , text : '' } ] }
171155 styles = { dropDownStyles ( theme ) }
172156 disabled = { ! cameraPermissionGranted || ! hasCameras }
173157 errorMessage = {
@@ -209,11 +193,7 @@ export const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element
209193 ? undefined
210194 : locale . strings . call . microphonePermissionDenied
211195 }
212- options = {
213- micPermissionGranted
214- ? prependHeaderDropdownItem ( getDropDownList ( props . microphones ) , soundLabel )
215- : [ { key : 'deniedOrUnknown' , text : '' } ]
216- }
196+ options = { micPermissionGranted ? getDropDownList ( props . microphones ) : [ { key : 'deniedOrUnknown' , text : '' } ] }
217197 defaultSelectedKey = {
218198 micPermissionGranted
219199 ? props . selectedMicrophone
@@ -245,7 +225,7 @@ export const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element
245225 placeholder = { hasSpeakers ? defaultPlaceHolder : noSpeakersLabel }
246226 styles = { dropDownStyles ( theme ) }
247227 disabled = { props . speakers . length === 0 }
248- options = { prependHeaderDropdownItem ( getDropDownList ( props . speakers ) , soundLabel ) }
228+ options = { getDropDownList ( props . speakers ) }
249229 defaultSelectedKey = { props . selectedSpeaker ? props . selectedSpeaker . id : defaultDeviceId ( props . speakers ) }
250230 onChange = { (
251231 event : React . FormEvent < HTMLDivElement > ,
0 commit comments