* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-@IMPORT_QT_QUICK@
+import QtQuick 2.0
import CameraPlus 1.0
import QtCamera 1.0
import QtCameraExtras 1.0
VideoPlayer {
id: video
anchors.fill: parent
- cameraConfig: cam.cameraConfig
+ cameraConfig: camera.cameraConfig
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()
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
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()
}
}
- ]
+ }
}
}