
* basic integration structure * jitsi logo * add jitsi meet description to event settings page * add JitsiVideoApiAdapter ref #1445 * add LocationType.Jitsi to BookingPage ref #1445 * add LocationType.Jitsi to event-types ref #1445 * add meet.jit.si/cal/uuid support to BookingPage ref #1445 * add basic "cal_provide_jitsi_meeting_url" translation strings ref #1445 * generate meeting id ref #1445 * implement direct jitsi link in /success page ref #1445 * cleanup location link duplicate ref #1445 * full JitsiVideoApiAdapter implementation ref #1445 * check integration availability in /pages/event-types/[type] ref #1445 * add video conferencing link as calendar event location ref #1445 * PR feedback * Update components/booking/pages/BookingPage.tsx don't know - wouldn't do this myself for future proofing but fine... Co-authored-by: Omar López <zomars@me.com> * Update components/booking/pages/BookingPage.tsx 🤷♂️ Co-authored-by: Omar López <zomars@me.com> * cleanup: props.type === "jitsi_video" ref #1445 Co-authored-by: zomars <zomars@me.com>
34 lines
996 B
TypeScript
34 lines
996 B
TypeScript
import { v4 as uuidv4 } from "uuid";
|
|
|
|
import { PartialReference } from "@lib/events/EventManager";
|
|
import { VideoApiAdapter, VideoCallData } from "@lib/videoClient";
|
|
|
|
const JitsiVideoApiAdapter = (): VideoApiAdapter => {
|
|
return {
|
|
getAvailability: () => {
|
|
return Promise.resolve([]);
|
|
},
|
|
createMeeting: async (): Promise<VideoCallData> => {
|
|
const meetingID = uuidv4();
|
|
return Promise.resolve({
|
|
type: "jitsi_video",
|
|
id: meetingID,
|
|
password: "",
|
|
url: "https://meet.jit.si/cal/" + meetingID,
|
|
});
|
|
},
|
|
deleteMeeting: async (): Promise<void> => {
|
|
Promise.resolve();
|
|
},
|
|
updateMeeting: (bookingRef: PartialReference): Promise<VideoCallData> => {
|
|
return Promise.resolve({
|
|
type: "jitsi_video",
|
|
id: bookingRef.meetingId as string,
|
|
password: bookingRef.meetingPassword as string,
|
|
url: bookingRef.meetingUrl as string,
|
|
});
|
|
},
|
|
};
|
|
};
|
|
|
|
export default JitsiVideoApiAdapter;
|