v1.7.0/call cleanup, server side toggle
This commit is contained in:
@@ -175,17 +175,7 @@ export default class CallManager {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
async usersListHandle() {
|
||||
var usersOnCall = {};
|
||||
VoxeetSDK.conference.participants.forEach((v, k, m) => {
|
||||
usersOnCall[k] = v;
|
||||
});
|
||||
this.listener({ usersOnCall });
|
||||
}
|
||||
async initialize() {
|
||||
VoxeetSDK.conference.on('participantAdded', () => this.usersListHandle());
|
||||
VoxeetSDK.conference.on('participantUpdated', () => this.usersListHandle());
|
||||
|
||||
VoxeetSDK.conference.on('joined', () => {
|
||||
this.listener({ onCall: true, callActionPending: false, usingVideo: this.__useVideo });
|
||||
});
|
||||
|
||||
+5
-9
@@ -89,7 +89,6 @@ export default class Chat extends Component {
|
||||
adminOnly: false,
|
||||
adminModeUpdate: false,
|
||||
users: [],
|
||||
usersOnCall: {},
|
||||
gif: false,
|
||||
onCall: false,
|
||||
muted: false,
|
||||
@@ -102,7 +101,6 @@ export default class Chat extends Component {
|
||||
LocalData().allowAutoRejoin !== undefined ? LocalData().allowAutoRejoin : true,
|
||||
replyTo: null,
|
||||
sendingMessages: [],
|
||||
volumes: {},
|
||||
usingVideo: false,
|
||||
};
|
||||
this.port = null;
|
||||
@@ -387,7 +385,6 @@ export default class Chat extends Component {
|
||||
this.sendMessageInvoker(iGif.images.original.url);
|
||||
}
|
||||
handlePhoneCall(useVideo = false) {
|
||||
console.log('USEVID 1', useVideo);
|
||||
const { onCall, conference, admin, adminOnly } = this.state;
|
||||
if (window.navigator && onCall === false) {
|
||||
try {
|
||||
@@ -403,7 +400,6 @@ export default class Chat extends Component {
|
||||
audio: true,
|
||||
})
|
||||
.then(() => {
|
||||
console.log('USEVID 2', useVideo);
|
||||
if (useVideo === true) {
|
||||
window.navigator
|
||||
.getUserMedia({
|
||||
@@ -416,7 +412,7 @@ export default class Chat extends Component {
|
||||
.catch(() => {
|
||||
document.getElementById('mic-permission-overlay').remove();
|
||||
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
|
||||
);
|
||||
});
|
||||
@@ -510,15 +506,15 @@ export default class Chat extends Component {
|
||||
users,
|
||||
callActionPending,
|
||||
allowAutoRejoin,
|
||||
usersOnCall,
|
||||
isFullscreen,
|
||||
adminModeUpdate,
|
||||
adminOnly,
|
||||
replyTo,
|
||||
sendingMessages,
|
||||
volumes,
|
||||
usingVideo,
|
||||
} = this.state;
|
||||
const { status } = this.props;
|
||||
const { callEnabled } = status;
|
||||
const alerts = [
|
||||
{
|
||||
condition: () => adminOnly,
|
||||
@@ -772,7 +768,7 @@ export default class Chat extends Component {
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{gif || newMessage ? null : callActionPending ? (
|
||||
{gif || newMessage || !callEnabled ? null : callActionPending ? (
|
||||
<CircularProgress className="icon-button" color="secondary" />
|
||||
) : (
|
||||
<Tooltip
|
||||
@@ -787,7 +783,7 @@ export default class Chat extends Component {
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
)}
|
||||
{gif || newMessage ? null : callActionPending ? (
|
||||
{gif || newMessage || !callEnabled ? null : callActionPending ? (
|
||||
<CircularProgress className="icon-button" color="secondary" />
|
||||
) : (
|
||||
<Tooltip placement="top" title={onCall ? 'Leave Call' : 'Join Call'}>
|
||||
|
||||
+1
-5
@@ -539,11 +539,7 @@ textarea::-webkit-scrollbar {
|
||||
margin-bottom: 0px;
|
||||
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 {
|
||||
padding: 12px 0 !important;
|
||||
max-height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user