Skip to content

Commit bb4aaaa

Browse files
authored
feat(electron): Add screenshot permissions config detail (#11694)
1 parent 7a5f2f8 commit bb4aaaa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

platform-includes/user-feedback/setup/javascript.electron.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,16 @@ Sentry.init({
1212
],
1313
});
1414
```
15+
16+
### Screenshot Permissions
17+
18+
Screenshot capture uses `navigator.mediaDevices.getDisplayMedia()` to capture
19+
the window which is denied by default in Electron. To enable this feature, you
20+
need to set a `setDisplayMediaRequestHandler` callback in the Electron main
21+
process and allow access to the requesting frame.
22+
23+
```javascript
24+
session.defaultSession.setDisplayMediaRequestHandler((request, callback) => {
25+
callback({ video: request.frame });
26+
});
27+
```

0 commit comments

Comments
 (0)