Skip to content

Instantly share code, notes, and snippets.

@FokkeZB
Created May 13, 2013 08:51
Show Gist options
  • Save FokkeZB/5567010 to your computer and use it in GitHub Desktop.
Save FokkeZB/5567010 to your computer and use it in GitHub Desktop.
AudioPlayer states

Just so me and you both know from now on... for some reason:

streamer.addEventListener('change', function (e) {

    // This doesn't work
    if (e.state === Ti.Media.AudioPlayer.STATE_PAUSED) doSomeThing();
    
    // This does:
    if (e.state === this.STATE_PAUSED) doSomeThing();
    
    // Or just go for:
    if (e.description === 'paused') doSomeThing();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment