Merge lp:~renatofilho/mediaplayer-app/no-fullscreen into lp:mediaplayer-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Bill Filler
Approved revision: 191
Merged at revision: 190
Proposed branch: lp:~renatofilho/mediaplayer-app/no-fullscreen
Merge into: lp:mediaplayer-app
Diff against target: 80 lines (+17/-2)
4 files modified
src/mediaplayer.cpp (+9/-0)
src/mediaplayer.h (+2/-0)
src/qml/player.qml (+1/-0)
src/qml/player/VideoPlayer.qml (+5/-2)
To merge this branch: bzr merge lp:~renatofilho/mediaplayer-app/no-fullscreen
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Bill Filler (community) Approve
Review via email: mp+199823@code.launchpad.net

Commit message

Disabled fullscreen as default mode.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
185. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

186. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

187. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

188. By Launchpad Translations on behalf of phablet-team

Launchpad automatic translations update.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
189. By Renato Araujo Oliveira Filho

clicking/tap anywhere in the scrubber should cause seek directly to that position where you clicked.

Approved by Bill Filler, PS Jenkins bot.

Revision history for this message
Bill Filler (bfiller) wrote :

this needs fixing. it works on the desktop (doesn't launch in fullscreen) but on the phone it no longer launches in fullscreen either (you see the indicator panel and you are not supposed to).

Since we are going to have the deb and desktop file for the 14.04 desktop version and a click package for the devices, maybe you can make the click package exec line have a --fullscreen arg passed to it and don't pass this arg in the desktop file? Then the app would just honor the value of the argument passed in

review: Needs Fixing
190. By Renato Araujo Oliveira Filho

Used "DESKTOP_MODE" enviroment variable to controll full screen behaviour.
Do not use full screen as default mode on desktop.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:190
http://jenkins.qa.ubuntu.com/job/mediaplayer-app-ci/160/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/2040
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/1947/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-trusty-amd64-ci/16
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-trusty-armhf-ci/16
        deb: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-trusty-armhf-ci/16/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mediaplayer-app-trusty-i386-ci/16
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/1788
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/2040
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/2040/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/1947
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/1947/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/4421/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/2767

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mediaplayer-app-ci/160/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

Can we add a check for desktop mode also in the active signal so that the video doesn't get suspended when losing focus on the desktop?

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
191. By Renato Araujo Oliveira Filho

Avoid pause the video when the application lost focus on desktop mode.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works with and without env var set

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mediaplayer.cpp'
2--- src/mediaplayer.cpp 2013-09-30 21:41:19 +0000
3+++ src/mediaplayer.cpp 2014-01-07 17:29:56 +0000
4@@ -53,6 +53,9 @@
5 bool windowed = args.removeAll("-w") + args.removeAll("--windowed") > 0;
6 bool testability = args.removeAll("-testability") > 0;
7
8+ // use windowed in desktop as default
9+ windowed = windowed || isDesktopMode();
10+
11 // The testability driver is only loaded by QApplication but not by
12 // QGuiApplication.
13 // However, QApplication depends on QWidget which would add some
14@@ -104,6 +107,7 @@
15 }
16 }
17
18+ m_view->rootContext()->setContextProperty("mpApplication", this);
19 m_view->rootContext()->setContextProperty("playUri", playUri);
20 m_view->rootContext()->setContextProperty("screenWidth", m_view->size().width());
21 m_view->rootContext()->setContextProperty("screenHeight", m_view->size().height());
22@@ -158,3 +162,8 @@
23 {
24 m_view->rootContext()->setContextProperty("screenHeight", height);
25 }
26+
27+bool MediaPlayer::isDesktopMode() const
28+{
29+ return (qEnvironmentVariableIsSet("DESKTOP_MODE") && (qgetenv("DESKTOP_MODE") == "1"));
30+}
31
32=== modified file 'src/mediaplayer.h'
33--- src/mediaplayer.h 2013-02-12 14:30:57 +0000
34+++ src/mediaplayer.h 2014-01-07 17:29:56 +0000
35@@ -23,6 +23,7 @@
36 class MediaPlayer : public QGuiApplication
37 {
38 Q_OBJECT
39+ Q_PROPERTY(bool desktopMode READ isDesktopMode)
40
41 public:
42 MediaPlayer(int &argc, char **argv);
43@@ -34,6 +35,7 @@
44 void toggleFullscreen();
45 void onWidthChanged(int);
46 void onHeightChanged(int);
47+ bool isDesktopMode() const;
48
49 private:
50 QQuickView *m_view;
51
52=== modified file 'src/qml/player.qml'
53--- src/qml/player.qml 2013-10-21 11:47:18 +0000
54+++ src/qml/player.qml 2014-01-07 17:29:56 +0000
55@@ -40,6 +40,7 @@
56
57 onAppActiveChanged: {
58 if (!appActive &&
59+ !mpApplication.desktopMode &&
60 playerLoader.item &&
61 playerLoader.item.playing) {
62 playerLoader.item.pause()
63
64=== modified file 'src/qml/player/VideoPlayer.qml'
65--- src/qml/player/VideoPlayer.qml 2013-09-25 23:04:03 +0000
66+++ src/qml/player/VideoPlayer.qml 2014-01-07 17:29:56 +0000
67@@ -115,8 +115,11 @@
68 onPlaybackClicked: player.playPause()
69
70 onFullscreenClicked: {
71- //TODO: wait for shell supports fullscreen
72- Qt.quit()
73+ if (mpApplication.desktopMode) {
74+ mpApplication.toggleFullscreen()
75+ } else {
76+ Qt.quit()
77+ }
78 }
79
80 onSeekRequested: {

Subscribers

People subscribed via source and target branches