mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-05 04:15:58 +00:00
Remove unused useIsEarpiece hook
This commit is contained in:
@@ -23,14 +23,6 @@ export function useMediaDevices(): MediaDevices {
|
||||
return mediaDevices;
|
||||
}
|
||||
|
||||
export const useIsEarpiece = (): boolean => {
|
||||
const devices = useMediaDevices();
|
||||
const audioOutput = useObservableEagerState(devices.audioOutput.selected$);
|
||||
const available = useObservableEagerState(devices.audioOutput.available$);
|
||||
if (!audioOutput?.id) return false;
|
||||
return available.get(audioOutput.id)?.type === "earpiece";
|
||||
};
|
||||
|
||||
/**
|
||||
* A convenience hook to get the audio node configuration for the earpiece.
|
||||
* It will check the `useAsEarpiece` of the `audioOutput` device and return
|
||||
|
||||
Reference in New Issue
Block a user