Electron SDK v6.1.1.41755 getting SDKRawDataError.SDKRawDataError_WRONGUSAGE from zoomRawData.Subscribe func

Meeting SDK Type and Version
Meeting SDK Electron Wrapper v6.1.1.41755

Description
While exploring the Meeting SDK Electron Wrapper (Meeting SDK Electron Wrapper ), we are consistently encountering the SDKRawDataError.SDKRawDataError_WRONGUSAGE error from zoomRawData.Subscribe. Below is the relevant portion of the code I am using (in src\assets\ts\rawdata\video.ts line 28):

const handleSubscribeVideo = (resolution: number, recv_handle: number, userid: number) => {
    console.log('handleSubscribeVideo userid:', userid);
    console.log('handleSubscribeVideo resolution:', resolution);
    console.log('handleSubscribeVideo recv_handle:', recv_handle);
    let obj = {resolution, recv_handle}
    let ret = zoomRawData.SetRawDataResolution(obj)
    let subscribeObj = {
      userid: userid,
      rawdataType: ZoomSDKRawDataType.RAW_DATA_TYPE_VIDEO,
      recv_handle: recv_handle
    }
    ret = zoomRawData.Subscribe(subscribeObj);
    console.warn('SDKRawDataError: ', ret);
    if (ret == SDKRawDataError.SDKRawDataError_SUCCESS || ret == SDKRawDataError.SDKRawDataError_NO_VIDEO_DATA) {
      subscribedVideoList.value[recv_handle] = zoomMeetingParticipants.GetUserInfoByUserID(userid)
    }
}

Error?
The zoomRawData.Subscribe method consistently returns SDKRawDataError.SDKRawDataError_WRONGUSAGE.

Troubleshooting Routes

  • Implement the above code snippet within the Meeting SDK Electron Wrapper.
  • Execute the handleSubscribeVideo function with appropriate parameters.

Could you please guide us how to correctly use zoomRawData.Subscribe method? Additionally, if there are any known issues or additional steps required to correctly use zoomRawData.Subscribe, please kindly provide that information.

Thank you for your assistance.

@Shared_Studios I’m not that familiar with electron, but from macOS, Windows and Linux SDK, here are the steps needed before calling Subscribe.

  1. Ensure that the SDK has fully joined the meeting
  2. Request for either recording rights, co-host or host priviledge
  3. Call the start raw recording method
  4. Call the Subscribe method.

Hi @chunsiong.zoom,

Thank you for your reply. It seems we are missing the second step: Request for either recording rights, co-host or host privileges. Could you please guide us how to request the privileges? Thank you.

Kindly,
James

@Shared_Studios ,.

I’ll be sharing the solution on Windows. Electron being a wrapper will call the same method on the bottom layer as well.

There is a IMeetingRecordingController which you can get from the ZoomSDK’s meetingService’s GetMeetingRecordingController method.

Within this Recording Controller, you can call RequestLocalRecordingPrivilege method

https://marketplacefront.zoom.us/sdk/meeting/windows/class_i_meeting_recording_controller.html#abcb2ca7aa87e73836f4d6226feffbe8d

Hi @chunsiong.zoom,

Thank you for your reply. I can see the GetMeetingRecordingController method in the ZoomMeetingRecording addon (zoom_sdk_electron\lib\zoom_setting_recording.js). However, I’m unable to find the RequestLocalRecordingPrivilege method in the wrapper (zoom_sdk_electron\lib\node_add_on\meeting_service_wrap_core.h) or in the C# wrapper (zoom_sdk_c_sharp_wrap\meeting_recording_dotnet_wrap.h). Could you please provide more details or guidance on how to call RequestLocalRecordingPrivilege method? Thank you.

Kindly,
James

@Shared_Studios , sorry I’m not that familiar with Electron.

You will need to trace the javascript files to the underlying “wrapped” cpp and .h files. They will call the specific methods on the underlying Windows SDK to request for local recording privilege.

The general guidelines are trace

  • GetSettingRecordingCtrl

    See that it returns ZSettingRecordingWrap& GetSettingRecordingCtrl();

    • further trace ZSettingRecordingWrap
      See that it is associated with setting_recording_wrap_core.h . You will need to create a method which allows the .js file to call over here, to request for local recording priviledge
      • further trace the .cpp implementation to setting_recording_wrap_core.cpp

.
.
.

Keep tracing until you find the actual code which calls |MeetingRecordingController::RequestLocalRecordingPrivilege()

I have added the necessary permissions in the scope, see the snapshots below, but when we request the permission in the meeting, I encounter another SDKRawDataError_WRONGUSAGE issue or maybe the same issue.



@Shared_Studios raw stream is not the same as raw data.

You want want to check out this flow diagram