Skip to content

Commit

Permalink
Allow audio and video larger than 32K to play (BL-12009)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenMcConnel committed Feb 28, 2024
1 parent 8d67269 commit 9ddd5f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ if (process.env.NODE_ENV !== "development") {
// Register our internal scheme ("bpub") as standard. A standard scheme adheres to what is
// called "generic URI syntax". A standard scheme can resolve both relative and absolute
// resources correctly when served. Also register our internal scheme to bypass content
// security policy for resources.
// security policy for resources. The scheme also needs to be registered as supporting
// streaming. Without this, the fetch can fail when the resource is larger than 32K.
protocol.registerSchemesAsPrivileged([
{ scheme: "bpub", privileges: { standard: true, bypassCSP: true } },
{
scheme: "bpub",
privileges: { standard: true, bypassCSP: true, stream: true },
},
]);

let mainWindow: BrowserWindow | null;
Expand Down

0 comments on commit 9ddd5f4

Please sign in to comment.