mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-07-19 14:37:00 +00:00
Initial commit of new video player
This commit is contained in:
parent
d4a900e902
commit
755db076e7
58 changed files with 2261 additions and 475 deletions
|
@ -119,6 +119,8 @@ export default class Main {
|
|||
Main.playerWindow = new BrowserWindow({
|
||||
fullscreen: true,
|
||||
autoHideMenuBar: true,
|
||||
minWidth: 515,
|
||||
minHeight: 290,
|
||||
icon: path.join(__dirname, 'icon512.png'),
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'player/preload.js')
|
||||
|
@ -166,6 +168,15 @@ export default class Main {
|
|||
});
|
||||
});
|
||||
|
||||
ipcMain.handle('is-full-screen', async () => {
|
||||
const window = Main.playerWindow;
|
||||
if (!window) {
|
||||
return;
|
||||
}
|
||||
|
||||
return window.isFullScreen();
|
||||
});
|
||||
|
||||
ipcMain.on('toggle-full-screen', () => {
|
||||
const window = Main.playerWindow;
|
||||
if (!window) {
|
||||
|
@ -330,7 +341,7 @@ export default class Main {
|
|||
|
||||
static main(app: Electron.App) {
|
||||
Main.application = app;
|
||||
const argv = yargs(hideBin(process.argv))
|
||||
const argv = yargs(hideBin(process.argv))
|
||||
.parserConfiguration({
|
||||
'boolean-negation': false
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue