Skip to content

Commit

Permalink
Merge pull request #36 from jamiewq/master
Browse files Browse the repository at this point in the history
stop sounds before reading metadata
  • Loading branch information
jamiewq authored Apr 27, 2017
2 parents 34b5114 + 3488521 commit 1b149de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/app/views/play/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ angular.module('myApp.play', ['ngRoute'])
utility.get_score(score_id)
.then(function(response) {
if(response.metaInfo == null) {
alert(display.show('Fail: Get the musicScore'));
// alert(display.show('Fail: Get the musicScore'));
}
else {
$scope.score_meta = response.metaInfo;
Expand All @@ -55,7 +55,7 @@ angular.module('myApp.play', ['ngRoute'])
meta_info_text.push(prop + ". " + $scope.score_meta[i][prop]);
}
}

utility.stop_all_sounds();
play([config.api.fetch_mp3 + $scope.score_meta.mp3]);

$scope.score_content = response.scoreContent;
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/views/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ angular.module('myApp.search', ['ngRoute'])
.then(function(response) {
if (response !== null) {
$scope.searchList = response;
debugger
if($scope.searchList.length > 0) {
$scope.selected = 0;
utility.stop_all_sounds();
var sound = new Howl({
src: [config.api.fetch_mp3 + $scope.searchList[$scope.selected].title_mp3],
preload: true,
Expand Down

0 comments on commit 1b149de

Please sign in to comment.