无法使用电子运行屏幕共享镶边应用程序

Unable to run a Screen share chrome app using electron

本文关键字:屏幕共享 应用程序 运行      更新时间:2023-09-26

我在chrome extenstion下成功运行了这个github应用程序。但是当我使用电子套接字连接运行它时,连接建立错误:net::ERR_CONNECTION_REFUSED

下面是 package.json 文件。我尝试了"chromium-args":"--allow-running-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。