ref(SS): remove legacy SS for electron.

This commit is contained in:
Hristo Terezov
2025-01-21 16:43:11 -06:00
parent 4cdc193ac3
commit a3622a3698
4 changed files with 4 additions and 40 deletions

1
globals.d.ts vendored
View File

@@ -18,7 +18,6 @@ declare global {
JITSI_MEET_LITE_SDK?: boolean;
interfaceConfig?: any;
JitsiMeetJS?: any;
JitsiMeetElectron?: any;
PressureObserver?: any;
PressureRecord?: any;
ReactNativeWebView?: any;

View File

@@ -1241,6 +1241,10 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
* Returns the state of availability electron share screen via external api.
*
* @returns {Promise}
*
* TODO: should be removed after we make sure that all Electron clients use only versions
* after with the legacy SS suport was removed from the electron SDK. If we remove it now the SS for Electron
* clients with older versions wont work.
*/
_isNewElectronScreensharingSupported() {
return this._transport.sendRequest({

View File

@@ -1,6 +1,4 @@
import logger from './logger';
import { ElectronWindowType } from './types';
/**
* Begins a request to get available DesktopCapturerSources.
@@ -13,23 +11,6 @@ import { ElectronWindowType } from './types';
* @returns {Function}
*/
export function obtainDesktopSources(options: { thumbnailSize?: Object; types: string[]; }) {
const { JitsiMeetElectron } = window as ElectronWindowType;
// TODO: delete this after 2 releases
if (JitsiMeetElectron?.obtainDesktopStreams) {
return new Promise((resolve, reject) => {
JitsiMeetElectron.obtainDesktopStreams(
(sources: Array<{ id: string; }>) => resolve(_separateSourcesByType(sources)),
(error: Error) => {
logger.error(
`Error while obtaining desktop sources: ${error}`);
reject(error);
},
options
);
});
}
return APP.API.requestDesktopSources(options).then(
({ sources, error }: { error: Error; sources: Array<{ id: string; }>; }) => {
if (sources) {
@@ -43,21 +24,6 @@ export function obtainDesktopSources(options: { thumbnailSize?: Object; types: s
});
}
/**
* Check usage of old jitsi meet electron version.
*
* @returns {boolean} True if we use old jitsi meet electron, otherwise false.
*/
export function oldJitsiMeetElectronUsage() {
const { JitsiMeetElectron } = window as ElectronWindowType;
if (JitsiMeetElectron?.obtainDesktopStreams) {
return true;
}
return false;
}
/**
* Converts an array of DesktopCapturerSources to an object with types for keys
* and values being an array with sources of the key's type.

View File

@@ -1,5 +0,0 @@
export type ElectronWindowType = {
JitsiMeetElectron?: {
obtainDesktopStreams: Function;
} ;
} & typeof window;