Disable auto focus when front camera is active
[harmattan/cameraplus] / qml / VideoPlayerPage.qml
index 9b6ec4f..7f4d981 100644 (file)
@@ -63,7 +63,7 @@ Item {
         onError: showError(qsTr("Error playing video. Please try again or restart the application"))
 
         function toggle() {
-            if (!video.paused) {
+            if (state != VideoPlayer.StatePaused) {
                 video.pause()
             } else {
                 page.play()
@@ -103,11 +103,12 @@ Item {
             PropertyAnimation { duration: 200; }
         }
 
-        items: [
+        tools: CameraToolBarTools {
             CameraToolIcon {
-                iconId: "icon-m-toolbar-mediacontrol-stop-white"
+                iconSource: cameraTheme.videoStopIconId
                 onClicked: video.stop()
-            },
+            }
+
             CameraSlider {
                 id: slider
                 height: toolBar.height
@@ -128,16 +129,16 @@ Item {
 
                     hideTimer.restart()
                 }
-            },
+            }
+
             CameraToolIcon {
                 id: control
-                iconId: !video.paused ? "icon-m-toolbar-mediacontrol-pause-white"
-                    : "icon-m-toolbar-mediacontrol-play-white"
+                iconSource: video.state != VideoPlayer.StatePaused ? cameraTheme.videoPauseIconId : cameraTheme.videoPlayIconId
                 onClicked: {
                     video.toggle()
                     hideTimer.restart()
                 }
             }
-        ]
+        }
     }
 }