@@ -40,6 +40,12 @@ FocusScope {
40 readonly property color backgroundColor: "#1B1B1B"
40 readonly property color backgroundColor: "#1B1B1B"
41 readonly property color iconColor: "#F3F3E7"
41 readonly property color iconColor: "#F3F3E7"
45+ color: root.backgroundColor
43 OrientationHelper {
49 OrientationHelper {
44 id: orientationHelper
50 id: orientationHelper
45 automaticOrientation: fullscreen
51 automaticOrientation: fullscreen
@@ -89,12 +95,6 @@ FocusScope {
89 return undefined;
95 return undefined;
94− color: root.backgroundColor
98 Component {
98 Component {
99 id: videoComponent
99 id: videoComponent
100 VideoPlayer {
100 VideoPlayer {
@@ -144,141 +144,141 @@ FocusScope {
148− Loader {
149+ Loader {
149− id: headerContent
150+ id: headerContent
150− anchors {
151+ anchors {
151− top: contentLoader.top
152+ top: parent.top
152− left: parent.left
153+ left: parent.left
153− right: parent.right
154+ right: parent.right
154− topMargin: -headerContent.height
155+ topMargin: -headerContent.height
156− height: units.gu(6)
157+ height: units.gu(6)
157− visible: false
158+ visible: false
159− // eater
160+ // eater
160− MouseArea {
161+ MouseArea {
161− anchors.fill: parent
162+ anchors.fill: parent
164− Rectangle {
165+ Rectangle {
165− anchors.fill: parent
166+ anchors.fill: parent
166− color: root.backgroundColor
167+ color: root.backgroundColor
167− opacity: 0.85
168+ opacity: 0.85
168− visible: headerContent.status === Loader.Ready
169+ visible: headerContent.status === Loader.Ready
171− active: root.fullscreen
172+ active: root.fullscreen
172− sourceComponent: headerComponent
173+ sourceComponent: headerComponent
174− Component {
175+ Component {
175− id: headerComponent
176+ id: headerComponent
177− MediaServicesHeader {
178+ MediaServicesHeader {
178− iconColor: root.iconColor
179+ iconColor: root.iconColor
179− onGoPrevious: {
180+ onGoPrevious: {
180− rotationAction.checked = false;
181+ rotationAction.checked = false;
181− root.close();
182+ root.close();
186− // If we interact with the bar, reset the hide timer.
187+ // If we interact with the bar, reset the hide timer.
187− MouseArea {
188+ MouseArea {
188− anchors.fill: parent
189+ anchors.fill: parent
189− onPressed: {
190+ onPressed: {
190− mouse.accepted = false
191+ mouse.accepted = false
191− if (controlHideTimer.running) controlHideTimer.restart()
192+ if (controlHideTimer.running) controlHideTimer.restart()
196− Loader {
197+ Loader {
197− id: footerContent
198+ id: footerContent
198− anchors {
199+ anchors {
199− left: parent.left
200+ left: parent.left
200− right: parent.right
201+ right: parent.right
201− bottom: contentLoader.bottom
202+ bottom: parent.bottom
202− bottomMargin: -footerContent.height
203+ bottomMargin: -footerContent.height
204− height: units.gu(7)
205+ height: units.gu(7)
205− visible: false
206+ visible: false
207− sourceComponent: {
208+ sourceComponent: {
208− switch (context) {
209+ switch (context) {
209− case "video":
210+ case "video":
210− return videoControlsComponent;
211+ return videoControlsComponent;
216− anchors.fill: parent
217+ anchors.fill: parent
219− Rectangle {
220+ Rectangle {
220− anchors.fill: parent
221+ anchors.fill: parent
221− color: root.backgroundColor
222+ color: root.backgroundColor
222− opacity: 0.85
223+ opacity: 0.85
223− visible: footerContent.status === Loader.Ready
224+ visible: footerContent.status === Loader.Ready
226− Component {
227+ Component {
227− id: videoControlsComponent
228+ id: videoControlsComponent
228− VideoPlayerControls {
229+ VideoPlayerControls {
229− id: controls
230+ id: controls
230− objectName: "videoControls"
231+ objectName: "videoControls"
232− viewAction: rotationAction.enabled ? rotationAction : fullscreenAction
233+ viewAction: rotationAction.enabled ? rotationAction : fullscreenAction
233− userActions: root.actions
234+ userActions: root.actions
234− iconColor: root.iconColor
235+ iconColor: root.iconColor
235− backgroundColor: root.backgroundColor
236+ backgroundColor: root.backgroundColor
237− mediaPlayer.source: {
238+ mediaPlayer.source: {
238− if (!root.sourceData) return "";
239+ if (!root.sourceData) return "";
240− var source = root.sourceData["source"];
241+ var source = root.sourceData["source"];
241− if (source.toString().indexOf("video://") === 0) {
242+ if (source.toString().indexOf("video://") === 0) {
242− return source.toString().substr(6);
243+ return source.toString().substr(6);
246− mediaPlayer.onPlaybackStateChanged: {
247− controlHideTimer.restart();
247+ mediaPlayer.onPlaybackStateChanged: {
248+ controlHideTimer.restart();
250− Binding {
251+ Binding {
251− target: priv
252+ target: priv
252− property: "forceControlsShown"
253+ property: "forceControlsShown"
254− value: (fullscreen && mediaPlayer.playbackState === MediaPlayer.StoppedState) ||
255+ value: (fullscreen && mediaPlayer.playbackState === MediaPlayer.StoppedState) ||
255− mediaPlayer.playbackState === MediaPlayer.PausedState ||
256+ mediaPlayer.playbackState === MediaPlayer.PausedState ||
256− interacting
257+ interacting
259− onInteractingChanged: {
260+ onInteractingChanged: {
260− controlHideTimer.restart();
261+ controlHideTimer.restart();
263− Binding {
264+ Binding {
264− target: header
265+ target: header
265− property: "title"
266+ property: "title"
266− value: controls.mediaPlayer.metaData.title !== undefined ?
267+ value: controls.mediaPlayer.metaData.title !== undefined ?
267− controls.mediaPlayer.metaData.title :
268+ controls.mediaPlayer.metaData.title :
268− controls.mediaPlayer.source.toString().replace(/^.*[\\\/]/, '')
269+ controls.mediaPlayer.source.toString().replace(/^.*[\\\/]/, '')
269− when: header != null
270+ when: header != null
274− // If we interact with the bar, reset the hide timer.
275+ // If we interact with the bar, reset the hide timer.
275− MouseArea {
276+ MouseArea {
277− anchors.fill: parent
278+ anchors.fill: parent
278− onPressed: {
279+ onPressed: {
279− mouse.accepted = false
280+ mouse.accepted = false
280− if (controlHideTimer.running) controlHideTimer.restart()
281+ if (controlHideTimer.running) controlHideTimer.restart()