Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtcstats and logs while waiting in the lobby #15157

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions react/features/base/logging/JitsiMeetLogStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ export default class JitsiMeetLogStorage {
}

/**
* The JitsiMeetLogStorage is ready when the conference has been joined.
* The JitsiMeetLogStorage is ready when the conference has been joined or when we are in the lobby waiting.
* A conference is considered joined when the 'conference' field is defined
* in the base/conference state.
*
* @returns {boolean} <tt>true</tt> when this storage is ready or
* <tt>false</tt> otherwise.
*/
isReady() {
const { conference } = this.getState()['features/base/conference'];
const { conference, membersOnly } = this.getState()['features/base/conference'];

return Boolean(conference);
return Boolean(conference || membersOnly);
}

/**
Expand Down
14 changes: 13 additions & 1 deletion react/features/base/logging/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import { AnyAction } from 'redux';

import { IStore } from '../../app/types';
import { APP_WILL_MOUNT } from '../app/actionTypes';
import { CONFERENCE_JOINED } from '../conference/actionTypes';
import { CONFERENCE_FAILED, CONFERENCE_JOINED } from '../conference/actionTypes';
import { getCurrentConference } from '../conference/functions';
import { SET_CONFIG } from '../config/actionTypes';
import JitsiMeetJS, {
JitsiConferenceErrors,
JitsiConferenceEvents
} from '../lib-jitsi-meet';
import { LIB_WILL_INIT } from '../lib-jitsi-meet/actionTypes';
Expand All @@ -32,6 +33,17 @@ MiddlewareRegistry.register(store => next => action => {
case APP_WILL_MOUNT:
return _appWillMount(store, next, action);

case CONFERENCE_FAILED: {
const { error } = action;

if (error.name === JitsiConferenceErrors.MEMBERS_ONLY_ERROR) {
// init the conference logger earlier
return _conferenceJoined(store, next, action);
}

break;
}

case CONFERENCE_JOINED:
return _conferenceJoined(store, next, action);

Expand Down
15 changes: 15 additions & 0 deletions resources/prosody-plugins/mod_muc_lobby_rooms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ function attach_lobby_room(room, actor)
new_room:set_persistent(true);
module:log("info","Lobby room jid = %s created from:%s", lobby_room_jid, actor);
new_room.main_room = room;
new_room._data.meetingId = room._data.meetingId;
room._data.lobbyroom = new_room.jid;
room:save(true);
return true
Expand Down Expand Up @@ -430,6 +431,20 @@ function process_lobby_muc_loaded(lobby_muc, host_module)
notify_lobby_access(room.main_room, actor, occupant.nick, display_name, false);
end
end);

-- add meeting Id to the disco info requests to the room
host_module:hook("muc-disco#info", function(event)
if not event.room._data.meetingId then
return;
end

table.insert(event.form, {
name = "muc#roominfo_meetingId";
type = "text-single";
label = "The meeting unique id.";
value = event.room._data.meetingId;
});
end);
end

-- process or waits to process the lobby muc component
Expand Down