projects
/
harmattan
/
cameraplus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unload post capture and settings views when we are in camera view
[harmattan/cameraplus]
/
qml
/
VideoPlayerPage.qml
diff --git
a/qml/VideoPlayerPage.qml
b/qml/VideoPlayerPage.qml
index
490e6b6
..
2e310bf
100644
(file)
--- a/
qml/VideoPlayerPage.qml
+++ b/
qml/VideoPlayerPage.qml
@@
-20,12
+20,10
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-import QtQuick 1.1
-import com.nokia.meego 1.1
-import QtMultimediaKit 1.1
+import QtQuick 2.0
import CameraPlus 1.0
import CameraPlus 1.0
-
-// TODO: error reporting
+import QtCamera 1.0
+import QtCameraExtras 1.0
Item {
id: page
Item {
id: page
@@
-34,7
+32,11
@@
Item {
property alias source: video.source
function play() {
property alias source: video.source
function play() {
- video.play()
+ return video.play()
+ }
+
+ function stop() {
+ return video.stop()
}
MouseArea {
}
MouseArea {
@@
-53,19
+55,26
@@
Item {
onTriggered: toolBar.show = false
}
onTriggered: toolBar.show = false
}
- Video {
+ Video
Player
{
id: video
anchors.fill: parent
id: video
anchors.fill: parent
+ cameraConfig: camera.cameraConfig
+
+ onError: showError(qsTr("Error playing video. Please try again or restart the application"))
function toggle() {
function toggle() {
- if (
!video.p
aused) {
+ if (
state != VideoPlayer.StateP
aused) {
video.pause()
} else {
page.play()
}
}
video.pause()
} else {
page.play()
}
}
- onStopped: page.finished()
+ onStateChanged: {
+ if (state == VideoPlayer.StateStopped) {
+ page.finished()
+ }
+ }
}
Connections {
}
Connections {
@@
-82,32
+91,32
@@
Item {
property bool show: true
property bool show: true
-
manual
Back: true
+
hide
Back: true
expanded: true
anchors.bottom: parent.bottom
expanded: true
anchors.bottom: parent.bottom
- anchors.bottomMargin:
show ? 20 : -1 * (height + 20)
+ anchors.bottomMargin:
20
anchors.left: parent.left
anchors.leftMargin: 20
anchors.left: parent.left
anchors.leftMargin: 20
- opacity: 0.5
+ opacity: show ? 0.8 : 0.0
+ visible: opacity > 0
- Behavior on
anchors.bottomMargin
{
+ Behavior on
opacity
{
PropertyAnimation { duration: 200; }
}
PropertyAnimation { duration: 200; }
}
- items: [
- ToolIcon {
- icon
Id: "icon-m-toolbar-mediacontrol-stop-white"
+ tools: CameraToolBarTools {
+
Camera
ToolIcon {
+ icon
Source: cameraTheme.videoStopIconId
onClicked: video.stop()
onClicked: video.stop()
- },
- Slider {
+ }
+
+ CameraSlider {
id: slider
height: toolBar.height
anchors.verticalCenter: parent.verticalCenter
id: slider
height: toolBar.height
anchors.verticalCenter: parent.verticalCenter
- platformStyle: SliderStyle {
- handleBackground: ""
- handleBackgroundPressed: ""
- }
+ handleBackground: ""
+ handleBackgroundPressed: ""
minimumValue: 0
maximumValue: video.duration
minimumValue: 0
maximumValue: video.duration
@@
-121,15
+130,16
@@
Item {
hideTimer.restart()
}
hideTimer.restart()
}
- },
- ToolIcon {
+ }
+
+ CameraToolIcon {
id: control
id: control
- icon
Id: !video.paused ? "icon-m-toolbar-mediacontrol-pause-white" : "icon-m-toolbar-mediacontrol-play-white"
+ icon
Source: video.state != VideoPlayer.StatePaused ? cameraTheme.videoPauseIconId : cameraTheme.videoPlayIconId
onClicked: {
video.toggle()
hideTimer.restart()
}
}
onClicked: {
video.toggle()
hideTimer.restart()
}
}
- ]
+ }
}
}
}
}