2020-09-27 18:38:33 +00:00
|
|
|
/*
|
|
|
|
Sailfin: a Jellyfin client written using Qt
|
|
|
|
Copyright (C) 2020 Chris Josten
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2020-09-25 12:46:39 +00:00
|
|
|
import QtQuick 2.6
|
|
|
|
import QtMultimedia 5.6
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
|
2020-09-25 15:14:44 +00:00
|
|
|
import nl.netsoj.chris.Jellyfin 1.0
|
|
|
|
|
|
|
|
import "../components"
|
|
|
|
|
2020-10-10 12:30:49 +00:00
|
|
|
PosterCover {
|
2021-08-22 23:53:20 +00:00
|
|
|
readonly property var player: appWindow.playbackManager
|
2020-09-25 12:46:39 +00:00
|
|
|
|
2020-10-10 12:30:49 +00:00
|
|
|
// Wanted to display the currently running move on here, but it's hard :/
|
|
|
|
/*Rectangle {
|
2020-09-25 12:46:39 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
color: "black"
|
|
|
|
|
2020-10-10 12:30:49 +00:00
|
|
|
VideoOutput {
|
2020-09-25 12:46:39 +00:00
|
|
|
id: coverOutput
|
|
|
|
anchors.fill: parent
|
|
|
|
source: player
|
2020-10-10 12:30:49 +00:00
|
|
|
}
|
2020-09-25 12:46:39 +00:00
|
|
|
|
2020-10-10 12:30:49 +00:00
|
|
|
}*/
|
2020-09-25 12:46:39 +00:00
|
|
|
|
2020-10-01 22:13:05 +00:00
|
|
|
Shim {
|
|
|
|
anchors {
|
|
|
|
left: parent.left
|
|
|
|
bottom: parent.bottom
|
|
|
|
right: parent.right
|
|
|
|
}
|
|
|
|
height: Theme.iconSizeLarge
|
|
|
|
}
|
|
|
|
|
2020-09-25 12:46:39 +00:00
|
|
|
CoverActionList {
|
|
|
|
CoverAction {
|
|
|
|
id: playPause
|
|
|
|
iconSource: player.playbackState === MediaPlayer.PlayingState ? "image://theme/icon-cover-pause"
|
|
|
|
: "image://theme/icon-cover-play"
|
2020-09-25 15:14:44 +00:00
|
|
|
onTriggered: {
|
|
|
|
if (player.playbackState === MediaPlayer.PlayingState) {
|
|
|
|
player.pause()
|
|
|
|
} else {
|
|
|
|
player.play()
|
|
|
|
}
|
|
|
|
}
|
2020-09-25 12:46:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|