fix(prejoin): Don't add video track to connection on start if video muted
This commit is contained in:
parent
f22d5ed629
commit
3538761543
|
@ -199,14 +199,13 @@ export function initPrejoin(tracks: Object[], errors: Object) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Joins the conference.
|
||||
* Action used to start the conference.
|
||||
*
|
||||
* @returns {Function}
|
||||
*/
|
||||
export function joinConference() {
|
||||
return function(dispatch: Function) {
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
dispatch(startConference());
|
||||
return {
|
||||
type: PREJOIN_START_CONFERENCE
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -418,14 +417,3 @@ export function setPrejoinPageVisibility(value: boolean) {
|
|||
value
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Action used to mark the start of the conference.
|
||||
*
|
||||
* @returns {Object}
|
||||
*/
|
||||
function startConference() {
|
||||
return {
|
||||
type: PREJOIN_START_CONFERENCE
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
import { MiddlewareRegistry } from '../base/redux';
|
||||
import { updateSettings } from '../base/settings';
|
||||
import { getLocalVideoTrack, replaceLocalTrack } from '../base/tracks';
|
||||
|
||||
import { PREJOIN_START_CONFERENCE } from './actionTypes';
|
||||
import { setPrejoinPageVisibility } from './actions';
|
||||
|
||||
declare var APP: Object;
|
||||
|
||||
|
@ -19,13 +21,20 @@ MiddlewareRegistry.register(store => next => async action => {
|
|||
const { getState, dispatch } = store;
|
||||
const state = getState();
|
||||
const { userSelectedSkipPrejoin } = state['features/prejoin'];
|
||||
const tracks = state['features/base/tracks'];
|
||||
const localVideoTrack = getLocalVideoTrack(state['features/base/tracks']);
|
||||
|
||||
userSelectedSkipPrejoin && dispatch(updateSettings({
|
||||
userSelectedSkipPrejoin
|
||||
}));
|
||||
|
||||
APP.conference.prejoinStart(tracks.map(t => t.jitsiTrack));
|
||||
if (localVideoTrack?.muted) {
|
||||
await dispatch(replaceLocalTrack(localVideoTrack.jitsiTrack, null));
|
||||
}
|
||||
|
||||
const jitsiTracks = getState()['features/base/tracks'].map(t => t.jitsiTrack);
|
||||
|
||||
dispatch(setPrejoinPageVisibility(false));
|
||||
APP.conference.prejoinStart(jitsiTracks);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue