Let users ring members when starting a group call

Co-Authored-By: Josh Perez <60019601+josh-signal@users.noreply.github.com>
This commit is contained in:
Evan Hahn 2021-08-25 16:42:51 -05:00 committed by GitHub
parent 4afe4649ec
commit 0e7f641dc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 556 additions and 97 deletions

View file

@ -42,9 +42,9 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => {
return {
availableCameras: overrideProps.availableCameras || [camera],
conversation,
groupMembers: isGroupCall
? times(3, () => getDefaultConversation())
: undefined,
groupMembers:
overrideProps.groupMembers ||
(isGroupCall ? times(3, () => getDefaultConversation()) : undefined),
hasLocalAudio: boolean(
'hasLocalAudio',
overrideProps.hasLocalAudio || false
@ -55,17 +55,22 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => {
),
i18n,
isGroupCall,
isGroupCallOutboundRingEnabled: true,
isCallFull: boolean('isCallFull', overrideProps.isCallFull || false),
maxGroupCallRingSize: overrideProps.maxGroupCallRingSize || 16,
me: overrideProps.me || {
color: AvatarColors[0],
id: generateUuid(),
uuid: generateUuid(),
},
onCallCanceled: action('on-call-canceled'),
onJoinCall: action('on-join-call'),
outgoingRing: boolean('outgoingRing', Boolean(overrideProps.outgoingRing)),
peekedParticipants: overrideProps.peekedParticipants || [],
setLocalAudio: action('set-local-audio'),
setLocalPreview: action('set-local-preview'),
setLocalVideo: action('set-local-video'),
setOutgoingRing: action('set-outgoing-ring'),
showParticipantsList: boolean(
'showParticipantsList',
Boolean(overrideProps.showParticipantsList)
@ -101,6 +106,7 @@ story.add('No Camera, local avatar', () => {
me: {
avatarPath: '/fixtures/kitten-4-112-112.jpg',
color: AvatarColors[0],
id: generateUuid(),
uuid: generateUuid(),
},
});
@ -138,7 +144,10 @@ story.add('Group Call - 1 peeked participant (self)', () => {
const uuid = generateUuid();
const props = createProps({
isGroupCall: true,
me: { uuid },
me: {
id: generateUuid(),
uuid,
},
peekedParticipants: [fakePeekedParticipant({ title: 'Ash', uuid })],
});
return <CallingLobby {...props} />;
@ -175,3 +184,11 @@ story.add('Group Call - call full', () => {
});
return <CallingLobby {...props} />;
});
story.add('Group Call - 0 peeked participants, big group', () => {
const props = createProps({
isGroupCall: true,
groupMembers: times(100, () => getDefaultConversation()),
});
return <CallingLobby {...props} />;
});