mirror of https://github.com/jitsi/jitsi-meet
parent
745879c447
commit
45f4643469
@ -0,0 +1,11 @@ |
||||
/** |
||||
* The type of the action which sets the list of known participant IDs which |
||||
* have an active screen share. |
||||
* |
||||
* @returns {{ |
||||
* type: SCREEN_SHARE_PARTICIPANTS_UPDATED, |
||||
* participantIds: Array<string> |
||||
* }} |
||||
*/ |
||||
export const SCREEN_SHARE_PARTICIPANTS_UPDATED |
||||
= 'SCREEN_SHARE_PARTICIPANTS_UPDATED'; |
@ -0,0 +1,21 @@ |
||||
// @flow
|
||||
|
||||
import { SCREEN_SHARE_PARTICIPANTS_UPDATED } from './actionTypes'; |
||||
|
||||
/** |
||||
* Creates a (redux) action which signals that the list of known participants |
||||
* with screen shares has changed. |
||||
* |
||||
* @param {string} participantIds - The participants which currently have active |
||||
* screen share streams. |
||||
* @returns {{ |
||||
* type: SCREEN_SHARE_PARTICIPANTS_UPDATED, |
||||
* participantId: string |
||||
* }} |
||||
*/ |
||||
export function setParticipantsWithScreenShare(participantIds: Array<string>) { |
||||
return { |
||||
type: SCREEN_SHARE_PARTICIPANTS_UPDATED, |
||||
participantIds |
||||
}; |
||||
} |
@ -0,0 +1,22 @@ |
||||
// @flow
|
||||
|
||||
import { ReducerRegistry } from '../../base/redux'; |
||||
|
||||
import { SCREEN_SHARE_PARTICIPANTS_UPDATED } from './actionTypes'; |
||||
|
||||
const DEFAULT_STATE = { |
||||
screenShares: [] |
||||
}; |
||||
|
||||
ReducerRegistry.register('features/mobile/external-api', (state = DEFAULT_STATE, action) => { |
||||
switch (action.type) { |
||||
case SCREEN_SHARE_PARTICIPANTS_UPDATED: { |
||||
return { |
||||
...state, |
||||
screenShares: action.participantIds |
||||
}; |
||||
} |
||||
} |
||||
|
||||
return state; |
||||
}); |
Loading…
Reference in new issue