on xenial help sign in
just rotate the media
commit314bd37aeaa15c1d91f44d87c4784152d66ff9b6 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateThu 19 May 2016, 11:12 (10 years ago) parent7c23ec5
1 file changed+114−114
qml/Components/MediaServices/MediaServices.qml+114−114
qml/Components/MediaServices/MediaServices.qml+114−114
@@ -40,6 +40,12 @@ FocusScope {
4040 readonly property color backgroundColor: "#1B1B1B"
4141 readonly property color iconColor: "#F3F3E7"
4242
43+ Rectangle {
44+ anchors.fill: parent
45+ color: root.backgroundColor
46+ opacity: 0.85
47+ }
48+
4349 OrientationHelper {
4450 id: orientationHelper
4551 automaticOrientation: fullscreen
@@ -89,12 +95,6 @@ FocusScope {
8995 return undefined;
9096 }
9197
92− Rectangle {
93− anchors.fill: parent
94− color: root.backgroundColor
95− opacity: 0.85
96− }
97−
9898 Component {
9999 id: videoComponent
100100 VideoPlayer {
@@ -144,141 +144,141 @@ FocusScope {
144144 }
145145 }
146146 }
147+ }
147148
148− Loader {
149− id: headerContent
150− anchors {
151− top: contentLoader.top
152− left: parent.left
153− right: parent.right
154− topMargin: -headerContent.height
155− }
156− height: units.gu(6)
157− visible: false
149+ Loader {
150+ id: headerContent
151+ anchors {
152+ top: parent.top
153+ left: parent.left
154+ right: parent.right
155+ topMargin: -headerContent.height
156+ }
157+ height: units.gu(6)
158+ visible: false
158159
159− // eater
160− MouseArea {
161− anchors.fill: parent
162− }
160+ // eater
161+ MouseArea {
162+ anchors.fill: parent
163+ }
163164
164− Rectangle {
165− anchors.fill: parent
166− color: root.backgroundColor
167− opacity: 0.85
168− visible: headerContent.status === Loader.Ready
169− }
165+ Rectangle {
166+ anchors.fill: parent
167+ color: root.backgroundColor
168+ opacity: 0.85
169+ visible: headerContent.status === Loader.Ready
170+ }
170171
171− active: root.fullscreen
172− sourceComponent: headerComponent
172+ active: root.fullscreen
173+ sourceComponent: headerComponent
173174
174− Component {
175− id: headerComponent
175+ Component {
176+ id: headerComponent
176177
177− MediaServicesHeader {
178− iconColor: root.iconColor
179− onGoPrevious: {
180− rotationAction.checked = false;
181− root.close();
182− }
178+ MediaServicesHeader {
179+ iconColor: root.iconColor
180+ onGoPrevious: {
181+ rotationAction.checked = false;
182+ root.close();
183183 }
184184 }
185+ }
185186
186− // If we interact with the bar, reset the hide timer.
187− MouseArea {
188− anchors.fill: parent
189− onPressed: {
190− mouse.accepted = false
191− if (controlHideTimer.running) controlHideTimer.restart()
192− }
187+ // If we interact with the bar, reset the hide timer.
188+ MouseArea {
189+ anchors.fill: parent
190+ onPressed: {
191+ mouse.accepted = false
192+ if (controlHideTimer.running) controlHideTimer.restart()
193193 }
194194 }
195+ }
195196
196− Loader {
197− id: footerContent
198− anchors {
199− left: parent.left
200− right: parent.right
201− bottom: contentLoader.bottom
202− bottomMargin: -footerContent.height
203− }
204− height: units.gu(7)
205− visible: false
197+ Loader {
198+ id: footerContent
199+ anchors {
200+ left: parent.left
201+ right: parent.right
202+ bottom: parent.bottom
203+ bottomMargin: -footerContent.height
204+ }
205+ height: units.gu(7)
206+ visible: false
206207
207− sourceComponent: {
208− switch (context) {
209− case "video":
210− return videoControlsComponent;
211− }
212− return undefined;
213− }
214− // eater
215− MouseArea {
216− anchors.fill: parent
208+ sourceComponent: {
209+ switch (context) {
210+ case "video":
211+ return videoControlsComponent;
217212 }
213+ return undefined;
214+ }
215+ // eater
216+ MouseArea {
217+ anchors.fill: parent
218+ }
218219
219− Rectangle {
220− anchors.fill: parent
221− color: root.backgroundColor
222− opacity: 0.85
223− visible: footerContent.status === Loader.Ready
224− }
220+ Rectangle {
221+ anchors.fill: parent
222+ color: root.backgroundColor
223+ opacity: 0.85
224+ visible: footerContent.status === Loader.Ready
225+ }
225226
226− Component {
227− id: videoControlsComponent
228− VideoPlayerControls {
229− id: controls
230− objectName: "videoControls"
227+ Component {
228+ id: videoControlsComponent
229+ VideoPlayerControls {
230+ id: controls
231+ objectName: "videoControls"
231232
232− viewAction: rotationAction.enabled ? rotationAction : fullscreenAction
233− userActions: root.actions
234− iconColor: root.iconColor
235− backgroundColor: root.backgroundColor
233+ viewAction: rotationAction.enabled ? rotationAction : fullscreenAction
234+ userActions: root.actions
235+ iconColor: root.iconColor
236+ backgroundColor: root.backgroundColor
236237
237− mediaPlayer.source: {
238− if (!root.sourceData) return "";
238+ mediaPlayer.source: {
239+ if (!root.sourceData) return "";
239240
240− var source = root.sourceData["source"];
241− if (source.toString().indexOf("video://") === 0) {
242− return source.toString().substr(6);
243− }
244− return source;
245− }
246− mediaPlayer.onPlaybackStateChanged: {
247− controlHideTimer.restart();
241+ var source = root.sourceData["source"];
242+ if (source.toString().indexOf("video://") === 0) {
243+ return source.toString().substr(6);
248244 }
245+ return source;
246+ }
247+ mediaPlayer.onPlaybackStateChanged: {
248+ controlHideTimer.restart();
249+ }
249250
250− Binding {
251− target: priv
252− property: "forceControlsShown"
251+ Binding {
252+ target: priv
253+ property: "forceControlsShown"
253254
254− value: (fullscreen && mediaPlayer.playbackState === MediaPlayer.StoppedState) ||
255− mediaPlayer.playbackState === MediaPlayer.PausedState ||
256− interacting
257− }
255+ value: (fullscreen && mediaPlayer.playbackState === MediaPlayer.StoppedState) ||
256+ mediaPlayer.playbackState === MediaPlayer.PausedState ||
257+ interacting
258+ }
258259
259− onInteractingChanged: {
260− controlHideTimer.restart();
261− }
260+ onInteractingChanged: {
261+ controlHideTimer.restart();
262+ }
262263
263− Binding {
264− target: header
265− property: "title"
266− value: controls.mediaPlayer.metaData.title !== undefined ?
267− controls.mediaPlayer.metaData.title :
268− controls.mediaPlayer.source.toString().replace(/^.*[\\\/]/, '')
269− when: header != null
270− }
264+ Binding {
265+ target: header
266+ property: "title"
267+ value: controls.mediaPlayer.metaData.title !== undefined ?
268+ controls.mediaPlayer.metaData.title :
269+ controls.mediaPlayer.source.toString().replace(/^.*[\\\/]/, '')
270+ when: header != null
271271 }
272272 }
273+ }
273274
274− // If we interact with the bar, reset the hide timer.
275− MouseArea {
276− z: 1
277− anchors.fill: parent
278− onPressed: {
279− mouse.accepted = false
280− if (controlHideTimer.running) controlHideTimer.restart()
281− }
275+ // If we interact with the bar, reset the hide timer.
276+ MouseArea {
277+ z: 1
278+ anchors.fill: parent
279+ onPressed: {
280+ mouse.accepted = false
281+ if (controlHideTimer.running) controlHideTimer.restart()
282282 }
283283 }
284284 }