2
* Copyright 2015 Canonical Ltd.
4
* This file is part of messaging-app.
6
* messaging-app is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* messaging-app is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
import Ubuntu.Components 1.3
21
import Ubuntu.Thumbnailer 0.1
25
property string filePath
29
onFilePathChanged: videoImage.source = "image://thumbnailer/" + filePath
31
width: childrenRect.width
32
height: childrenRect.height
39
sourceSize.width: width
40
sourceSize.height: height
41
fillMode: Image.PreserveAspectCrop
45
if (status === Image.Error) {
46
source = "image://theme/image-missing"
52
anchors.centerIn: parent
54
running: videoImage.status != Image.Ready
60
anchors.centerIn: parent
61
name: "media-playback-start"
63
visible: opacity > 0.0
64
opacity: videoImage.status == Image.Ready ? 0.8 : 0.0
65
Behavior on opacity { UbuntuNumberAnimation {duration: UbuntuAnimation.FastDuration} }
72
thumbnail.pressAndHold()