Skip to content

Commit

Permalink
Merge branch 'v1.16.5-mconf' into v1.18.3-mconf
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/build-test-and-deploy.yml
#	docker-compose.yaml
#	play/src/common/FrontConfigurationInterface.ts
#	play/src/front/Components/ActionBar/ActionBar.svelte
#	play/src/front/WebRtc/ScreenSharingPeer.ts
#	play/src/front/WebRtc/VideoPeer.ts
#	play/src/pusher/enums/EnvironmentVariable.ts
#	play/src/pusher/enums/EnvironmentVariableValidator.ts
  • Loading branch information
fcecagno committed Jan 4, 2024
2 parents c703521 + 29d61f9 commit 25d125f
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 724 deletions.
766 changes: 57 additions & 709 deletions .github/workflows/build-test-and-deploy.yml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion back/src/Services/SocketManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,6 @@ export class SocketManager {
const clientURL = api.administration.join(user.name, meetingId, isAdmin ? moderatorPW : attendeePW, {
...joinParams,
userID: user.id,
joinViaHtml5: true,
});
console.log(
`User "${user.name}" (${user.uuid}) joined the BBB meeting "${meetingName}" as ${
Expand Down
2 changes: 2 additions & 0 deletions play/src/common/FrontConfigurationInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,6 @@ export interface FrontConfigurationInterface {
PEER_VIDEO_RECOMMENDED_BANDWIDTH: number;
PEER_SCREEN_SHARE_LOW_BANDWIDTH: number;
PEER_SCREEN_SHARE_RECOMMENDED_BANDWIDTH: number;
BBB_MOBILE_ENABLED: boolean;
BBB_MOBILE_DIRECT_JOIN_PREFIX: string | undefined;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
cowebsiteName = "Jitsi meeting";
} else if (isBBB) {
icon.src = meetingIcon;
cowebsiteName = "BigBlueButton meeting";
cowebsiteName = "Elos meeting";
} else {
icon.src = `${ICON_URL}/icon?url=${encodeURIComponent(
coWebsite.getUrl().toString()
Expand Down
3 changes: 3 additions & 0 deletions play/src/front/Enum/EnvironmentVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ export const GOOGLE_DOCS_ENABLED = env.GOOGLE_DOCS_ENABLED;
export const GOOGLE_SHEETS_ENABLED = env.GOOGLE_SHEETS_ENABLED;
export const GOOGLE_SLIDES_ENABLED = env.GOOGLE_SLIDES_ENABLED;
export const ERASER_ENABLED = env.ERASER_ENABLED;

export const BBB_MOBILE_ENABLED = env.BBB_MOBILE_ENABLED;
export const BBB_MOBILE_DIRECT_JOIN_PREFIX = env.BBB_MOBILE_DIRECT_JOIN_PREFIX;
60 changes: 47 additions & 13 deletions play/src/front/Phaser/Game/GameMapPropertiesListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ import { ON_ACTION_TRIGGER_BUTTON, ON_ICON_TRIGGER_BUTTON } from "../../WebRtc/L
import type { CoWebsite } from "../../WebRtc/CoWebsite/CoWebsite";
import { SimpleCoWebsite } from "../../WebRtc/CoWebsite/SimpleCoWebsite";
import { bbbFactory } from "../../WebRtc/BBBFactory";
import { JITSI_PRIVATE_MODE, JITSI_URL } from "../../Enum/EnvironmentVariable";
import {
JITSI_PRIVATE_MODE,
JITSI_URL,
BBB_MOBILE_ENABLED,
BBB_MOBILE_DIRECT_JOIN_PREFIX
} from "../../Enum/EnvironmentVariable";
import { JitsiCoWebsite } from "../../WebRtc/CoWebsite/JitsiCoWebsite";
import { audioManagerFileStore, audioManagerVisibilityStore } from "../../Stores/AudioManagerStore";
import { iframeListener } from "../../Api/IframeListener";
Expand All @@ -26,6 +31,7 @@ import type { GameMapFrontWrapper } from "./GameMap/GameMapFrontWrapper";
import type { GameScene } from "./GameScene";
import { AreasPropertiesListener } from "./MapEditor/AreasPropertiesListener";
import { gameManager } from "./GameManager";
import { isMediaBreakpointUp } from "../../Utils/BreakpointsUtils";

export interface OpenCoWebsite {
actionId: string;
Expand Down Expand Up @@ -207,20 +213,48 @@ export class GameMapPropertiesListener {
return;
}
}

inBbbStore.set(true);
bbbFactory.setStopped(false);
bbbFactory
.parametrizeMeetingId(newValue as string)
.then((hashedMeetingId) => {
if (this.scene.connection === undefined) {
throw new Error("No more connection to open BBB");
}
return this.scene.connection.queryBBBMeetingUrl(hashedMeetingId, allProps);
})
.then((bbbAnswer) => {
bbbFactory.start(bbbAnswer.clientURL);
})
.catch((e) => console.error(e));

let isMobile = isMediaBreakpointUp("md");
if (BBB_MOBILE_ENABLED && isMobile) {
let message = allProps.get(GameMapProperties.OPEN_WEBSITE_TRIGGER_MESSAGE);
if (message === undefined) {
message = get(LL).trigger.newTab();
}
layoutManagerActionStore.addAction({
uuid: "openTab",
type: "message",
message: message,
callback: () => bbbFactory
.parametrizeMeetingId(newValue as string)
.then((hashedMeetingId) => {
if (this.scene.connection === undefined) {
throw new Error("No more connection to open BBB");
}
return this.scene.connection.queryBBBMeetingUrl(hashedMeetingId, allProps);
})
.then((bbbAnswer) => {
scriptUtils.openTab(BBB_MOBILE_DIRECT_JOIN_PREFIX + bbbAnswer.clientURL.replace(/^https?:\/\//, ''));
})
.catch((e) => console.error(e)),
userInputManager: this.scene.userInputManager,
});
} else {
bbbFactory
.parametrizeMeetingId(newValue as string)
.then((hashedMeetingId) => {
if (this.scene.connection === undefined) {
throw new Error("No more connection to open BBB");
}
return this.scene.connection.queryBBBMeetingUrl(hashedMeetingId, allProps);
})
.then((bbbAnswer) => {
bbbFactory.start(bbbAnswer.clientURL);
})
.catch((e) => console.error(e));
}
});

this.gameMapFrontWrapper.onPropertyChange(GameMapProperties.EXIT_SCENE_URL, (newValue) => {
Expand Down
2 changes: 2 additions & 0 deletions play/src/pusher/enums/EnvironmentVariable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,6 @@ export const FRONT_ENVIRONMENT_VARIABLES: FrontConfigurationInterface = {
PEER_VIDEO_RECOMMENDED_BANDWIDTH: parseInt(env.PEER_VIDEO_RECOMMENDED_BANDWIDTH || "600"),
PEER_SCREEN_SHARE_LOW_BANDWIDTH: parseInt(env.PEER_SCREEN_SHARE_LOW_BANDWIDTH || "250"),
PEER_SCREEN_SHARE_RECOMMENDED_BANDWIDTH: parseInt(env.PEER_SCREEN_SHARE_RECOMMENDED_BANDWIDTH || "1000"),
BBB_MOBILE_ENABLED: env.BBB_MOBILE_ENABLED,
BBB_MOBILE_DIRECT_JOIN_PREFIX: env.BBB_MOBILE_DIRECT_JOIN_PREFIX,
};
4 changes: 4 additions & 0 deletions play/src/pusher/enums/EnvironmentVariableValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export const EnvironmentVariables = z.object({
PEER_VIDEO_RECOMMENDED_BANDWIDTH: PositiveIntAsString.optional(),
PEER_SCREEN_SHARE_LOW_BANDWIDTH: PositiveIntAsString.optional(),
PEER_SCREEN_SHARE_RECOMMENDED_BANDWIDTH: PositiveIntAsString.optional(),

// Allow bbb-mobile-sdk direct join
BBB_MOBILE_ENABLED: BoolAsString.optional().transform((val) => toBool(val, false)),
BBB_MOBILE_DIRECT_JOIN_PREFIX: z.string().optional(),
});

export type EnvironmentVariables = z.infer<typeof EnvironmentVariables>;

0 comments on commit 25d125f

Please sign in to comment.