mirror of
https://github.com/koush/scrypted.git
synced 2026-02-10 17:22:03 +00:00
snapshot: enable plugin on doorbells too
This commit is contained in:
4
plugins/snapshot/package-lock.json
generated
4
plugins/snapshot/package-lock.json
generated
@@ -14,7 +14,7 @@
|
||||
"@scrypted/common": "file:../../common",
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.0.2"
|
||||
"version": "0.0.3"
|
||||
},
|
||||
"../../common": {
|
||||
"name": "@scrypted/common",
|
||||
@@ -207,5 +207,5 @@
|
||||
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
|
||||
}
|
||||
},
|
||||
"version": "0.0.2"
|
||||
"version": "0.0.3"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/snapshot",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.3",
|
||||
"description": "Snapshot Plugin for Scrypted",
|
||||
"scripts": {
|
||||
"prepublishOnly": "NODE_ENV=production scrypted-webpack",
|
||||
|
||||
@@ -74,7 +74,7 @@ class SnapshotMixin extends SettingsMixinDeviceBase<Camera> implements Camera {
|
||||
|
||||
class SnapshotPlugin extends ScryptedDeviceBase implements MixinProvider {
|
||||
async canMixin(type: ScryptedDeviceType, interfaces: string[]): Promise<string[]> {
|
||||
if (type === ScryptedDeviceType.Camera && interfaces.includes(ScryptedInterface.VideoCamera))
|
||||
if ((type === ScryptedDeviceType.Camera || type === ScryptedDeviceType.Doorbell) && interfaces.includes(ScryptedInterface.VideoCamera))
|
||||
return [ScryptedInterface.Camera, ScryptedInterface.Settings];
|
||||
return undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user