How to switch on CC automatically with meeting sdk on web

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]);

Hi @spaclla ,

Can you please confirm the following

  • Which view you(component view/client view) are using for meeting sdk ?
  • Which version of the SDK?

Additionally, can you please elaborate on the VideoSDK trasncription being used with Meetings product. Are you using this separately or together.

One option you might want to consider is to capture the live transcript and display it outside the view by leveraging function “onReceiveTranscriptionMsg

Please let me know your thoughts.

Thanks,
Binesh

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.