File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/providers/MeetingProvider Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -344,15 +344,9 @@ export class MeetingManager implements AudioVideoObserver {
344344 async listAndSelectDevices ( ) : Promise < void > {
345345 await this . updateDeviceLists ( ) ;
346346
347- let hasAudioInput = false , hasAudioOutput = false , hasVideoInput = false ;
348- const devices = await navigator . mediaDevices . enumerateDevices ( ) ;
349- for ( const device of devices ) {
350- if ( device . label ) {
351- if ( device . kind === "audioinput" ) hasAudioInput = true ;
352- if ( device . kind === "audiooutput" ) hasAudioOutput = true ;
353- if ( device . kind === "videoinput" ) hasVideoInput = true ;
354- }
355- }
347+ const hasAudioInput = this . audioInputDevices ?. some ( value => value . label ) || false ;
348+ const hasAudioOutput = this . audioOutputDevices ?. some ( value => value . label ) || false ;
349+ const hasVideoInput = this . videoInputDevices ?. some ( value => value . label ) || false ;
356350
357351 if (
358352 hasAudioInput &&
You can’t perform that action at this time.
0 commit comments