Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(prejoin): Handles different ways of disabling prejoin.
damenchofb075c376dd1
diff --git a/react/features/base/config/functions.any.ts b/react/features/base/config/functions.any.tsindex dae1ad4e2a..9fed40943b 100644--- a/react/features/base/config/functions.any.ts+++ b/react/features/base/config/functions.any.ts@@ -387,7 +387,8 @@ export function setConfigFromURLParams(// When not in an iframe, start without media if the pre-join page is not enabled.if (!isEmbedded()- && 'config.prejoinConfig.enabled' in params && config.prejoinConfig?.enabled === false) {+ && ('config.prejoinConfig' in params || 'config.prejoinConfig.enabled' in params)+ && config.prejoinConfig?.enabled === false) {logger.warn('Using prejoinConfig.enabled config URL overwrite implies starting without media.');config.disableInitialGUM = true;}diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.tsindex 49992842b0..449d25a5fd 100644--- a/tests/helpers/Participant.ts+++ b/tests/helpers/Participant.ts@@ -252,6 +252,9 @@ export class Participant {// For the iFrame API the tenant is passed in a different way.url = `/${options.tenant}/${url}`;}+ if (options.urlAppendString) {+ url = `${url}${options.urlAppendString}`;+ }await this.driver.url(url);diff --git a/tests/helpers/types.ts b/tests/helpers/types.tsindex 397e2cfe9a..84ab502f06 100644--- a/tests/helpers/types.ts+++ b/tests/helpers/types.ts@@ -72,6 +72,11 @@ export type IParticipantJoinOptions = {* An optional tenant to use. If provided it overrides the default.*/tenant?: string;++ /**+ * An optional string to append to the URL when joining the room.+ */+ urlAppendString?: string;};export type IJoinOptions = {@@ -110,4 +115,9 @@ export type IJoinOptions = {* Options used when generating a token.*/tokenOptions?: ITokenOptions;++ /**+ * An optional string to append to the URL when joining the room.+ */+ urlAppendString?: string;};diff --git a/tests/specs/media/prejoinDisabled.spec.ts b/tests/specs/media/prejoinDisabled.spec.tsnew file mode 100644index 0000000000..d6cabfcb4b--- /dev/null+++ b/tests/specs/media/prejoinDisabled.spec.ts@@ -0,0 +1,44 @@+import type { Participant } from '../../helpers/Participant';+import { setTestProperties } from '../../helpers/TestProperties';+import { ensureTwoParticipants, hangupAllParticipants } from '../../helpers/participants';++setTestProperties(__filename, {+ usesBrowsers: [ 'p1', 'p2' ]+});++describe('Prejoin disabled', () => {+ it('joining with no prejoin - nested object', async () => {+ await ensureTwoParticipants({+ configOverwrite: {+ prejoinConfig: {+ enabled: false+ }+ },+ skipInMeetingChecks: true,+ });++ await checkEveryoneMuted(ctx);++ await hangupAllParticipants();+ });+ it('joining with no prejoin - direct url param ', async () => {+ await ensureTwoParticipants({+ skipInMeetingChecks: true,+ urlAppendString: '&config.prejoinConfig.enabled=false'+ });++ await checkEveryoneMuted(ctx);+ });+});++async function checkEveryoneMuted({ p1, p2 }: { p1: Participant; p2: Participant; }) {+ await p1.getFilmstrip().assertAudioMuteIconIsDisplayed(p2);+ await p1.getFilmstrip().assertAudioMuteIconIsDisplayed(p1);+ await p2.getFilmstrip().assertAudioMuteIconIsDisplayed(p2);+ await p2.getFilmstrip().assertAudioMuteIconIsDisplayed(p1);++ await p1.getParticipantsPane().assertAudioMuteIconIsDisplayed(p2);+ await p1.getParticipantsPane().assertAudioMuteIconIsDisplayed(p1);+ await p2.getParticipantsPane().assertAudioMuteIconIsDisplayed(p2);+ await p2.getParticipantsPane().assertAudioMuteIconIsDisplayed(p1);+}