Use mediaDevices API in Jira forge app not allowed

I want to use mediaDevices.getUserMedia() to capture screen, but in new version of browsers it disallowed by permission policy.
I use this code for capturing:

desktopStream = await navigator.mediaDevices.getDisplayMedia({ video:true, audio: true });

the container iframe has not allow directive for “display-capture”. the console throw this error:

Uncaught (in promise) DOMException: Failed to execute 'getDisplayMedia' on 'MediaDevices': Access to the feature "display-capture" is disallowed by permission policy.

Hi @naseriimahmoud,

I don’t think the media API is publicly available. How did you come across it? Can you point me to the documentation you see on it?


Hi @dmorrow
Thanks for the reply
I intend to use Media Device using this. But because using it in the form of Ifram (where the Jira app runs) requires access from the parent page (Jira), and this access is not defined in Ifram, the new version of Google Chrome (version 94) does not allow its use. And it returns the error I mentioned in the text of the topic in the console.
Is there a solution to this problem?