Skip to content

Instantly share code, notes, and snippets.

@ricardoalcocer
Created March 17, 2014 21:18
Show Gist options
  • Save ricardoalcocer/9608552 to your computer and use it in GitHub Desktop.
Save ricardoalcocer/9608552 to your computer and use it in GitHub Desktop.
Test Case: Titanium AudioPlayer for Android - This code fails to return the current song position and the player state
sound = Ti.Media.createAudioPlayer({
url: 'http://www.televisiontunes.com/themesongs/The%20Gadget%20Show.mp3'
});
sound.play();
var tempIntCount = 0;
trackTempInterval = setInterval(function() {
tempIntCount++;
console.log('Current state: ' + sound.state);
console.log('Current position:' + sound.time);
console.log('Current count: ' + tempIntCount);
},1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment