Browse Source

ref(SS): remove legacy SS for electron.

factor2
Hristo Terezov 4 months ago
parent
commit
a3622a3698

+ 0
- 1
globals.d.ts View File

@@ -18,7 +18,6 @@ declare global {
18 18
         JITSI_MEET_LITE_SDK?: boolean;
19 19
         interfaceConfig?: any;
20 20
         JitsiMeetJS?: any;
21
-        JitsiMeetElectron?: any;
22 21
         PressureObserver?: any;
23 22
         PressureRecord?: any;
24 23
         ReactNativeWebView?: any;

+ 4
- 0
modules/API/external/external_api.js View File

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

+ 0
- 34
react/features/desktop-picker/functions.ts View File

@@ -1,6 +1,4 @@
1 1
 import logger from './logger';
2
-import { ElectronWindowType } from './types';
3
-
4 2
 
5 3
 /**
6 4
  * Begins a request to get available DesktopCapturerSources.
@@ -13,23 +11,6 @@ import { ElectronWindowType } from './types';
13 11
  * @returns {Function}
14 12
  */
15 13
 export function obtainDesktopSources(options: { thumbnailSize?: Object; types: string[]; }) {
16
-    const { JitsiMeetElectron } = window as ElectronWindowType;
17
-
18
-    // TODO: delete this after 2 releases
19
-    if (JitsiMeetElectron?.obtainDesktopStreams) {
20
-        return new Promise((resolve, reject) => {
21
-            JitsiMeetElectron.obtainDesktopStreams(
22
-                (sources: Array<{ id: string; }>) => resolve(_separateSourcesByType(sources)),
23
-                (error: Error) => {
24
-                    logger.error(
25
-                        `Error while obtaining desktop sources: ${error}`);
26
-                    reject(error);
27
-                },
28
-                options
29
-            );
30
-        });
31
-    }
32
-
33 14
     return APP.API.requestDesktopSources(options).then(
34 15
         ({ sources, error }: { error: Error; sources: Array<{ id: string; }>; }) => {
35 16
             if (sources) {
@@ -43,21 +24,6 @@ export function obtainDesktopSources(options: { thumbnailSize?: Object; types: s
43 24
         });
44 25
 }
45 26
 
46
-/**
47
- * Check usage of old jitsi meet electron version.
48
- *
49
- * @returns {boolean} True if we use old jitsi meet electron, otherwise false.
50
- */
51
-export function oldJitsiMeetElectronUsage() {
52
-    const { JitsiMeetElectron } = window as ElectronWindowType;
53
-
54
-    if (JitsiMeetElectron?.obtainDesktopStreams) {
55
-        return true;
56
-    }
57
-
58
-    return false;
59
-}
60
-
61 27
 /**
62 28
  * Converts an array of DesktopCapturerSources to an object with types for keys
63 29
  * and values being an array with sources of the key's type.

+ 0
- 5
react/features/desktop-picker/types.ts View File

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

Loading…
Cancel
Save