@3deye-toolkit/react-camera 0.0.4 → 0.0.5
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/dist/react-camera.css +1 -914
- package/dist/react-camera.d.ts +37 -83
- package/dist/react-camera.js +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +3 -4
package/dist/react-camera.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IReactionDisposer } from 'mobx';
|
|
2
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
3
|
import { Matrix } from 'transformation-matrix';
|
|
3
4
|
import { Observable } from 'rxjs';
|
|
4
5
|
import { default as React_2 } from 'react';
|
|
@@ -42,7 +43,7 @@ declare interface Box {
|
|
|
42
43
|
Right: number;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export declare const BoxSelector: (({ onSelect, onRequestCancel, onClose }:
|
|
46
|
+
export declare const BoxSelector: (({ onSelect, onRequestCancel, onClose }: Props_3) => JSX_2.Element) & {
|
|
46
47
|
displayName: string;
|
|
47
48
|
};
|
|
48
49
|
|
|
@@ -68,7 +69,7 @@ export declare class Camera {
|
|
|
68
69
|
get supportsWebRTC(): boolean;
|
|
69
70
|
constructor(raw: RawCamera);
|
|
70
71
|
update: (raw: RawCamera) => void;
|
|
71
|
-
can: (permission: CameraPermissions) =>
|
|
72
|
+
can: (permission: CameraPermissions) => boolean;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
declare interface Camera_2 {
|
|
@@ -90,7 +91,12 @@ declare interface Camera_2 {
|
|
|
90
91
|
archiveDuration: number;
|
|
91
92
|
permissions: number;
|
|
92
93
|
raw: RawCamera;
|
|
93
|
-
|
|
94
|
+
imageUrl: string;
|
|
95
|
+
stateUpdatedAt: Date;
|
|
96
|
+
state: string;
|
|
97
|
+
supportsWebRTC: boolean;
|
|
98
|
+
update: (raw: RawCamera) => void;
|
|
99
|
+
can: (permission: CameraPermissions) => boolean;
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
declare interface CameraAddress {
|
|
@@ -186,31 +192,31 @@ declare class Clip_2 {
|
|
|
186
192
|
}
|
|
187
193
|
|
|
188
194
|
export declare const CloseControl: {
|
|
189
|
-
({ onClick }: Props_4):
|
|
195
|
+
({ onClick }: Props_4): JSX_2.Element | null;
|
|
190
196
|
displayName: string;
|
|
191
197
|
};
|
|
192
198
|
|
|
193
199
|
export declare const Control: React_2.ForwardRefExoticComponent<Omit<Props_5, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
194
200
|
|
|
195
|
-
export declare function Controls({ style, children }: Props_6):
|
|
201
|
+
export declare function Controls({ style, children }: Props_6): JSX_2.Element;
|
|
196
202
|
|
|
197
203
|
export declare namespace Controls {
|
|
198
|
-
var Spacer: () =>
|
|
204
|
+
var Spacer: () => JSX_2.Element;
|
|
199
205
|
}
|
|
200
206
|
|
|
201
|
-
export declare const DefaultControls: (({ onRequestClose, fullscreenControl }: Props_8) =>
|
|
207
|
+
export declare const DefaultControls: (({ onRequestClose, fullscreenControl }: Props_8) => JSX_2.Element) & {
|
|
202
208
|
displayName: string;
|
|
203
209
|
};
|
|
204
210
|
|
|
205
211
|
declare class ErrorBase<T extends string> extends Error {
|
|
206
212
|
name: T;
|
|
207
213
|
message: string;
|
|
208
|
-
cause?:
|
|
209
|
-
constructor(name: T, message: string, cause?:
|
|
214
|
+
cause?: unknown;
|
|
215
|
+
constructor(name: T, message: string, cause?: unknown);
|
|
210
216
|
}
|
|
211
217
|
|
|
212
218
|
export declare const FullscreenControl: {
|
|
213
|
-
({ toggle
|
|
219
|
+
({ toggle, active }: Props_7): JSX_2.Element;
|
|
214
220
|
displayName: string;
|
|
215
221
|
};
|
|
216
222
|
|
|
@@ -237,11 +243,11 @@ declare class LiveChunk {
|
|
|
237
243
|
setBounds: (range: [Date, Date]) => void;
|
|
238
244
|
}
|
|
239
245
|
|
|
240
|
-
export declare const PlaybackRateControl: (() =>
|
|
246
|
+
export declare const PlaybackRateControl: (() => JSX_2.Element | null) & {
|
|
241
247
|
displayName: string;
|
|
242
248
|
};
|
|
243
249
|
|
|
244
|
-
export declare const Player: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<Omit<
|
|
250
|
+
export declare const Player: React_2.MemoExoticComponent<React_2.ForwardRefExoticComponent<Omit<Props_2 & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>>;
|
|
245
251
|
|
|
246
252
|
declare interface PlayerBehavior {
|
|
247
253
|
state: PlayerState | null;
|
|
@@ -332,8 +338,8 @@ export declare class PlayerController {
|
|
|
332
338
|
private replaceErrorMessageOnOffline;
|
|
333
339
|
changeMedia: ({ time, chunk, backward }: {
|
|
334
340
|
time: Date;
|
|
335
|
-
chunk?:
|
|
336
|
-
backward?: boolean
|
|
341
|
+
chunk?: ArchiveChunk | LiveChunk;
|
|
342
|
+
backward?: boolean;
|
|
337
343
|
}) => void;
|
|
338
344
|
private initCurrentTime;
|
|
339
345
|
private initPlayableRange;
|
|
@@ -404,7 +410,7 @@ declare enum PlayerState {
|
|
|
404
410
|
Failed = "failed"
|
|
405
411
|
}
|
|
406
412
|
|
|
407
|
-
export declare const PlayPauseControl: (() =>
|
|
413
|
+
export declare const PlayPauseControl: (() => JSX_2.Element) & {
|
|
408
414
|
displayName: string;
|
|
409
415
|
};
|
|
410
416
|
|
|
@@ -417,13 +423,7 @@ declare interface Props extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'on
|
|
|
417
423
|
playerRef?: Ref<PlayerController>;
|
|
418
424
|
}
|
|
419
425
|
|
|
420
|
-
declare interface Props_2 {
|
|
421
|
-
onSelect: (box: Box) => void;
|
|
422
|
-
onClose: () => void;
|
|
423
|
-
onRequestCancel: () => void;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
declare interface Props_3 extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onMouseDown'> {
|
|
426
|
+
declare interface Props_2 extends Omit<React_2.HTMLAttributes<HTMLDivElement>, 'onMouseDown'> {
|
|
427
427
|
camera: Camera;
|
|
428
428
|
startTime?: Date | null;
|
|
429
429
|
endTime?: Date | null;
|
|
@@ -438,10 +438,12 @@ declare interface Props_3 extends Omit<React_2.HTMLAttributes<HTMLDivElement>, '
|
|
|
438
438
|
controllerRef?: Ref<PlayerController>;
|
|
439
439
|
videoRef?: Ref<HTMLVideoElement>;
|
|
440
440
|
archivesStore: ArchivesStore;
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
declare interface Props_3 {
|
|
444
|
+
onSelect: (box: Box) => void;
|
|
445
|
+
onClose: () => void;
|
|
446
|
+
onRequestCancel: () => void;
|
|
445
447
|
}
|
|
446
448
|
|
|
447
449
|
declare interface Props_4 {
|
|
@@ -454,8 +456,8 @@ declare type Props_5 = Omit<React_2.HTMLAttributes<HTMLButtonElement>, 'title'>
|
|
|
454
456
|
};
|
|
455
457
|
|
|
456
458
|
declare interface Props_6 {
|
|
457
|
-
children:
|
|
458
|
-
style?:
|
|
459
|
+
children: React.ReactNode;
|
|
460
|
+
style?: React.CSSProperties;
|
|
459
461
|
}
|
|
460
462
|
|
|
461
463
|
declare interface Props_7 {
|
|
@@ -465,16 +467,16 @@ declare interface Props_7 {
|
|
|
465
467
|
|
|
466
468
|
declare interface Props_8 {
|
|
467
469
|
onRequestClose?: () => void;
|
|
468
|
-
fullscreenControl?:
|
|
470
|
+
fullscreenControl?: React.ReactNode;
|
|
469
471
|
}
|
|
470
472
|
|
|
471
|
-
export declare const PtzControls: ((props: PtzControlsProps) =>
|
|
473
|
+
export declare const PtzControls: ((props: PtzControlsProps) => JSX_2.Element) & {
|
|
472
474
|
displayName: string;
|
|
473
475
|
};
|
|
474
476
|
|
|
475
477
|
declare interface PtzControlsProps {
|
|
476
478
|
cameraId: number;
|
|
477
|
-
style?:
|
|
479
|
+
style?: React.CSSProperties;
|
|
478
480
|
initialZoomSpeed?: number;
|
|
479
481
|
initialMovementSpeed?: number;
|
|
480
482
|
disabled?: boolean;
|
|
@@ -558,62 +560,17 @@ declare interface RawClip {
|
|
|
558
560
|
version: string;
|
|
559
561
|
}
|
|
560
562
|
|
|
561
|
-
declare type RawToken = {
|
|
562
|
-
accessToken: string;
|
|
563
|
-
accessTokenExpires: string;
|
|
564
|
-
accessTokenIssued: string;
|
|
565
|
-
clientId: string;
|
|
566
|
-
expiresIn: number;
|
|
567
|
-
refreshToken: string;
|
|
568
|
-
refreshTokenExpires: string;
|
|
569
|
-
refreshTokenIssued: string;
|
|
570
|
-
tokenType: string;
|
|
571
|
-
userName: string;
|
|
572
|
-
} & {
|
|
573
|
-
access_token: string;
|
|
574
|
-
access_token_expires: string;
|
|
575
|
-
access_token_issued: string;
|
|
576
|
-
client_id: string;
|
|
577
|
-
expires_in: number;
|
|
578
|
-
refresh_token: string;
|
|
579
|
-
refresh_token_expires: string;
|
|
580
|
-
refresh_token_issued: string;
|
|
581
|
-
token_type: string;
|
|
582
|
-
userName: string;
|
|
583
|
-
} & {
|
|
584
|
-
widgetId?: string;
|
|
585
|
-
widgetToken?: string;
|
|
586
|
-
};
|
|
587
|
-
|
|
588
563
|
declare type REACT_SRPING_CONTROLLER_TYPE_HACK = any;
|
|
589
564
|
|
|
590
|
-
export declare const ResizeModeControl: (() =>
|
|
565
|
+
export declare const ResizeModeControl: (() => JSX_2.Element) & {
|
|
591
566
|
displayName: string;
|
|
592
567
|
};
|
|
593
568
|
|
|
594
569
|
export declare const SnapshotControl: {
|
|
595
|
-
():
|
|
570
|
+
(): JSX_2.Element;
|
|
596
571
|
displayName: string;
|
|
597
572
|
};
|
|
598
573
|
|
|
599
|
-
declare class Token {
|
|
600
|
-
accessToken: string;
|
|
601
|
-
accessTokenExpires: Date;
|
|
602
|
-
accessTokenIssued: Date;
|
|
603
|
-
clientId: string;
|
|
604
|
-
expiresIn: number;
|
|
605
|
-
refreshToken: string;
|
|
606
|
-
refreshTokenExpires: Date;
|
|
607
|
-
refreshTokenIssued: Date;
|
|
608
|
-
tokenType: string;
|
|
609
|
-
userName: string;
|
|
610
|
-
invalid: boolean;
|
|
611
|
-
widgetId?: string;
|
|
612
|
-
widgetToken?: string;
|
|
613
|
-
json: RawToken;
|
|
614
|
-
constructor(raw: RawToken);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
574
|
export declare function useFullscreen(): {
|
|
618
575
|
ref: (node: HTMLElement | null) => void;
|
|
619
576
|
toggle: () => undefined;
|
|
@@ -637,12 +594,9 @@ export declare function usePlayerRef(): {
|
|
|
637
594
|
player: PlayerController | null;
|
|
638
595
|
};
|
|
639
596
|
|
|
640
|
-
declare
|
|
641
|
-
Fit = "contain",
|
|
642
|
-
Stretch = "fill"
|
|
643
|
-
}
|
|
597
|
+
declare type VideoResizeMode = 'contain' | 'fill';
|
|
644
598
|
|
|
645
|
-
export declare const VolumeControl: (() =>
|
|
599
|
+
export declare const VolumeControl: (() => JSX_2.Element) & {
|
|
646
600
|
displayName: string;
|
|
647
601
|
};
|
|
648
602
|
|