Enhance startMeeting function to accept optional metadata and recording URL parameters #48
@ -738,7 +738,13 @@ export async function getJitsiMeetingInfo(id: string): Promise<JitsiMeetingInfo>
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function startMeeting(id: string): Promise<Appointment> {
|
export async function startMeeting(
|
||||||
|
id: string,
|
||||||
|
options?: {
|
||||||
|
metadata?: string;
|
||||||
|
recording_url?: string;
|
||||||
|
}
|
||||||
|
): Promise<Appointment> {
|
||||||
const tokens = getStoredTokens();
|
const tokens = getStoredTokens();
|
||||||
if (!tokens.access) {
|
if (!tokens.access) {
|
||||||
throw new Error("Authentication required.");
|
throw new Error("Authentication required.");
|
||||||
@ -750,6 +756,11 @@ export async function startMeeting(id: string): Promise<Appointment> {
|
|||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
Authorization: `Bearer ${tokens.access}`,
|
Authorization: `Bearer ${tokens.access}`,
|
||||||
},
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
action: "start",
|
||||||
|
metadata: options?.metadata,
|
||||||
|
recording_url: options?.recording_url,
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await parseResponse(response);
|
const data = await parseResponse(response);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user