rename everything to controlledMediaDevices to make it consistent with the actual name in the url parameters (controlledOutput is now only used for the hook that provides the output handle)
This commit is contained in:
@@ -132,7 +132,7 @@ export interface UrlParams {
|
||||
* allowing the list of output devices to be controlled by the app hosting
|
||||
* Element Call.
|
||||
*/
|
||||
controlledOutput: boolean;
|
||||
controlledMediaDevices: boolean;
|
||||
/**
|
||||
* Setting this flag skips the lobby and brings you in the call directly.
|
||||
* In the widget this can be combined with preload to pass the device settings
|
||||
@@ -288,7 +288,7 @@ export const getUrlParams = (
|
||||
fontScale: Number.isNaN(fontScale) ? null : fontScale,
|
||||
allowIceFallback: parser.getFlagParam("allowIceFallback"),
|
||||
perParticipantE2EE: parser.getFlagParam("perParticipantE2EE"),
|
||||
controlledOutput: parser.getFlagParam("controlledMediaDevices"),
|
||||
controlledMediaDevices: parser.getFlagParam("controlledMediaDevices"),
|
||||
skipLobby: parser.getFlagParam(
|
||||
"skipLobby",
|
||||
isWidget && intent === UserIntent.StartNewCall,
|
||||
|
||||
@@ -280,7 +280,7 @@ export const MediaDevicesProvider: FC<Props> = ({ children }) => {
|
||||
usingNames,
|
||||
} = useInputDevices();
|
||||
|
||||
const { controlledOutput } = useUrlParams();
|
||||
const { controlledMediaDevices } = useUrlParams();
|
||||
|
||||
const webViewAudioOutput = useMediaDeviceHandle(
|
||||
"audiooutput",
|
||||
@@ -292,7 +292,7 @@ export const MediaDevicesProvider: FC<Props> = ({ children }) => {
|
||||
const context: MediaDevices = useMemo(
|
||||
() => ({
|
||||
audioInput,
|
||||
audioOutput: controlledOutput
|
||||
audioOutput: controlledMediaDevices
|
||||
? controlledAudioOutput
|
||||
: webViewAudioOutput,
|
||||
videoInput,
|
||||
@@ -301,7 +301,7 @@ export const MediaDevicesProvider: FC<Props> = ({ children }) => {
|
||||
}),
|
||||
[
|
||||
audioInput,
|
||||
controlledOutput,
|
||||
controlledMediaDevices,
|
||||
controlledAudioOutput,
|
||||
webViewAudioOutput,
|
||||
videoInput,
|
||||
|
||||
@@ -107,7 +107,7 @@ export const SettingsModal: FC<Props> = ({
|
||||
// If we are on ios we will show a button to open the native picker.
|
||||
const iosDeviceMenu = useObservableEagerState(iosDeviceMenu$);
|
||||
// In controlled devices we will not show the input section
|
||||
const { controlledOutput } = useUrlParams();
|
||||
const { controlledMediaDevices } = useUrlParams();
|
||||
|
||||
const audioTab: Tab<SettingsTab> = {
|
||||
key: "audio",
|
||||
@@ -115,7 +115,7 @@ export const SettingsModal: FC<Props> = ({
|
||||
content: (
|
||||
<>
|
||||
<Form>
|
||||
{!controlledOutput && (
|
||||
{!controlledMediaDevices && (
|
||||
<DeviceSelection
|
||||
device={devices.audioInput}
|
||||
title={t("settings.devices.microphone")}
|
||||
|
||||
Reference in New Issue
Block a user