mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-18 09:27:47 +00:00
Fall back to using label for preferred devices (#4171)
* Skips setting undefined device id to sink in audio preview. * Fallbacks to use labels for user selected devices. * Fixes comment.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
import { Component } from 'react';
|
||||
|
||||
const logger = require('jitsi-meet-logger').getLogger(__filename);
|
||||
|
||||
/**
|
||||
* Describes audio element interface used in the base/media feature for audio
|
||||
* playback.
|
||||
@@ -10,7 +12,7 @@ export type AudioElement = {
|
||||
currentTime: number,
|
||||
pause: () => void,
|
||||
play: () => void,
|
||||
setSinkId?: string => void,
|
||||
setSinkId?: string => Function,
|
||||
stop: () => void
|
||||
};
|
||||
|
||||
@@ -113,7 +115,8 @@ export default class AbstractAudio extends Component<Props> {
|
||||
setSinkId(sinkId: string): void {
|
||||
this._audioElementImpl
|
||||
&& typeof this._audioElementImpl.setSinkId === 'function'
|
||||
&& this._audioElementImpl.setSinkId(sinkId);
|
||||
&& this._audioElementImpl.setSinkId(sinkId)
|
||||
.catch(error => logger.error('Error setting sink', error));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user