@3deye-toolkit/react-camera 0.0.1-alpha.21

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.
@@ -0,0 +1,873 @@
1
+ /// <reference types="react" />
2
+
3
+ import { BehaviorSubject } from 'rxjs';
4
+ import crossfilter from 'crossfilter2';
5
+ import { IReactionDisposer } from 'mobx';
6
+ import { Observable } from 'rxjs';
7
+ import { default as React_2 } from 'react';
8
+ import { Subject } from 'rxjs';
9
+ import { Subscription } from 'rxjs';
10
+
11
+ declare class Api<T> {
12
+ [key: string]: any;
13
+ static create<T extends PartialApi>(apiConfig: T | null, authStore: Auth, createConnection: (accessToken: string) => Connection): Api<T> & ExtractHubs<IApi, T>;
14
+ connectionShutdown$: Subject<null>;
15
+ connection$: BehaviorSubject<Connection | null>;
16
+ events: Subject<{
17
+ hub: keyof typeof events;
18
+ event: string;
19
+ data: any;
20
+ }>;
21
+ logging: boolean;
22
+ authStore: Auth;
23
+ createConnection: (accessToken: string) => Connection;
24
+ apiConfig: PartialApi;
25
+ constructor(apiConfig: T, authStore: Auth, createConnection: (accessToken: string) => Connection);
26
+ connect(token: Token): void;
27
+ shutdownConnection(): void;
28
+ private init;
29
+ private createHubMethod;
30
+ private subscribeToEvents;
31
+ }
32
+
33
+ declare type ApiPageResult<T> = {
34
+ success: true;
35
+ resultItems: T[];
36
+ pageInfo: PageInfo;
37
+ } | {
38
+ success: false;
39
+ error: {
40
+ code: number;
41
+ message: string;
42
+ };
43
+ };
44
+
45
+ declare type ApiResult<T> = {
46
+ success: true;
47
+ resultItems: T[];
48
+ } | {
49
+ success: false;
50
+ error: {
51
+ code: number;
52
+ message: string;
53
+ };
54
+ };
55
+
56
+ declare abstract class ApiStore {
57
+ api: Api<IApi> & IApi;
58
+ disposables: (IReactionDisposer | Subscription)[];
59
+ protected afterInit?(): void;
60
+ initWith(api: Api<IApi> & IApi): void;
61
+ dispose(): void;
62
+ }
63
+
64
+ declare type ArchiveChunk = Chunk & {
65
+ isLive: false;
66
+ };
67
+
68
+ declare class ArchiveChunk_2 implements Chunk_2 {
69
+ json?: string;
70
+ startTime: Date;
71
+ endTime: Date;
72
+ streamUrl: string;
73
+ duration?: number;
74
+ isLive: false;
75
+ cameraId: number;
76
+ id: number;
77
+ constructor(raw: any);
78
+ }
79
+
80
+ declare class ArchivesStore extends ApiStore {
81
+ data: crossfilter.Crossfilter<ArchiveChunk_2>;
82
+ chunksByCameraId: crossfilter.Dimension<ArchiveChunk_2, number>;
83
+ chunksByStart: crossfilter.Dimension<ArchiveChunk_2, number>;
84
+ chunksByEnd: crossfilter.Dimension<ArchiveChunk_2, number>;
85
+ chunksById: Map<number, ArchiveChunk_2>;
86
+ private pendingRequests;
87
+ private pendingRequestsByEnd;
88
+ private pendingRequestsByStart;
89
+ private pendingRequestsByCameraId;
90
+ knownIntervals: Map<number, [Date, Date]>;
91
+ updates: number;
92
+ constructor();
93
+ /**
94
+ * Fetches archive chunks for given camera and period
95
+ * @param cameraId - camera id
96
+ * @param startTime - start of the period
97
+ * @param endTime - end of the period
98
+ * TODO: add support for null endTime in order to remove requestedArchivesSince logic from player controller
99
+ */
100
+ fetch(cameraId: number, startTime: Date, endTime: Date): Observable<ArchiveChunk_2[]>;
101
+ extendKnownInterval(cameraId: number, chunks: ArchiveChunk_2[]): void;
102
+ add(chunks: ArchiveChunk_2[]): void;
103
+ getChunks({ cameraId, from, to }: ChunksQuery): ArchiveChunk_2[];
104
+ findClosestChunk({ cameraId, time }: {
105
+ cameraId: number;
106
+ time: Date;
107
+ }): ArchiveChunk_2;
108
+ protected afterInit(): void;
109
+ }
110
+
111
+ declare class Auth {
112
+ token: Token | null;
113
+ isAuthenticating: boolean;
114
+ storage: Storage_2;
115
+ tokenServiceUrl: string;
116
+ tokenStorageKey: string;
117
+ widgetTokenServiceUrl?: string;
118
+ deviceInfo: string | null;
119
+ clientId: string;
120
+ private pendingUpdateTokenRequest;
121
+ get isAuthenticated(): boolean;
122
+ constructor({ tokenServiceUrl, widgetTokenServiceUrl, storage, tokenStorageKey, deviceInfo, clientId }: AuthStoreOptions);
123
+ signOut: () => void;
124
+ signIn: ({ username, password, tokenToKick, agreedWithTerms }: {
125
+ username: string;
126
+ password: string;
127
+ tokenToKick?: string | undefined;
128
+ agreedWithTerms?: boolean | undefined;
129
+ }) => Promise<Token> | undefined;
130
+ invalidateToken: () => void;
131
+ getTokenFromStorage(): Promise<Token | null>;
132
+ private storeToken;
133
+ private getInitialToken;
134
+ private fetchTokenBy;
135
+ private updateToken;
136
+ private fetchWidgetToken;
137
+ }
138
+
139
+ declare interface AuthStoreOptions {
140
+ tokenServiceUrl: string;
141
+ widgetTokenServiceUrl?: string;
142
+ storage: Storage_2;
143
+ tokenStorageKey: string;
144
+ deviceInfo: any;
145
+ clientId: string;
146
+ }
147
+
148
+ declare type BehaviorFactory = (controller: PlayerController) => PlayerBehavior;
149
+
150
+ declare interface Box {
151
+ Top: number;
152
+ Left: number;
153
+ Bottom: number;
154
+ Right: number;
155
+ }
156
+
157
+ export declare const BoxSelector: (({ onSelect, onRequestCancel, onClose }: Props_2) => JSX.Element) & {
158
+ displayName: string;
159
+ };
160
+
161
+ declare const Camera: ((props: Props) => JSX.Element) & {
162
+ displayName: string;
163
+ };
164
+ export default Camera;
165
+
166
+ declare interface Camera_2 {
167
+ id: number;
168
+ name: string;
169
+ streamUrl: string;
170
+ dashStreamUrl: string;
171
+ webRtcUrl: string;
172
+ pin: string;
173
+ dvrWindowLength: number;
174
+ enabled: boolean;
175
+ isOnline: boolean;
176
+ isPtz: boolean;
177
+ isMicEnabled: boolean;
178
+ address?: {
179
+ Lat: number;
180
+ Lng: number;
181
+ } | null;
182
+ archiveDuration: number;
183
+ permissions: number;
184
+ raw: RawCamera;
185
+ }
186
+
187
+ declare interface CameraStatistics {
188
+ id: number;
189
+ month: number;
190
+ trafficOutMBytes: number;
191
+ archiveStorageMBytes: number;
192
+ clipStorageMBytes: number;
193
+ }
194
+
195
+ declare interface CamgroupItem {
196
+ id: number;
197
+ order: number;
198
+ }
199
+
200
+ declare interface Chunk {
201
+ startTime: Date;
202
+ endTime: Date;
203
+ streamUrl: string;
204
+ duration?: number;
205
+ cameraId: number;
206
+ }
207
+
208
+ declare interface Chunk_2 {
209
+ json?: string;
210
+ startTime: Date;
211
+ endTime: Date;
212
+ streamUrl: string;
213
+ duration?: number;
214
+ }
215
+
216
+ declare interface ChunksQuery {
217
+ cameraId: number;
218
+ from: Date;
219
+ to: Date;
220
+ }
221
+
222
+ declare interface Clip {
223
+ id: number;
224
+ cameraId: number;
225
+ startTime: Date;
226
+ endTime: Date;
227
+ isTimelapse: boolean;
228
+ duration: number;
229
+ clipUrl?: string;
230
+ name: string;
231
+ }
232
+
233
+ export declare const CloseControl: {
234
+ ({ onClick }: Props_3): JSX.Element | null;
235
+ displayName: string;
236
+ };
237
+
238
+ declare interface Connection {
239
+ state: CONNECTION_STATE;
240
+ stop: () => void;
241
+ start: () => Connection;
242
+ done: (callback: () => void) => Connection;
243
+ fail: (callback: (err: any) => void) => Connection;
244
+ error: (callback: (err: any) => void) => Connection;
245
+ disconnected: (callback: () => void) => Connection;
246
+ reconnecting: (callback: () => void) => Connection;
247
+ reconnected: (callback: () => void) => Connection;
248
+ proxies: {
249
+ [P in keyof typeof FULL_API_CONFIG]: {
250
+ on: (eventName: string, callback: (data: any) => void) => void;
251
+ invoke: any;
252
+ };
253
+ };
254
+ createHubProxy: (hubName: string) => void;
255
+ lastError: any;
256
+ qs: {
257
+ access_token: string;
258
+ };
259
+ }
260
+
261
+ declare enum CONNECTION_STATE {
262
+ CONNECTING = 0,
263
+ CONNECTED = 1,
264
+ RECONNECTING = 2,
265
+ DISCONNECTED = 3
266
+ }
267
+
268
+ export declare const Control: React_2.FC<Props_4>;
269
+
270
+ export declare class Controls extends React_2.Component<Props_5> {
271
+ get player(): PlayerController;
272
+ static contextType: React_2.Context<PlayerController>;
273
+ static Spacer: React_2.FC;
274
+ containerRef: React_2.RefObject<HTMLDivElement>;
275
+ mutationObserver: MutationObserver;
276
+ resizeReactionDisposer: IReactionDisposer;
277
+ componentDidUpdate(): void;
278
+ componentDidMount(): void;
279
+ reflow: () => void;
280
+ componentWillUnmount(): void;
281
+ render(): JSX.Element;
282
+ }
283
+
284
+ declare type DeepPartial<T> = {
285
+ [K in keyof T]?: DeepPartial<T[K]>;
286
+ };
287
+
288
+ export declare const DefaultControls: (({ onRequestClose, onRequestToggleFullscreen }: Props_7) => JSX.Element) & {
289
+ displayName: string;
290
+ };
291
+
292
+ declare const events: {
293
+ [P in keyof PartialApi]: Array<{
294
+ name: string;
295
+ explicit?: boolean;
296
+ }>;
297
+ };
298
+
299
+ declare type EventType = 'Motion' | 'Tampering' | 'PanTiltZoom' | 'CrossLine' | 'Intrusion' | 'LicensePlate' | 'FaceDetection' | 'Audio' | 'Analytic' | 'SpeedDetection' | 'PeopleCounter' | 'Temperature' | 'PoS' | 'GPS' | 'DigitalInput' | 'Normal' | 'Suspicious' | 'Loitering' | 'Vandalism' | 'Trespass' | 'Emergency' | 'LifeInDanger' | 'ErroneousAlert' | 'Misidentification' | 'Fire' | 'MedicalDuress' | 'HoldUp' | 'CheckIn' | 'CheckOut' | 'ClockIn' | 'ClockOut' | 'ParkingStart' | 'ParkingEnd' | 'ParkingViolation' | 'GateAccess' | 'DoorAccess' | 'TemperatureCheck' | 'IDCheck' | 'PPECheck' | 'WelfareCheck' | 'Uncategorized' | 'Unknown';
300
+
301
+ declare type ExtractHubs<T, K> = {
302
+ [P in keyof ExtractMethods<T, K>]: ExtractMethods<T[P], K[P]>;
303
+ };
304
+
305
+ declare type ExtractMethods<T, K> = Pick<T, Extract<keyof T, keyof K>>;
306
+
307
+ declare const FULL_API_CONFIG: IApi;
308
+
309
+ export declare const FullscreenControl: {
310
+ ({ onClick }: Props_6): JSX.Element | null;
311
+ displayName: string;
312
+ };
313
+
314
+ declare interface IApi {
315
+ archives: {
316
+ PopulateArchive: (params: {
317
+ cameraId: number;
318
+ endTime: Date;
319
+ startTime: Date;
320
+ }) => Observable<any>;
321
+ GetArchives: (params: any) => Observable<any>;
322
+ GetClips: () => Observable<any>;
323
+ UpdateClip: (params: any) => Observable<any>;
324
+ DeleteClip: (params: any) => Observable<any>;
325
+ SaveClip: (params: any) => Observable<any>;
326
+ SaveTimelaps: (params: any) => Observable<any>;
327
+ SaveArchive: (params: any) => Observable<any>;
328
+ DeleteArchive: (params: any) => Observable<any>;
329
+ ShareClip: (sharedClip: RawSharedClip) => Observable<ApiResult<RawSharedClip>>;
330
+ GetSharedClips: (recordId: number | null) => Observable<ApiResult<RawSharedClip>>;
331
+ UpdateSharedClip: (sharedClip: RawSharedClip) => Observable<ApiResult<RawSharedClip>>;
332
+ DeleteSharedClip: (recordId: number) => Observable<ApiResult<RawSharedClip>>;
333
+ };
334
+ cameras: {
335
+ GetCameras: (camera: {
336
+ id?: number;
337
+ } | null, since: Date | null) => Observable<ApiResult<RawCamera>>;
338
+ /**
339
+ * @deprecated
340
+ */
341
+ GetMotionEvents: (params: {
342
+ cameraId: number;
343
+ endTime: Date | null;
344
+ startTime: Date;
345
+ }) => Observable<OBVIOUSLY_NEEDS_TO_BE_FIXED_EventsApiResult<RawEvent>>;
346
+ GetSensorDataSchema: (eventType: EventType) => Observable<any>;
347
+ GetSensorEvents: (params: SensorEventsParams, filter: string, box: Box) => Observable<ApiResult<RawSensorEvent>>;
348
+ GetSensorEventsPage: (request: SensorEventsRequest, filter: string | null, searchPolygons: string[]) => Observable<ApiPageResult<RawSensorEvent>>;
349
+ AddUserSensorEvent: (event: PartialExcept<RawSensorEvent, 'id' | 'eventType' | 'message'>) => Observable<ApiResult<RawSensorEvent>>;
350
+ AcknowledgeSensorEvent: (event: PartialExcept<RawSensorEvent, 'id' | 'ackEventType' | 'message'>) => Observable<ApiResult<RawSensorEvent>>;
351
+ MoveCamera: (camera: {
352
+ id: number;
353
+ }, x: number, y: number, zoom: number, moveSpeed: number, zoomSpeed: number) => Observable<any>;
354
+ MoveCameraContinuousStart: ({ id }: {
355
+ id: number;
356
+ }, x: number, y: number, zoom: number, timeout: number) => Observable<any>;
357
+ MoveCameraContinuousStop: ({ id }: {
358
+ id: number;
359
+ }) => Observable<any>;
360
+ GoHomePtzCamera: ({ id }: {
361
+ id: number;
362
+ }) => Observable<any>;
363
+ SetHomePtzCamera: ({ id }: {
364
+ id: number;
365
+ }) => Observable<any>;
366
+ };
367
+ camgroups: {
368
+ GetCamgroups: () => Observable<ApiResult<RawCamgroup>>;
369
+ DeleteCamgroup: (params: any) => Observable<ApiResult<RawCamgroup>>;
370
+ AddCamgroup: (params: any) => Observable<ApiResult<RawCamgroup>>;
371
+ UpdateCamgroup: (params: any) => Observable<ApiResult<RawCamgroup>>;
372
+ };
373
+ sound: {
374
+ GetPushSoundServiceUrl: (id: number) => Observable<any>;
375
+ };
376
+ thumbnails: {
377
+ GetThumbnailsInfo: (params: {
378
+ cameraId: number;
379
+ from: Date;
380
+ to: Date;
381
+ count: number;
382
+ }) => Observable<any>;
383
+ GetThumbnailInfo: (params: {
384
+ cameraId: number;
385
+ from: Date;
386
+ to: Date;
387
+ }) => Observable<any>;
388
+ GetHeatMapsInfo: (params: {
389
+ cameraId: number;
390
+ from: Date;
391
+ to: Date;
392
+ count: number;
393
+ }) => Observable<any>;
394
+ };
395
+ users: {
396
+ GetUser: () => Observable<ApiResult<RawUser>>;
397
+ UserUpdateProfile: (user: Partial<RawUser>) => Observable<ApiResult<RawUser>>;
398
+ };
399
+ }
400
+
401
+ declare class LiveChunk {
402
+ cameraId: number;
403
+ streamUrl: string;
404
+ dashStreamUrl: string;
405
+ startTime: Date;
406
+ endTime: Date;
407
+ length: number;
408
+ isLive: boolean;
409
+ isDvr: boolean;
410
+ hasDvr: boolean;
411
+ rtmpStreamUrl: string;
412
+ managed: boolean;
413
+ constructor(data: {
414
+ cameraId: number;
415
+ endTime: Date;
416
+ startTime: Date;
417
+ streamUrl: string;
418
+ dashStreamUrl: string;
419
+ length: number;
420
+ });
421
+ setBounds: (range: [Date, Date]) => void;
422
+ }
423
+
424
+ declare type OBVIOUSLY_NEEDS_TO_BE_FIXED_EventsApiResult<T> = {
425
+ success: true;
426
+ motionEventItems: T[];
427
+ } | {
428
+ success: false;
429
+ error: {
430
+ code: number;
431
+ message: string;
432
+ };
433
+ };
434
+
435
+ declare interface PageInfo {
436
+ isDescending: boolean;
437
+ nextPageToken: number;
438
+ haveMore: boolean;
439
+ }
440
+
441
+ declare type PartialApi = DeepPartial<IApi>;
442
+
443
+ declare type PartialExcept<T, K extends keyof T> = Pick<T, K> & Partial<T>;
444
+
445
+ export declare const PlaybackRateControl: (() => JSX.Element | null) & {
446
+ displayName: string;
447
+ };
448
+
449
+ declare interface PlayerBehavior {
450
+ player: PlayerController;
451
+ delay?: number;
452
+ live?: boolean;
453
+ seek?: (time: Date) => void;
454
+ goLive?: () => void;
455
+ getCurrentTime: () => Date | null;
456
+ getDateRange?: () => [Date, Date] | null;
457
+ dispose: () => Promise<void> | void;
458
+ }
459
+
460
+ export declare const PlayerContext: React_2.Context<PlayerController>;
461
+
462
+ declare class PlayerController {
463
+ id: number;
464
+ disposables: (IReactionDisposer | Subscription)[];
465
+ liveChunk?: LiveChunk | null;
466
+ currentTime: Date | null;
467
+ chunk: ArchiveChunk | LiveChunk | null;
468
+ paused: boolean;
469
+ loading: boolean;
470
+ error: any;
471
+ playbackRate: number;
472
+ volume: number;
473
+ muted: boolean;
474
+ videoResizeMode: VideoResizeMode;
475
+ camera: Camera_2;
476
+ stats: any;
477
+ mode: 'archive' | 'DVR' | 'WebRTC' | null;
478
+ behavior: PlayerBehavior | null;
479
+ width: number;
480
+ height: number;
481
+ chunkRequestTime: Date | null;
482
+ requestedArchivesSince: Date;
483
+ archivesRequest: Observable<ArchiveChunk[]>;
484
+ video: HTMLVideoElement;
485
+ clip?: Clip;
486
+ startTime: Date | null;
487
+ endTime: Date | null;
488
+ stream: MediaStream | null;
489
+ canSeek: boolean;
490
+ canSeek$: Observable<any>;
491
+ progress$: Observable<any>;
492
+ muted$: Observable<boolean>;
493
+ volume$: Observable<number>;
494
+ ended$: Observable<any>;
495
+ archivesStore: ArchivesStore;
496
+ behaviors: {
497
+ archive: BehaviorFactory;
498
+ DVR: BehaviorFactory;
499
+ WebRTC: BehaviorFactory | null;
500
+ };
501
+ seekTime?: Date | null;
502
+ constructor({ camera, startTime, endTime, clip, archivesStore, behaviors }: {
503
+ camera: Camera_2;
504
+ clip?: Clip;
505
+ startTime?: Date | null;
506
+ endTime?: Date;
507
+ archivesStore: ArchivesStore;
508
+ behaviors: {
509
+ archive: BehaviorFactory;
510
+ DVR: BehaviorFactory;
511
+ WebRTC: BehaviorFactory | null;
512
+ };
513
+ });
514
+ attach(video: HTMLVideoElement, { canSeek$, progress$, muted$, volume$, ended$ }: PlayerEventStreams): void;
515
+ seek: (time: Date) => void;
516
+ seekAfterReady(): void;
517
+ stopLoadingOnError(): void;
518
+ replaceErrorMessageOnOffline(): void;
519
+ changeMedia: ({ time, chunk }: {
520
+ time?: Date | null | undefined;
521
+ chunk?: LiveChunk | ArchiveChunk | undefined;
522
+ }) => void;
523
+ initCurrentTime(): void;
524
+ initLiveChunkUpdate(): void;
525
+ initChunkRequest(): void;
526
+ requestArchives: (time: Date) => Observable<ArchiveChunk[]>;
527
+ setupLiveChunk(): void;
528
+ /**
529
+ * Inits correct behavior for current player mode
530
+ */
531
+ initPlayerBehavior(): void;
532
+ goLive: () => void;
533
+ fallbackToDVR: () => void;
534
+ setCamera: (camera: Camera_2) => void;
535
+ setCameraAndStartTime: (camera: Camera_2, startTime: Date | null) => void;
536
+ toggleResizeMode: () => void;
537
+ setVideoResizeMode: (mode: VideoResizeMode) => void;
538
+ toggleMute: () => void;
539
+ setStartTime: (time: Date | null) => void;
540
+ setVolume: (volume: number) => void;
541
+ setPlaybackRate: (rate: number) => void;
542
+ reactToVolumeChange(): void;
543
+ togglePlayback: () => void;
544
+ play: () => void;
545
+ pause: () => void;
546
+ detach: () => void;
547
+ private initUpgradeToWebRtc;
548
+ }
549
+
550
+ declare interface PlayerEventStreams {
551
+ canSeek$: Observable<any>;
552
+ progress$: Observable<any>;
553
+ ended$: Observable<any>;
554
+ volume$: Observable<number>;
555
+ muted$: Observable<boolean>;
556
+ }
557
+
558
+ export declare const PlayPauseControl: (() => JSX.Element) & {
559
+ displayName: string;
560
+ };
561
+
562
+ declare interface Props extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onMouseDown'> {
563
+ cameraId: number;
564
+ startTime?: Date | null;
565
+ controls?: React_2.ReactNode;
566
+ onMouseDown?: (e: MouseEvent) => void;
567
+ onRequestClose?: () => void;
568
+ }
569
+
570
+ declare interface Props_2 {
571
+ onSelect: (box: Box) => void;
572
+ onClose: () => void;
573
+ onRequestCancel: () => void;
574
+ }
575
+
576
+ declare interface Props_3 {
577
+ onClick?: () => void;
578
+ }
579
+
580
+ declare type Props_4 = React_2.HTMLAttributes<HTMLButtonElement> & {
581
+ ref?: React_2.Ref<HTMLButtonElement>;
582
+ };
583
+
584
+ declare interface Props_5 {
585
+ children: React_2.ReactNode;
586
+ style?: React_2.CSSProperties;
587
+ }
588
+
589
+ declare interface Props_6 {
590
+ onClick: (() => void) | null;
591
+ }
592
+
593
+ declare interface Props_7 {
594
+ onRequestClose?: () => void;
595
+ onRequestToggleFullscreen: (() => void) | null;
596
+ }
597
+
598
+ export declare const PtzControl: React_2.FC;
599
+
600
+ declare interface RawCamera {
601
+ id: number;
602
+ customerId: number;
603
+ name: string;
604
+ description: string;
605
+ cameraBrand: string;
606
+ cameraModel: string;
607
+ enabled: boolean;
608
+ cameraUserName: string;
609
+ cameraPassword: null;
610
+ serialNum: string;
611
+ isOnvif: boolean;
612
+ isP2P: boolean;
613
+ p2pRegistrationCode: null;
614
+ planId: null;
615
+ p2pState: string;
616
+ cameraVideoFormat: string;
617
+ cameraState: string;
618
+ cameraStateChangedTime: Date;
619
+ cameraError: null;
620
+ cameraAddress: string;
621
+ isMicEnabled: boolean;
622
+ imageQuality: number;
623
+ cameraSourceChannel: string;
624
+ pin: string;
625
+ streamUrl: string;
626
+ dashStreamUrl: string;
627
+ rtmpUrl: string;
628
+ webRtcStreamHost: string;
629
+ webRtcUrl: string;
630
+ cameraHttpSourceUrl: string;
631
+ cameraRtspSourceUrl: string;
632
+ supportedResolutions: string;
633
+ cameraType: string;
634
+ isCloud: boolean;
635
+ generateImageUrl: null;
636
+ imageUrl: string;
637
+ qualityProfile: string;
638
+ encodingProfile: null;
639
+ width: number;
640
+ height: number;
641
+ bitRate: number;
642
+ frameRate: number;
643
+ archiveDuration: number;
644
+ isArchiveByMotionEvent: boolean;
645
+ isAnalyticsEnabled: boolean;
646
+ isTimelapseAvailable: boolean;
647
+ motionEnabled: boolean;
648
+ isPTZ: boolean;
649
+ motionDuration: number;
650
+ dvrWindowLength: number;
651
+ jsonField: string;
652
+ dtUpdUtc: Date;
653
+ version: string;
654
+ statistics: CameraStatistics;
655
+ }
656
+
657
+ declare interface RawCamgroup {
658
+ id: number;
659
+ name: string | null;
660
+ text: null;
661
+ description: null;
662
+ iconUrl: null;
663
+ iconCls: null;
664
+ dynamic: boolean;
665
+ allowDuplicates: boolean;
666
+ allowDrop: boolean;
667
+ allowNodeDropInView: boolean;
668
+ visible: boolean;
669
+ layout_id: string;
670
+ contentFilter: null;
671
+ customerWideGroup: boolean;
672
+ cameras: CamgroupItem[];
673
+ camgroups: CamgroupItem[];
674
+ version: string;
675
+ order: number;
676
+ }
677
+
678
+ declare interface RawEvent {
679
+ id: number;
680
+ startTime: string;
681
+ endTime?: string;
682
+ cameraId: number;
683
+ data: string | null;
684
+ }
685
+
686
+ declare interface RawSensorEvent {
687
+ message: string;
688
+ data: string | null;
689
+ id: number;
690
+ customerId: number;
691
+ sensorId: number;
692
+ sensorType: 'CameraSensor' | 'MotionSensor' | 'IntrusionSensor' | 'AudioSensor' | 'TemperatureSensor' | 'SpeedSensor' | 'Unknown';
693
+ eventType: EventType;
694
+ ackEventType: string;
695
+ description?: any;
696
+ tags?: any;
697
+ customerData?: any;
698
+ startTime: string;
699
+ endTime: string;
700
+ userId: string;
701
+ }
702
+
703
+ declare interface RawSharedClip {
704
+ id: number;
705
+ recordId: number;
706
+ creatorUserId: number;
707
+ cameraId: number;
708
+ startTime: string | Date;
709
+ endTime: string | Date;
710
+ duration: number;
711
+ fileSize: number;
712
+ password: string;
713
+ name: string;
714
+ description: string;
715
+ url: string;
716
+ validTo: string | Date;
717
+ }
718
+
719
+ declare interface RawToken {
720
+ access_token: string;
721
+ accessToken: string;
722
+ access_token_expires: string;
723
+ accessTokenExpires: string;
724
+ access_token_issued: string;
725
+ accessTokenIssued: string;
726
+ client_id: string;
727
+ clientId: string;
728
+ expires_in: number;
729
+ expiresIn: number;
730
+ refresh_token: string;
731
+ refreshToken: string;
732
+ refresh_token_expires: string;
733
+ refreshTokenExpires: string;
734
+ refresh_token_issued: string;
735
+ refreshTokenIssued: string;
736
+ token_type: string;
737
+ tokenType: string;
738
+ userName: string;
739
+ widgetId?: string;
740
+ widgetToken?: string;
741
+ }
742
+
743
+ declare interface RawUser {
744
+ id: number;
745
+ customerId: number;
746
+ userName: string;
747
+ firstName?: string;
748
+ lastName?: string;
749
+ email: string;
750
+ languageCode: string;
751
+ layoutStartId: number | null;
752
+ layoutStartType: 'camera' | 'camgroup' | '';
753
+ timeZoneOffset: string;
754
+ connectionId: string;
755
+ ipAddress: string;
756
+ userRoles: string[];
757
+ lastLoginAt: Date;
758
+ createdAt: Date;
759
+ jsonField: string;
760
+ imageUrl: null;
761
+ permissions: number;
762
+ version: string;
763
+ }
764
+
765
+ export declare const ResizeModeControl: (() => JSX.Element) & {
766
+ displayName: string;
767
+ };
768
+
769
+ declare interface SensorEventsParams {
770
+ sensorId: number;
771
+ sensorType: 'CameraSensor' | 'MotionSensor' | 'IntrusionSensor' | 'AudioSensor' | 'TemperatureSensor' | 'SpeedSensor' | 'Unknown';
772
+ startTime: Date;
773
+ endTime: Date;
774
+ eventType: EventType;
775
+ }
776
+
777
+ declare interface SensorEventsRequest {
778
+ sensorIds: number[];
779
+ sensorType: string;
780
+ sensorEventTypes: SensorEventType[];
781
+ startTime?: Date;
782
+ endTime?: Date;
783
+ isDescending: boolean;
784
+ rowsLimit: number;
785
+ pageToken?: number;
786
+ }
787
+
788
+ declare enum SensorEventType {
789
+ Motion = 0,
790
+ Tampering = 1,
791
+ PanTiltZoom = 2,
792
+ CrossLine = 3,
793
+ Intrusion = 4,
794
+ LicensePlate = 5,
795
+ FaceDetection = 6,
796
+ Audio = 7,
797
+ Analytic = 8,
798
+ SpeedDetection = 9,
799
+ PeopleCounter = 10,
800
+ Temperature = 11,
801
+ PoS = 12,
802
+ GPS = 13,
803
+ DigitalInput = 14,
804
+ Normal = 15,
805
+ Suspicious = 16,
806
+ Loitering = 17,
807
+ Vandalism = 18,
808
+ Trespass = 19,
809
+ Emergency = 20,
810
+ LifeInDanger = 21,
811
+ ErroneousAlert = 22,
812
+ Misidentification = 23,
813
+ Fire = 24,
814
+ MedicalDuress = 25,
815
+ HoldUp = 26,
816
+ CheckIn = 27,
817
+ CheckOut = 28,
818
+ ClockIn = 29,
819
+ ClockOut = 30,
820
+ ParkingStart = 31,
821
+ ParkingEnd = 32,
822
+ ParkingViolation = 33,
823
+ GateAccess = 34,
824
+ DoorAccess = 35,
825
+ TemperatureCheck = 36,
826
+ IDCheck = 37,
827
+ PPECheck = 38,
828
+ WelfareCheck = 39,
829
+ Uncategorized = 40,
830
+ Unknown = 999
831
+ }
832
+
833
+ export declare class SnapshotControl extends React_2.Component {
834
+ static contextType: React_2.Context<PlayerController>;
835
+ get player(): PlayerController;
836
+ getSnapshot: () => void;
837
+ render(): JSX.Element;
838
+ }
839
+
840
+ declare interface Storage_2 {
841
+ setItem: (key: string, value: string) => void | Promise<undefined>;
842
+ getItem: (key: string) => (string | null) | Promise<string | null>;
843
+ removeItem: (key: string) => void | Promise<undefined>;
844
+ }
845
+
846
+ declare class Token {
847
+ accessToken: string;
848
+ accessTokenExpires: Date;
849
+ accessTokenIssued: Date;
850
+ clientId: string;
851
+ expiresIn: number;
852
+ refreshToken: string;
853
+ refreshTokenExpires: Date;
854
+ refreshTokenIssued: Date;
855
+ tokenType: string;
856
+ userName: string;
857
+ invalid: boolean;
858
+ widgetId?: string;
859
+ widgetToken?: string;
860
+ json: RawToken;
861
+ constructor(raw: RawToken);
862
+ }
863
+
864
+ declare enum VideoResizeMode {
865
+ Fit = "contain",
866
+ Stretch = "fill"
867
+ }
868
+
869
+ export declare const VolumeControl: (() => JSX.Element) & {
870
+ displayName: string;
871
+ };
872
+
873
+ export { }