v1.6.0/system alerts, and user call volume
This commit is contained in:
+53
-14
@@ -36,6 +36,8 @@ import {
|
||||
Chip,
|
||||
CircularProgress,
|
||||
Paper,
|
||||
Grid,
|
||||
Slider,
|
||||
} from '@material-ui/core';
|
||||
import Thread from './Thread';
|
||||
import {
|
||||
@@ -47,10 +49,10 @@ import {
|
||||
PLAYER_SOURCE,
|
||||
LocalData,
|
||||
PLAYER_STATUS,
|
||||
emptyLocalData,
|
||||
updateLocalData,
|
||||
UpdateAdminOnly,
|
||||
scrollThread,
|
||||
removeLocalData,
|
||||
} from './Api';
|
||||
import {
|
||||
Send,
|
||||
@@ -70,6 +72,8 @@ import {
|
||||
Error,
|
||||
FullscreenExit,
|
||||
Fullscreen,
|
||||
VolumeDown,
|
||||
VolumeUp,
|
||||
CancelRounded,
|
||||
} from '@material-ui/icons';
|
||||
import Create from './Create';
|
||||
@@ -255,7 +259,8 @@ export default class Chat extends Component {
|
||||
DeleteRoomApi(data)
|
||||
.then((res) => {
|
||||
this.props.notify('Ended party');
|
||||
emptyLocalData();
|
||||
removeLocalData('partyPin');
|
||||
removeLocalData('partyName');
|
||||
goTo(Create, this.props);
|
||||
this.props.updateLoading(false);
|
||||
})
|
||||
@@ -282,7 +287,8 @@ export default class Chat extends Component {
|
||||
LeaveRoomApi(data)
|
||||
.then((res) => {
|
||||
this.props.notify('Left party');
|
||||
emptyLocalData();
|
||||
removeLocalData('partyPin');
|
||||
removeLocalData('partyName');
|
||||
goTo(Create, this.props);
|
||||
this.props.updateLoading(false);
|
||||
})
|
||||
@@ -434,6 +440,23 @@ export default class Chat extends Component {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
getVideoVolume (id) {
|
||||
console.log('GET VIDEO VOLUME FOR USER', id);
|
||||
if (document.getElementById(id)) {
|
||||
return document.getElementById(id).volume * 10;
|
||||
} else {
|
||||
console.log('VIDEO NOT FOUND FOR USER', id);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
setVideoVolume (v,id) {
|
||||
console.log('SET VIDEO VOLUME FOR USER', v, id);
|
||||
if (document.getElementById(id)) {
|
||||
return document.getElementById(id).volume = (v/10);
|
||||
} else {
|
||||
console.log('VIDEO NOT FOUND FOR USER', id);
|
||||
}
|
||||
}
|
||||
render() {
|
||||
const {
|
||||
admin,
|
||||
@@ -634,17 +657,33 @@ export default class Chat extends Component {
|
||||
{Object.keys(usersOnCall).map((id) => {
|
||||
return usersOnCall[id].status === 'Connected' ||
|
||||
usersOnCall[id].status === 'Connecting' ? (
|
||||
<Chip
|
||||
color={
|
||||
usersOnCall[id].info.externalId === LocalData().userUid
|
||||
? 'secondary'
|
||||
: 'default'
|
||||
}
|
||||
className="party-controls-users-chip"
|
||||
clickable
|
||||
size="small"
|
||||
label={usersOnCall[id].info.name || ' '}
|
||||
/>
|
||||
<Tooltip interactive
|
||||
title={
|
||||
<Grid className="party-controls-users-volume" container spacing={2}>
|
||||
<Grid item>
|
||||
<VolumeDown />
|
||||
</Grid>
|
||||
<Grid item xs>
|
||||
<Slider max={10} min={0} step={1} color="secondary" value={this.getVideoVolume(id)} onChangeCommitted={(e,v) => this.setVideoVolume(v, id)} />
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<VolumeUp />
|
||||
</Grid>
|
||||
</Grid>
|
||||
}
|
||||
>
|
||||
<Chip
|
||||
color={
|
||||
usersOnCall[id].info.externalId === LocalData().userUid
|
||||
? 'secondary'
|
||||
: 'default'
|
||||
}
|
||||
className="party-controls-users-chip"
|
||||
clickable
|
||||
size="small"
|
||||
label={usersOnCall[id].info.name || ' '}
|
||||
/>
|
||||
</Tooltip>
|
||||
) : null;
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user