Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fixes issues for audio only participants
hristoterezov1176390214e1
diff --git a/conference.js b/conference.jsindex abf88f0658..0f3cf46399 100644--- a/conference.js+++ b/conference.js@@ -225,7 +225,9 @@ export default {return JitsiMeetJS.init(config).then(() => {return Promise.all([- this.createLocalTracks('audio', 'video').catch(+ this.createLocalTracks('audio', 'video').catch(()=>{+ return this.createLocalTracks('audio');+ }).catch(() => {return [];}),connect()]);@@ -500,7 +502,7 @@ export default {handler(id , mute);});room.on(ConferenceEvents.TRACK_AUDIO_LEVEL_CHANGED, (id, lvl) => {- if(this.isLocalId(id) && localAudio.isMuted()) {+ if(this.isLocalId(id) && localAudio && localAudio.isMuted()) {lvl = 0;}@@ -584,9 +586,13 @@ export default {});APP.UI.addListener(UIEvents.AUDIO_MUTED, (muted) => {+ if(!localAudio)+ return;(muted)? localAudio.mute() : localAudio.unmute();});APP.UI.addListener(UIEvents.VIDEO_MUTED, (muted) => {+ if(!localVideo)+ return;(muted)? localVideo.mute() : localVideo.unmute();});@@ -794,7 +800,7 @@ export default {APP.desktopsharing.addListener(DSEvents.NEW_STREAM_CREATED,(track, callback) => {const localCallback = (newTrack) => {- if(!newTrack || !newTrack.isLocal() ||+ if(!newTrack || !localVideo || !newTrack.isLocal() ||newTrack !== localVideo)return;if(localVideo.isMuted() &&@@ -808,7 +814,8 @@ export default {if(room) {room.on(ConferenceEvents.TRACK_ADDED, localCallback);}- localVideo.stop();+ if(localVideo)+ localVideo.stop();localVideo = track;addTrack(track);if(!room)diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.jsindex c39ef63ecb..e7528bce9e 100644--- a/modules/UI/videolayout/LargeVideo.js+++ b/modules/UI/videolayout/LargeVideo.js@@ -277,6 +277,9 @@ class VideoContainer extends LargeContainer {this.stream = stream;this.videoType = videoType;+ if(!stream)+ return;+stream.attach(this.$video);let flipX = stream.isLocal() && !this.isScreenSharing();@@ -421,7 +424,7 @@ export default class LargeVideoManager {// change the avatar url on largethis.updateAvatar(Avatar.getAvatarUrl(id));- let isVideoMuted = stream.isMuted();+ let isVideoMuted = stream? stream.isMuted() : true;// show the avatar on large if neededthis.videoContainer.showAvatar(isVideoMuted);@@ -443,19 +446,18 @@ export default class LargeVideoManager {/*** Update large video.* Switches to large video even if previously other container was visible.+ * @param userID the userID of the participant associated with the stream* @param {JitsiTrack?} stream new stream* @param {string?} videoType new video type* @returns {Promise}*/- updateLargeVideo (stream, videoType) {- let id = getStreamOwnerId(stream);-+ updateLargeVideo (userID, stream, videoType) {if (this.newStreamData) {this.newStreamData.reject();}this.newStreamData = createDeferred();- this.newStreamData.id = id;+ this.newStreamData.id = userID;this.newStreamData.stream = stream;this.newStreamData.videoType = videoType;diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.jsindex 6805410483..b83dfeaaf6 100644--- a/modules/UI/videolayout/VideoLayout.js+++ b/modules/UI/videolayout/VideoLayout.js@@ -987,6 +987,7 @@ var VideoLayout = {let videoType = this.getRemoteVideoType(id);largeVideo.updateLargeVideo(+ id,smallVideo.videoStream,videoType).then(function() {