Skip to content

Commit 0589a17

Browse files
Add frame flexibility
1 parent cbb4aee commit 0589a17

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

injected/src/features/windows-permission-usage.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,13 @@ export default class WindowsPermissionUsage extends ContentFeature {
350350
},
351351
});
352352
getUserMediaProxy.overload();
353-
const disableDeviceEnumeration = this.getFeatureSettingEnabled('disableDeviceEnumeration');
353+
let disableDeviceEnumeration = false;
354+
const isFrame = window.self !== window.top;
355+
if (isFrame) {
356+
disableDeviceEnumeration = this.getFeatureSettingEnabled('disableDeviceEnumerationFrames');
357+
} else {
358+
disableDeviceEnumeration = this.getFeatureSettingEnabled('disableDeviceEnumeration');
359+
}
354360
if (disableDeviceEnumeration) {
355361
const enumerateDevicesProxy = new DDGProxy(this, MediaDevices.prototype, 'enumerateDevices', {
356362
apply() {

0 commit comments

Comments
 (0)