diff --git a/conference.js b/conference.js index ca92cd63f7..96e9dda81b 100644 --- a/conference.js +++ b/conference.js @@ -165,7 +165,6 @@ import { AudioMixerEffect } from './react/features/stream-effects/audio-mixer/Au import { createRnnoiseProcessor } from './react/features/stream-effects/rnnoise'; import { handleToggleVideoMuted } from './react/features/toolbox/actions.any'; import { muteLocal } from './react/features/video-menu/actions.any'; -import { iAmVisitor } from './react/features/visitors/functions'; import UIEvents from './service/UI/UIEvents'; const logger = Logger.getLogger(__filename); @@ -705,10 +704,6 @@ export default { const handleInitialTracks = (options, tracks) => { let localTracks = tracks; - // No local tracks are added when user joins as a visitor. - if (iAmVisitor(state)) { - return []; - } if (options.startWithAudioMuted || room?.isStartAudioMuted()) { // Always add the track on Safari because of a known issue where audio playout doesn't happen // if the user joins audio and video muted, i.e., if there is no local media capture. diff --git a/react/features/base/conference/actions.ts b/react/features/base/conference/actions.ts index 67c809c609..ad54cf60b1 100644 --- a/react/features/base/conference/actions.ts +++ b/react/features/base/conference/actions.ts @@ -8,8 +8,15 @@ import { getReplaceParticipant } from '../config/functions'; import { connect, disconnect, hangup } from '../connection/actions'; import { JITSI_CONNECTION_CONFERENCE_KEY } from '../connection/constants'; import { JitsiConferenceEvents, JitsiE2ePingEvents } from '../lib-jitsi-meet'; -import { setAudioMuted, setAudioUnmutePermissions, setVideoMuted, setVideoUnmutePermissions } from '../media/actions'; +import { + gumPending, + setAudioMuted, + setAudioUnmutePermissions, + setVideoMuted, + setVideoUnmutePermissions +} from '../media/actions'; import { MEDIA_TYPE } from '../media/constants'; +import { IGUMPendingState } from '../media/types'; import { dominantSpeakerChanged, participantKicked, @@ -1052,6 +1059,11 @@ export function redirect(vnode: string, focusJid: string, username: string) { .then(() => dispatch(conferenceWillInit())) .then(() => dispatch(connect())) .then(() => { + + // Clear the gum pending state in case we have set it to pending since we are starting the + // conference without tracks. + dispatch(gumPending([ MEDIA_TYPE.AUDIO, MEDIA_TYPE.VIDEO ], IGUMPendingState.NONE)); + // FIXME: Workaround for the web version. To be removed once we get rid of conference.js if (typeof APP !== 'undefined') { APP.conference.startConference([]);