← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/music-app/use-media-keys into lp:music-app

 

Victor Thompson has proposed merging lp:~vthompson/music-app/use-media-keys into lp:music-app.

Commit message:
* Add media keys

Requested reviews:
  Music App Developers (music-app-dev)
Related bugs:
  Bug #1437483 in Ubuntu Music App: "Music app does not react to bluetooth headset buttons"
  https://bugs.launchpad.net/music-app/+bug/1437483

For more details, see:
https://code.launchpad.net/~vthompson/music-app/use-media-keys/+merge/254468

* Add media keys
-- 
Your team Music App Developers is requested to review the proposed merge of lp:~vthompson/music-app/use-media-keys into lp:music-app.
=== modified file 'music-app.qml'
--- music-app.qml	2015-03-24 02:17:30 +0000
+++ music-app.qml	2015-03-27 22:21:05 +0000
@@ -118,6 +118,19 @@
                 player.shuffle = !player.shuffle
                 break;
             }
+        } else {
+            switch (event.key) {
+            case Qt.Key_MediaPlay:  //   Play   Toggle playing state
+            case Qt.Key_MediaPause:  //  Pause  Toggle playing state
+                player.toggle();
+                break;
+            case Qt.Key_MediaPrev:   //  Prev   Previous Song
+                player.previousSong(true);
+                break;
+            case Qt.Key_MediaNext:  //   Next   Next Song
+                player.nextSong(true, true);
+                break;
+            }
         }
     }
 


Follow ups