Zoom throws error when starting video if you're alone in a meeting

Description
Zoom throws an error when starting the video if you’re alone in the Meeting.

The issue seems related with this line:

 "string" == typeof r.canvas && (r.canvas = document.getElementById(r.canvas))

Where r.canvas will be main-video.

as I’m alone at the meeting, it will not exist a document with the id main-video. Checking the DOM tree I can only find a video with the id "main-video-self.

the code breaks when Zoom tries to access the id of the r.canvas later in the code.

 W = r.canvas.id

the issue doesn’t happen if there is another participant in the meeting.

Browser Console Error

js_media.min.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'id')
    at e.<anonymous> (js_media.min.js:1:604276)
    at p (js_media.min.js:1:103944)
    at Generator.<anonymous> (js_media.min.js:1:105281)
    at Generator.next (js_media.min.js:1:104307)
    at r (js_media.min.js:1:64601)
    at s (js_media.min.js:1:64812)
    at js_media.min.js:1:64871
    at new Promise (<anonymous>)
    at e.<anonymous> (js_media.min.js:1:64752)
    at e.Notify_MeidaSDK (js_media.min.js:1:653595)

Which Web Meeting SDK version?
3.1.2 and 3.5.2

Meeting SDK Code Snippets

  const onSuccessZoomInit = useCallback(
    (
        meetingConfig: {
          meetingNumber: string | number
          userName: string
          userEmail?: string
          passWord?: string
          customerKey?: string
          tk?: string
          zak?: string
          sdkKey?: string
          signature: string
          recordingToken?: string
        },
        launchInBrowserURL: string,
        ZoomMtg: ZoomMtgType,
      ) =>
      () => {
        initZoomStatus.current = true
        ZoomMtg.join({
          ...meetingConfig,
          success: onZoomJoinSuccess(ZoomMtg),
          error: (error: unknown) => handleZoomError(error, launchInBrowserURL),
        })
      },
    [handleZoomError, onZoomJoinSuccess],
  )

const meetingConfig = {
          sdkKey,
          signature,
          meetingNumber: meetingId,
          userName,
          passWord: pwd ? pwd : '',
          zak: zak,
        }

        ZoomMtg.init({
          leaveUrl: leaveUrl,
          isSupportAV: true,
          disablePreview: !user,
          success: onSuccessZoomInit(meetingConfig, launchInBrowserURL, ZoomMtg),
          error: (error: unknown) => handleZoomError(error, launchInBrowserURL),
        })

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Create a meeting
  2. make sure that you’re the only participant
  3. start video
  4. See error
  • Device: Macbook Pro
  • OS: MacOS 14.4.1
  • Browser: Chrome
  • Browser Version 123.0.6312.87 (Official Build) (arm64)

@thoffart ,

Thank you for sharing your post. I’ve done some testing on the latest sample App , but I’m unable to replicate the behavior you’ve reported. As a next step, you can try using the sample app and let us know if you’re encountering the same issue.

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