v1.4.3/call manager fixes, usersOnCall view

This commit is contained in:
2020-07-20 01:56:03 -04:00
parent c80121bf25
commit 0095214a6f
4 changed files with 75 additions and 7 deletions
+33 -2
View File
@@ -71,6 +71,7 @@ import Create from './Create';
import { goTo } from 'route-lite';
import CallManager from './CallManager';
import VideoListener from './VideoListener';
import VoxeetSDK from '@voxeet/voxeet-web-sdk';
const giphyFetch = new GiphyFetch('ojJbIMUN6XRMn4mHiFFav3rMCpXUg8sq');
const alerts = [
@@ -90,6 +91,7 @@ export default class Chat extends Component {
newMessage: '',
admin: null,
users: [],
usersOnCall: {},
gif: false,
onCall: false,
muted: false,
@@ -310,6 +312,7 @@ export default class Chat extends Component {
allowChatNotification,
users,
callActionPending,
usersOnCall,
} = this.state;
return (
<div className="party-chat-container">
@@ -387,7 +390,15 @@ export default class Chat extends Component {
color={allowChatNotification ? 'secondary' : 'primary'}
/>
}
label="Allow chat notification when side panel is closed"
label={
<span>
Allow chat notification when side panel is closed
<br />
<span style={{ color: '#8a8a8a' }}>
{allowChatNotification ? 'Currently Enabled' : 'Currently Disabled'}
</span>
</span>
}
labelPlacement="end"
/>
<Typography className="party-controls-users-title" variant="overline">
@@ -398,6 +409,26 @@ export default class Chat extends Component {
<Chip className="party-controls-users-chip" clickable size="small" label={user} />
))}
</div>
{VoxeetSDK.conference.participants.size > 0 ? (
<Typography className="party-controls-users-title" variant="overline">
MEMBERS IN CALL
</Typography>
) : null}
{VoxeetSDK.conference.participants.size > 0 ? (
<div className="party-controls-users-container">
{Object.keys(usersOnCall).map((id) => {
return usersOnCall[id].status === 'Connected' ||
usersOnCall[id].status === 'Connecting' ? (
<Chip
className="party-controls-users-chip"
clickable
size="small"
label={usersOnCall[id].info.name}
/>
) : null;
})}
</div>
) : null}
</ExpansionPanelDetails>
</ExpansionPanel>
{player ? (
@@ -495,7 +526,7 @@ export default class Chat extends Component {
placeholder={this.state.gif ? 'Search something...' : 'Say something...'}
helperText={
this.state.newMessage && !this.state.gif
? 'Enter to send / Shift+Enter for next line'
? 'Enter to send / Shift+Enter for new line'
: this.state.gif
? 'Click on gif to send'
: null