+
+
@@ -23,6 +24,7 @@ import BaseMixin from '@/components/mixins/base'
import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
import WebcamMixin from '@/components/mixins/webcam'
import { capitalize } from '@/plugins/helpers'
+import WebcamNozzleCrosshair from '@/components/webcams/WebcamNozzleCrosshair.vue'
interface CameraStreamerResponse extends RTCSessionDescriptionInit {
id: string
@@ -30,7 +32,7 @@ interface CameraStreamerResponse extends RTCSessionDescriptionInit {
}
@Component({
- methods: { capitalize },
+ components: { WebcamNozzleCrosshair },
})
export default class WebrtcCameraStreamer extends Mixins(BaseMixin, WebcamMixin) {
capitalize = capitalize
@@ -65,6 +67,10 @@ export default class WebrtcCameraStreamer extends Mixins(BaseMixin, WebcamMixin)
return output
}
+ get nozzleCrosshair() {
+ return this.camSettings.extra_data?.nozzleCrosshair ?? false
+ }
+
get expanded(): boolean {
if (this.page !== 'dashboard') return true
diff --git a/src/locales/en.json b/src/locales/en.json
index 3bec5b39f..c897531ac 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -1292,9 +1292,11 @@
"Update": "update",
"WebcamsTab": {
"AddWebcam": "add webcam",
+ "Color": "Color",
"CreateWebcam": "Create Webcam",
"EditCrowsnestConf": "Edit crowsnest.conf",
"EditWebcam": "Edit Webcam",
+ "Enable": "Enable",
"EnableAudio": "Enable audio",
"FlipWebcam": "Flip webcam image:",
"HideFps": "Hide FPS counter",
@@ -1314,10 +1316,12 @@
"MjpegstreamerAdaptive": "Adaptive MJPEG-Streamer (experimental)",
"Name": "Name",
"NameAlreadyExists": "Name already exists",
+ "NozzleCrosshair": "Nozzle Crosshair",
"Required": "required",
"Rotate": "Rotate",
"SaveWebcam": "Save Webcam",
"Service": "Service",
+ "Size": "Size",
"TargetFPS": "Target FPS",
"UpdateWebcam": "Update Webcam",
"UrlSnapshot": "URL Snapshot",
diff --git a/src/store/gui/webcams/types.ts b/src/store/gui/webcams/types.ts
index a5566b62c..2fe109a92 100644
--- a/src/store/gui/webcams/types.ts
+++ b/src/store/gui/webcams/types.ts
@@ -28,6 +28,9 @@ export interface GuiWebcamStateWebcam {
extra_data?: {
enableAudio?: boolean
hideFps?: boolean
+ nozzleCrosshair?: boolean
+ nozzleCrosshairColor?: string
+ nozzleCrosshairSize?: number
}
source?: 'config' | 'database'
}