our sandboxed application is wrapped by a top level html, which servers as a proxy between our app and service workers.
I need access to microphone in the application, navigator.mediaDevices.getUserMedia({ audio: {deviceId: {exact: 'default'}} }), but it seems like we cannot do that in a sandboxed origin? [Violation] Permissions policy violation: microphone is not allowed in this document.
I haven't seen any mention of the navigator.mediaDevices being blocked in a sandboxed origin. But if that's the case, is my only workaround to handle audio in the wrapper?
Here's what I've been trying to do
Top level wrapper:
let iframe = document.createElement('iframe'),
appUrl = chrome.runtime.getURL('index.html');
iframe.setAttribute('src', appUrl);
iframe.setAttribute('allow', 'microphone ' + appUrl);
document.body.appendChild(iframe);
Permissions in manifest.json:
"permissions": [
"notifications",
"storage",
"notifications",
"scripting",
"contentSettings"
],