On Android (and most probably the rest of mobile devices) audio can't be play from the Audio object unless it's a result of a direct user touch event. Similar to how popup blocking works. As a result, the phone doesn't play anything.
Even though it seems the user tapping a track should lead to playing that track as a direct action, the promise used in $http in API.getTrack() disconnects the callback from the user touch action.
A workaround is to start playing as the user taps, and change the src once we get the URL for the track.
On Android (and most probably the rest of mobile devices) audio can't be play from the
Audio
object unless it's a result of a direct user touch event. Similar to how popup blocking works. As a result, the phone doesn't play anything.Even though it seems the user tapping a track should lead to playing that track as a direct action, the promise used in
$http
inAPI.getTrack()
disconnects the callback from the user touch action.A workaround is to start playing as the user taps, and change the
src
once we get the URL for the track.