v1.6.0/volume manager, styling fixes

This commit is contained in:
2020-08-05 21:31:35 -04:00
parent 9d1fe04bda
commit 9d4a9ca0ad
4 changed files with 102 additions and 94 deletions
+1 -12
View File
@@ -105,7 +105,7 @@ export default class CallManager {
const joined = await VoxeetSDK.conference
.join(conference, { constraints: { audio: true, video: false } })
.then(() => true)
.catch(e => {
.catch((e) => {
this.listener({ onCall: false, muted: false, callActionPending: false });
this.notify('Unable to join call. Try again in a moment.');
console.error('Error joining call', e);
@@ -157,21 +157,10 @@ export default class CallManager {
});
VoxeetSDK.conference.on('streamAdded', (participant, stream) => {
if (participant !== VoxeetSDK.session.participant) {
const voiceNode = document.createElement('video');
voiceNode.srcObject = stream;
voiceNode.id = participant.id;
voiceNode.width = 0;
voiceNode.height = 0;
voiceNode.autoplay = true;
voiceNode.classList.add('voxeetAudioOut');
document.body.appendChild(voiceNode);
}
this.listener({ callActionPending: false });
});
VoxeetSDK.conference.on('streamRemoved', (participant, stream) => {
if (document.getElementById(participant.id)) document.getElementById(participant.id).remove();
this.listener({ callActionPending: false });
});