1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-05-19 20:32:42 +00:00
harbour-sailfin/qml/pages/VideoPage.qml

38 lines
954 B
QML

import QtQuick 2.6
import Sailfish.Silica 1.0
import "../components"
Page {
id: videoPage
property string itemId
property var itemData
allowedOrientations: Orientation.All
palette.colorScheme: Theme.LightOnDark
showNavigationIndicator: videoPlayer.hudVisible
Rectangle {
anchors.fill: parent
color: "black"
}
VideoPlayer {
id: videoPlayer
anchors.fill: parent
itemId: videoPage.itemId
onLandscapeChanged: {
console.log("Is landscape: " + landscape)
//appWindow.orientation = landscape ? Orientation.Landscape : Orientation.Portrait
videoPage.allowedOrientations = landscape ? Orientation.LandscapeMask : Orientation.PortraitMask
}
player: appWindow.mediaPlayer
title: itemData.Name
}
onStatusChanged: {
if (status == PageStatus.Inactive) {
videoPlayer.stop()
}
}
}