无法使用 Electron 运行 屏幕共享 chrome 应用
Unable to run a Screen share chrome app using electron
我 运行 这个 github 应用在 chrome 扩展名下成功。但是当我运行它使用电子套接字连接时连接建立错误:net::ERR_CONNECTION_REFUSED
下面是 package.json 文件。
我尝试了 "chromium-args": "--allow-运行ning-insecure-content --ignore-certificate-errors",但没有帮助。
我需要在 package.json 中进行任何特定更改吗?只是想学习,如果缺少任何信息,请告诉我?
{
"name": "electron-app",
"version": "1.0.0",
"description": "",
"main": "main.js",
"icons": {
"16": "icon.png",
"128": "icon.png"
},
"app": {
"background": {
"scripts": ["background.js"]
}
},
"sockets": {
"udp": { "bind": "*", "send": "*" }
},
"permissions": [
"system.network", "desktopCapture", "videoCapture", "mdns"
],
"dependencies": {
"pretty-bytes": "^2.0.1"
},
"devDependencies": {
"electron-prebuilt": "^0.35.2"
},
"scripts": {
"start": "electron main.js"
},
"author": "",
"license": "ISC"
}
我认为目前无法在 Electron 中 运行 一个 Chrome 应用程序,您可能想尝试 NW.js v0.13 Beta。
我 运行 这个 github 应用在 chrome 扩展名下成功。但是当我运行它使用电子套接字连接时连接建立错误:net::ERR_CONNECTION_REFUSED
下面是 package.json 文件。 我尝试了 "chromium-args": "--allow-运行ning-insecure-content --ignore-certificate-errors",但没有帮助。 我需要在 package.json 中进行任何特定更改吗?只是想学习,如果缺少任何信息,请告诉我?
{
"name": "electron-app",
"version": "1.0.0",
"description": "",
"main": "main.js",
"icons": {
"16": "icon.png",
"128": "icon.png"
},
"app": {
"background": {
"scripts": ["background.js"]
}
},
"sockets": {
"udp": { "bind": "*", "send": "*" }
},
"permissions": [
"system.network", "desktopCapture", "videoCapture", "mdns"
],
"dependencies": {
"pretty-bytes": "^2.0.1"
},
"devDependencies": {
"electron-prebuilt": "^0.35.2"
},
"scripts": {
"start": "electron main.js"
},
"author": "",
"license": "ISC"
}
我认为目前无法在 Electron 中 运行 一个 Chrome 应用程序,您可能想尝试 NW.js v0.13 Beta。