Ver código fonte

fix(screenshare): remove redundant event / only show on supported env (#9100)

* remove redundant event / only show on supported env

* remove unused imports
master
Andrei Gavrilescu 4 anos atrás
pai
commit
6ee868032e
Nenhuma conta vinculada ao e-mail do autor do commit

+ 0
- 9
react/features/base/conference/middleware.web.js Ver arquivo

1
 // @flow
1
 // @flow
2
 
2
 
3
-import UIEvents from '../../../../service/UI/UIEvents';
4
 import { setPrejoinPageVisibility, setSkipPrejoinOnReload } from '../../prejoin';
3
 import { setPrejoinPageVisibility, setSkipPrejoinOnReload } from '../../prejoin';
5
 import { JitsiConferenceErrors } from '../lib-jitsi-meet';
4
 import { JitsiConferenceErrors } from '../lib-jitsi-meet';
6
 import { MiddlewareRegistry } from '../redux';
5
 import { MiddlewareRegistry } from '../redux';
7
-import { TOGGLE_SCREENSHARING } from '../tracks/actionTypes';
8
 
6
 
9
 import { CONFERENCE_FAILED, CONFERENCE_JOINED } from './actionTypes';
7
 import { CONFERENCE_FAILED, CONFERENCE_JOINED } from './actionTypes';
10
 import './middleware.any';
8
 import './middleware.any';
30
 
28
 
31
         break;
29
         break;
32
     }
30
     }
33
-    case TOGGLE_SCREENSHARING: {
34
-        if (typeof APP === 'object') {
35
-            APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING, action.audioOnly);
36
-        }
37
-
38
-        break;
39
-    }
40
     }
31
     }
41
 
32
 
42
     return next(action);
33
     return next(action);

+ 9
- 0
react/features/base/environment/environment.js Ver arquivo

50
     return Platform.OS === 'macos';
50
     return Platform.OS === 'macos';
51
 }
51
 }
52
 
52
 
53
+/**
54
+ * Returns whether or not the current OS is Windows.
55
+ *
56
+ * @returns {boolean}
57
+ */
58
+export function isWindows() {
59
+    return Platform.OS === 'windows';
60
+}
61
+
53
 /**
62
 /**
54
  * Returns whether or not the current browser or the list of passed in browsers
63
  * Returns whether or not the current browser or the list of passed in browsers
55
  * is considered suboptimal. Suboptimal means it is a supported browser but has
64
  * is considered suboptimal. Suboptimal means it is a supported browser but has

+ 4
- 4
react/features/screen-share/functions.js Ver arquivo

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { isMacOS } from '../base/environment';
3
+import { isWindows } from '../base/environment';
4
 import { browser } from '../base/lib-jitsi-meet';
4
 import { browser } from '../base/lib-jitsi-meet';
5
 
5
 
6
 
6
 
15
 }
15
 }
16
 
16
 
17
 /**
17
 /**
18
- * Returns the visibility of the audio only screen share button. Currently electron on mac os doesn't
19
- * have support for this functionality.
18
+ * Returns the visibility of the audio only screen share button. Currently only chrome browser and electron on
19
+ * windows supports this functionality.
20
  *
20
  *
21
  * @returns {boolean}
21
  * @returns {boolean}
22
  */
22
  */
23
 export function isScreenAudioSupported() {
23
 export function isScreenAudioSupported() {
24
-    return !(browser.isElectron() && isMacOS());
24
+    return browser.isChrome() || (browser.isElectron() && isWindows());
25
 }
25
 }

Carregando…
Cancelar
Salvar