Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Playing delay different between iPhone and iPod

Hello,

can someone help me with this problem? There is a difference between playing an mp3 file on an iPhone than on an iPod. I have a button that plays a sound when it is pushed. On the iPod the sound plays instantly, but on the iPhone it takes almost 1 sec. until it plays.

Is there a trick to change that behaviour?

var win = Titanium.UI.createWindow();

var btn = Titanium.UI.createButton({
    width:200,
    height:30
});

win.add(btn);

var sound = Titanium.Media.createSound({
    url:'mp3/birds.mp3'
});

btn.addEventListener('click', function(){
    sound.play();
})


win.open();
— asked May 25th 2010 by Robert Ölei
  • delay
  • mp3
  • sound
0 Comments

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.