-
-
Save BrandonXLF/465e91ee96fe29514d4e9d998e590d76 to your computer and use it in GitHub Desktop.
mp4-handle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { net, protocol, app, BrowserWindow } = require('electron') | |
function createWindow () { | |
const mainWindow = new BrowserWindow({ | |
width: 800, | |
height: 600 | |
}) | |
mainWindow.loadURL('file:///PUT_LOCAL_LOCAL_MP4_FILE'); | |
} | |
app.whenReady().then(() => { | |
protocol.handle('file', async (req) => { | |
return net.fetch(req, { | |
bypassCustomProtocolHandlers: true | |
}); | |
}); | |
createWindow(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "maddening-conversation-phone-kmkem", | |
"productName": "maddening-conversation-phone-kmkem", | |
"description": "My Electron application description", | |
"keywords": [], | |
"main": "./main.js", | |
"version": "1.0.0", | |
"author": "brand", | |
"scripts": { | |
"start": "electron ." | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
"electron": "27.0.3" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment