camstreamerlib
Version:
Helper library for CamStreamer ACAP applications.
79 lines (78 loc) • 4.34 kB
TypeScript
import { IClient, TParameters, TResponse } from './internal/types';
import { TAudioSampleRates, TSDCardInfo, TPtzOverview, TCameraPTZItem, TCameraPTZItemData, TAudioDevice } from './types/VapixAPI';
import { ProxyClient } from './internal/ProxyClient';
import { TCameraImageConfig, TProxyParam } from './types/common';
export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
client: ProxyClient<Client>;
constructor(client: Client, getProxyUrl: () => string);
getUrlEncoded(proxy: TProxyParam, path: string, parameters?: TParameters, headers?: Record<string, string>): Promise<TResponse>;
postJson(proxy: TProxyParam, path: string, jsonData: Record<string, any>, headers?: Record<string, string>): Promise<TResponse>;
getCameraImage(params: TCameraImageConfig, proxy?: TProxyParam): Promise<TResponse>;
getEventDeclarations(proxy?: TProxyParam): Promise<string>;
getSupportedAudioSampleRate(proxy?: TProxyParam): Promise<TAudioSampleRates[]>;
performAutofocus(proxy?: TProxyParam): Promise<void>;
checkSDCard(proxy?: TProxyParam): Promise<TSDCardInfo>;
mountSDCard(proxy?: TProxyParam): Promise<number>;
unmountSDCard(proxy?: TProxyParam): Promise<number>;
private _doSDCardMountAction;
fetchSDCardJobProgress(jobId: number, proxy?: TProxyParam): Promise<number>;
downloadCameraReport(proxy?: TProxyParam): Promise<TResponse>;
getSystemLog(proxy?: TProxyParam): Promise<TResponse>;
getMaxFps(channel: number, proxy?: TProxyParam): Promise<number>;
getTimezone(proxy?: TProxyParam): Promise<string>;
getDateTimeInfo(proxy?: TProxyParam): Promise<{
data: {
dateTime: string;
dstEnabled: boolean;
localDateTime: string;
posixTimeZone: string;
timeZone: string;
};
}>;
getDevicesSettings(proxy?: TProxyParam): Promise<TAudioDevice[]>;
fetchRemoteDeviceInfo<T extends Record<string, any>>(payload: T, proxy?: TProxyParam): Promise<any>;
getHeaders(proxy?: TProxyParam): Promise<Record<string, string>>;
setHeaders(headers: Record<string, string>, proxy?: TProxyParam): Promise<TResponse>;
getParameter(paramNames: string | string[], proxy?: TProxyParam): Promise<Record<string, string>>;
setParameter(params: Record<string, string | number | boolean>, proxy?: TProxyParam): Promise<boolean>;
getGuardTourList(proxy?: TProxyParam): Promise<{
name: string;
id: string;
running: string;
tour: {
moveSpeed?: unknown;
position?: unknown;
presetNbr?: unknown;
waitTime?: unknown;
waitTimeViewType?: unknown;
}[];
camNbr?: unknown;
randomEnabled?: unknown;
timeBetweenSequences?: unknown;
}[]>;
setGuardTourEnabled(guardTourID: string, enable: boolean, proxy?: TProxyParam): Promise<boolean>;
getPTZPresetList(channel: number, proxy?: TProxyParam): Promise<string[]>;
listPTZ(camera: number, proxy?: TProxyParam): Promise<TCameraPTZItem[]>;
listPtzVideoSourceOverview(proxy?: TProxyParam): Promise<TPtzOverview>;
goToPreset(channel: number, presetName: string, proxy?: TProxyParam): Promise<TResponse>;
getPtzPosition(camera: number, proxy?: TProxyParam): Promise<TCameraPTZItemData>;
getInputState(port: number, proxy?: TProxyParam): Promise<boolean>;
setOutputState(port: number, active: boolean, proxy?: TProxyParam): Promise<TResponse>;
getApplicationList(proxy?: TProxyParam): Promise<{
appId: "CamStreamer" | "CamSwitcher" | "CamOverlay" | "CamScripter" | "PlaneTracker" | "Ndihxplugin" | "SportTracker" | null;
Name: string;
NiceName: string;
Vendor: string;
Version: string;
License: string;
Status: string;
ApplicationID?: string | undefined;
ConfigurationPage?: string | undefined;
VendorHomePage?: string | undefined;
LicenseName?: string | undefined;
}[]>;
startApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
restartApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
stopApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
installApplication(data: Blob, fileName: string): Promise<void>;
}