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

View File

@ -193,7 +193,7 @@ function _setAudioOnly({ dispatch, getState }, next, action) {
// Make sure we mute both the desktop and video tracks. // Make sure we mute both the desktop and video tracks.
dispatch(setVideoMuted(audioOnly, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY)); dispatch(setVideoMuted(audioOnly, VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY));
if (getMultipleVideoSendingSupportFeatureFlag(state)) { 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); return next(action);

View File

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