26 Feb 2011

Add Event Listeners to ‘Play’ and Other Media Events Using Sencha Touch

4 Comments Code Snippets, Programming / Web Development

Recently, I was working on a side-project that involved allowing the user to press play and listen to a sample track from a list of tracks on their iPhone. While this functionality works great when the user is on WiFi, the delay between pressing ‘Play’ and hearing the song on a 3G connection makes the application feel sluggish and non-responsive. My first idea was to add an event listener to the ‘play’ event (or something similar) and show / hide some sort of loading message when the user selects ‘play’. Unfortunately, the Sencha Touch API doesn’t support any such event. However, there is a way around this. Read more