We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d5a96c + 4b42fc2 commit 87928f7Copy full SHA for 87928f7
app/public/js/player/playerCtrl.js
@@ -45,11 +45,7 @@ app.controller('PlayerCtrl', function (
45
};
46
47
$scope.playPause = function ($event) {
48
- if ($rootScope.isSongPlaying) {
49
- playerService.pauseSong();
50
- } else {
51
- playerService.playSong();
52
- }
+ togglePlayPause();
53
54
55
$scope.prevSong = function ($event) {
@@ -149,7 +145,9 @@ app.controller('PlayerCtrl', function (
149
145
* the amount of times we define it.
150
146
*/
151
147
var togglePlayPause = function () {
152
148
+ var track = queueService.getTrack();
+
+ if ($rootScope.isSongPlaying || track == null) {
153
playerService.pauseSong();
154
} else {
155
playerService.playSong();
0 commit comments