-
Notifications
You must be signed in to change notification settings - Fork 12.1k
feat: Add BigBlueButton video conferencing integration #28223
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
Closed
Awesome-wml
wants to merge
1
commit into
calcom:main
from
Awesome-wml:feat/bigbluebutton-integration
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import type { AppMeta } from "@calcom/types/App"; | ||
|
|
||
| export const metadata = { | ||
| linkType: "dynamic", | ||
| name: "BigBlueButton", | ||
| description: | ||
| "BigBlueButton is an open-source web conferencing system for online learning. It provides real-time sharing of audio, video, slides, chat, and screen, and is designed for online classrooms with features like breakout rooms, polls, and whiteboard.", | ||
| type: "bigbluebutton_video", | ||
| categories: ["conferencing"], | ||
| variant: "conferencing", | ||
| logo: "icon.svg", | ||
| publisher: "Cal.com", | ||
| url: "https://bigbluebutton.org/", | ||
| category: "conferencing", | ||
| slug: "bigbluebutton", | ||
| title: "BigBlueButton", | ||
| email: "help@cal.com", | ||
| appData: { | ||
| location: { | ||
| default: false, | ||
| linkType: "dynamic", | ||
| type: "integrations:bigbluebutton", | ||
| label: "BigBlueButton", | ||
| }, | ||
| }, | ||
| dirName: "bigbluebuttonvideo", | ||
| isOAuth: false, | ||
| } as AppMeta; | ||
|
|
||
| export default metadata; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from "./_metadata"; |
42 changes: 42 additions & 0 deletions
42
packages/app-store/bigbluebuttonvideo/lib/VideoApiAdapter.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import crypto from "crypto"; | ||
| import { v4 as uuidv4 } from "uuid"; | ||
| import type { CalendarEvent } from "@calcom/types/Calendar"; | ||
| import type { PartialReference } from "@calcom/types/EventManager"; | ||
| import type { VideoApiAdapter, VideoCallData } from "@calcom/types/VideoApiAdapter"; | ||
| import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug"; | ||
| import { metadata } from "../_metadata"; | ||
| function generateBBBChecksum(apiCall: string, queryString: string, secret: string): string { | ||
| const stringToHash = apiCall + queryString + secret; | ||
| return crypto.createHash("sha1").update(stringToHash).digest("hex"); | ||
| } | ||
| function buildBBBUrl( | ||
| host: string, | ||
| apiCall: string, | ||
| params: Record<string, string>, | ||
| secret: string | ||
| ): string { | ||
| const queryString = new URLSearchParams(params).toString(); | ||
| const checksum = generateBBBChecksum(apiCall, queryString, secret); | ||
| return `${host}/bigbluebutton/api/${apiCall}?${queryString}&checksum=${checksum}`; | ||
| } | ||
| const BigBlueButtonVideoApiAdapter = (): VideoApiAdapter => { | ||
| return { | ||
| getAvailability: () => { | ||
| return Promise.resolve([]); | ||
| }, | ||
| createMeeting: async (eventData: CalendarEvent): Promise<VideoCallData> => { | ||
| const appKeys = await getAppKeysFromSlug(metadata.slug); | ||
| const host = (appKeys.bbbHost as string) || "https://test.bigbluebutton.org"; | ||
| const secret = (appKeys.bbbSecret as string) || ""; | ||
| const meetingID = `cal-${uuidv4()}`; | ||
| const moderatorPW = crypto.randomBytes(8).toString("hex"); | ||
| const attendeePW = crypto.randomBytes(8).toString("hex"); | ||
| const createParams: Record<string, string> = { | ||
| name: eventData.title || "Cal.com Meeting", | ||
| meetingID: meetingID, | ||
| moderatorPW: moderatorPW, | ||
| attendeePW: attendeePW, | ||
| welcome: "Welcome to this Cal.com meeting powered by BigBlueButton!", | ||
| record: "true", | ||
| autoStartRecording: "false",allowStartStopRecording: "true", | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { default as VideoApiAdapter } from "./VideoApiAdapter"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "name": "@calcom/bigbluebutton", | ||
| "version": "0.0.1", | ||
| "main": "./index.ts", | ||
| "dependencies": { | ||
| "@calcom/lib": "*", | ||
| "@calcom/types": "*" | ||
| }, | ||
| "devDependencies": { | ||
| "@calcom/tsconfig": "*" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { z } from "zod"; | ||
|
|
||
| export const appKeysSchema = z.object({ | ||
| bbbHost: z.string().optional(), | ||
| bbbSecret: z.string().optional(), | ||
| }); |
7 changes: 7 additions & 0 deletions
7
packages/packages/app-store/bigbluebuttonvideo/static/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
P2: Internal @calcom dependencies should use the workspace protocol ("workspace:") like other app-store packages. Using "" can resolve to registry versions instead of local workspace packages, causing version drift in CI/dev.
Prompt for AI agents