mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
29
src/index.ts
29
src/index.ts
@ -11,6 +11,7 @@ import {
|
||||
shell,
|
||||
dialog,
|
||||
ipcMain,
|
||||
protocol,
|
||||
type BrowserWindowConstructorOptions,
|
||||
} from 'electron';
|
||||
import enhanceWebRequest, {
|
||||
@ -83,6 +84,34 @@ if (!gotTheLock) {
|
||||
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
|
||||
app.commandLine.appendSwitch('ozone-platform-hint', 'auto');
|
||||
// SharedArrayBuffer: Required for downloader (@ffmpeg/core-mt)
|
||||
|
||||
Reference in New Issue
Block a user