|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|