Skip to content

Commit

Permalink
fix bug: volume settings not work for initial and new songs
Browse files Browse the repository at this point in the history
  • Loading branch information
listen1 committed May 23, 2016
1 parent b9b530b commit 9c2ada6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,9 @@
$scope.volume = 90;
$scope.saveLocalSettings();
}
else {
angularPlayer.adjustVolumeSlider($scope.volume);
}
}

$scope.saveLocalSettings = function() {
Expand Down
2 changes: 2 additions & 0 deletions js/vendor/angular-soundmanager2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4686,6 +4686,7 @@ ngSoundManager.factory('angularPlayer', ['$rootScope', '$log',
if ((bootstrapTrack != null) && (isResume !== true)) {
var angularPlayerObj = this;
var sound = soundManager.getSoundById(trackId);
sound.setVolume(volume);
bootstrapTrack(sound, this.currentTrackData(), function(){
soundManager.play(trackId);
$rootScope.$broadcast('track:id', trackId);
Expand Down Expand Up @@ -4879,6 +4880,7 @@ ngSoundManager.factory('angularPlayer', ['$rootScope', '$log',
}
$rootScope.$broadcast('music:volume', volume);
};
volume = value;
changeVolume(value);
},
clearPlaylist: function(callback) {
Expand Down

0 comments on commit 9c2ada6

Please sign in to comment.