Platform: web
I’ve active license for video sdk.
I am using meeting sdk to join meeting & video sdk to enable live trascription. It’s working.
Problem is -
The user has to click on the CC button on the embedded zoom ui for live transcription to start working.
I want to not have the user to click on CC.
React code -
useEffect(() => {
const initializeZoom = async () => {
const meetingSDKElement = meetingSDKElementRef.current;
const client = ZoomMtgEmbedded.createClient();
const videoClient = ZoomVideo.createClient();
var stream;
if (!meetingSDKElement) {
setError("Meeting SDK element not found.");
return;
}
try {
await client.init({
patchJsMedia: true,
language: "en-US",
zoomAppRoot: meetingSDKElement,
customize: {
video: {
isResizable: false,
},
},
});
const role = 0;
const signature = generateSignature(meetingNumber, role);
const signatureVideoSDK = generateSignatureVideoSDK(meetingNumber, role);
await client.join({
meetingNumber,
userName,
signature,
sdkKey: process.env.NEXT_PUBLIC_ZOOM_SDK_KEY!,
password,
});
videoClient.init('en-US', 'Global', { patchJsMedia: true }).then(() => {
videoClient
.join(meetingNumber, signatureVideoSDK, userName, password)
.then(() => {
// stream = client.getMediaStream()
const liveTranscriptionTranslation = videoClient.getLiveTranscriptionClient();
liveTranscriptionTranslation.startLiveTranscription().then(() => {
liveTranscriptionTranslation.setSpeakingLanguage(LiveTranscriptionLanguage.English)
})
})
})
videoClient.on("caption-message", (payload) => {
if (payload.done) {
console.log("received", payload);
onNewCaptions([{
name: payload.displayName,
text: payload.text,
timestamp: new Date().toISOString()
}]);
}
});
} catch (err) {
console.error("Error initializing or joining Zoom SDK: ", err);
setError("Error initializing or joining Zoom SDK.");
console.log(error)
}
};
initializeZoom();
}, [meetingNumber, userName, password]);