Merge lp:~renatofilho/gallery-app/use-mediaplayer-components into lp:gallery-app

Proposed by Renato Araujo Oliveira Filho
Status: Needs review
Proposed branch: lp:~renatofilho/gallery-app/use-mediaplayer-components
Merge into: lp:gallery-app
Diff against target: 73 lines (+18/-13)
1 file modified
rc/qml/MediaViewer/SingleMediaViewer.qml (+18/-13)
To merge this branch: bzr merge lp:~renatofilho/gallery-app/use-mediaplayer-components
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+242001@code.launchpad.net

Commit message

Make use of MediaPlayer components.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

1112. By Renato Araujo Oliveira Filho

Make use of MediaPlayer components.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/MediaViewer/SingleMediaViewer.qml'
2--- rc/qml/MediaViewer/SingleMediaViewer.qml 2014-10-09 16:08:50 +0000
3+++ rc/qml/MediaViewer/SingleMediaViewer.qml 2014-11-17 17:28:10 +0000
4@@ -15,12 +15,12 @@
5 */
6
7 import QtQuick 2.2
8-import QtMultimedia 5.0
9 import Ubuntu.Components 1.0
10 import Ubuntu.Components.ListItems 1.0 as ListItems
11 import Ubuntu.Components.Popups 1.0
12 import Ubuntu.Content 0.1
13 import Ubuntu.Thumbnailer 0.1
14+import Ubuntu.Components.Extras.MediaPlayer 0.1 as MediaPlayer
15 import Gallery 1.0
16 import "../Components"
17
18@@ -184,11 +184,10 @@
19 visible: viewer.isVideo && video.status == Loader.Ready &&
20 video.item.playbackState !== MediaPlayer.StoppedState
21 onLoaded: {
22- item.source = mediaSource.path;
23- item.play()
24+ item.playUri(mediaSource.path)
25 }
26
27- property bool isPlaying: item && item.playbackState === MediaPlayer.PlayingState
28+ property bool isPlaying: item && item.playing
29 function play() {
30 if (item) {
31 item.play();
32@@ -215,6 +214,7 @@
33
34 MouseArea {
35 anchors.fill: parent
36+ enabled: !video.visible
37 onDoubleClicked: {
38 clickTimer.stop();
39 if (viewer.isVideo) return;
40@@ -233,19 +233,24 @@
41 onTriggered: viewer.clicked()
42 }
43 }
44-
45- MouseArea {
46- anchors.centerIn: parent
47- width: units.gu(10)
48- height: units.gu(10)
49- enabled: viewer.isVideo
50- onClicked: viewer.togglePlayPause()
51- }
52 }
53
54 Component {
55 id: component_video
56- Video { }
57+ MediaPlayer.VideoPlayer {
58+ settingsEnabled: false
59+ onStatusChanged: {
60+ if (status === MediaPlayer.EndOfMedia) {
61+ stop()
62+ controlsActive = true
63+ }
64+ }
65+ onFullscreenModeChanged: {
66+ if (!fullscreenMode) {
67+ //FIXME: go back to list page
68+ }
69+ }
70+ }
71 }
72 }
73 }

Subscribers

People subscribed via source and target branches