Skip to content

Commit 5f9a74d

Browse files
Ujjwal SharmaUjjwal Sharma
authored andcommitted
permissions: Allow fullscreen video requests on macOS
On macOS, videos embedded in Zulip Desktop could not enter fullscreen mode because the app's permission handler did not explicitly grant fullscreen permissions. This commit updates the `ipcRenderer.on("permission-request")` handler to include fullscreen, in addition to existing permissions such as notifications. With this change, video players (e.g., YouTube and Zulip-embedded media) can properly request fullscreen. Tested on macOS to confirm fullscreen now works, and on Windows/Linux to ensure no regressions. Fixes #1409.
1 parent c08bbf4 commit 5f9a74d

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

app/renderer/js/main.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -961,20 +961,22 @@ export class ServerManagerView {
961961
permissionCallbackId: number,
962962
) => {
963963
const grant =
964-
webContentsId === null
965-
? origin === "null" && permission === "notifications"
966-
: (
967-
await Promise.all(
968-
this.tabs.map(async (tab) => {
969-
if (!(tab instanceof ServerTab)) return false;
970-
const webview = await tab.webview;
971-
return (
972-
webview.webContentsId === webContentsId &&
973-
webview.properties.hasPermission?.(origin, permission)
974-
);
975-
}),
976-
)
977-
).some(Boolean);
964+
permission === "fullscreen"
965+
? true
966+
: webContentsId === null
967+
? origin === "null" && permission === "notifications"
968+
: (
969+
await Promise.all(
970+
this.tabs.map(async (tab) => {
971+
if (!(tab instanceof ServerTab)) return false;
972+
const webview = await tab.webview;
973+
return (
974+
webview.webContentsId === webContentsId &&
975+
webview.properties.hasPermission?.(origin, permission)
976+
);
977+
}),
978+
)
979+
).some(Boolean);
978980
console.log(
979981
grant ? "Granted" : "Denied",
980982
"permissions request for",

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)