Stop video recording when we become non-active
authorMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 15:01:43 +0000 (18:01 +0300)
committerMohammed Sameer <msameer@foolab.org>
Sun, 9 Sep 2012 23:01:31 +0000 (02:01 +0300)
qml/VideoPage.qml

index e53adae..c8687fe 100644 (file)
@@ -32,6 +32,15 @@ CameraPage {
                 visible: (videoMode.recording || videoMode.canCapture) && !cameraMode.animationRunning && !previewAnimationRunning
         }
 
+        Connections {
+                target: platformWindow
+                onActiveChanged: {
+                        if (!platformWindow.active && videoMode.recording) {
+                                videoMode.stopRecording();
+                        }
+                }
+        }
+
         VideoMode {
                 id: videoMode
                 camera: cam