Hide screenshare button in video rooms on Desktop (#22810)
* Hide screenshare button in video rooms on Desktop * Splice the screensharing button into the arraypull/22819/head
parent
a271516c8b
commit
796aeff168
|
@ -52,6 +52,7 @@ let openIdToken: IOpenIDCredentials;
|
||||||
let roomName: string;
|
let roomName: string;
|
||||||
let startAudioOnly: boolean;
|
let startAudioOnly: boolean;
|
||||||
let isVideoChannel: boolean;
|
let isVideoChannel: boolean;
|
||||||
|
let supportsScreensharing: boolean;
|
||||||
|
|
||||||
let widgetApi: WidgetApi;
|
let widgetApi: WidgetApi;
|
||||||
let meetApi: any; // JitsiMeetExternalAPI
|
let meetApi: any; // JitsiMeetExternalAPI
|
||||||
|
@ -122,6 +123,7 @@ const ack = (ev: CustomEvent<IWidgetApiRequest>) => widgetApi.transport.reply(ev
|
||||||
roomName = qsParam('roomName', true);
|
roomName = qsParam('roomName', true);
|
||||||
startAudioOnly = qsParam('isAudioOnly', true) === "true";
|
startAudioOnly = qsParam('isAudioOnly', true) === "true";
|
||||||
isVideoChannel = qsParam('isVideoChannel', true) === "true";
|
isVideoChannel = qsParam('isVideoChannel', true) === "true";
|
||||||
|
supportsScreensharing = qsParam('supportsScreensharing', true) === "true";
|
||||||
|
|
||||||
// We've reached the point where we have to wait for the config, so do that then parse it.
|
// We've reached the point where we have to wait for the config, so do that then parse it.
|
||||||
const instanceConfig = new SnakedObject<IConfigOptions>((await configPromise) ?? <IConfigOptions>{});
|
const instanceConfig = new SnakedObject<IConfigOptions>((await configPromise) ?? <IConfigOptions>{});
|
||||||
|
@ -408,9 +410,13 @@ function joinConference(audioDevice?: string | null, videoDevice?: string | null
|
||||||
// deployments that have it enabled
|
// deployments that have it enabled
|
||||||
options.configOverwrite.prejoinConfig = { enabled: false };
|
options.configOverwrite.prejoinConfig = { enabled: false };
|
||||||
// Use a simplified set of toolbar buttons
|
// Use a simplified set of toolbar buttons
|
||||||
options.configOverwrite.toolbarButtons = [
|
options.configOverwrite.toolbarButtons = ["microphone", "camera", "tileview", "hangup"];
|
||||||
"microphone", "camera", "desktop", "tileview", "hangup",
|
// Note: We can hide the screenshare button in video rooms but not in
|
||||||
];
|
// normal conference calls, since in video rooms we control exactly what
|
||||||
|
// set of controls appear, but in normal calls we need to leave that up
|
||||||
|
// to the deployment's configuration.
|
||||||
|
// https://github.com/vector-im/element-web/issues/4880#issuecomment-940002464
|
||||||
|
if (supportsScreensharing) options.configOverwrite.toolbarButtons.splice(2, 0, "desktop");
|
||||||
// Hide all top bar elements
|
// Hide all top bar elements
|
||||||
options.configOverwrite.conferenceInfo = { autoHide: [] };
|
options.configOverwrite.conferenceInfo = { autoHide: [] };
|
||||||
// Remove the ability to hide your own tile, since we're hiding the
|
// Remove the ability to hide your own tile, since we're hiding the
|
||||||
|
|
|
@ -324,6 +324,11 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public supportsJitsiScreensharing(): boolean {
|
||||||
|
// See https://github.com/vector-im/element-web/issues/4880
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public async getAvailableSpellCheckLanguages(): Promise<string[]> {
|
public async getAvailableSpellCheckLanguages(): Promise<string[]> {
|
||||||
return this.ipc.call('getAvailableSpellCheckLanguages');
|
return this.ipc.call('getAvailableSpellCheckLanguages');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue