mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
@@ -117,7 +117,7 @@ export function useLivekit(
|
|||||||
// deviceId here, because it will be set by the native app.
|
// deviceId here, because it will be set by the native app.
|
||||||
// (also the id does not need to match a browser device id)
|
// (also the id does not need to match a browser device id)
|
||||||
deviceId: controlledAudioDevices
|
deviceId: controlledAudioDevices
|
||||||
? ""
|
? "default"
|
||||||
: getValue(devices.audioOutput.selected$)?.id,
|
: getValue(devices.audioOutput.selected$)?.id,
|
||||||
},
|
},
|
||||||
e2ee,
|
e2ee,
|
||||||
@@ -331,7 +331,7 @@ export function useLivekit(
|
|||||||
selected$.subscribe((device) => {
|
selected$.subscribe((device) => {
|
||||||
let d = device;
|
let d = device;
|
||||||
if (controlledAudioDevices && kind === "audiooutput") {
|
if (controlledAudioDevices && kind === "audiooutput") {
|
||||||
d = { id: "" };
|
d = { id: "default" };
|
||||||
}
|
}
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"[LivekitRoom] syncDevice room.getActiveDevice(kind) !== d.id :",
|
"[LivekitRoom] syncDevice room.getActiveDevice(kind) !== d.id :",
|
||||||
|
|||||||
@@ -1276,7 +1276,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
(available, selected) => {
|
(available, selected) => {
|
||||||
const selectionType = selected && available.get(selected.id)?.type;
|
const selectionType = selected && available.get(selected.id)?.type;
|
||||||
|
|
||||||
// If we are in any output mode other than spaeker switch to speaker.
|
// If we are in any output mode other than speaker switch to speaker.
|
||||||
const newSelectionType =
|
const newSelectionType =
|
||||||
selectionType === "speaker" ? "earpiece" : "speaker";
|
selectionType === "speaker" ? "earpiece" : "speaker";
|
||||||
const newSelection = [...available].find(
|
const newSelection = [...available].find(
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ class ControlledAudioOutput
|
|||||||
(available, preferredId) => {
|
(available, preferredId) => {
|
||||||
const id = preferredId ?? available.keys().next().value;
|
const id = preferredId ?? available.keys().next().value;
|
||||||
return id === undefined
|
return id === undefined
|
||||||
? undefined
|
? { id: "default", virtualEarpiece: false }
|
||||||
: { id, virtualEarpiece: id === EARPIECE_CONFIG_ID };
|
: { id, virtualEarpiece: id === EARPIECE_CONFIG_ID };
|
||||||
},
|
},
|
||||||
).pipe(this.scope.state());
|
).pipe(this.scope.state());
|
||||||
|
|||||||
Reference in New Issue
Block a user