Merge lp:~renatofilho/mediaplayer-app/show-controls-at-end into lp:mediaplayer-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 68
Merged at revision: 67
Proposed branch: lp:~renatofilho/mediaplayer-app/show-controls-at-end
Merge into: lp:mediaplayer-app
Diff against target: 60 lines (+31/-0)
3 files modified
src/qml/player.qml (+9/-0)
src/qml/player/VideoPlayer.qml (+1/-0)
tests/autopilot/mediaplayer_app/tests/test_player_with_video.py (+21/-0)
To merge this branch: bzr merge lp:~renatofilho/mediaplayer-app/show-controls-at-end
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+156412@code.launchpad.net

Commit message

Force the controls to became visible at the end of the video.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
68. By Renato Araujo Oliveira Filho

Added autopilot test for controls appear in the end of the movie.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good and works as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/player.qml'
2--- src/qml/player.qml 2013-02-26 21:01:23 +0000
3+++ src/qml/player.qml 2013-04-01 22:20:29 +0000
4@@ -133,6 +133,15 @@
5 ]
6 }
7
8+ Connections {
9+ target: playerLoader.item
10+ onStatusChanged: {
11+ if (playerLoader.item.status === MediaPlayer.EndOfMedia) {
12+ playerLoader.item.controlsActive = true
13+ }
14+ }
15+ }
16+
17 HUD.HUD {
18 applicationIdentifier: "media-player" // this must match the .desktop file!
19 HUD.Context {
20
21=== modified file 'src/qml/player/VideoPlayer.qml'
22--- src/qml/player/VideoPlayer.qml 2013-02-21 20:39:19 +0000
23+++ src/qml/player/VideoPlayer.qml 2013-04-01 22:20:29 +0000
24@@ -32,6 +32,7 @@
25 property bool wasPlaying: false
26 property string uri
27 property bool rotating: false
28+ property alias controlsActive: _controls.active
29
30 signal timeClicked
31
32
33=== modified file 'tests/autopilot/mediaplayer_app/tests/test_player_with_video.py'
34--- tests/autopilot/mediaplayer_app/tests/test_player_with_video.py 2013-03-21 19:11:38 +0000
35+++ tests/autopilot/mediaplayer_app/tests/test_player_with_video.py 2013-04-01 22:20:29 +0000
36@@ -144,6 +144,27 @@
37 self.assertEqual(time_label.text[0:9], "- 00:00:0")
38
39
40+ def test_show_controls_at_end(self):
41+ self.show_controls()
42+ time_line = self.main_window.get_object("Slider", "TimeLine.Slider")
43+
44+ """ Seek to the midle of the video """
45+ self.mouse.move_to_object(time_line)
46+ self.mouse.click()
47+
48+ """ hide controls """
49+ video_area = self.main_window.get_object("VideoPlayer", "player")
50+ self.mouse.move_to_object(video_area)
51+ self.mouse.click()
52+
53+ """ wait for video ends and control appears"""
54+ controls = self.main_window.get_object("Controls", "controls")
55+ self.assertProperty(controls, visible=False)
56+ self.assertThat(controls.visible, Eventually(Equals(True)))
57+
58+
59+
60+
61
62
63

Subscribers

People subscribed via source and target branches