mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 12:42:06 +00:00
29
src/index.ts
29
src/index.ts
@ -11,6 +11,7 @@ import {
|
|||||||
shell,
|
shell,
|
||||||
dialog,
|
dialog,
|
||||||
ipcMain,
|
ipcMain,
|
||||||
|
protocol,
|
||||||
type BrowserWindowConstructorOptions,
|
type BrowserWindowConstructorOptions,
|
||||||
} from 'electron';
|
} from 'electron';
|
||||||
import enhanceWebRequest, {
|
import enhanceWebRequest, {
|
||||||
@ -83,6 +84,34 @@ if (!gotTheLock) {
|
|||||||
app.exit();
|
app.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protocol.registerSchemesAsPrivileged([
|
||||||
|
{
|
||||||
|
scheme: 'http',
|
||||||
|
privileges: {
|
||||||
|
standard: true,
|
||||||
|
bypassCSP: true,
|
||||||
|
allowServiceWorkers: true,
|
||||||
|
supportFetchAPI: true,
|
||||||
|
corsEnabled: true,
|
||||||
|
stream: true,
|
||||||
|
codeCache: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scheme: 'https',
|
||||||
|
privileges: {
|
||||||
|
standard: true,
|
||||||
|
bypassCSP: true,
|
||||||
|
allowServiceWorkers: true,
|
||||||
|
supportFetchAPI: true,
|
||||||
|
corsEnabled: true,
|
||||||
|
stream: true,
|
||||||
|
codeCache: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ scheme: 'mailto', privileges: { standard: true } },
|
||||||
|
]);
|
||||||
|
|
||||||
// Ozone platform hint: Required for Wayland support
|
// Ozone platform hint: Required for Wayland support
|
||||||
app.commandLine.appendSwitch('ozone-platform-hint', 'auto');
|
app.commandLine.appendSwitch('ozone-platform-hint', 'auto');
|
||||||
// SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt)
|
// SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt)
|
||||||
|
|||||||
Reference in New Issue
Block a user