X-Git-Url: http://git.tdb.fi/?p=xinema.git;a=blobdiff_plain;f=remote%2Fqml%2Fpages%2FPlaybackPage.qml;h=abbd0d84ea95814d6b2eebb1d6a47aafe7731cd2;hp=4a487a4f8cd9b80add977b1ad9b3e52931ef7fce;hb=5ddfcd433a000be3c32e7fc6ade4de9e0673de9e;hpb=6fd809bbdbfe628ef1e63b68665f374751838baf diff --git a/remote/qml/pages/PlaybackPage.qml b/remote/qml/pages/PlaybackPage.qml index 4a487a4..abbd0d8 100644 --- a/remote/qml/pages/PlaybackPage.qml +++ b/remote/qml/pages/PlaybackPage.qml @@ -1,6 +1,7 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 import fi.mikkosoft.xinema 0.1 +import "../components" Page { @@ -19,12 +20,42 @@ Page Label { text: streamControl.title + anchors + { + left: parent.left + right: parent.right + margins: Theme.horizontalPageMargin + } + horizontalAlignment: Text.AlignHCenter + wrapMode: Text.WordWrap + } + + Column + { + width: parent.width + spacing: Theme.paddingSmall + + StreamInfo + { + text: streamControl.videoSize.width+"×"+streamControl.videoSize.height+" @ "+streamControl.framerate.toFixed(2)+"fps" + } + + StreamInfo + { + text: streamControl.videoCodec + } + + StreamInfo + { + text: streamControl.audioCodec + } } Slider { id: slider width: parent.width + minimumValue: 0.0 maximumValue: Math.max(streamControl.duration, 1.0) valueText: @@ -49,6 +80,43 @@ Page return str+secs; } + + onDownChanged: + { + if(!down) + streamControl.position = value; + } + } + + IconButton + { + id: playPauseButton + anchors.horizontalCenter: parent.horizontalCenter + property string action: (streamControl.playbackState==StreamControl.Playing ? "pause" : "play") + icon.source: "image://theme/icon-l-"+action + onPressed: + { + if(action=="play") + streamControl.playbackState = StreamControl.Playing; + else if(action=="pause") + streamControl.playbackState = StreamControl.Paused; + } + } + + ChannelSelect + { + id: audioSelect + label: "Audio" + channels: streamControl.audioChannels + onCurrentChannelChanged: streamControl.currentAudioChannel = currentChannel + } + + ChannelSelect + { + id: spuSelect + label: "Subtitles" + channels: streamControl.spuChannels + onCurrentChannelChanged: streamControl.currentSpuChannel = currentChannel } } @@ -59,7 +127,9 @@ Page onPositionChanged: { if(!slider.down) - slider.value = streamControl.position + slider.value = position; } + onCurrentAudioChannelChanged: audioSelect.currentChannel = streamControl.currentAudioChannel; + onCurrentSpuChannelChanged: spuSelect.currentChannel = streamControl.currentSpuChannel; } }