camstreamerlib 4.0.0-beta.33 → 4.0.0-beta.34
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/cjs/CamOverlayAPI.js +2 -2
- package/cjs/CamStreamerAPI.js +54 -11
- package/cjs/CamSwitcherAPI.js +7 -7
- package/cjs/CamSwitcherEvents.js +4 -60
- package/cjs/PlaneTrackerAPI.js +52 -52
- package/cjs/VapixAPI.js +10 -7
- package/cjs/index.js +2 -11
- package/cjs/internal/ProxyClient.js +6 -6
- package/cjs/internal/WsEvents.js +72 -0
- package/cjs/node/DefaultClient.js +4 -4
- package/cjs/node/HttpRequestSender.js +1 -1
- package/cjs/node/WsClient.js +1 -1
- package/cjs/{events → node/events}/AxisCameraStationEvents.js +4 -4
- package/cjs/{events → node/events}/GenetecAgent.js +1 -1
- package/cjs/node/index.js +2 -2
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +14 -1
- package/cjs/types/CamOverlayAPI/scoreBoardSchema.js +127 -0
- package/cjs/types/CamStreamerAPI.js +30 -3
- package/esm/CamOverlayAPI.js +2 -2
- package/esm/CamStreamerAPI.js +53 -11
- package/esm/CamSwitcherAPI.js +7 -7
- package/esm/CamSwitcherEvents.js +5 -61
- package/esm/PlaneTrackerAPI.js +52 -52
- package/esm/VapixAPI.js +10 -7
- package/esm/index.js +1 -6
- package/esm/internal/ProxyClient.js +6 -6
- package/esm/internal/WsEvents.js +68 -0
- package/esm/node/DefaultClient.js +4 -4
- package/esm/node/HttpRequestSender.js +1 -1
- package/esm/node/WsClient.js +1 -1
- package/esm/{events → node/events}/AxisCameraStationEvents.js +3 -3
- package/esm/{events → node/events}/GenetecAgent.js +1 -1
- package/esm/node/index.js +2 -2
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +9 -0
- package/esm/types/CamOverlayAPI/scoreBoardSchema.js +124 -0
- package/esm/types/CamStreamerAPI.js +29 -2
- package/package.json +22 -2
- package/{cjs → types}/CamOverlayAPI.d.ts +3 -5
- package/{esm → types}/CamScripterAPI.d.ts +4 -4
- package/types/CamStreamerAPI.d.ts +48 -0
- package/{esm → types}/CamSwitcherAPI.d.ts +8 -8
- package/types/CamSwitcherEvents.d.ts +8 -0
- package/types/PlaneTrackerAPI.d.ts +43 -0
- package/{cjs → types}/VapixAPI.d.ts +11 -7
- package/{cjs → types}/index.d.ts +1 -6
- package/{esm → types}/internal/ProxyClient.d.ts +4 -4
- package/types/internal/WsEvents.d.ts +41 -0
- package/{esm → types}/internal/types.d.ts +12 -9
- package/{cjs → types}/node/DefaultClient.d.ts +6 -4
- package/{esm → types/node}/events/AxisCameraStationEvents.d.ts +4 -4
- package/{esm → types}/node/index.d.ts +2 -2
- package/{cjs → types}/types/CamOverlayAPI/CamOverlayAPI.d.ts +1071 -7
- package/{esm → types}/types/CamOverlayAPI/infotickerSchema.d.ts +2 -2
- package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +357 -0
- package/types/types/CamStreamerAPI.d.ts +274 -0
- package/types/web/DefaultClient.d.ts +6 -0
- package/cjs/CamScripterAPI.d.ts +0 -37
- package/cjs/CamStreamerAPI.d.ts +0 -19
- package/cjs/CamSwitcherAPI.d.ts +0 -54
- package/cjs/CamSwitcherEvents.d.ts +0 -18
- package/cjs/PlaneTrackerAPI.d.ts +0 -43
- package/cjs/events/AxisCameraStationEvents.d.ts +0 -12
- package/cjs/internal/ProxyClient.d.ts +0 -10
- package/cjs/internal/types.d.ts +0 -42
- package/cjs/node/index.d.ts +0 -5
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +0 -96
- package/cjs/types/CamStreamerAPI.d.ts +0 -150
- package/cjs/web/DefaultClient.d.ts +0 -6
- package/esm/CamOverlayAPI.d.ts +0 -41
- package/esm/CamOverlayDrawingAPI.d.ts +0 -41
- package/esm/CamOverlayPainter/Frame.d.ts +0 -67
- package/esm/CamOverlayPainter/Painter.d.ts +0 -43
- package/esm/CamOverlayPainter/ResourceManager.d.ts +0 -15
- package/esm/CamScripterAPICameraEventsGenerator.d.ts +0 -74
- package/esm/CamStreamerAPI.d.ts +0 -19
- package/esm/CamSwitcherEvents.d.ts +0 -18
- package/esm/CreatePackage.d.ts +0 -1
- package/esm/PlaneTrackerAPI.d.ts +0 -43
- package/esm/VapixAPI.d.ts +0 -80
- package/esm/VapixEvents.d.ts +0 -43
- package/esm/errors/errors.d.ts +0 -37
- package/esm/events/GenetecAgent.d.ts +0 -159
- package/esm/index.d.ts +0 -23
- package/esm/internal/Digest.d.ts +0 -4
- package/esm/internal/constants.d.ts +0 -1
- package/esm/internal/transformers.d.ts +0 -5
- package/esm/internal/utils.d.ts +0 -14
- package/esm/internal/versionCompare.d.ts +0 -6
- package/esm/node/DefaultClient.d.ts +0 -14
- package/esm/node/HttpRequestSender.d.ts +0 -29
- package/esm/node/HttpServer.d.ts +0 -21
- package/esm/node/WsClient.d.ts +0 -40
- package/esm/types/CamOverlayAPI/CamOverlayAPI.d.ts +0 -3260
- package/esm/types/CamOverlayAPI/accuweatherSchema.d.ts +0 -84
- package/esm/types/CamOverlayAPI/customGraphicsSchema.d.ts +0 -700
- package/esm/types/CamOverlayAPI/imagesSchema.d.ts +0 -95
- package/esm/types/CamOverlayAPI/index.d.ts +0 -11
- package/esm/types/CamOverlayAPI/pipSchema.d.ts +0 -125
- package/esm/types/CamOverlayAPI/ptzCompassSchema.d.ts +0 -93
- package/esm/types/CamOverlayAPI/ptzSchema.d.ts +0 -118
- package/esm/types/CamOverlayAPI/screenSharingSchema.d.ts +0 -58
- package/esm/types/CamOverlayAPI/webCameraSharingSchema.d.ts +0 -58
- package/esm/types/CamOverlayAPI/widgetCommonTypes.d.ts +0 -141
- package/esm/types/CamOverlayDrawingAPI.d.ts +0 -58
- package/esm/types/CamOverlayPainter.d.ts +0 -74
- package/esm/types/CamScripterAPI.d.ts +0 -132
- package/esm/types/CamStreamerAPI.d.ts +0 -150
- package/esm/types/CamSwitcherAPI.d.ts +0 -812
- package/esm/types/CamSwitcherEvents.d.ts +0 -568
- package/esm/types/PlaneTrackerAPI.d.ts +0 -8
- package/esm/types/VapixAPI.d.ts +0 -1819
- package/esm/types/common.d.ts +0 -46
- package/esm/web/DefaultClient.d.ts +0 -6
- package/esm/web/WsClient.d.ts +0 -13
- package/esm/web/index.d.ts +0 -2
- /package/cjs/{internal → node}/Digest.js +0 -0
- /package/esm/{internal → node}/Digest.js +0 -0
- /package/{cjs → types}/CamOverlayDrawingAPI.d.ts +0 -0
- /package/{cjs → types}/CamOverlayPainter/Frame.d.ts +0 -0
- /package/{cjs → types}/CamOverlayPainter/Painter.d.ts +0 -0
- /package/{cjs → types}/CamOverlayPainter/ResourceManager.d.ts +0 -0
- /package/{cjs → types}/CamScripterAPICameraEventsGenerator.d.ts +0 -0
- /package/{cjs → types}/CreatePackage.d.ts +0 -0
- /package/{cjs → types}/VapixEvents.d.ts +0 -0
- /package/{cjs → types}/errors/errors.d.ts +0 -0
- /package/{cjs → types}/internal/constants.d.ts +0 -0
- /package/{cjs → types}/internal/transformers.d.ts +0 -0
- /package/{cjs → types}/internal/utils.d.ts +0 -0
- /package/{cjs → types}/internal/versionCompare.d.ts +0 -0
- /package/{cjs/internal → types/node}/Digest.d.ts +0 -0
- /package/{cjs → types}/node/HttpRequestSender.d.ts +0 -0
- /package/{cjs → types}/node/HttpServer.d.ts +0 -0
- /package/{cjs → types}/node/WsClient.d.ts +0 -0
- /package/{cjs → types/node}/events/GenetecAgent.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/accuweatherSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/customGraphicsSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/imagesSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/index.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/pipSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/ptzCompassSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/ptzSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/screenSharingSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/webCameraSharingSchema.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayAPI/widgetCommonTypes.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayDrawingAPI.d.ts +0 -0
- /package/{cjs → types}/types/CamOverlayPainter.d.ts +0 -0
- /package/{cjs → types}/types/CamScripterAPI.d.ts +0 -0
- /package/{cjs → types}/types/CamSwitcherAPI.d.ts +0 -0
- /package/{cjs → types}/types/CamSwitcherEvents.d.ts +0 -0
- /package/{cjs → types}/types/PlaneTrackerAPI.d.ts +0 -0
- /package/{cjs → types}/types/VapixAPI.d.ts +0 -0
- /package/{cjs → types}/types/common.d.ts +0 -0
- /package/{cjs → types}/web/WsClient.d.ts +0 -0
- /package/{cjs → types}/web/index.d.ts +0 -0
package/cjs/CamStreamerAPI.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ProxyClient } from './internal/ProxyClient';
|
|
2
|
-
import { IClient, TResponse } from './internal/types';
|
|
3
|
-
import { TStreamAttributes, TStreamList } from './types/CamStreamerAPI';
|
|
4
|
-
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
5
|
-
export declare class CamStreamerAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
|
|
6
|
-
client: Client;
|
|
7
|
-
constructor(client: Client);
|
|
8
|
-
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
9
|
-
getStreamList(options?: THttpRequestOptions): Promise<TStreamList>;
|
|
10
|
-
getStream(streamId: string, options?: THttpRequestOptions): Promise<TStreamAttributes>;
|
|
11
|
-
getStreamParameter(streamId: string, paramName: string, options?: THttpRequestOptions): Promise<string>;
|
|
12
|
-
setStream(streamId: string, params: Partial<TStreamAttributes>, options?: THttpRequestOptions): Promise<void>;
|
|
13
|
-
setStreamParameter(streamId: string, paramName: string, value: string, options?: THttpRequestOptions): Promise<void>;
|
|
14
|
-
isStreaming(streamId: string, options?: THttpRequestOptions): Promise<boolean>;
|
|
15
|
-
deleteStream(streamId: string, options?: THttpRequestOptions): Promise<void>;
|
|
16
|
-
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
17
|
-
getUtcTime(options?: THttpRequestOptions): Promise<number>;
|
|
18
|
-
private get;
|
|
19
|
-
}
|
package/cjs/CamSwitcherAPI.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { IClient, TResponse } from './internal/types';
|
|
2
|
-
import { TAudioPushInfo, TOutputInfo, TStorageInfo, TStreamSaveList, TClipList, TStreamSaveLoadList, TClipSaveLoadList, TPlaylistSaveLoadList, TTrackerSaveList, TrackerSaveLoadList, TClipSaveList, TPlaylistSaveList, TCameraOptions, TGlobalAudioSettings, TSecondaryAudioSettings } from './types/CamSwitcherAPI';
|
|
3
|
-
import { TAudioChannel, THttpRequestOptions, TNetworkCamera, TProxyParams, TStorageType } from './types/common';
|
|
4
|
-
import { ProxyClient } from './internal/ProxyClient';
|
|
5
|
-
export declare class CamSwitcherAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
|
|
6
|
-
client: Client;
|
|
7
|
-
private CustomFormData;
|
|
8
|
-
private vapixAgent;
|
|
9
|
-
constructor(client: Client, CustomFormData?: {
|
|
10
|
-
new (form?: HTMLFormElement | undefined, submitter?: HTMLElement | null | undefined): FormData;
|
|
11
|
-
prototype: FormData;
|
|
12
|
-
});
|
|
13
|
-
static getProxyUrlPath: () => string;
|
|
14
|
-
static getWsEventsUrlPath: () => string;
|
|
15
|
-
static getClipPreviewUrlPath: (id: string, storage: TStorageType) => string;
|
|
16
|
-
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
17
|
-
generateSilence(sampleRate: number, channels: TAudioChannel, options?: THttpRequestOptions): Promise<void>;
|
|
18
|
-
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
19
|
-
getNetworkCameraList(options?: THttpRequestOptions): Promise<TNetworkCamera[]>;
|
|
20
|
-
getMaxFps(source: number, options?: THttpRequestOptions): Promise<number>;
|
|
21
|
-
getStorageInfo(options?: THttpRequestOptions): Promise<TStorageInfo[]>;
|
|
22
|
-
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
23
|
-
getOutputInfo(options?: THttpRequestOptions): Promise<TOutputInfo>;
|
|
24
|
-
getAudioPushInfo(options?: THttpRequestOptions): Promise<TAudioPushInfo>;
|
|
25
|
-
getStreamSaveList(options?: THttpRequestOptions): Promise<TStreamSaveLoadList>;
|
|
26
|
-
getClipSaveList(options?: THttpRequestOptions): Promise<TClipSaveLoadList>;
|
|
27
|
-
getPlaylistSaveList(options?: THttpRequestOptions): Promise<TPlaylistSaveLoadList>;
|
|
28
|
-
getTrackerSaveList(options?: THttpRequestOptions): Promise<TrackerSaveLoadList>;
|
|
29
|
-
setStreamSaveList(data: TStreamSaveList, options?: THttpRequestOptions): Promise<boolean>;
|
|
30
|
-
setClipSaveList(data: TClipSaveList, options?: THttpRequestOptions): Promise<boolean>;
|
|
31
|
-
setPlaylistSaveList(data: TPlaylistSaveList, options?: THttpRequestOptions): Promise<boolean>;
|
|
32
|
-
setTrackerSaveList(data: TTrackerSaveList, options?: THttpRequestOptions): Promise<boolean>;
|
|
33
|
-
playlistSwitch(playlistName: string, options?: THttpRequestOptions): Promise<void>;
|
|
34
|
-
playlistQueuePush(playlistName: string, options?: THttpRequestOptions): Promise<void>;
|
|
35
|
-
playlistQueueClear(options?: THttpRequestOptions): Promise<void>;
|
|
36
|
-
playlistQueueList(options?: THttpRequestOptions): Promise<string[]>;
|
|
37
|
-
playlistQueuePlayNext(options?: THttpRequestOptions): Promise<void>;
|
|
38
|
-
addNewClip(file: any, clipType: 'video' | 'audio', storage: TStorageType, id: string, fileName?: string, options?: THttpRequestOptions): Promise<void>;
|
|
39
|
-
removeClip(id: string, storage: TStorageType, options?: THttpRequestOptions): Promise<any>;
|
|
40
|
-
getClipList(options?: THttpRequestOptions): Promise<TClipList>;
|
|
41
|
-
setCamSwitchOptions(data: TCameraOptions, cameraFWVersion: string, options?: THttpRequestOptions): Promise<boolean>;
|
|
42
|
-
setGlobalAudioSettings(settings: TGlobalAudioSettings, options?: THttpRequestOptions): Promise<boolean>;
|
|
43
|
-
setSecondaryAudioSettings(settings: TSecondaryAudioSettings, options?: THttpRequestOptions): Promise<boolean>;
|
|
44
|
-
setDefaultPlaylist(id: string, options?: THttpRequestOptions): Promise<boolean>;
|
|
45
|
-
setPermanentRtspUrlToken(token: string, options?: THttpRequestOptions): Promise<boolean>;
|
|
46
|
-
getCamSwitchOptions(options?: THttpRequestOptions): Promise<Partial<TCameraOptions>>;
|
|
47
|
-
getGlobalAudioSettings(options?: THttpRequestOptions): Promise<TGlobalAudioSettings>;
|
|
48
|
-
getSecondaryAudioSettings(options?: THttpRequestOptions): Promise<TSecondaryAudioSettings>;
|
|
49
|
-
getPermanentRtspUrlToken(options?: THttpRequestOptions): Promise<string>;
|
|
50
|
-
private get;
|
|
51
|
-
private set;
|
|
52
|
-
private setParamFromCameraJSON;
|
|
53
|
-
private getParamFromCameraAndJSONParse;
|
|
54
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IWebsocket } from './internal/types';
|
|
2
|
-
import { TCamSwitcherEventOfType, TCamSwitcherEventType } from './types/CamSwitcherEvents';
|
|
3
|
-
type TListenerFunction<T extends TCamSwitcherEventType> = (data: TCamSwitcherEventOfType<T>, isInit: boolean) => void;
|
|
4
|
-
export declare class CamSwitcherEvents<Event extends {
|
|
5
|
-
data: string;
|
|
6
|
-
}> {
|
|
7
|
-
isDestroyed: boolean;
|
|
8
|
-
private ws;
|
|
9
|
-
private listeners;
|
|
10
|
-
setWebsocket(ws: IWebsocket<Event>): void;
|
|
11
|
-
resendInitData(): void;
|
|
12
|
-
addListener<T extends TCamSwitcherEventType>(type: T, listener: TListenerFunction<T>, id: string): void;
|
|
13
|
-
removeListener<T extends TCamSwitcherEventType>(type: T, id: string): void;
|
|
14
|
-
private onMessage;
|
|
15
|
-
private processMessage;
|
|
16
|
-
destroy(): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
package/cjs/PlaneTrackerAPI.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { IClient, TBlobResponse, TParameters, TResponse } from './internal/types';
|
|
2
|
-
import { ICAO, TApiUser, TExportDataType, TImportDataType } from './types/PlaneTrackerAPI';
|
|
3
|
-
import { THttpRequestOptions, TProxyParams } from './types/common';
|
|
4
|
-
import { ProxyClient } from './internal/ProxyClient';
|
|
5
|
-
export declare class PlaneTrackerAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
|
|
6
|
-
private client;
|
|
7
|
-
private apiUser;
|
|
8
|
-
constructor(client: Client, apiUser: TApiUser);
|
|
9
|
-
static getProxyUrlPath: () => string;
|
|
10
|
-
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
11
|
-
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
12
|
-
resetPtzCalibration: (options?: THttpRequestOptions) => Promise<TResponse>;
|
|
13
|
-
resetFocusCalibration: (options?: THttpRequestOptions) => Promise<TResponse>;
|
|
14
|
-
serverRunCheck: (options?: THttpRequestOptions) => Promise<TResponse>;
|
|
15
|
-
getLiveViewAlias: (rtspUrl: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
16
|
-
fetchCameraSettings: (options?: THttpRequestOptions) => Promise<any>;
|
|
17
|
-
setCameraSettings: (settingsJsonString: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
18
|
-
fetchServerSettings: (options?: THttpRequestOptions) => Promise<any>;
|
|
19
|
-
exportAppSettings: (dataType: TExportDataType, options?: THttpRequestOptions) => Promise<TBlobResponse<Client>>;
|
|
20
|
-
importAppSettings: (dataType: TImportDataType, formData: FormData, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
21
|
-
fetchFlightInfo: (icao: ICAO, options?: THttpRequestOptions) => Promise<any>;
|
|
22
|
-
getTrackingMode: (options?: THttpRequestOptions) => Promise<any>;
|
|
23
|
-
setTrackingMode: (modeJsonString: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
24
|
-
startTrackingPlane: (icao: ICAO, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
25
|
-
stopTrackingPlane: (options?: THttpRequestOptions) => Promise<TResponse>;
|
|
26
|
-
getPriorityList: (options?: THttpRequestOptions) => Promise<any>;
|
|
27
|
-
setPriorityList: (priorityListJsonString: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
28
|
-
getWhiteList: (options?: THttpRequestOptions) => Promise<any>;
|
|
29
|
-
setWhiteList: (whiteListJsonString: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
30
|
-
getBlackList: (options?: THttpRequestOptions) => Promise<any>;
|
|
31
|
-
setBlackList: (blackListJsonString: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
32
|
-
fetchMapInfo: (options?: THttpRequestOptions) => Promise<any>;
|
|
33
|
-
getZones: (options?: THttpRequestOptions) => Promise<any>;
|
|
34
|
-
setZones: (zonesJsonString: string, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
35
|
-
goToCoordinates: (lat: number, lon: number, alt?: number, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
36
|
-
checkGenetecConnection: (params: TParameters, options?: THttpRequestOptions) => Promise<TResponse>;
|
|
37
|
-
getGenetecCameraList: (params: TParameters, options?: THttpRequestOptions) => Promise<any>;
|
|
38
|
-
private _getJson;
|
|
39
|
-
private _getBlob;
|
|
40
|
-
private parseBlobResponse;
|
|
41
|
-
private _postJsonEncoded;
|
|
42
|
-
private _postUrlEncoded;
|
|
43
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HttpOptions } from '../internal/types';
|
|
2
|
-
import { THttpRequestOptions, TProxyParams } from '../types/common';
|
|
3
|
-
import { ProxyClient } from '../internal/ProxyClient';
|
|
4
|
-
import { DefaultClient } from '../node';
|
|
5
|
-
export declare class AxisCameraStationEvents {
|
|
6
|
-
private sourceKey;
|
|
7
|
-
private client;
|
|
8
|
-
constructor(clientOptions: HttpOptions, sourceKey: string);
|
|
9
|
-
getClient(proxyParams?: TProxyParams): DefaultClient | ProxyClient<DefaultClient>;
|
|
10
|
-
sendEvent(data: Record<string, string>, eventType: string, options?: THttpRequestOptions): Promise<void>;
|
|
11
|
-
private getDate;
|
|
12
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { IClient, TGetParams, TPostParams, TResponse } from './types';
|
|
2
|
-
import { TProxyParams } from '../types/common';
|
|
3
|
-
export declare class ProxyClient<Client extends IClient<TResponse> = IClient<TResponse>> {
|
|
4
|
-
private client;
|
|
5
|
-
private proxyParams;
|
|
6
|
-
constructor(client: Client, proxyParams: TProxyParams);
|
|
7
|
-
get: (params: TGetParams) => Promise<TResponse>;
|
|
8
|
-
post: (params: TPostParams) => Promise<TResponse>;
|
|
9
|
-
private getReal;
|
|
10
|
-
}
|
package/cjs/internal/types.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { Response as UndiciResponse } from 'undici';
|
|
4
|
-
export type Options = {
|
|
5
|
-
ip?: string;
|
|
6
|
-
port?: number;
|
|
7
|
-
user?: string;
|
|
8
|
-
pass?: string;
|
|
9
|
-
tls?: boolean;
|
|
10
|
-
tlsInsecure?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type HttpOptions = Options & {
|
|
13
|
-
keepAlive?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export type WsOptions = Options;
|
|
16
|
-
export type TParameters = Record<string, string | number | boolean | null | undefined>;
|
|
17
|
-
export type TResponse = Response | UndiciResponse;
|
|
18
|
-
export type TGetParams = {
|
|
19
|
-
path: string;
|
|
20
|
-
parameters?: TParameters;
|
|
21
|
-
headers?: Record<string, string>;
|
|
22
|
-
timeout?: number;
|
|
23
|
-
};
|
|
24
|
-
export type TPostParams = {
|
|
25
|
-
path: string;
|
|
26
|
-
data: string | Buffer | FormData;
|
|
27
|
-
parameters?: TParameters;
|
|
28
|
-
headers?: Record<string, string>;
|
|
29
|
-
timeout?: number;
|
|
30
|
-
};
|
|
31
|
-
export interface IClient<TRes extends TResponse> {
|
|
32
|
-
get: (params: TGetParams) => Promise<TRes>;
|
|
33
|
-
post: (params: TPostParams) => Promise<TRes>;
|
|
34
|
-
}
|
|
35
|
-
export type TBlobResponse<Client extends IClient<TResponse>> = Awaited<ReturnType<Awaited<ReturnType<Client['get']>>['blob']>>;
|
|
36
|
-
export interface IWebsocket<Event extends {
|
|
37
|
-
readonly data: string;
|
|
38
|
-
}> {
|
|
39
|
-
destroy: () => void;
|
|
40
|
-
onmessage: null | ((event: Event) => void);
|
|
41
|
-
send: (data: string) => void;
|
|
42
|
-
}
|
package/cjs/node/index.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const infoTickerSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodNumber;
|
|
4
|
-
enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
5
|
-
automationType: z.ZodUnion<[z.ZodLiteral<"time">, z.ZodLiteral<"manual">, z.ZodLiteral<"schedule">, z.ZodType<`input${number}`, z.ZodTypeDef, `input${number}`>]>;
|
|
6
|
-
invertInput: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
-
cameraList: z.ZodArray<z.ZodNumber, "many">;
|
|
8
|
-
camera: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
schedule: z.ZodOptional<z.ZodString>;
|
|
10
|
-
customName: z.ZodString;
|
|
11
|
-
zIndex: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
width: z.ZodNumber;
|
|
13
|
-
height: z.ZodNumber;
|
|
14
|
-
} & {
|
|
15
|
-
name: z.ZodLiteral<"infoticker">;
|
|
16
|
-
showClock: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
17
|
-
clockType: z.ZodUnion<[z.ZodLiteral<"12h">, z.ZodLiteral<"24h">]>;
|
|
18
|
-
textColor: z.ZodString;
|
|
19
|
-
bgColor: z.ZodString;
|
|
20
|
-
weatherLocation: z.ZodString;
|
|
21
|
-
weatherLocationName: z.ZodString;
|
|
22
|
-
weatherLang: z.ZodUnion<[z.ZodLiteral<"en-us">, z.ZodLiteral<"fr-fr">, z.ZodLiteral<"ja-jp">, z.ZodLiteral<"pt-pt">, z.ZodLiteral<"es-es">, z.ZodLiteral<"de-de">, z.ZodLiteral<"ko-kr">, z.ZodLiteral<"zh-hk">, z.ZodLiteral<"zh-cn">, z.ZodLiteral<"nl-nl">, z.ZodLiteral<"cs-cz">, z.ZodLiteral<"ru-ru">, z.ZodLiteral<"sv-se">]>;
|
|
23
|
-
weatherUnits: z.ZodUnion<[z.ZodLiteral<"Metric">, z.ZodLiteral<"Imperial">]>;
|
|
24
|
-
numberOfLines: z.ZodNumber;
|
|
25
|
-
switchingTime: z.ZodNumber;
|
|
26
|
-
crawlLeft: z.ZodBoolean;
|
|
27
|
-
crawlSpeed: z.ZodNumber;
|
|
28
|
-
coordSystem: z.ZodUnion<[z.ZodLiteral<"top">, z.ZodLiteral<"bottom">]>;
|
|
29
|
-
pos_y: z.ZodNumber;
|
|
30
|
-
font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
|
|
31
|
-
fontSize: z.ZodNumber;
|
|
32
|
-
sourceType: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"url">]>;
|
|
33
|
-
source: z.ZodString;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
name: "infoticker";
|
|
36
|
-
enabled: 0 | 1;
|
|
37
|
-
id: number;
|
|
38
|
-
width: number;
|
|
39
|
-
height: number;
|
|
40
|
-
source: string;
|
|
41
|
-
automationType: "time" | "manual" | "schedule" | `input${number}`;
|
|
42
|
-
cameraList: number[];
|
|
43
|
-
customName: string;
|
|
44
|
-
pos_y: number;
|
|
45
|
-
coordSystem: "top" | "bottom";
|
|
46
|
-
showClock: 0 | 1;
|
|
47
|
-
clockType: "12h" | "24h";
|
|
48
|
-
textColor: string;
|
|
49
|
-
bgColor: string;
|
|
50
|
-
weatherLocation: string;
|
|
51
|
-
weatherLocationName: string;
|
|
52
|
-
weatherLang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
|
|
53
|
-
weatherUnits: "Metric" | "Imperial";
|
|
54
|
-
numberOfLines: number;
|
|
55
|
-
switchingTime: number;
|
|
56
|
-
crawlLeft: boolean;
|
|
57
|
-
crawlSpeed: number;
|
|
58
|
-
font: string;
|
|
59
|
-
fontSize: number;
|
|
60
|
-
sourceType: "url" | "text";
|
|
61
|
-
camera?: number | undefined;
|
|
62
|
-
schedule?: string | undefined;
|
|
63
|
-
invertInput?: boolean | undefined;
|
|
64
|
-
zIndex?: number | undefined;
|
|
65
|
-
}, {
|
|
66
|
-
name: "infoticker";
|
|
67
|
-
enabled: 0 | 1;
|
|
68
|
-
id: number;
|
|
69
|
-
width: number;
|
|
70
|
-
height: number;
|
|
71
|
-
source: string;
|
|
72
|
-
automationType: "time" | "manual" | "schedule" | `input${number}`;
|
|
73
|
-
cameraList: number[];
|
|
74
|
-
customName: string;
|
|
75
|
-
pos_y: number;
|
|
76
|
-
coordSystem: "top" | "bottom";
|
|
77
|
-
showClock: 0 | 1;
|
|
78
|
-
clockType: "12h" | "24h";
|
|
79
|
-
textColor: string;
|
|
80
|
-
bgColor: string;
|
|
81
|
-
weatherLocation: string;
|
|
82
|
-
weatherLocationName: string;
|
|
83
|
-
weatherLang: "en-us" | "fr-fr" | "ja-jp" | "pt-pt" | "es-es" | "de-de" | "ko-kr" | "zh-hk" | "zh-cn" | "nl-nl" | "cs-cz" | "ru-ru" | "sv-se";
|
|
84
|
-
weatherUnits: "Metric" | "Imperial";
|
|
85
|
-
numberOfLines: number;
|
|
86
|
-
switchingTime: number;
|
|
87
|
-
crawlLeft: boolean;
|
|
88
|
-
crawlSpeed: number;
|
|
89
|
-
font: string;
|
|
90
|
-
fontSize: number;
|
|
91
|
-
sourceType: "url" | "text";
|
|
92
|
-
camera?: number | undefined;
|
|
93
|
-
schedule?: string | undefined;
|
|
94
|
-
invertInput?: boolean | undefined;
|
|
95
|
-
zIndex?: number | undefined;
|
|
96
|
-
}>;
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { HttpOptions } from '../internal/types';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export type CamStreamerAPIOptions = HttpOptions;
|
|
4
|
-
export declare const streamAttributesSchema: z.ZodObject<{
|
|
5
|
-
enabled: z.ZodString;
|
|
6
|
-
active: z.ZodString;
|
|
7
|
-
audioSource: z.ZodString;
|
|
8
|
-
avSyncMsec: z.ZodString;
|
|
9
|
-
internalVapixParameters: z.ZodString;
|
|
10
|
-
userVapixParameters: z.ZodString;
|
|
11
|
-
outputParameters: z.ZodString;
|
|
12
|
-
outputType: z.ZodString;
|
|
13
|
-
mediaServerUrl: z.ZodString;
|
|
14
|
-
inputType: z.ZodString;
|
|
15
|
-
inputUrl: z.ZodString;
|
|
16
|
-
forceStereo: z.ZodString;
|
|
17
|
-
streamDelay: z.ZodString;
|
|
18
|
-
statusLed: z.ZodString;
|
|
19
|
-
statusPort: z.ZodString;
|
|
20
|
-
callApi: z.ZodString;
|
|
21
|
-
trigger: z.ZodString;
|
|
22
|
-
schedule: z.ZodString;
|
|
23
|
-
prepareAhead: z.ZodString;
|
|
24
|
-
startTime: z.ZodString;
|
|
25
|
-
stopTime: z.ZodString;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
enabled: string;
|
|
28
|
-
schedule: string;
|
|
29
|
-
active: string;
|
|
30
|
-
audioSource: string;
|
|
31
|
-
avSyncMsec: string;
|
|
32
|
-
internalVapixParameters: string;
|
|
33
|
-
userVapixParameters: string;
|
|
34
|
-
outputParameters: string;
|
|
35
|
-
outputType: string;
|
|
36
|
-
mediaServerUrl: string;
|
|
37
|
-
inputType: string;
|
|
38
|
-
inputUrl: string;
|
|
39
|
-
forceStereo: string;
|
|
40
|
-
streamDelay: string;
|
|
41
|
-
statusLed: string;
|
|
42
|
-
statusPort: string;
|
|
43
|
-
callApi: string;
|
|
44
|
-
trigger: string;
|
|
45
|
-
prepareAhead: string;
|
|
46
|
-
startTime: string;
|
|
47
|
-
stopTime: string;
|
|
48
|
-
}, {
|
|
49
|
-
enabled: string;
|
|
50
|
-
schedule: string;
|
|
51
|
-
active: string;
|
|
52
|
-
audioSource: string;
|
|
53
|
-
avSyncMsec: string;
|
|
54
|
-
internalVapixParameters: string;
|
|
55
|
-
userVapixParameters: string;
|
|
56
|
-
outputParameters: string;
|
|
57
|
-
outputType: string;
|
|
58
|
-
mediaServerUrl: string;
|
|
59
|
-
inputType: string;
|
|
60
|
-
inputUrl: string;
|
|
61
|
-
forceStereo: string;
|
|
62
|
-
streamDelay: string;
|
|
63
|
-
statusLed: string;
|
|
64
|
-
statusPort: string;
|
|
65
|
-
callApi: string;
|
|
66
|
-
trigger: string;
|
|
67
|
-
prepareAhead: string;
|
|
68
|
-
startTime: string;
|
|
69
|
-
stopTime: string;
|
|
70
|
-
}>;
|
|
71
|
-
export type TStreamAttributes = z.infer<typeof streamAttributesSchema>;
|
|
72
|
-
export declare const streamListSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
73
|
-
enabled: z.ZodString;
|
|
74
|
-
active: z.ZodString;
|
|
75
|
-
audioSource: z.ZodString;
|
|
76
|
-
avSyncMsec: z.ZodString;
|
|
77
|
-
internalVapixParameters: z.ZodString;
|
|
78
|
-
userVapixParameters: z.ZodString;
|
|
79
|
-
outputParameters: z.ZodString;
|
|
80
|
-
outputType: z.ZodString;
|
|
81
|
-
mediaServerUrl: z.ZodString;
|
|
82
|
-
inputType: z.ZodString;
|
|
83
|
-
inputUrl: z.ZodString;
|
|
84
|
-
forceStereo: z.ZodString;
|
|
85
|
-
streamDelay: z.ZodString;
|
|
86
|
-
statusLed: z.ZodString;
|
|
87
|
-
statusPort: z.ZodString;
|
|
88
|
-
callApi: z.ZodString;
|
|
89
|
-
trigger: z.ZodString;
|
|
90
|
-
schedule: z.ZodString;
|
|
91
|
-
prepareAhead: z.ZodString;
|
|
92
|
-
startTime: z.ZodString;
|
|
93
|
-
stopTime: z.ZodString;
|
|
94
|
-
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
enabled: string;
|
|
96
|
-
schedule: string;
|
|
97
|
-
active: string;
|
|
98
|
-
audioSource: string;
|
|
99
|
-
avSyncMsec: string;
|
|
100
|
-
internalVapixParameters: string;
|
|
101
|
-
userVapixParameters: string;
|
|
102
|
-
outputParameters: string;
|
|
103
|
-
outputType: string;
|
|
104
|
-
mediaServerUrl: string;
|
|
105
|
-
inputType: string;
|
|
106
|
-
inputUrl: string;
|
|
107
|
-
forceStereo: string;
|
|
108
|
-
streamDelay: string;
|
|
109
|
-
statusLed: string;
|
|
110
|
-
statusPort: string;
|
|
111
|
-
callApi: string;
|
|
112
|
-
trigger: string;
|
|
113
|
-
prepareAhead: string;
|
|
114
|
-
startTime: string;
|
|
115
|
-
stopTime: string;
|
|
116
|
-
}, {
|
|
117
|
-
enabled: string;
|
|
118
|
-
schedule: string;
|
|
119
|
-
active: string;
|
|
120
|
-
audioSource: string;
|
|
121
|
-
avSyncMsec: string;
|
|
122
|
-
internalVapixParameters: string;
|
|
123
|
-
userVapixParameters: string;
|
|
124
|
-
outputParameters: string;
|
|
125
|
-
outputType: string;
|
|
126
|
-
mediaServerUrl: string;
|
|
127
|
-
inputType: string;
|
|
128
|
-
inputUrl: string;
|
|
129
|
-
forceStereo: string;
|
|
130
|
-
streamDelay: string;
|
|
131
|
-
statusLed: string;
|
|
132
|
-
statusPort: string;
|
|
133
|
-
callApi: string;
|
|
134
|
-
trigger: string;
|
|
135
|
-
prepareAhead: string;
|
|
136
|
-
startTime: string;
|
|
137
|
-
stopTime: string;
|
|
138
|
-
}>>;
|
|
139
|
-
export type TStreamList = z.infer<typeof streamListSchema>;
|
|
140
|
-
export declare const camstreamerServerResponseSchema: z.ZodObject<{
|
|
141
|
-
code: z.ZodNumber;
|
|
142
|
-
message: z.ZodString;
|
|
143
|
-
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
code: number;
|
|
145
|
-
message: string;
|
|
146
|
-
}, {
|
|
147
|
-
code: number;
|
|
148
|
-
message: string;
|
|
149
|
-
}>;
|
|
150
|
-
export type TCamstreamerServerResponse = z.infer<typeof camstreamerServerResponseSchema>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IClient, TGetParams, TPostParams } from '../internal/types';
|
|
2
|
-
export declare class DefaultClient implements IClient<Response> {
|
|
3
|
-
get: (params: TGetParams) => Promise<Response>;
|
|
4
|
-
post: (params: TPostParams) => Promise<Response>;
|
|
5
|
-
private fetchWithTimeout;
|
|
6
|
-
}
|
package/esm/CamOverlayAPI.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { IClient, TBlobResponse, TResponse } from './internal/types';
|
|
4
|
-
import { THttpRequestOptions, TProxyParams, TNetworkCamera } from './types/common';
|
|
5
|
-
import { ProxyClient } from './internal/ProxyClient';
|
|
6
|
-
import { ImageType, TCoordinates, TField, TFile, TFileList, TFileType, TStorage, TStorageDataList, TWidget } from './types/CamOverlayAPI';
|
|
7
|
-
export declare class CamOverlayAPI<Client extends IClient<TResponse> = IClient<TResponse>> {
|
|
8
|
-
private client;
|
|
9
|
-
constructor(client: Client);
|
|
10
|
-
static getBasePath: () => string;
|
|
11
|
-
static getProxyPath: () => string;
|
|
12
|
-
static getFilePreviewPath: (path: string) => string;
|
|
13
|
-
getClient(proxyParams?: TProxyParams): Client | ProxyClient<Client>;
|
|
14
|
-
checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
|
|
15
|
-
getNetworkCameraList(options?: THttpRequestOptions): Promise<TNetworkCamera[]>;
|
|
16
|
-
wsAuthorization(options?: THttpRequestOptions): Promise<string>;
|
|
17
|
-
getMjpegStreamImage(mjpegUrl: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
18
|
-
listFiles(fileType: TFileType, options?: THttpRequestOptions): Promise<TFileList>;
|
|
19
|
-
uploadFile(fileType: TFileType, formData: FormData, storage: TStorage, options?: THttpRequestOptions): Promise<void>;
|
|
20
|
-
removeFile(fileType: TFileType, fileParams: TFile, options?: THttpRequestOptions): Promise<void>;
|
|
21
|
-
getFileStorage(fileType: TFileType, options?: THttpRequestOptions): Promise<TStorageDataList>;
|
|
22
|
-
getFilePreviewFromCamera(path: string, options?: THttpRequestOptions): Promise<TBlobResponse<Client>>;
|
|
23
|
-
updateInfoticker(serviceId: number, text: string, options?: THttpRequestOptions): Promise<void>;
|
|
24
|
-
setEnabled(serviceId: number, enabled: boolean, options?: THttpRequestOptions): Promise<void>;
|
|
25
|
-
isEnabled(serviceId: number, options?: THttpRequestOptions): Promise<boolean>;
|
|
26
|
-
getSingleWidget(serviceId: number, options?: THttpRequestOptions): Promise<TWidget>;
|
|
27
|
-
getWidgets(options?: THttpRequestOptions): Promise<TWidget[]>;
|
|
28
|
-
updateSingleWidget(widget: TWidget, options?: THttpRequestOptions): Promise<void>;
|
|
29
|
-
updateWidgets(widgets: TWidget[], options?: THttpRequestOptions): Promise<void>;
|
|
30
|
-
updateCGText(serviceId: number, fields: TField[], options?: THttpRequestOptions): Promise<void>;
|
|
31
|
-
updateCGImagePos(serviceId: number, coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
32
|
-
updateCGImage(serviceId: number, path: string, coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
33
|
-
updateCGImageFromData(serviceId: number, imageType: ImageType, imageData: Buffer, coordinates?: TCoordinates, x?: number, y?: number, options?: THttpRequestOptions): Promise<void>;
|
|
34
|
-
private promiseCGUpdate;
|
|
35
|
-
private _get;
|
|
36
|
-
private _post;
|
|
37
|
-
private _getBlob;
|
|
38
|
-
private parseBlobResponse;
|
|
39
|
-
private _postUrlEncoded;
|
|
40
|
-
private _postJsonEncoded;
|
|
41
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
import * as EventEmitter from 'events';
|
|
5
|
-
import { CamOverlayDrawingOptions, TCairoCreateResponse, TCairoResponse, TUploadImageResponse, TWriteTextParams } from './types/CamOverlayDrawingAPI';
|
|
6
|
-
export declare class CamOverlayDrawingAPI extends EventEmitter {
|
|
7
|
-
private tls;
|
|
8
|
-
private tlsInsecure;
|
|
9
|
-
private ip;
|
|
10
|
-
private port;
|
|
11
|
-
private user;
|
|
12
|
-
private pass;
|
|
13
|
-
private cameraList;
|
|
14
|
-
private zIndex;
|
|
15
|
-
private callId;
|
|
16
|
-
private sendMessages;
|
|
17
|
-
private timeoutCheckTimer;
|
|
18
|
-
private wsConnected;
|
|
19
|
-
private ws;
|
|
20
|
-
constructor(options?: CamOverlayDrawingOptions);
|
|
21
|
-
connect(): void;
|
|
22
|
-
disconnect(): void;
|
|
23
|
-
isConnected(): boolean;
|
|
24
|
-
cairo(command: string, ...params: unknown[]): Promise<TCairoResponse | TCairoCreateResponse>;
|
|
25
|
-
writeText(...params: TWriteTextParams): Promise<TCairoResponse>;
|
|
26
|
-
uploadImageData(imgBuffer: Buffer): Promise<TUploadImageResponse>;
|
|
27
|
-
uploadFontData(fontBuffer: Buffer): Promise<TCairoCreateResponse>;
|
|
28
|
-
showCairoImage(cairoImage: string, posX: number, posY: number): Promise<TCairoResponse>;
|
|
29
|
-
showCairoImageAbsolute(cairoImage: string, posX: number, posY: number, width: number, height: number): Promise<TCairoResponse>;
|
|
30
|
-
removeImage(): Promise<TCairoResponse>;
|
|
31
|
-
private createWsClient;
|
|
32
|
-
private incomingWsMessageHandler;
|
|
33
|
-
private sendMessage;
|
|
34
|
-
private sendBinaryMessage;
|
|
35
|
-
private startMsgsTimeoutCheck;
|
|
36
|
-
private stopMsgsTimeoutCheck;
|
|
37
|
-
private reconnectWithError;
|
|
38
|
-
private reportMessage;
|
|
39
|
-
private reportError;
|
|
40
|
-
private reportClose;
|
|
41
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
|
|
4
|
-
import { TAlign, TCairoCreateResponse, TUploadImageResponse } from '../types/CamOverlayDrawingAPI';
|
|
5
|
-
import { ResourceManager } from './ResourceManager';
|
|
6
|
-
import { TBg, TBorder, TDrawingCallback, TFrame, TFrameOptions, TObjectFitType, TRgb, TRgba, TText, TTmf } from '../types/CamOverlayPainter';
|
|
7
|
-
export declare class Frame extends EventEmitter {
|
|
8
|
-
protected enabled: boolean;
|
|
9
|
-
protected posX: number;
|
|
10
|
-
protected posY: number;
|
|
11
|
-
protected width: number;
|
|
12
|
-
protected height: number;
|
|
13
|
-
private text;
|
|
14
|
-
private fontColor;
|
|
15
|
-
private fontName?;
|
|
16
|
-
private font?;
|
|
17
|
-
private align;
|
|
18
|
-
private textType;
|
|
19
|
-
private bgColor?;
|
|
20
|
-
private bgImageName?;
|
|
21
|
-
private bgImage?;
|
|
22
|
-
private bgType?;
|
|
23
|
-
private borderRadius;
|
|
24
|
-
private borderWidth;
|
|
25
|
-
private borderColor;
|
|
26
|
-
private customDraw?;
|
|
27
|
-
private layer;
|
|
28
|
-
protected children: Frame[];
|
|
29
|
-
constructor(opt: TFrameOptions);
|
|
30
|
-
enable(): void;
|
|
31
|
-
disable(): void;
|
|
32
|
-
setFramePosition(x: number, y: number): void;
|
|
33
|
-
setFrameSize(width: number, height: number): void;
|
|
34
|
-
getFrameInfo(): TFrame;
|
|
35
|
-
setText(text: string, align: TAlign, textType?: TTmf, fontColor?: TRgb): void;
|
|
36
|
-
setFontColor(fontColor: TRgb): void;
|
|
37
|
-
setFont(fontName: string): void;
|
|
38
|
-
setFontData(fontData: TCairoCreateResponse): void;
|
|
39
|
-
getTextInfo(): TText;
|
|
40
|
-
setBgColor(color: TRgba): void;
|
|
41
|
-
setBgImage(imageName: string, type?: TObjectFitType): void;
|
|
42
|
-
setBgImageData(imageData: TUploadImageResponse, type?: TObjectFitType): void;
|
|
43
|
-
setBgType(type: TObjectFitType): void;
|
|
44
|
-
getBgInfo(): TBg;
|
|
45
|
-
setBorderRadius(radius: number): void;
|
|
46
|
-
setBorderWidth(width: number): void;
|
|
47
|
-
setBorderColor(color: TRgba): void;
|
|
48
|
-
getBorderInfo(): TBorder;
|
|
49
|
-
setCustomDraw(customDraw: TDrawingCallback): void;
|
|
50
|
-
resetFont(): void;
|
|
51
|
-
resetBgColor(): void;
|
|
52
|
-
resetBgImage(): void;
|
|
53
|
-
resetCustomDraw(): void;
|
|
54
|
-
clear(): void;
|
|
55
|
-
insert(...frames: Frame[]): void;
|
|
56
|
-
getLayers(): Set<number>;
|
|
57
|
-
protected layoutChanged(): void;
|
|
58
|
-
displayImage(cod: CamOverlayDrawingAPI, resourceManager: ResourceManager, cairo: string, ppX: number, ppY: number, scale: number, layer: number): Promise<void>;
|
|
59
|
-
private prepareResources;
|
|
60
|
-
protected displayOwnImage(cod: CamOverlayDrawingAPI, cairo: string, ppX: number, ppY: number, scale: number): Promise<void>;
|
|
61
|
-
private clipDrawing;
|
|
62
|
-
private drawFrame;
|
|
63
|
-
private drawImage;
|
|
64
|
-
private drawText;
|
|
65
|
-
private drawBorder;
|
|
66
|
-
private drawRectPath;
|
|
67
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { CamOverlayDrawingAPI } from '../CamOverlayDrawingAPI';
|
|
2
|
-
import { CamOverlayDrawingOptions } from '../types/CamOverlayDrawingAPI';
|
|
3
|
-
import { ResourceManager } from './ResourceManager';
|
|
4
|
-
import { Frame } from './Frame';
|
|
5
|
-
import { TCoAlignment, TPainterOptions } from '../types/CamOverlayPainter';
|
|
6
|
-
export declare const COORD: {
|
|
7
|
-
readonly top_left: readonly [-1, -1];
|
|
8
|
-
readonly center_left: readonly [-1, 0];
|
|
9
|
-
readonly bottom_left: readonly [-1, 1];
|
|
10
|
-
readonly top_center: readonly [0, -1];
|
|
11
|
-
readonly center: readonly [0, 0];
|
|
12
|
-
readonly bottom_center: readonly [0, 1];
|
|
13
|
-
readonly top_right: readonly [1, -1];
|
|
14
|
-
readonly center_right: readonly [1, 0];
|
|
15
|
-
readonly bottom_right: readonly [1, 1];
|
|
16
|
-
};
|
|
17
|
-
export declare class Painter extends Frame {
|
|
18
|
-
private screenWidth;
|
|
19
|
-
private screenHeight;
|
|
20
|
-
private coAlignment;
|
|
21
|
-
private cod;
|
|
22
|
-
private rm;
|
|
23
|
-
private refreshLayers;
|
|
24
|
-
private layers;
|
|
25
|
-
constructor(opt: TPainterOptions, coopt: CamOverlayDrawingOptions);
|
|
26
|
-
get camOverlayDrawingAPI(): CamOverlayDrawingAPI;
|
|
27
|
-
get resourceManager(): ResourceManager;
|
|
28
|
-
connect(): void;
|
|
29
|
-
disconnect(): void;
|
|
30
|
-
isConnected(): boolean;
|
|
31
|
-
registerImage(moniker: string, fileName: string): void;
|
|
32
|
-
registerFont(moniker: string, fileName: string): void;
|
|
33
|
-
setScreenSize(sw: number, sh: number): void;
|
|
34
|
-
setCoAlignment(coAlignment: TCoAlignment): void;
|
|
35
|
-
protected layoutChanged(): void;
|
|
36
|
-
display(scale?: number): Promise<void>;
|
|
37
|
-
hide(): Promise<void>;
|
|
38
|
-
invalidateLayer(layer: number): Promise<void>;
|
|
39
|
-
private prepareLayers;
|
|
40
|
-
private prepareSurface;
|
|
41
|
-
private cleanupSurface;
|
|
42
|
-
private positionConvertor;
|
|
43
|
-
}
|