node-webkit

Node WebKit and YouTube: chrome is not defined

空扰寡人 提交于 2019-12-06 00:27:08
I'm developing an app for Android , iOS , Mac OS and Windows using PhoneGap and Node-WebKit . This application has embedded youtube videos. These youtube videos are working fine in my Mobile app ( Android / iPhone ) using PhoneGap , but if I test it on my Mac (building the app using grunt node-webkit builder ) I get the following error: Uncaught ReferenceError: chrome is not defined www-embed-player.js:184 I tried to check that line and there is some code like: chrome.cast.requestSession(v(this.Lc,this) I'm embedding the videos using an iframe: <iframe src="http://www.youtube.com/embed

node.js child process doesn't work in node webkit

空扰寡人 提交于 2019-12-05 19:21:46
I made a small app with node webkit. Pre-packaging, it works fine. But after I zipped it and added it to Contents/Resources in node-webkit.app I get an error when I run the app. It opens fine, but the task it does involves child processes, and I get this error: Uncaught node.js Error Error: spawn ENOENT. I'm guessing it might be something related to the issue raised in this question: Node-Webkit Child Process Exec because my child processes are calling pdftk, a separate command line program. Ultimately, I'd love to install pdftk as part of my app - I have not been able to figure out how to do

Where are node-webkit database files stored?

本小妞迷上赌 提交于 2019-12-05 14:43:26
I've just started to work with Node-webkit, and think it's great. I've setup a db using the "Web SQL Database" option, mentioned here , and it seems to work well. Much like Sqlite, which I'm a bit familiar with. From the docs, this is implemented using sqlite, so I'd like to be able to find the actual db file this create on disk and look at it with a Sqlite editor, like sqliteman. Where is the db file saved to? I couldn't find it in the docs, or by googling it ;-) Since node-webkit version 0.6.1, you may retrieve the dataPath from the App object. The WebSQL files will be stored within the

Trying to use mongoose with node-webkit target on Webpack

不羁的心 提交于 2019-12-05 10:29:15
问题 I use webpack and target it's build output for node-webkit . I want to require the mongoose module inside my project to connect to mongodb, but it always states some errors when I try to pack the project: WARNING in ./~/mongoose/~/mongodb/~/mongodb-core/~/bson/~/bson-ext/ext/index.js Module not found: Error: Cannot resolve 'file' or 'directory' ./win32/x64/bson in /Users/Johannes/Documents/Development/holmes/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules

Get the path to the current application in node-webkit

混江龙づ霸主 提交于 2019-12-04 20:09:37
问题 In node-webkit, is there any way to find the path to the current application? In node.js, you can use __dirname to find the path to the current application, but in node-webkit, the variable __dirname appears to be undefined. The following node.js script prints the file path correctly: console.log(__dirname) The following node-webkit script does not print the file path correctly: <script type = "text/javascript"> alert(__dirname); </script> What is the correct way to find the path to the

node wkhtmltopdf create corrupted PDF in node webkit

不问归期 提交于 2019-12-04 18:42:26
Im having a lot of trouble in node webkit to convert html to PDF. Im using wkhtmltopdf 0.12.1 and did the npm install wkhtmltopdf. Here is my node code: var wkhtmltopdf = require('wkhtmltopdf'); var fs = require("fs-plus"); // URL wkhtmltopdf('http://google.com/', { pageSize: 'letter' }) .pipe(fs.createWriteStream('out.pdf')); It gave me an error. Later I found this https://github.com/devongovett/node-wkhtmltopdf/pull/9 I did the correcting and im not getting any error anymore but the PDF that I get in return is corrupted . Any idea ? I have tried following the examples on the node-wkhtmltopdf

Demeteorizer with node-webkit

安稳与你 提交于 2019-12-04 17:35:35
I'm trying to make a desktop application using meteor. Can I use Demeteorizer to convert it to a standard node.js app, then use ndoe-webkit to turn it into a desktop app? My problem with this is, how would the mongodb database still work? If this is not a valid option, is there any other way to do this? Interesting idea. Demeteorizer will help you create a bundle that can be installed anywhere. You would then be able to use this on a desktop computer. There are a few things you need to keep in mind when using node-webkit 1) You need to load the URL that is running the server, which is what

node-webkit enabling flag touch screen

孤街浪徒 提交于 2019-12-04 17:04:17
I use Ubuntu 14.04 LTS. If I use Chromium 34.0.1847.116 to enable touch events on my web app I have to: start chromium with --enable-touch-events --enable-pinch set to enabled the flag "Enable touch events" using chrome://flags I'm looking to enable theses touch events on node-webkit . I'm using 64 bit version of node-webkit v0.9.2 that uses chromium 32.0.1700.107 . If I add the following key to package.json , it does not work. "chromium-args" : "--enable-touch-events --enable-pinch" touch events on browser don't work. If i try to open chrome://flags, I get a white page. Is it a problem of

Progress bar based on file download

前提是你 提交于 2019-12-04 14:27:15
问题 How would I display a progress bar based on file downloaded in node webkit? var https = require('https'); var fs = require('fs'); var exec = require('child_process').exec; var file = fs.createWriteStream("update_setup.exe"); var len = 0; var request = https.get(url + 'appdata/update_setup.exe', function (response) { response.pipe(file); response.on('data', function (chunk) { file.write(chunk); len += chunk.length; var percent = (len / response.headers['content-length']) * 100; }); file.on(

console.log() does not appear in my terminal (nwjs)

末鹿安然 提交于 2019-12-04 10:04:44
In my nwjs app, I load a _launch.js file from an HTML file: <html> <body> <script type="text/javascript" src="_launch.js"></script> </body> </html> And in my _launch.js file, I fire up the the Node processes I need for an express server and socketIO. var express = require('express'), app = express(), server = require('http').Server(app), io = require('socket.io')(server), gui = require('nw.gui'), __curDir = process.cwd(), //keep the logic for the IO connections separate ioServer = require(__curDir + '/server.js'); //configure Express to default web requests to /workspace/ folder app.use