Dynamic audio level indicator

This commit is contained in:
Fedor Indutny 2022-05-18 20:28:51 -07:00 committed by GitHub
parent ac59dec5aa
commit e6223b6a11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 323 additions and 123 deletions

View file

@ -4,7 +4,7 @@
import * as React from 'react';
import { times } from 'lodash';
import { storiesOf } from '@storybook/react';
import { boolean } from '@storybook/addon-knobs';
import { boolean, select } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { AvatarColors } from '../types/Colors';
@ -39,7 +39,7 @@ const getCommonActiveCallData = () => ({
conversation,
hasLocalAudio: boolean('hasLocalAudio', true),
hasLocalVideo: boolean('hasLocalVideo', false),
amISpeaking: boolean('amISpeaking', false),
localAudioLevel: select('localAudioLevel', [0, 0.5, 1], 0),
isInSpeakerView: boolean('isInSpeakerView', false),
joinedAt: Date.now(),
outgoingRing: true,
@ -120,7 +120,7 @@ story.add('Group Call', () => {
deviceCount: 0,
peekedParticipants: [],
remoteParticipants: [],
speakingDemuxIds: new Set<number>(),
remoteAudioLevels: new Map<number, number>(),
},
});
return <CallingPip {...props} />;