]> git.tdb.fi Git - xinema.git/blobdiff - remote/qml/pages/PlaybackPage.qml
Move non-page qml components to a separate subdirectory
[xinema.git] / remote / qml / pages / PlaybackPage.qml
index 345960a6c80de994d15c06dc017a865a895804fe..bf1d976c0b382eccc18a14dbc844ea9dac388633 100644 (file)
@@ -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,21 @@ Page
                Label
                {
                        text: streamControl.title
+                       anchors
+                       {
+                               left: parent.left
+                               right: parent.right
+                               margins: Theme.horizontalPageMargin
+                       }
+                       horizontalAlignment: Text.AlignHCenter
+                       wrapMode: Text.WordWrap
                }
 
                Slider
                {
                        id: slider
                        width: parent.width
+
                        minimumValue: 0.0
                        maximumValue: Math.max(streamControl.duration, 1.0)
                        valueText:
@@ -71,6 +81,22 @@ Page
                                        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
+               }
        }
 
        StreamControl
@@ -82,5 +108,7 @@ Page
                        if(!slider.down)
                                slider.value = position;
                }
+               onCurrentAudioChannelChanged: audioSelect.currentChannel = streamControl.currentAudioChannel;
+               onCurrentSpuChannelChanged: spuSelect.currentChannel = streamControl.currentSpuChannel;
        }
 }