Commit 869ecb05 authored by Sebastian Pettke's avatar Sebastian Pettke

Improve video recording error handling

parent e2d130b1
......@@ -256,7 +256,7 @@ Kirigami.Page {
RowLayout {
id: recordingFeedback
visible: false
visible: (camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus)
spacing: Kirigami.Units.gridUnit
anchors {
......@@ -315,13 +315,17 @@ Kirigami.Page {
}
else if (camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus) {
camera.videoRecorder.stop()
recordingFeedback.visible = false
showPassiveNotification(i18n("Stopped recording"))
}
else if (camera.captureMode === Camera.CaptureVideo) {
camera.videoRecorder.record()
recordingFeedback.visible = true
showPassiveNotification(i18n("Started recording"))
if (camera.videoRecorder.recorderStatus === CameraRecorder.RecordingStatus) {
showPassiveNotification(i18n("Started recording"))
}
else {
showPassiveNotification(i18n("Failed to start recording"))
}
}
}
......
......@@ -90,6 +90,10 @@ Kirigami.ApplicationWindow {
resolution: settings.resolution
// frameRate: 30 // a fixed frame rate is not set for now as it does not always get enforced anyway and can cause errors
}
onError: {
showPassiveNotification(i18n("An error occurred: \"") + errorString + i18n("\". Please consider restarting the application if it stopped working."))
}
}
title: i18n("Camera")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment