-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(screenshare): Audio only screenshare (#8922)
* audio only screen share implementation * clean up * handle stop screen share from chrome window * update icon
- Loading branch information
1 parent
fd4819a
commit 6d3d65d
Showing
19 changed files
with
210 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @flow | ||
|
||
/** | ||
* Type of action which sets the current state of screen audio sharing. | ||
* | ||
* { | ||
* type: SET_SCREEN_AUDIO_SHARE_STATE, | ||
* isSharingAudio: boolean | ||
* } | ||
*/ | ||
export const SET_SCREEN_AUDIO_SHARE_STATE = 'SET_SCREEN_AUDIO_SHARE_STATE'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// @flow | ||
|
||
import { SET_SCREEN_AUDIO_SHARE_STATE } from './actionTypes'; | ||
|
||
/** | ||
* Updates the current known status of the shared video. | ||
* | ||
* @param {boolean} isSharingAudio - Is audio currently being shared or not. | ||
* @returns {{ | ||
* type: SET_SCREEN_AUDIO_SHARE_STATE, | ||
* isSharingAudio: boolean | ||
* }} | ||
*/ | ||
export function setScreenAudioShareState(isSharingAudio: boolean) { | ||
return { | ||
type: SET_SCREEN_AUDIO_SHARE_STATE, | ||
isSharingAudio | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// @flow | ||
|
||
import { isMacOS } from '../base/environment'; | ||
import { browser } from '../base/lib-jitsi-meet'; | ||
|
||
|
||
/** | ||
* State of audio sharing. | ||
* | ||
* @param {Object} state - The state of the application. | ||
* @returns {boolean} | ||
*/ | ||
export function isScreenAudioShared(state: Object) { | ||
return state['features/screen-share'].isSharingAudio; | ||
} | ||
|
||
/** | ||
* Returns the visibility of the audio only screen share button. Currently electron on mac os doesn't | ||
* have support for this functionality. | ||
* | ||
* @returns {boolean} | ||
*/ | ||
export function isScreenAudioSupported() { | ||
return !(browser.isElectron() && isMacOS()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './actions'; | ||
export * from './actionTypes'; | ||
export * from './functions'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
import { ReducerRegistry } from '../base/redux'; | ||
|
||
import { SET_SCREEN_AUDIO_SHARE_STATE } from './actionTypes'; | ||
|
||
/** | ||
* Reduces the Redux actions of the feature features/screen-share. | ||
*/ | ||
ReducerRegistry.register('features/screen-share', (state = {}, action) => { | ||
const { isSharingAudio } = action; | ||
|
||
switch (action.type) { | ||
case SET_SCREEN_AUDIO_SHARE_STATE: | ||
return { | ||
...state, | ||
isSharingAudio | ||
}; | ||
|
||
default: | ||
return state; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.