mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-04 05:37:22 +00:00
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:
@@ -10,7 +10,7 @@ A few aspects of Element Call's interface can be controlled through a global API
|
||||
|
||||
## Audio output devices
|
||||
|
||||
These functions must be used in conjunction with the `controlledOutput` URL parameter in order to have any effect.
|
||||
These functions must be used in conjunction with the `controlledMediaDevices` URL parameter in order to have any effect.
|
||||
|
||||
- `controls.setAvailableOutputDevices(devices: { id: string, name: string, forEarpiece?: boolean, isEarpiece?: boolean isSpeaker?: boolean, isExternalHeadset?, boolean;}[]): void` Sets the list of available audio outputs. `forEarpiece` is used on ios only.
|
||||
It flags the device that should be used if the user selects earpiece mode. This should be the main stereo loudspeaker of the device.
|
||||
|
||||
@@ -63,7 +63,7 @@ These parameters are relevant to both [widget](./embedded-standalone.md) and [st
|
||||
| `lang` | [BCP 47](https://www.rfc-editor.org/info/bcp47) code | No | No | The language the app should use. |
|
||||
| `password` | | No | No | E2EE password when using a shared secret. (For individual sender keys in embedded mode this is not required.) |
|
||||
| `perParticipantE2EE` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Enables per participant encryption with Keys exchanged over encrypted matrix room messages. |
|
||||
| `controlledOutput` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Whether the [global JS controls for audio output devices](./controls.md#audio-devices) should be enabled, allowing the list of output devices to be controlled by the app hosting Element Call. |
|
||||
| `controlledMediaDevices` | `true` or `false` | No, defaults to `false` | No, defaults to `false` | Whether the [global JS controls for audio output devices](./controls.md#audio-devices) should be enabled, allowing the list of output devices to be controlled by the app hosting Element Call. |
|
||||
| `roomId` | [Matrix Room ID](https://spec.matrix.org/v1.12/appendices/#room-ids) | Yes | No | Anything about what room we're pointed to should be from useRoomIdentifier which parses the path and resolves alias with respect to the default server name, however roomId is an exception as we need the room ID in embedded widget mode, and not the room alias (or even the via params because we are not trying to join it). This is also not validated, where it is in `useRoomIdentifier()`. |
|
||||
| `showControls` | `true` or `false` | No, defaults to `true` | No, defaults to `true` | Displays controls like mute, screen-share, invite, and hangup buttons during a call. |
|
||||
| `skipLobby` (deprecated: use `intent` instead) | `true` or `false` | No. If `intent` is explicitly `start_call` then defaults to `true`. Otherwise defaults to `false` | No, defaults to `false` | Skips the lobby to join a call directly, can be combined with preload in widget. When `true` the audio and video inputs will be muted by default. (This means there currently is no way to start without muted video if one wants to skip the lobby. Also not in widget mode.) |
|
||||
|
||||
@@ -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