snapshot: add support for periodic snapshots via http

This commit is contained in:
Koushik Dutta
2024-01-11 13:15:18 -08:00
parent f18e58a108
commit 566c18251c
3 changed files with 4 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/snapshot",
"version": "0.2.32",
"version": "0.2.33",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/snapshot",
"version": "0.2.32",
"version": "0.2.33",
"dependencies": {
"@types/node": "^20.10.6",
"sharp": "^0.33.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/snapshot",
"version": "0.2.32",
"version": "0.2.33",
"description": "Snapshot Plugin for Scrypted",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",

View File

@@ -673,6 +673,7 @@ export class SnapshotPlugin extends AutoenableMixinProvider implements MixinProv
const mixin = this.mixinDevices.get(id);
let buffer: Buffer;
const rpo: RequestPictureOptions = {
reason: search.get('reason') as 'event' | 'periodic',
picture: {
width: parseInt(search.get('width')) || undefined,
height: parseInt(search.get('height')) || undefined,