Web Meeting SDK MediaCapturePermission not working

The meeting is not recurring. I created meeting using the “New Meeting” button in zoom app.

@gianni.zoom This is my zoom recording setting.

@gianni.zoom Any updates on this?

Hi @bharat.bhadresha ,

Please see what Akash shared and try this way by giving permission in live meeting before calling API:

  1. Start instant meeting from client
  2. Join meeting from Web SDK
  3. From client, click Web SDK participant and grant local recording
  4. Run provided code in browser console

I tried this but doesn’t work for me.

Does this work with a guest user? The meeting sdk is joining the meeting as a guest user.

Hi @bharat.bhadresha ,

Please clarify. Were you able to complete all 4 steps but still received the error? Or you were not able to grant local recording to guest user prior to running the code?

Hi @gianni.zoom ,
We tried the following steps to get our bot join the host’s zoom meeting as a “guest participant” by passing the local recording token of the meeting host obtained via Zoom OAuth flow:

const signature = ZoomMtg.generateSDKSignature({
  sdkKey,
  sdkSecret,
  meetingNumber,
  role: "0", //join as a participant
});

// Use the zoom api to retrieve host' local recording token:
//https://api.zoom.us/v2/meetings/<meeting_id>/jointoken/local_recording
let host_local_rec_token = get_host_local_rec_token(); //method which uses above zoom api to retrieve host local recording token
 ZoomMtg.join({
    signature: signature,
    meetingNumber,
    recordingToken: host_local_rec_token, 
    userName: botName,
    sdkKey,
    passWord: password,
    success: res,
    error: rej,
  });

Next step was to use media capture API’s as shown below to inform other participants that the bot(as guest user) is recording this meeting.

ZoomMtg.mediaCapturePermission({
  operate: 'request',
  success: handleMediaCapturePermissionSuccess,
  error: handleMediaCapturePermissionError
});

function handleMediaCapturePermissionError(error:any) {
  if (error.errorCode == '1') {
    console.log('Media capture permission Active');
    ZoomMtg.mediaCapture({ record: "start" });
  } else {
    console.log(error, 'media capture permission error');
  }
}

This is working for us. Please confirm if this is a correct process.

Additionally our requirement is that we want the bot to join as a “signed-in” participant for meetings which require authentication. Zoom API document suggests that we could make our bot join as a “signed-in” participant by using the “zak” token of the bot user. But when we are trying to use the “zak” token of our bot in meeting sdk to join as a “signed-in” bot participant, it doesn’t work.
Here is the code that we are using. Please guide/suggest what could be done to make it working:

// Use the zoom api to retrieve zak token for our bot(assuming we have made our bot authenticated via Zoom OAuth flow for our meeting SDK app):
//https://api.zoom.us/v2/users/me/token?type=zak
let zak_token = get_zak_token(); //method which uses above zoom api to retrieve bot's zak token
 ZoomMtg.join({
    signature: signature,
    meetingNumber,
    zak: bot_zak_token, 
    userEmail: botEmail,
    userName: botName,
    sdkKey,
    passWord: password,
    success: res,
    error: rej,
  });

Here is the error that we are seeing when we use above code:

{
  "method": "join",
  "status": false,
  "result": "Not support start meeting via tokens",
  "errorMessage": "Token error",
  "errorCode": 3265
}

The error indicates that we can’t start meeting via tokens, but we are using role as “0” to join as a participant. Do you guys believe this is a bug in meeting SDK for web(client view). If so, may we know if this is already worked upon

Hi @gianni.zoom ,
One more question. Say suppose we authorize/authenticate a non-host meeting participant for our Web Meeting SDK app. If we now try to use access token of this participant in https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingLocalRecordingJoinToken then we are unable to retrieve the local recording token (which is required to display the zoom consent popup to zoom meeting participants).
Is there any way we can get local recording token of any participant other than meeting organizer?

Hi @deepak.babel ,

Thanks for the context that you were using a bot. This information would have been helpful to know earlier :sweat_smile:

Yes, it should work with guest users and am happy you were able to get it to work.

Are you able to reproduce the error with our bot sample app?
GitHub - zoom/meetingsdk-web-bot-sample: A bot implementation for the Web Meeting SDK built with Vanilla JS

We also have additional guidance here on our blog: Creating test cases for automated clients

Yes @gianni.zoom , I am able to reproduce this issue with mediaCapturePermission API with zoom’s web sample app https://github.com/zoom/meetingsdk-web-sample as well when I try to use Zak token of a meeting attendee which was authenticated on my meeting SDK app.

The zoom web sample app is currently using latest version(2.16.0) of zoom meeting SDK for web, but still I get the same error as reported by @bharat.bhadresha in his original post.

Code Snippet

      ZoomMtg.join({
        meetingNumber: meetingConfig.meetingNumber,
        userName: meetingConfig.userName,
        signature: signature,
        sdkKey: meetingConfig.sdkKey,
        userEmail: meetingConfig.userEmail,
        passWord: meetingConfig.passWord,
        zak: get_zak_token_of_meeting_attendee(),
        success: function (res) {
          console.log("join meeting success");
          console.log("get attendeelist");
          ZoomMtg.getAttendeeslist({});
          ZoomMtg.getCurrentUser({
            success: function (res) {
              console.log("success getCurrentUser", res.result.currentUser);
            },
          });
        },
        error: function (res) {
          console.log(res);
        },
      });

Browser Console Error

{"method":"mediaCapturePermission","status":false,"errorCode":1,"errorMessage":"not support grant local record permissin","result":null}

Which Web Meeting SDK version?
2.16.0

Use of Zak Token of meeting attendee: Yes

Use of local recording Token of meeting host: No

Result
Bot is able to join the meeting, but Host is not seeing any option/popup to grant local recording permission to bot to record.

This is important for compliance requirements for implementing bot as a meeting participant. Can you please help us on this issue!!
Happy to discuss this over a call if it works for you !!

HI @gianni.zoom,
We were able to get this working on zoom web sample app after updating the zoom native client yesterday without any code changes.
This means that the SDK reference documentation and the SDK code were inconsistent. Please take this as a feedback for the concerned team to improve developer community. experience.
Thanks for your help.

Hi @deepak.babel , thank you for sharing!

Which part was inconsistent for you please?

HI @gianni.zoom ,
For mediaCapture API to work, we need to have 2.16.0 version of zoom sdk + latest version of zoom native app(5.15.12).
Then it works.

Thank you for sharing, I will communicate these details with our Web SDK team.

1 Like

@gianni.zoom :slight_smile:
Thank you

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