UNPKG

homebridge-unifi-protect

Version:

Homebridge UniFi Protect plugin providing complete HomeKit integration for the entire UniFi Protect ecosystem with full support for most features including HomeKit Secure Video, multiple controllers, blazing fast performance, and much more.

43 lines 2.19 kB
import type { Nullable } from "homebridge-plugin-utils"; import type { ProtectCameraChannelConfig } from "unifi-protect"; import type { Resolution } from "homebridge"; export interface ChannelProfile { channel: ProtectCameraChannelConfig; lens?: number; name: string; resolution: Resolution; url: string; } export declare const RESOLUTIONS_4X3: readonly (readonly [number, number])[]; export declare const RESOLUTIONS_16X9: readonly (readonly [number, number])[]; export declare const PACKAGE_CHANNEL_NAME = "Package Camera"; export type SelectRequest = { mode: "name"; name: string; } | { bias: "higher" | "lower"; height: number; mode: "nearest"; width: number; }; export declare function is4x3AspectRatio(width: number, height: number): boolean; export declare function sortByResolutions(a: ChannelProfile, b: ChannelProfile): number; export declare function formatResolution(resolution: Resolution): string; export declare function rtspUrl(channel: ProtectCameraChannelConfig, urlHost: string, rtspPort: number, secure?: boolean): string; export declare function isPackageChannel(channel: ProtectCameraChannelConfig): boolean; export declare function isPrimaryChannel(channel: ProtectCameraChannelConfig): boolean; export declare function buildChannelProfile(channel: ProtectCameraChannelConfig, options: { lens?: number; rtspPort: number; urlHost: string; }): ChannelProfile; export declare function resolutionTableFor(nativeTop: Resolution): readonly (readonly [number, number])[]; export declare function isMandatedOrUnderTop(candidate: Resolution, currentTop: Resolution): boolean; export declare function capByPixels(entries: readonly ChannelProfile[], maxPixels: number | undefined): ChannelProfile[]; export declare function selectChannelProfile(entries: readonly ChannelProfile[], request: SelectRequest): Nullable<ChannelProfile>; export declare function buildAdvertisedProfiles(nativeEntries: readonly ChannelProfile[]): ChannelProfile[]; export declare function buildAdvertisedResolutions(options: { fpsSet: readonly number[]; nativeTop: Resolution; }): Resolution[]; //# sourceMappingURL=resolution.d.ts.map