electron

Use AudioWorklet within electron (DOMException: The user aborted a request)

寵の児 提交于 2019-12-08 06:25:54
问题 I am trying to use an AudioWorklet within my electron app for metering etc. which works fine when executed in dev mode where the worklet is being served by an express dev server like http://localhost:3000/processor.js. However if I try to run the app in prod mode the file is being served locally like file://tmp/etc/etc/build/processor.js and in the developer-console I can even see the file correctly being previewed but I get this error message: Uncaught (in promise) DOMException: The user

Angular2 rc5 and Electron Error - Cannot resolve component using

為{幸葍}努か 提交于 2019-12-08 05:52:14
问题 I learning how to use angular2 with electron.Currently i am using the the latest angular rc5 and the latest version of electron.I decided to use the official angular tutorial (Tour of heroes). I had no major problems till i got to routing.I had to make some little changes for routing to work eg in index.html instead of using for support with electron i had to use .I am also using webpack and angular2-materialize. My problem is when i click one of the heroes it shows the error stated in the

Install sqlite3 on windows

≡放荡痞女 提交于 2019-12-08 05:11:28
问题 I am trying to use "electron": "^4.1.4", with "sqlite3": "^4.0.6" on windows 8.1 and node v10.15.3 . I tried to install windows-build-tools , like: npm install --global --production windows-build-tools@4.0.0 Furthermore, I used electron-rebuild -w sqlite3 which: V Rebuild Complete The operation ran through successfully, however, when trying to install npm install sqlite3 --save I get: 62 silly saveTree `-- sqlite3@4.0.6 62 silly saveTree +-- nan@2.10.0 62 silly saveTree `-- node-pre-gyp@0.11

Firebase: Sign in with a token

血红的双手。 提交于 2019-12-08 04:36:16
问题 Firebase question My goal is to keep a user signed in a desktop app made primarily with NodeJS User signs in Store some kind of token to sign user in later When user re-opens app, sign user in with that token if available Token can expire / be invalidated Currently, it seems Firebase relies on cookies of some sort. Is there a way to sign in a user without their email/password again? I am currently trying to use Firebase authentication as part of my Electron app where I cannot have the

JavaScript - Read metadata of video file

痴心易碎 提交于 2019-12-08 04:00:20
问题 I've been at this for hours, it's time to ask for a little help. I need to know the frame rate of a video on load in JavaScript/HTML and I'm trying to avoid VLC plug-in or ffmpeg. The browser reads the video metadata to check the intended frame rate, so how can I do this as well? I read a lot of online things and didn't find anything useful but I can't believe that this is unfeasible. I'm looking for this but for videos. Should be simple, right? Note: I'm building a desktop app with Electron

How to execute locally installed Node.js application by child_process.spawn()?

故事扮演 提交于 2019-12-08 03:54:55
问题 I want to execute the Electron application by child_process.spawn : import ChildProcess, {ChildProcess as ChildProcess__type} from 'child_process'; const childProcess: ChildProcess__type = ChildProcess.spawn( 'electron', ['ProjectInitializer__ElectronMain.js'], { cwd: __dirname } // current project root ); I got Error: spawn electron ENOENT error. Electron has been installed locally, AFAIK is the good practice. Also, electron ProjectInitializer__ElectronMain.js works, it to execute this

ERROR in renderer.js from UglifyJs Unexpected token punc «(»

こ雲淡風輕ζ 提交于 2019-12-08 03:44:26
Version: webpack 2.3.3 Hi there I'm trying to build my first Electron app using Vuejs. Everything seems to be going great until I've come to package the app. When I run npm run dev everything works just fine. However, when I run npm build:darwin I get the following error ERROR in renderer.js from UglifyJs Unexpected token punc «(», expected punc «:» [renderer.js:26813,14] It does end up compiling however when I run the application I get the white screen of death. From what I read, this can be because Uglifyjs doesn't compile ES6 but you can overcome that by the following in your .babelrc file

Intellisense in VSCode for electron app development

痞子三分冷 提交于 2019-12-08 03:00:38
问题 I am developing windows desktop app using Electron and VSCode. I do not see any intellisence when I try to use functions from electron. My query is, how to configure vscode to enable the electron intellisense? In general I want to know what procedures I need to follow so that I can get intellisense feature in JavaScript code. 回答1: Running this should do the trick typings install github-electron --source dt --global Update The new method would be to install the @types through npm via: npm i -D

How to view a PDF in an Electron BrowserWindow?

匆匆过客 提交于 2019-12-08 02:37:58
问题 So I have this Electron app and in one of the .html-files I link another script that provides some utility-functions to the program and one of those is this one: function openPDF(filePath){ let pdfWindow = new electron.remote.BrowserWindow({ icon: './build/icon.png', width: 1200, height: 800, webPreferences: { plugins: true } }); pdfWindow.loadURL(url.format({ pathname: filePath, protocol: 'file:', slashes: true })); pdfWindow.setMenu(null); pdfWindow.on("closed", function () { pdfWindow =

Multi Windows App Structure with Electron

若如初见. 提交于 2019-12-08 02:12:07
问题 I'm developing a dashboard application, my intention is to have multiple windows that can be customized by selecting pre-defined window layouts. An illustrated layout would be something like this: I'm currently shooting for Electron framework. The way I'm doing it is by creating multiple BrowserWindow by capturing the screen size and calculating the windows sizes and positions. This is how I'm writing it: // app/main.js // Module to control application life. var app = require('electron').app;