@htmlbricks/hb-player-live-camera-ptz 0.71.35 → 0.71.37
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/README.md +132 -27
- package/main.iife.js +1 -1
- package/main.iife.js.map +1 -1
- package/manifest.json +34 -3
- package/package.json +1 -1
- package/types/webcomponent.type.d.ts +94 -62
package/manifest.json
CHANGED
|
@@ -570,10 +570,41 @@
|
|
|
570
570
|
},
|
|
571
571
|
"styleSetup": {
|
|
572
572
|
"vars": [
|
|
573
|
+
{
|
|
574
|
+
"name": "--bulma-danger",
|
|
575
|
+
"valueType": "color",
|
|
576
|
+
"defaultValue": "#f14668",
|
|
577
|
+
"description": "Click-to-center selection rectangle on the video (`#area_selector`)."
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "--bulma-border",
|
|
581
|
+
"valueType": "color",
|
|
582
|
+
"defaultValue": "#dbdbdb",
|
|
583
|
+
"description": "Optional grid overlay lines on the video surface."
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"name": "--bulma-link",
|
|
587
|
+
"valueType": "color",
|
|
588
|
+
"defaultValue": "#485fc7",
|
|
589
|
+
"description": "Toolbar buttons, PTZ controls, and active accents."
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"name": "--bulma-text",
|
|
593
|
+
"valueType": "color",
|
|
594
|
+
"defaultValue": "#363636",
|
|
595
|
+
"description": "Labels and metadata in dialogs and toolbars."
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"name": "--bulma-scheme-main",
|
|
599
|
+
"valueType": "color",
|
|
600
|
+
"defaultValue": "#ffffff",
|
|
601
|
+
"description": "Panel and dialog surfaces layered over the player."
|
|
602
|
+
},
|
|
573
603
|
{
|
|
574
604
|
"name": "--hb-pad-joystick-size",
|
|
575
605
|
"valueType": "number",
|
|
576
|
-
"defaultValue": ""
|
|
606
|
+
"defaultValue": "100px",
|
|
607
|
+
"description": "Diameter passed to nested `hb-pad-joystick` (set on that child in component SCSS)."
|
|
577
608
|
}
|
|
578
609
|
],
|
|
579
610
|
"parts": []
|
|
@@ -677,7 +708,7 @@
|
|
|
677
708
|
}
|
|
678
709
|
}
|
|
679
710
|
],
|
|
680
|
-
"iifeIntegrity": "sha384-
|
|
711
|
+
"iifeIntegrity": "sha384-6Vbhw9sZtPRoZw+GrOZ8xMt4mxN7UU21cXWVDoROnpZKHcmSK2FRk2FO4dSdt7Ez",
|
|
681
712
|
"dependencies": [
|
|
682
713
|
{
|
|
683
714
|
"name": "hb-dialog",
|
|
@@ -840,5 +871,5 @@
|
|
|
840
871
|
"size": {},
|
|
841
872
|
"iifePath": "main.iife.js",
|
|
842
873
|
"repoName": "@htmlbricks/hb-player-live-camera-ptz",
|
|
843
|
-
"version": "0.71.
|
|
874
|
+
"version": "0.71.37"
|
|
844
875
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-player-live-camera-ptz",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.37",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Live camera view built on `hb-player-live` with a configurable PTZ panel: D-pad or analog joystick, zoom in/out, go home, click-to-center region on the video, optional grid overlay, fullscreen, mute, and play/pause. Manages camera presets in dialogs with `hb-table` (add, go to, delete). Toolbar uses Bulma `button` / `buttons has-addons`. Feature flags live in `configuration`; PTZ and UI state are driven by `is_ptz_connected`, `is_ptz_panel_opened`, and `is_home`. Dispatches movement, preset, and video-init events for the host app to wire to your backend.",
|
|
6
6
|
"licenses": [
|
|
@@ -1,77 +1,109 @@
|
|
|
1
1
|
export type TPreset = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
token: string;
|
|
3
|
+
name: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
z: number;
|
|
7
7
|
};
|
|
8
8
|
export type TMovementSettings = {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
speed: number;
|
|
10
|
+
precision: number;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export type Component = {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
id?: string;
|
|
15
|
+
style?: string;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
is_ptz_connected?: boolean;
|
|
18
|
+
is_ptz_panel_opened?: boolean;
|
|
19
|
+
live_uri: string;
|
|
20
|
+
media_type?: "hls" | "webrtc" | "auto" | "whep" | "";
|
|
21
|
+
presets?: TPreset[];
|
|
22
|
+
position?:
|
|
23
|
+
| "top"
|
|
24
|
+
| "right-bottom"
|
|
25
|
+
| "left-bottom"
|
|
26
|
+
| "bottom"
|
|
27
|
+
| "right-top"
|
|
28
|
+
| "left-top";
|
|
29
|
+
current_preset?: string;
|
|
30
|
+
is_home?: boolean;
|
|
31
|
+
configuration?: {
|
|
32
|
+
joystick?: boolean;
|
|
33
|
+
presets?: boolean;
|
|
34
|
+
addPreset?: boolean;
|
|
35
|
+
switchPreset?: boolean;
|
|
36
|
+
deletePreset?: boolean;
|
|
37
|
+
home?: boolean;
|
|
38
|
+
zoom?: {
|
|
39
|
+
in?: boolean;
|
|
40
|
+
out?: boolean;
|
|
41
|
+
};
|
|
42
|
+
pan?: boolean;
|
|
43
|
+
tilt?: boolean;
|
|
44
|
+
clickToCenter?: boolean;
|
|
45
|
+
settings?: boolean;
|
|
46
|
+
};
|
|
41
47
|
};
|
|
42
|
-
export type CardinalDirection =
|
|
48
|
+
export type CardinalDirection =
|
|
49
|
+
| "C"
|
|
50
|
+
| "N"
|
|
51
|
+
| "S"
|
|
52
|
+
| "NE"
|
|
53
|
+
| "SE"
|
|
54
|
+
| "NW"
|
|
55
|
+
| "SW"
|
|
56
|
+
| "NO"
|
|
57
|
+
| "SO"
|
|
58
|
+
| "W"
|
|
59
|
+
| "O";
|
|
43
60
|
|
|
44
61
|
export type Events = {
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
initVideo: { id: string; time: Date; htmlVideoElement: any };
|
|
63
|
+
panelMove: { id: string; opened: boolean };
|
|
47
64
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
goToHome: { movementSettings: TMovementSettings; id: string; time: Date };
|
|
66
|
+
goToSelectedArea: {
|
|
67
|
+
movementSettings: TMovementSettings;
|
|
68
|
+
id: string;
|
|
69
|
+
top: number;
|
|
70
|
+
left: number;
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
htmlVideoElementWidth: number;
|
|
74
|
+
htmlVideoElementHeight: number;
|
|
75
|
+
time: Date;
|
|
76
|
+
};
|
|
60
77
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
setPreset: { id: string; time: Date };
|
|
79
|
+
goToPreset: TPreset & {
|
|
80
|
+
playerId: string;
|
|
81
|
+
movementSettings: TMovementSettings;
|
|
82
|
+
time: Date;
|
|
83
|
+
};
|
|
84
|
+
deletePreset: TPreset & { playerId: string; time: Date };
|
|
64
85
|
|
|
65
|
-
|
|
86
|
+
zoomAction: {
|
|
87
|
+
movementSettings: TMovementSettings;
|
|
88
|
+
direction: "in" | "out";
|
|
89
|
+
id: string;
|
|
90
|
+
time: Date;
|
|
91
|
+
};
|
|
66
92
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
93
|
+
sendJoystickPosition: {
|
|
94
|
+
movementSettings: TMovementSettings;
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
cardinalDirection: CardinalDirection;
|
|
98
|
+
id: string;
|
|
99
|
+
joyId: string;
|
|
100
|
+
time: Date;
|
|
101
|
+
};
|
|
102
|
+
sendDirection: {
|
|
103
|
+
movementSettings: TMovementSettings;
|
|
104
|
+
direction: "up" | "right" | "down" | "left";
|
|
105
|
+
id: string;
|
|
106
|
+
joyId: string;
|
|
107
|
+
time: Date;
|
|
108
|
+
};
|
|
77
109
|
};
|