-
Notifications
You must be signed in to change notification settings - Fork 1
[PB-5897] Fix participant count and zombies on reload #213
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
base: main
Are you sure you want to change the base?
Changes from all commits
b0bc845
048598a
5f80d23
6381b8e
4493517
ea59609
e0b290c
8e4cf63
51dc483
3f25c18
fec919b
fa8f52a
340ce2d
b02c8a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| DRIVE_NEW_API_URL=http://drive-server-wip:3004/api | ||
| PAYMENTS_API_URL=http://payments-server:8003 | ||
| MEET_API_URL=http://meet-server:3006 | ||
| CRYPTO_SECRET=6KYQBP847D4ATSFA | ||
| MAGIC_IV=d139cb9a2cd17092e79e1861cf9d7023 | ||
| MAGIC_SALT=38dce0391b49efba88dbc8c39ebf868f0267eb110bb0012ab27dc52a528d61b1d1ed9d76f400ff58e3240028442b1eab9bb84e111d9dadd997982dbde9dbd25e | ||
| JITSI_APP_ID=vpaas-magic-cookie-04a19c25aaab448c9cf74516ffb5ebf2 | ||
| JITSI_APP_ID=vpaas-magic-cookie-04a19c25aaab448c9cf74516ffb5ebf2 | ||
| WEBPACK_DEV_SERVER_PROXY_TARGET=https://meet.internxt.com |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ all.css | |
| .remote-sync.json | ||
| .sync-config.cson | ||
| .env | ||
| .env.* | ||
| .npmrc | ||
|
|
||
| # Coverage | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,22 +15,24 @@ import { | |
| } from '../util/uri'; | ||
|
|
||
| import { setJoinRoomError } from "../meet/general/store/errors/actions"; | ||
| import { LocalStorageManager } from "../meet/LocalStorageManager"; | ||
| import MeetingService from "../meet/services/meeting.service"; | ||
| import { clearNewMeetingFlowSession, isNewMeetingFlow } from "../meet/services/sessionStorage.service"; | ||
| import { clearNewMeetingFlowSession } from "../meet/services/sessionStorage.service"; | ||
| import { | ||
| CONNECTION_DISCONNECTED, | ||
| CONNECTION_ESTABLISHED, | ||
| CONNECTION_FAILED, | ||
| CONNECTION_PROPERTIES_UPDATED, | ||
| CONNECTION_WILL_CONNECT, | ||
| CONNECTION_TOKEN_EXPIRED, | ||
| SET_LOCATION_URL, | ||
| SET_PREFER_VISITOR, | ||
| } from "./actionTypes"; | ||
| import { JITSI_CONNECTION_URL_KEY } from "./constants"; | ||
| import logger from "./logger"; | ||
| import { get8x8Options } from "./options8x8"; | ||
| import { ConnectionFailedError, IIceServers } from "./types"; | ||
| import { ConfigService } from '../meet/services/config.service'; | ||
| import { SessionStorageManager } from '../meet/SessionStorageManager'; | ||
|
|
||
| /** | ||
| * The options that will be passed to the JitsiConnection instance. | ||
|
|
@@ -155,7 +157,9 @@ export function constructOptions(state: IReduxState) { | |
| options.websocketKeepAliveUrl = appendURLParam(options.websocketKeepAliveUrl, "room", roomName ?? ""); | ||
| } | ||
| if (options.conferenceRequestUrl) { | ||
| options.conferenceRequestUrl = appendURLParam(options.conferenceRequestUrl, "room", roomName ?? ""); | ||
| options.conferenceRequestUrl = ConfigService.instance.isDevelopment() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. perfect :) |
||
| ? undefined | ||
| : appendURLParam(options.conferenceRequestUrl, "room", roomName ?? ""); | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -242,7 +246,7 @@ export function _connectInternal({ | |
| let userUUID: string | undefined; | ||
|
|
||
| if (isAnonymous) { | ||
| userUUID = LocalStorageManager.instance.getOrCreateAnonymousUUID(); | ||
| userUUID = SessionStorageManager.instance.getOrCreateAnonymousUUID(); | ||
| } | ||
| const { token: jwt, appId } = await MeetingService.instance.joinCall(room, { | ||
| name: displayName ?? name ?? "", | ||
|
|
@@ -268,6 +272,7 @@ export function _connectInternal({ | |
| connection.addEventListener(JitsiConnectionEvents.CONNECTION_FAILED, _onConnectionFailed); | ||
| connection.addEventListener(JitsiConnectionEvents.CONNECTION_REDIRECTED, _onConnectionRedirected); | ||
| connection.addEventListener(JitsiConnectionEvents.PROPERTIES_UPDATED, _onPropertiesUpdate); | ||
| connection.addEventListener(JitsiConnectionEvents.CONNECTION_TOKEN_EXPIRED, _onTokenExpired); | ||
|
|
||
| /** | ||
| * Unsubscribe the connection instance from | ||
|
|
@@ -362,6 +367,16 @@ export function _connectInternal({ | |
| dispatch(redirect(vnode, focusJid, username)); | ||
| } | ||
|
|
||
| /** | ||
| * Connection will resume. | ||
| * | ||
| * @private | ||
| * @returns {void} | ||
| */ | ||
| function _onTokenExpired(): void { | ||
| dispatch(_connectionTokenExpired(connection)); | ||
| } | ||
|
|
||
| /** | ||
| * Connection properties were updated. | ||
| * | ||
|
|
@@ -416,6 +431,23 @@ export function _connectInternal({ | |
| function _connectionWillConnect(connection: Object) { | ||
| return { | ||
| type: CONNECTION_WILL_CONNECT, | ||
| connection, | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * Create an action for when a connection token is expired. | ||
| * | ||
| * @param {JitsiConnection} connection - The {@code JitsiConnection} token is expired. | ||
| * @private | ||
| * @returns {{ | ||
| * type: CONNECTION_TOKEN_EXPIRED, | ||
| * connection: JitsiConnection | ||
| * }} | ||
| */ | ||
| function _connectionTokenExpired(connection: Object) { | ||
| return { | ||
| type: CONNECTION_TOKEN_EXPIRED, | ||
| connection | ||
| }; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,30 @@ | ||
| import { redirectToStaticPage } from '../../app/actions.any'; | ||
| import { CONFERENCE_WILL_LEAVE } from "../conference/actionTypes"; | ||
| import { isLeavingConferenceManually, setLeaveConferenceManually } from "../meet/general/utils/conferenceState"; | ||
| import MiddlewareRegistry from "../redux/MiddlewareRegistry"; | ||
| import MiddlewareRegistry from '../redux/MiddlewareRegistry'; | ||
|
|
||
| import { CONNECTION_DISCONNECTED, CONNECTION_WILL_CONNECT } from "./actionTypes"; | ||
| import { CONNECTION_WILL_CONNECT } from './actionTypes'; | ||
|
|
||
| /** | ||
| * The feature announced so we can distinguish jibri participants. | ||
| * | ||
| * @type {string} | ||
| */ | ||
| export const DISCO_JIBRI_FEATURE = "http://jitsi.org/protocol/jibri"; | ||
| export const DISCO_JIBRI_FEATURE = 'http://jitsi.org/protocol/jibri'; | ||
|
|
||
| MiddlewareRegistry.register(({ getState, dispatch }) => (next) => (action) => { | ||
| MiddlewareRegistry.register(({ getState }) => next => action => { | ||
| switch (action.type) { | ||
| case CONNECTION_WILL_CONNECT: { | ||
| const { connection } = action; | ||
| const { iAmRecorder } = getState()["features/base/config"]; | ||
| case CONNECTION_WILL_CONNECT: { | ||
| const { connection } = action; | ||
| const { iAmRecorder } = getState()['features/base/config']; | ||
|
|
||
| if (iAmRecorder) { | ||
| connection.addFeature(DISCO_JIBRI_FEATURE); | ||
| } | ||
|
|
||
| // @ts-ignore | ||
| APP.connection = connection; | ||
|
|
||
| setLeaveConferenceManually(false); | ||
| break; | ||
| } | ||
|
|
||
| case CONFERENCE_WILL_LEAVE: { | ||
| setLeaveConferenceManually(true); | ||
| break; | ||
| if (iAmRecorder) { | ||
| connection.addFeature(DISCO_JIBRI_FEATURE); | ||
| } | ||
|
|
||
| case CONNECTION_DISCONNECTED: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this no longer necessary?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| setLeaveConferenceManually(false); | ||
| // @ts-ignore | ||
| APP.connection = connection; | ||
|
|
||
| break; | ||
| } | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| return next(action); | ||
| }); | ||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does
notifyOnConferenceDestructiondo?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Jitsi, it's a question of whether to send a notification or not. I'll activate it just in case. So far, Jitsi's signals are blocked, but maybe it will start working after we permit them