Immediately Request Local Recording On Join

Description
I’m trying to build a Zoom bot that joins a meeting after being invited and then immediately requests rights to local recording (the bot it not OAuth’d and is not a meeting owner).

Currently, I have this code:

			if (m_sdk_login_ui_mgr->attemptJoin(envMeetingId, envMeetingPass, envBotName)) {
				auto requestRecordingResult = SDKInterfaceWrap::GetInst().GetMeetingService()->GetMeetingRecordingController()->RequestLocalRecordingPrivilege();
				if (requestRecordingResult != ZOOMSDK::SDKERR_SUCCESS) {
					std::cout << "Error requesting recording rights: " << requestRecordingResult << std::endl;
				}
			}

However, when I run this I get the error code SDKERR_WRONG_USAGE. What am I doing wrong?

Which Windows Meeting SDK version?
v5.14.5.15340

Device (please complete the following information):
Windows 11

If you are trying to record, there are a couple of things to take note of.

  1. Make sure you already have permission to do so. This means the user is host / co-host or is given recording permission. You might be getting an error here, as you are trying to join the meeting, but have not successfully joined yet, hence you are unable to “ask for recording permission”

  2. Call the startRecording method when you are “in meeting”. If you try to call startRecording while trying to join, it will not work.

Typically I would call startRecording from the meeting status callback. This is guarantee my status is “in meeting” before calling startRecording.

@chunsiong.zoom That worked. For further context for anyone having the same issue, the solution was to add this code in the sdk_demo_app.cpp file in the CSDKDemoApp::onShowLoggedInUI function are the end:

	auto requestRecordingResult = SDKInterfaceWrap::GetInst().GetMeetingService()->GetMeetingRecordingController()->RequestLocalRecordingPrivilege();
	if (requestRecordingResult != ZOOMSDK::SDKERR_SUCCESS) {
		std::cout << "Error requesting recording rights: " << requestRecordingResult << std::endl;
	}

When you do this, the bot will request the local recording rights as soon as it joins

1 Like

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