ref(setScreenshareMuted): remove mediaType

This commit is contained in:
Hristo Terezov 2022-12-07 15:41:50 -06:00
parent 5077a33fcb
commit 9cc41469d2
3 changed files with 2 additions and 6 deletions

View File

@ -17,7 +17,6 @@ import {
} from './actionTypes';
import {
MEDIA_TYPE,
type MediaType,
SCREENSHARE_MUTISM_AUTHORITY,
VIDEO_MUTISM_AUTHORITY
} from './constants';
@ -95,14 +94,12 @@ export function setCameraFacingMode(cameraFacingMode: string) {
* Action to set the muted state of the local screenshare.
*
* @param {boolean} muted - True if the local screenshare is to be enabled or false otherwise.
* @param {MEDIA_TYPE} mediaType - The type of media.
* @param {number} authority - The {@link SCREENSHARE_MUTISM_AUTHORITY} which is muting/unmuting the local screenshare.
* @param {boolean} ensureTrack - True if we want to ensure that a new track is created if missing.
* @returns {Function}
*/
export function setScreenshareMuted(
muted: boolean,
mediaType: MediaType = MEDIA_TYPE.SCREENSHARE,
authority: number = SCREENSHARE_MUTISM_AUTHORITY.USER,
ensureTrack = false) {
return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
@ -125,7 +122,6 @@ export function setScreenshareMuted(
return dispatch({
type: SET_SCREENSHARE_MUTED,
authority,
mediaType,
ensureTrack,
muted: newValue
});

View File

@ -193,7 +193,7 @@ function _setAudioOnly({ dispatch, getState }, next, action) {
// Make sure we mute both the desktop and video tracks.
dispatch(setVideoMuted(audioOnly, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY));
if (getMultipleVideoSendingSupportFeatureFlag(state)) {
dispatch(setScreenshareMuted(audioOnly, MEDIA_TYPE.SCREENSHARE, SCREENSHARE_MUTISM_AUTHORITY.AUDIO_ONLY));
dispatch(setScreenshareMuted(audioOnly, SCREENSHARE_MUTISM_AUTHORITY.AUDIO_ONLY));
}
return next(action);

View File

@ -79,7 +79,7 @@ MiddlewareRegistry.register(store => next => action => {
}
case SET_SCREENSHARE_MUTED:
_setMuted(store, action, action.mediaType);
_setMuted(store, action, MEDIA_TYPE.SCREENSHARE);
break;
case SET_VIDEO_MUTED: