@camstack/addon-provider-rtsp 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",
package/dist/addon.d.mts DELETED
@@ -1,14 +0,0 @@
1
- import { ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
2
-
3
- declare class RtspProviderAddon implements ICamstackAddon, IConfigurable {
4
- readonly manifest: AddonManifest;
5
- private provider;
6
- initialize(context: AddonContext): Promise<void>;
7
- shutdown(): Promise<void>;
8
- getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
9
- getConfigSchema(): ConfigUISchema;
10
- getConfig(): Record<string, unknown>;
11
- onConfigChange(_config: Record<string, unknown>): Promise<void>;
12
- }
13
-
14
- export { RtspProviderAddon };
package/dist/addon.d.ts DELETED
@@ -1,14 +0,0 @@
1
- import { ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
2
-
3
- declare class RtspProviderAddon implements ICamstackAddon, IConfigurable {
4
- readonly manifest: AddonManifest;
5
- private provider;
6
- initialize(context: AddonContext): Promise<void>;
7
- shutdown(): Promise<void>;
8
- getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
9
- getConfigSchema(): ConfigUISchema;
10
- getConfig(): Record<string, unknown>;
11
- onConfigChange(_config: Record<string, unknown>): Promise<void>;
12
- }
13
-
14
- export { RtspProviderAddon };
package/dist/index.d.mts DELETED
@@ -1,63 +0,0 @@
1
- export { RtspProviderAddon } from './addon.mjs';
2
- import { IDevice, DeviceType, DeviceCapabilityName, CamstackContext, IDeviceCapability, DeviceState, DeviceMetadata, IDeviceProvider, ProviderStatus, DiscoveredDevice, ConfigUISchema, LiveEvent } from '@camstack/types';
3
-
4
- interface RtspCameraConfig {
5
- readonly id: string;
6
- readonly name: string;
7
- readonly url: string;
8
- readonly subStreamUrl?: string;
9
- readonly snapshotUrl?: string;
10
- readonly audioEnabled?: boolean;
11
- readonly width?: number;
12
- readonly height?: number;
13
- }
14
- interface RtspProviderConfig {
15
- readonly id: string;
16
- readonly name: string;
17
- readonly cameras: readonly RtspCameraConfig[];
18
- }
19
-
20
- declare class RtspDevice implements IDevice {
21
- private readonly config;
22
- readonly id: string;
23
- readonly name: string;
24
- readonly providerId: string;
25
- readonly type: DeviceType;
26
- readonly capabilities: DeviceCapabilityName[];
27
- readonly ctx: CamstackContext;
28
- private readonly capabilityMap;
29
- constructor(config: RtspCameraConfig, providerId: string, ctx: CamstackContext);
30
- getCapability<T extends IDeviceCapability>(cap: DeviceCapabilityName): T | null;
31
- hasCapability(cap: DeviceCapabilityName): boolean;
32
- getState(): DeviceState;
33
- getMetadata(): DeviceMetadata;
34
- /** Return the camera config for persistence */
35
- getCameraConfig(): RtspCameraConfig;
36
- private createCamera;
37
- }
38
-
39
- declare class RtspProvider implements IDeviceProvider {
40
- readonly id: string;
41
- readonly type = "rtsp";
42
- readonly name: string;
43
- readonly discoveryMode: 'manual';
44
- readonly ctx: CamstackContext;
45
- private readonly devices;
46
- constructor(config: RtspProviderConfig, ctx: CamstackContext);
47
- start(): Promise<void>;
48
- stop(): Promise<void>;
49
- getStatus(): ProviderStatus;
50
- discoverDevices(): Promise<DiscoveredDevice[]>;
51
- getDevices(): IDevice[];
52
- getDeviceConfigSchema(): ConfigUISchema;
53
- createDevice(config: Record<string, unknown>): Promise<IDevice>;
54
- subscribeLiveEvents(_callback: (event: LiveEvent) => void): () => void;
55
- private buildDevice;
56
- /**
57
- * Persist all dynamically-created device configs so they survive restarts.
58
- * Saves the full list of camera configs under the 'devices' key in the provider's config.
59
- */
60
- private persistDeviceConfigs;
61
- }
62
-
63
- export { type RtspCameraConfig, RtspDevice, RtspProvider, type RtspProviderConfig };
package/dist/index.d.ts DELETED
@@ -1,63 +0,0 @@
1
- export { RtspProviderAddon } from './addon.js';
2
- import { IDevice, DeviceType, DeviceCapabilityName, CamstackContext, IDeviceCapability, DeviceState, DeviceMetadata, IDeviceProvider, ProviderStatus, DiscoveredDevice, ConfigUISchema, LiveEvent } from '@camstack/types';
3
-
4
- interface RtspCameraConfig {
5
- readonly id: string;
6
- readonly name: string;
7
- readonly url: string;
8
- readonly subStreamUrl?: string;
9
- readonly snapshotUrl?: string;
10
- readonly audioEnabled?: boolean;
11
- readonly width?: number;
12
- readonly height?: number;
13
- }
14
- interface RtspProviderConfig {
15
- readonly id: string;
16
- readonly name: string;
17
- readonly cameras: readonly RtspCameraConfig[];
18
- }
19
-
20
- declare class RtspDevice implements IDevice {
21
- private readonly config;
22
- readonly id: string;
23
- readonly name: string;
24
- readonly providerId: string;
25
- readonly type: DeviceType;
26
- readonly capabilities: DeviceCapabilityName[];
27
- readonly ctx: CamstackContext;
28
- private readonly capabilityMap;
29
- constructor(config: RtspCameraConfig, providerId: string, ctx: CamstackContext);
30
- getCapability<T extends IDeviceCapability>(cap: DeviceCapabilityName): T | null;
31
- hasCapability(cap: DeviceCapabilityName): boolean;
32
- getState(): DeviceState;
33
- getMetadata(): DeviceMetadata;
34
- /** Return the camera config for persistence */
35
- getCameraConfig(): RtspCameraConfig;
36
- private createCamera;
37
- }
38
-
39
- declare class RtspProvider implements IDeviceProvider {
40
- readonly id: string;
41
- readonly type = "rtsp";
42
- readonly name: string;
43
- readonly discoveryMode: 'manual';
44
- readonly ctx: CamstackContext;
45
- private readonly devices;
46
- constructor(config: RtspProviderConfig, ctx: CamstackContext);
47
- start(): Promise<void>;
48
- stop(): Promise<void>;
49
- getStatus(): ProviderStatus;
50
- discoverDevices(): Promise<DiscoveredDevice[]>;
51
- getDevices(): IDevice[];
52
- getDeviceConfigSchema(): ConfigUISchema;
53
- createDevice(config: Record<string, unknown>): Promise<IDevice>;
54
- subscribeLiveEvents(_callback: (event: LiveEvent) => void): () => void;
55
- private buildDevice;
56
- /**
57
- * Persist all dynamically-created device configs so they survive restarts.
58
- * Saves the full list of camera configs under the 'devices' key in the provider's config.
59
- */
60
- private persistDeviceConfigs;
61
- }
62
-
63
- export { type RtspCameraConfig, RtspDevice, RtspProvider, type RtspProviderConfig };