Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-website-to-camera

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-website-to-camera - npm Package Compare versions

Comparing version 1.5.3 to 1.6.0

2

CameraSource.js

@@ -15,3 +15,3 @@ "use strict";

this.streamControllers = [];
this.screenshotHelper = new ScreenshotHelper(log, conf.url, conf.chromiumPath);
this.screenshotHelper = new ScreenshotHelper(log, conf.url, conf.chromiumPath, conf.ignoreHTTPSErrors);

@@ -18,0 +18,0 @@ this.pendingSessions = {};

{
"name": "homebridge-website-to-camera",
"version": "1.5.3",
"version": "1.6.0",
"description": "shows the screenshot of a website as camera (image)",

@@ -43,4 +43,5 @@ "main": "index.js",

"ip": "^1.1.5",
"puppeteer-core": "3.0.1"
"puppeteer-core": "^5.5.0",
"username": "^5.1.0"
}
}

@@ -10,2 +10,8 @@ # homebridge-website-to-camera

If you find my work useful you can buy me a coffee, I am very thankful for your support.
<a href="https://www.buymeacoffee.com/werthdavid" target="_blank"><img width="140" src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Buy Me A Coffee"></a>
# Installation

@@ -58,2 +64,3 @@

* `renderTimeout` timeout in ms for waiting AFTER the page has loaded before taking the screenshot. userful for PWAs. (defaults to 1ms)
* `ignoreHTTPSErrors` ignore HTTPS errors, useful for self-signed certificates (defaults to `false`)

@@ -60,0 +67,0 @@

const puppeteer = require('puppeteer-core');
const username = require('username');
module.exports = ScreenshotHelper;
function ScreenshotHelper(log, url, chromiumPath = "/usr/bin/chromium-browser") {
function ScreenshotHelper(log, url, chromiumPath = "/usr/bin/chromium-browser", ignoreHTTPSErrors = false) {
this.log = log;
this.url = url;
this.chromiumPath = chromiumPath;
this.ignoreHTTPSErrors = ignoreHTTPSErrors;
this.log("Initialized ScreenshotHelper");

@@ -19,2 +21,3 @@ }

this.log("Starting new instance of Chromium: " + this.chromiumPath);
const isRoot = username.sync() === "root";
this.browser = await puppeteer.launch(

@@ -24,3 +27,4 @@ {

headless: true,
args: ['--no-sandbox'] // required if homebridge is started as root-user
ignoreHTTPSErrors: this.ignoreHTTPSErrors,
args: isRoot ? ['--no-sandbox'] : []
}

@@ -27,0 +31,0 @@ );

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc