@@ -250,6 +259,27 @@ export default class WebcamForm extends Mixins(BaseMixin, WebcamMixin) {
return classes
}
+ get hasFpsCounter() {
+ return ['mjpegstreamer', 'mjpegstreamer-adaptive'].includes(this.webcam.service)
+ }
+
+ get hideFps() {
+ return this.webcam.extra_data?.hideFps ?? false
+ }
+
+ set hideFps(newVal) {
+ if (!('extra_data' in this.webcam)) {
+ this.webcam.extra_data = {
+ hideFps: newVal,
+ }
+
+ return
+ }
+
+ // @ts-ignore
+ this.webcam.extra_data.hideFps = newVal
+ }
+
mounted() {
this.oldWebcamName = this.webcam.name
}
diff --git a/src/components/webcams/Mjpegstreamer.vue b/src/components/webcams/Mjpegstreamer.vue
index 1e64a04d4..c6873a9a0 100644
--- a/src/components/webcams/Mjpegstreamer.vue
+++ b/src/components/webcams/Mjpegstreamer.vue
@@ -6,7 +6,7 @@
class="webcamImage"
:style="webcamStyle"
@load="onload" />
- {{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}
+ {{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}
@@ -73,6 +73,12 @@ export default class Mjpegstreamer extends Mixins(BaseMixin, WebcamMixin) {
return this.currentFPS < 10 ? '0' + this.currentFPS.toString() : this.currentFPS
}
+ get showFpsCounter() {
+ if (!this.showFps) return false
+
+ return !(this.camSettings.extra_data?.hideFps ?? false)
+ }
+
startStream() {
if (this.streamState) return
this.streamState = true
diff --git a/src/components/webcams/MjpegstreamerAdaptive.vue b/src/components/webcams/MjpegstreamerAdaptive.vue
index 40d2c77f8..42ea3e055 100644
--- a/src/components/webcams/MjpegstreamerAdaptive.vue
+++ b/src/components/webcams/MjpegstreamerAdaptive.vue
@@ -10,7 +10,7 @@
height="400"
:style="webcamStyle"
:class="'webcamImage ' + (isLoaded ? '' : 'hiddenWebcam')">
-
+
{{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}
@@ -75,6 +75,12 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
return this.currentFPS < 10 ? '0' + this.currentFPS.toString() : this.currentFPS
}
+ get showFpsCounter() {
+ if (!this.showFps) return false
+
+ return !(this.camSettings.extra_data?.hideFps ?? false)
+ }
+
get rotate() {
return [90, 270].includes(this.camSettings.rotation ?? 0)
}
diff --git a/src/locales/de.json b/src/locales/de.json
index eb3a1aec2..ab7d92501 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -1097,6 +1097,7 @@
"EditWebcam": "Webcam bearbeiten",
"FlipWebcam": "Webcam-Bild spiegeln:",
"Hlsstream": "HLS-Stream",
+ "HideFps": "FPS-Anzeige verstecken",
"Horizontally": "horizontal",
"IconBed": "Bett",
"IconCam": "Kamera",
diff --git a/src/locales/en.json b/src/locales/en.json
index 86d442965..75431dd8e 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -1096,6 +1096,7 @@
"EditCrowsnestConf": "Edit crowsnest.conf",
"EditWebcam": "Edit Webcam",
"FlipWebcam": "Flip webcam image:",
+ "HideFps": "Hide FPS counter",
"Horizontally": "horizontally",
"IconBed": "Bed",
"IconCam": "Cam",
diff --git a/src/store/gui/webcams/types.ts b/src/store/gui/webcams/types.ts
index 1fa1385bb..50f03153b 100644
--- a/src/store/gui/webcams/types.ts
+++ b/src/store/gui/webcams/types.ts
@@ -25,6 +25,8 @@ export interface GuiWebcamStateWebcam {
flip_vertical: boolean
rotation: number
aspect_ratio?: string
- extra_data?: {}
+ extra_data?: {
+ hideFps?: boolean
+ }
source?: 'config' | 'database'
}