Error shared screen

I am using the integration by CDN but when I share the screen I get this error:

{
“errorName”: “SecurityError”,
“errorMsg”: “Failed to execute ‘getDisplayMedia’ on ‘MediaDevices’: Access to the feature “display-capture” is disallowed by permission policy.”,
“errorStack”: “Error: Failed to execute ‘getDisplayMedia’ on ‘MediaDevices’: Access to the feature “display-capture” is disallowed by permission policy.\n at MediaDevices.n (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/app.bundle.min.js?v=5415.2103:438:926433)\n at Object.obtainScreenFromGetDisplayMedia (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:1:156353)\n at https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:1:91807\n at new Promise ()\n at $._getDesktopMedia (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:1:91783)\n at $. (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:1:92613)\n at $.obtainAudioAndVideoPermissions (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:1:93782)\n at Function.obtainAudioAndVideoPermissions (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:1:97860)\n at Object.createLocalTracks (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/lib-jitsi-meet.min.js?v=5415.2103:17:142212)\n at https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/app.bundle.min.js?v=5415.2103:145:129950\n at async Object.toggleScreenSharing (https://web-cdn.jitsi.net/meetjitsi_5415.2103/libs/app.bundle.min.js?v=5415.2103:212:15399)”
}

You are using IframeAPI from meet.jit.si?
What is the browser you use and see the problem?

Hi, i have this error.
If i access directly in the browser to the conference its ok.
It its by iframe is not ok.

Thanks.

Are you creating the iframe yourself, or you use the iframeAPI and let it create the iframe for you?

I am creating myself. But i put “display-capture” in the allow attribute of the iframe and it seems it works.

Thank you.

You better use the iframeAPI for that, as it takes care for all of that.