fix(desktop): allow HTML5 video fullscreen through the permission handlers again
360c1ee836+e6aa2e9fe4were dropped in the merge: the request handler denied 'fullscreen' and the check handler denied 'automatic-fullscreen', so the native fullscreen button on <video controls> did nothing.
This commit is contained in:
1 parent
529315649a
commit
dae4cacbcb
1 file changed
+8
@@ -6786,6 +6786,13 @@ function installContextMenuBridge(window: BrowserWindow) {
|
||||
// usage strings), so the user keeps a real allow/deny and can revoke it in
|
||||
// System Settings afterwards.
|
||||
function isMediaCapturePermission(permission, details) {
|
||||
// HTML5 video/audio fullscreen asks the request handler for 'fullscreen'
|
||||
// and the check handler for 'automatic-fullscreen'. Both must be allowed
|
||||
// or the native fullscreen button on <video controls> does nothing.
|
||||
if (permission === 'fullscreen' || permission === 'automatic-fullscreen') {
|
||||
return true
|
||||
}
|
||||
|
||||
if (permission === 'audioCapture' || permission === 'videoCapture') {
|
||||
return true
|
||||
}
|
||||
@@ -6848,6 +6855,7 @@ function installMediaPermissions() {
|
||||
session.defaultSession.setPermissionCheckHandler((_webContents, permission) => {
|
||||
return (
|
||||
permission === 'media' ||
|
||||
(permission as string) === 'automatic-fullscreen' ||
|
||||
permission === ('audioCapture' as any) /* todo: is this needed? */ ||
|
||||
permission === ('videoCapture' as any)
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user