mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
ref(SS): remove legacy SS for electron.
This commit is contained in:
1
globals.d.ts
vendored
1
globals.d.ts
vendored
@@ -18,7 +18,6 @@ declare global {
|
||||
JITSI_MEET_LITE_SDK?: boolean;
|
||||
interfaceConfig?: any;
|
||||
JitsiMeetJS?: any;
|
||||
JitsiMeetElectron?: any;
|
||||
PressureObserver?: any;
|
||||
PressureRecord?: any;
|
||||
ReactNativeWebView?: any;
|
||||
|
||||
4
modules/API/external/external_api.js
vendored
4
modules/API/external/external_api.js
vendored
@@ -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({
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
export type ElectronWindowType = {
|
||||
JitsiMeetElectron?: {
|
||||
obtainDesktopStreams: Function;
|
||||
} ;
|
||||
} & typeof window;
|
||||
Reference in New Issue
Block a user