2 * Copyright (C) 2016 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 import QtMultimedia 5.0
19 import Ubuntu.Components 1.3
20 import Ubuntu.Thumbnailer 0.1
21 import "../../Components"
22 import "../../Components/MediaServices"
24 /*! \brief Preview widget for video.
26 This widget shows video contained in widgetData["source"],
27 with a placeholder screenshot specified by widgetData["screenshot"].
32 implicitWidth: units.gu(35)
33 implicitHeight: services.height
35 widgetMargins: -units.gu(1)
36 orientationLock: services.fullscreen
38 property alias rootItem: services.rootItem
44 actions: sharingAction
46 sourceData: widgetData
48 maximumEmbeddedHeight: rootItem.height / 2
50 onClose: fullscreen = false
55 visible: sharingPicker.active
56 onTriggered: sharingPicker.showPeerPicker()
62 objectName: "sharingPicker"
63 shareData: widgetData["share-data"]