electron

Play local video file in electron html5 video player using node.js fs.readStream()

╄→尐↘猪︶ㄣ 提交于 2021-01-05 10:53:08
问题 I am developing a video player application, which plays video videos (.mp4) from the local filesystem using node.js and electron (therefore I am using chromium's html5 video player). Playing video videos larger than 2GB seems to be a problem with my current approach. I used to read the local video files using fs.readFileSync and pass that Blob to the video player, like in this code: this.videoNode = document.querySelector('video'); const file: Buffer = fs.readFileSync(video.previewFilePath);

Using file protocol to access react router route locally?

旧街凉风 提交于 2021-01-05 09:41:11
问题 I am building a app with React and Electron and am using React Router Dom for navigation (I am using the HashRouter as it will not be on a server in production). I am trying to open a new electron window and display a page made with React in it but I cannot figure out how to access a react router route using the file protocol because each page does not get its own html file. Does anyone know how I can access that route using the file protocol? My home page is loaded into the app using this

Cannot capture system audio output with Electron desktopcapturer in Ubuntu

佐手、 提交于 2021-01-05 06:37:26
问题 I want to capture OS system audio output with Electron desktopcapturer, it works well in Windows as following: constraints = { // audio: false, audio: { mandatory: { chromeMediaSource: 'desktop' } }, video: { mandatory: { chromeMediaSource: 'desktop' //maxFrameRate: 15 }, } then, I use: navigator.webkitGetUserMedia(constraints, function(dstream) {... However, in Ubuntu, it always shows "could not start audio source". Can anyone tell me how to do? Thanks for your help. 回答1: Leaving my answer

Cannot find module './App.svelte' or its corresponding type declarations

不问归期 提交于 2021-01-04 06:56:07
问题 I have a setup that integrates electron with svelte along with typescript support. when I run the rollup script to compile svelte app, i am getting cannot find module ./App.svelte error as shown below. Plugin typescript: @rollup/plugin-typescript TS2307: Cannot find module './App.svelte' or its corresponding type declarations. Here's my package.json configuration : { "name": "tapwire-electron-first", "productName": "tapwire-electron-first", "version": "1.0.0", "description": "My Electron

Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send

若如初见. 提交于 2020-12-31 05:41:10
问题 I am unable to pass any object or arrays to IPCRenderer. I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string. I have tried passing a fileList, an array of object & even an object nothing passes. only string or handwritten objects are working. I've read that it uses Structured Clone Algorithm and fileList & Array is allowed by this algorithm ERROR: electron/js2c

Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send

点点圈 提交于 2020-12-31 05:40:55
问题 I am unable to pass any object or arrays to IPCRenderer. I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string. I have tried passing a fileList, an array of object & even an object nothing passes. only string or handwritten objects are working. I've read that it uses Structured Clone Algorithm and fileList & Array is allowed by this algorithm ERROR: electron/js2c

Unable To Pass Objects/Arrays in IPCRenderer, An object could not be cloned EventEmitter.i.send.i.send

此生再无相见时 提交于 2020-12-31 05:40:30
问题 I am unable to pass any object or arrays to IPCRenderer. I am getting error when passing an object or array through ipcs, I have even tried to send by converting to string using JSON.stringify but it converts it into empty object string. I have tried passing a fileList, an array of object & even an object nothing passes. only string or handwritten objects are working. I've read that it uses Structured Clone Algorithm and fileList & Array is allowed by this algorithm ERROR: electron/js2c

Cannot activate Conda environment from subprocess

你说的曾经没有我的故事 提交于 2020-12-31 01:52:17
问题 I am building an Electron app (running an Angular application) which acts as the User Interface for a python program underneath. The python program uses anaconda for package management (I am using miniconda for development). When the app boots up, it checks whether the required conda environment exists, and if not, creates it. The following code is part of a Service which is responsible for managing the python program. public doEnvironmentSetup() { let stdOutSub = new Subject<string>(); let

Cannot activate Conda environment from subprocess

ε祈祈猫儿з 提交于 2020-12-31 01:46:05
问题 I am building an Electron app (running an Angular application) which acts as the User Interface for a python program underneath. The python program uses anaconda for package management (I am using miniconda for development). When the app boots up, it checks whether the required conda environment exists, and if not, creates it. The following code is part of a Service which is responsible for managing the python program. public doEnvironmentSetup() { let stdOutSub = new Subject<string>(); let

Cannot activate Conda environment from subprocess

旧城冷巷雨未停 提交于 2020-12-31 01:42:38
问题 I am building an Electron app (running an Angular application) which acts as the User Interface for a python program underneath. The python program uses anaconda for package management (I am using miniconda for development). When the app boots up, it checks whether the required conda environment exists, and if not, creates it. The following code is part of a Service which is responsible for managing the python program. public doEnvironmentSetup() { let stdOutSub = new Subject<string>(); let