Format Your New Topic as Follows:
Meeting SDK Type and Version 3.7.0
Share the Meeting SDK type and version you’re working with to give relevant context.
Error?
“use client”;
import { useEffect } from “react”;
import { ZoomMtg } from “@zoom/meetingsdk”;
import { getMeetingsDetails } from “@/redux/zoomMeeting/zoom-action”;
import { jwtDecode } from “jwt-decode”;
ZoomMtg.preLoadWasm();
ZoomMtg.prepareWebSDK();
const StartMeeting = ({ id }) => {
const zmmtgRoot = document.getElementById(“zmmtg-root”);
useEffect(() => {
async function fetchAndStartMeeting() {
try {
const { data } = await getMeetingsDetails({ id, type: 0 });
if (data) {
startMeeting(data);
} else {
console.error(“No meeting data received”);
}
} catch (error) {
console.error(“Error fetching meeting details:”, error);
}
}
fetchAndStartMeeting();
}, [id]);
function startMeeting(data) {
try {
const decoded = jwtDecode(data?.jwtToken);
if (zmmtgRoot) {
zmmtgRoot.style.display = “block”;
ZoomMtg.init({
leaveUrl: "/super/live",
patchJsMedia: true,
leaveOnPageUnload: true,
success: (success) => {
console.log(success, "user:read ", data);
ZoomMtg.join({
signature: data?.jwtToken,
sdkKey: decoded?.sdkKey,
meetingNumber: data?.id,
passWord: data?.password,
userName: "sanjay",
userEmail: "sanjay@gmail.com",
zak: data?.zakToken || "",
success: (success) => {
console.log(success);
},
error: (error) => {
console.log(error);
},
});
},
error: (error) => {
console.log(error);
},
});
}
} catch (error) {
console.error("Error decoding token:", error);
}
}
return
;};
export default StartMeeting;
generateSignature: async (data, password) => {
const iat = Math.round(new Date().getTime() / 1000) - 30;
const exp = iat + 60 * 60 * 24;
const oHeader = { alg: “HS256”, typ: “JWT” };
const oPayload = {
sdkKey: "",// Client key
appKey: "", Client key
mn: data?.id,
role: "0",
iat: iat,
exp: exp,
tokenExp: exp,
tpc: data?.fullName || data?.topic,
session_key: password,
user_identity: data?._id,
};
const sHeader = JSON.stringify(oHeader);
const sPayload = JSON.stringify(oPayload);
const sdkJWT = KJUR.jws.JWS.sign(
"HS256",
sHeader,
sPayload,
"Secret key"
);
return sdkJWT;
},
responce after click on start
{method: ‘init’, status: true, errorCode: 0, errorMessage: null, result: null}
i am not able click on join button why