v1.7.0/call cleanup, server side toggle

This commit is contained in:
2020-09-05 18:48:00 -04:00
parent 93c903cc45
commit 785071b4fe
3 changed files with 6 additions and 24 deletions
-10
View File
@@ -175,17 +175,7 @@ export default class CallManager {
} }
return true; return true;
} }
async usersListHandle() {
var usersOnCall = {};
VoxeetSDK.conference.participants.forEach((v, k, m) => {
usersOnCall[k] = v;
});
this.listener({ usersOnCall });
}
async initialize() { async initialize() {
VoxeetSDK.conference.on('participantAdded', () => this.usersListHandle());
VoxeetSDK.conference.on('participantUpdated', () => this.usersListHandle());
VoxeetSDK.conference.on('joined', () => { VoxeetSDK.conference.on('joined', () => {
this.listener({ onCall: true, callActionPending: false, usingVideo: this.__useVideo }); this.listener({ onCall: true, callActionPending: false, usingVideo: this.__useVideo });
}); });
+5 -9
View File
@@ -89,7 +89,6 @@ export default class Chat extends Component {
adminOnly: false, adminOnly: false,
adminModeUpdate: false, adminModeUpdate: false,
users: [], users: [],
usersOnCall: {},
gif: false, gif: false,
onCall: false, onCall: false,
muted: false, muted: false,
@@ -102,7 +101,6 @@ export default class Chat extends Component {
LocalData().allowAutoRejoin !== undefined ? LocalData().allowAutoRejoin : true, LocalData().allowAutoRejoin !== undefined ? LocalData().allowAutoRejoin : true,
replyTo: null, replyTo: null,
sendingMessages: [], sendingMessages: [],
volumes: {},
usingVideo: false, usingVideo: false,
}; };
this.port = null; this.port = null;
@@ -387,7 +385,6 @@ export default class Chat extends Component {
this.sendMessageInvoker(iGif.images.original.url); this.sendMessageInvoker(iGif.images.original.url);
} }
handlePhoneCall(useVideo = false) { handlePhoneCall(useVideo = false) {
console.log('USEVID 1', useVideo);
const { onCall, conference, admin, adminOnly } = this.state; const { onCall, conference, admin, adminOnly } = this.state;
if (window.navigator && onCall === false) { if (window.navigator && onCall === false) {
try { try {
@@ -403,7 +400,6 @@ export default class Chat extends Component {
audio: true, audio: true,
}) })
.then(() => { .then(() => {
console.log('USEVID 2', useVideo);
if (useVideo === true) { if (useVideo === true) {
window.navigator window.navigator
.getUserMedia({ .getUserMedia({
@@ -416,7 +412,7 @@ export default class Chat extends Component {
.catch(() => { .catch(() => {
document.getElementById('mic-permission-overlay').remove(); document.getElementById('mic-permission-overlay').remove();
this.props.notify( this.props.notify(
'Check your webcam permission for this website. You can modify site permission by clicking on the lock (🔒) icon in the top left, then clicking site permissions.', 'Check your camera permission for this website. You can modify site permission by clicking on the lock (🔒) icon in the top left, then clicking site permissions.',
15000 15000
); );
}); });
@@ -510,15 +506,15 @@ export default class Chat extends Component {
users, users,
callActionPending, callActionPending,
allowAutoRejoin, allowAutoRejoin,
usersOnCall,
isFullscreen, isFullscreen,
adminModeUpdate, adminModeUpdate,
adminOnly, adminOnly,
replyTo, replyTo,
sendingMessages, sendingMessages,
volumes,
usingVideo, usingVideo,
} = this.state; } = this.state;
const { status } = this.props;
const { callEnabled } = status;
const alerts = [ const alerts = [
{ {
condition: () => adminOnly, condition: () => adminOnly,
@@ -772,7 +768,7 @@ export default class Chat extends Component {
</IconButton> </IconButton>
</Tooltip> </Tooltip>
)} )}
{gif || newMessage ? null : callActionPending ? ( {gif || newMessage || !callEnabled ? null : callActionPending ? (
<CircularProgress className="icon-button" color="secondary" /> <CircularProgress className="icon-button" color="secondary" />
) : ( ) : (
<Tooltip <Tooltip
@@ -787,7 +783,7 @@ export default class Chat extends Component {
</IconButton> </IconButton>
</Tooltip> </Tooltip>
)} )}
{gif || newMessage ? null : callActionPending ? ( {gif || newMessage || !callEnabled ? null : callActionPending ? (
<CircularProgress className="icon-button" color="secondary" /> <CircularProgress className="icon-button" color="secondary" />
) : ( ) : (
<Tooltip placement="top" title={onCall ? 'Leave Call' : 'Join Call'}> <Tooltip placement="top" title={onCall ? 'Leave Call' : 'Join Call'}>
+1 -5
View File
@@ -539,11 +539,7 @@ textarea::-webkit-scrollbar {
margin-bottom: 0px; margin-bottom: 0px;
border-radius: 26px; border-radius: 26px;
} }
.text-phone-panel .icon-button {
width: 15px !important;
height: 15px !important;
margin: 7.5px !important;
}
.text-phone-panel .gif-button.gif-close { .text-phone-panel .gif-button.gif-close {
padding: 12px 0 !important; padding: 12px 0 !important;
max-height: 100%; max-height: 100%;