fix(screenshare): remove redundant event / only show on supported env (#9100)
* remove redundant event / only show on supported env * remove unused imports
This commit is contained in:
parent
cf37d34923
commit
6ee868032e
|
@ -1,10 +1,8 @@
|
|||
// @flow
|
||||
|
||||
import UIEvents from '../../../../service/UI/UIEvents';
|
||||
import { setPrejoinPageVisibility, setSkipPrejoinOnReload } from '../../prejoin';
|
||||
import { JitsiConferenceErrors } from '../lib-jitsi-meet';
|
||||
import { MiddlewareRegistry } from '../redux';
|
||||
import { TOGGLE_SCREENSHARING } from '../tracks/actionTypes';
|
||||
|
||||
import { CONFERENCE_FAILED, CONFERENCE_JOINED } from './actionTypes';
|
||||
import './middleware.any';
|
||||
|
@ -30,13 +28,6 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
|
|||
|
||||
break;
|
||||
}
|
||||
case TOGGLE_SCREENSHARING: {
|
||||
if (typeof APP === 'object') {
|
||||
APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING, action.audioOnly);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return next(action);
|
||||
|
|
|
@ -50,6 +50,15 @@ export function isMacOS() {
|
|||
return Platform.OS === 'macos';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the current OS is Windows.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isWindows() {
|
||||
return Platform.OS === 'windows';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the current browser or the list of passed in browsers
|
||||
* is considered suboptimal. Suboptimal means it is a supported browser but has
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
|
||||
import { isMacOS } from '../base/environment';
|
||||
import { isWindows } from '../base/environment';
|
||||
import { browser } from '../base/lib-jitsi-meet';
|
||||
|
||||
|
||||
|
@ -15,11 +15,11 @@ export function isScreenAudioShared(state: Object) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the visibility of the audio only screen share button. Currently electron on mac os doesn't
|
||||
* have support for this functionality.
|
||||
* Returns the visibility of the audio only screen share button. Currently only chrome browser and electron on
|
||||
* windows supports this functionality.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function isScreenAudioSupported() {
|
||||
return !(browser.isElectron() && isMacOS());
|
||||
return browser.isChrome() || (browser.isElectron() && isWindows());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue