Use 2.0 instead of 1.1 for QtQuick version
[harmattan/cameraplus] / qml / VideoPlayerPage.qml
index 5e80ffa..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: cameraTheme.videoStopIconId
+                iconSource: cameraTheme.videoStopIconId
                 onClicked: video.stop()
-            },
+            }
+
             CameraSlider {
                 id: slider
                 height: toolBar.height
@@ -128,15 +129,16 @@ Item {
 
                     hideTimer.restart()
                 }
-            },
+            }
+
             CameraToolIcon {
                 id: control
-                iconId: !video.paused ? cameraTheme.videoPauseIconId : cameraTheme.videoPlayIconId
+                iconSource: video.state != VideoPlayer.StatePaused ? cameraTheme.videoPauseIconId : cameraTheme.videoPlayIconId
                 onClicked: {
                     video.toggle()
                     hideTimer.restart()
                 }
             }
-        ]
+        }
     }
 }