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
fix(breakout-rooms) ensure we use the same media types when joining
Saúl Ibarra Corretgée6accd40e115
diff --git a/conference.js b/conference.jsindex 9cdee1acaf..b5357b8924 100644--- a/conference.js+++ b/conference.js@@ -1333,18 +1333,19 @@ export default {/*** Used by the Breakout Rooms feature to join a breakout room or go back to the main room.*/- async joinRoom(roomName) {+ async joinRoom(roomName, options) {// Reset VideoLayout. It's destroyed in features/video-layout/middleware.web.js so re-initialize it.VideoLayout.initLargeVideo();VideoLayout.resizeVideoArea();- // Destroy old tracks.- APP.store.dispatch(destroyLocalTracks());+ // Restore initial state.this._localTracksInitialized = false;+ this.isSharingScreen = false;+ this.localPresenterVideo = null;this.roomName = roomName;- const { tryCreateLocalTracks, errors } = this.createInitialLocalTracks();+ const { tryCreateLocalTracks, errors } = this.createInitialLocalTracks(options);const localTracks = await tryCreateLocalTracks;this._displayErrorsForCreateInitialLocalTracks(errors);diff --git a/react/features/breakout-rooms/actions.js b/react/features/breakout-rooms/actions.jsindex b6e4e756fd..fed2faa536 100644--- a/react/features/breakout-rooms/actions.js+++ b/react/features/breakout-rooms/actions.js@@ -11,9 +11,18 @@ import {createConference,getCurrentConference} from '../base/conference';-import { setAudioMuted, setVideoMuted } from '../base/media';+import {+ MEDIA_TYPE,+ setAudioMuted,+ setVideoMuted+} from '../base/media';import { getRemoteParticipants } from '../base/participants';import { createDesiredLocalTracks } from '../base/tracks/actions';+import {+ getLocalTracks,+ isLocalCameraTrackMuted,+ isLocalTrackMuted+} from '../base/tracks';import {NOTIFICATION_TIMEOUT_TYPE,clearNotifications,@@ -219,6 +228,10 @@ export function moveToRoom(roomId?: string) {dispatch(setVideoMuted(video.muted));dispatch(createDesiredLocalTracks());} else {+ const localTracks = getLocalTracks(getState()['features/base/tracks']);+ const isAudioMuted = isLocalTrackMuted(localTracks, MEDIA_TYPE.AUDIO);+ const isVideoMuted = isLocalCameraTrackMuted(localTracks);+try {await APP.conference.leaveRoom(false /* doDisconnect */);} catch (error) {@@ -227,7 +240,10 @@ export function moveToRoom(roomId?: string) {// TODO: revisit why we don't dispatch CONFERENCE_LEFT here.}- APP.conference.joinRoom(_roomId);+ APP.conference.joinRoom(_roomId, {+ startWithAudioMuted: isAudioMuted,+ startWithVideoMuted: isVideoMuted+ });}if (goToMainRoom) {