2 import Sailfish.Silica 1.0
3 import fi.mikkosoft.xinema 0.1
13 spacing: Theme.paddingLarge
17 title: qsTr("Playback")
22 text: streamControl.title
27 margins: Theme.horizontalPageMargin
29 horizontalAlignment: Text.AlignHCenter
30 wrapMode: Text.WordWrap
36 spacing: Theme.paddingSmall
40 visible: streamControl.videoSize.width && streamControl.videoSize.height
41 property string size: streamControl.videoSize.width+"×"+streamControl.videoSize.height
42 property string fps: " @ "+streamControl.framerate.toFixed(2)+"fps"
43 text: (streamControl.framerate ? size+fps : size)
48 visible: streamControl.videoCodec
49 text: streamControl.videoCodec
54 visible: streamControl.audioCodec
55 text: streamControl.audioCodec
65 maximumValue: Math.max(streamControl.duration, 1.0)
68 var secs = Math.round(value);
69 var mins = Math.floor(secs/60);
71 var hours = Math.floor(mins/60);
92 streamControl.position = value;
99 anchors.horizontalCenter: parent.horizontalCenter
100 property string action: (streamControl.playbackState==StreamControl.Playing ? "pause" : "play")
101 icon.source: "image://theme/icon-l-"+action
105 streamControl.playbackState = StreamControl.Playing;
106 else if(action=="pause")
107 streamControl.playbackState = StreamControl.Paused;
115 spacing: Theme.paddingLarge
116 anchors.bottom: page.bottom
117 anchors.bottomMargin: 2*Theme.paddingLarge
123 channels: streamControl.audioChannels
124 onCurrentChannelChanged: streamControl.currentAudioChannel = currentChannel
131 channels: streamControl.spuChannels
132 onCurrentChannelChanged: streamControl.currentSpuChannel = currentChannel
139 control: xinemaControl
143 slider.value = position;
145 onCurrentAudioChannelChanged: audioSelect.currentChannel = streamControl.currentAudioChannel;
146 onCurrentSpuChannelChanged: spuSelect.currentChannel = streamControl.currentSpuChannel;