Calling lobby: show your blurred avatar instead of other person's
This commit is contained in:
parent
4d95f83007
commit
957a1e0d07
4 changed files with 26 additions and 29 deletions
|
@ -13,16 +13,6 @@ import enMessages from '../../_locales/en/messages.json';
|
|||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
|
||||
const conversation = {
|
||||
id: '3051234567',
|
||||
avatarPath: undefined,
|
||||
color: 'ultramarine' as ColorType,
|
||||
title: 'Rick Sanchez',
|
||||
name: 'Rick Sanchez',
|
||||
phoneNumber: '3051234567',
|
||||
profileName: 'Rick Sanchez',
|
||||
};
|
||||
|
||||
const camera = {
|
||||
deviceId: 'dfbe6effe70b0611ba0fdc2a9ea3f39f6cb110e6687948f7e5f016c111b7329c',
|
||||
groupId: '63ee218d2446869e40adfc958ff98263e51f74382b0143328ee4826f20a76f47',
|
||||
|
@ -35,11 +25,14 @@ const camera = {
|
|||
|
||||
const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||
availableCameras: overrideProps.availableCameras || [camera],
|
||||
conversation,
|
||||
conversation: {
|
||||
title: 'Rick Sanchez',
|
||||
},
|
||||
hasLocalAudio: boolean('hasLocalAudio', overrideProps.hasLocalAudio || false),
|
||||
hasLocalVideo: boolean('hasLocalVideo', overrideProps.hasLocalVideo || false),
|
||||
i18n,
|
||||
isGroupCall: boolean('isGroupCall', overrideProps.isGroupCall || false),
|
||||
me: overrideProps.me || { color: 'ultramarine' as ColorType },
|
||||
onCallCanceled: action('on-call-canceled'),
|
||||
onJoinCall: action('on-join-call'),
|
||||
setLocalAudio: action('set-local-audio'),
|
||||
|
@ -53,24 +46,27 @@ const story = storiesOf('Components/CallingLobby', module);
|
|||
|
||||
story.add('Default', () => {
|
||||
const props = createProps();
|
||||
return (
|
||||
<CallingLobby
|
||||
{...props}
|
||||
conversation={{
|
||||
...conversation,
|
||||
avatarPath: 'https://www.stevensegallery.com/600/600',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
return <CallingLobby {...props} />;
|
||||
});
|
||||
|
||||
story.add('No Camera', () => {
|
||||
story.add('No Camera, no avatar', () => {
|
||||
const props = createProps({
|
||||
availableCameras: [],
|
||||
});
|
||||
return <CallingLobby {...props} />;
|
||||
});
|
||||
|
||||
story.add('No Camera, local avatar', () => {
|
||||
const props = createProps({
|
||||
availableCameras: [],
|
||||
me: {
|
||||
color: 'ultramarine' as ColorType,
|
||||
avatarPath: '/fixtures/kitten-4-112-112.jpg',
|
||||
},
|
||||
});
|
||||
return <CallingLobby {...props} />;
|
||||
});
|
||||
|
||||
story.add('Local Video', () => {
|
||||
const props = createProps({
|
||||
hasLocalVideo: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue