possan/webapi-player-example — pull request #10 by JMPerez (2014-10-03 06:57:49+00:00)
Title: Make it work on Android phones

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.