The playback order of tracks within an album was odd, to say the least. Tracks were being skipped over and sometimes the same track could be played many times, and all this while neither Shuffle nor Repeat was active. The problem was not visible when manually changing to next or previous track with the buttons, but only when the tracks were actually played through and the next track was started automatically.
The bug was caused by registering the same callbacks again and again for the same PlayerWrapper instance every time when the playing song changed. Hence, the $scope.next() function got called many times when the track ended.
The playback order of tracks within an album was odd, to say the least. Tracks were being skipped over and sometimes the same track could be played many times, and all this while neither Shuffle nor Repeat was active. The problem was not visible when manually changing to next or previous track with the buttons, but only when the tracks were actually played through and the next track was started automatically.
The bug was caused by registering the same callbacks again and again for the same PlayerWrapper instance every time when the playing song changed. Hence, the $scope.next() function got called many times when the track ended.