Quellcode durchsuchen

ref(SS): remove legacy SS for electron.

factor2
Hristo Terezov vor 4 Monaten
Ursprung
Commit
a3622a3698

+ 0
- 1
globals.d.ts Datei anzeigen

18
         JITSI_MEET_LITE_SDK?: boolean;
18
         JITSI_MEET_LITE_SDK?: boolean;
19
         interfaceConfig?: any;
19
         interfaceConfig?: any;
20
         JitsiMeetJS?: any;
20
         JitsiMeetJS?: any;
21
-        JitsiMeetElectron?: any;
22
         PressureObserver?: any;
21
         PressureObserver?: any;
23
         PressureRecord?: any;
22
         PressureRecord?: any;
24
         ReactNativeWebView?: any;
23
         ReactNativeWebView?: any;

+ 4
- 0
modules/API/external/external_api.js Datei anzeigen

1241
      * Returns the state of availability electron share screen via external api.
1241
      * Returns the state of availability electron share screen via external api.
1242
      *
1242
      *
1243
      * @returns {Promise}
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
     _isNewElectronScreensharingSupported() {
1249
     _isNewElectronScreensharingSupported() {
1246
         return this._transport.sendRequest({
1250
         return this._transport.sendRequest({

+ 0
- 34
react/features/desktop-picker/functions.ts Datei anzeigen

1
 import logger from './logger';
1
 import logger from './logger';
2
-import { ElectronWindowType } from './types';
3
-
4
 
2
 
5
 /**
3
 /**
6
  * Begins a request to get available DesktopCapturerSources.
4
  * Begins a request to get available DesktopCapturerSources.
13
  * @returns {Function}
11
  * @returns {Function}
14
  */
12
  */
15
 export function obtainDesktopSources(options: { thumbnailSize?: Object; types: string[]; }) {
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
     return APP.API.requestDesktopSources(options).then(
14
     return APP.API.requestDesktopSources(options).then(
34
         ({ sources, error }: { error: Error; sources: Array<{ id: string; }>; }) => {
15
         ({ sources, error }: { error: Error; sources: Array<{ id: string; }>; }) => {
35
             if (sources) {
16
             if (sources) {
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
  * Converts an array of DesktopCapturerSources to an object with types for keys
28
  * Converts an array of DesktopCapturerSources to an object with types for keys
63
  * and values being an array with sources of the key's type.
29
  * and values being an array with sources of the key's type.

+ 0
- 5
react/features/desktop-picker/types.ts Datei anzeigen

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

Laden…
Abbrechen
Speichern