diff --git a/ui/js/component/video/internal/player.jsx b/ui/js/component/video/internal/player.jsx index 1a86c3b20..608d67842 100644 --- a/ui/js/component/video/internal/player.jsx +++ b/ui/js/component/video/internal/player.jsx @@ -1,3 +1,4 @@ +const { remote } = require("electron"); import React from "react"; import { Thumbnail } from "component/common"; import player from "render-media"; @@ -25,6 +26,15 @@ class VideoPlayer extends React.PureComponent { const renderMediaCallback = err => { if (err) this.setState({ unplayable: true }); }; + // Handle fullscreen change for the Windows platform + const win32FullScreenChange = e => { + const win = remote.BrowserWindow.getFocusedWindow(); + if ("win32" === process.platform) { + win.setMenu( + document.webkitIsFullScreen ? null : remote.Menu.getApplicationMenu() + ); + } + }; player.append( this.file(), @@ -42,6 +52,10 @@ class VideoPlayer extends React.PureComponent { once: true, } ); + mediaElement.addEventListener( + "webkitfullscreenchange", + win32FullScreenChange.bind(this) + ); } }