[TIMOB-527] setTimeout and sound
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | ios, iphone, media, sound |
Reporter | Nolan Wright |
Assignee | Jeff Haynie |
Created | 2011-04-15T02:31:03.000+0000 |
Updated | 2011-04-17T01:53:24.000+0000 |
Description
from community. create and play sound in a set timeout. fire 3 setTimeouts and the sound stops playing after the 3rd time. sound file is attached. fyi - issue does not occur if sound variable is declared outside of setTimeout (i.e., var siren = null;)
var label = Titanium.UI.createLabel({
color: '#fff',
text:'Sound will stop in 3 ...',
textAlign: 'center',
font:{fontSize:20,fontFamily:'Helvetica Neue'}
}); win.add(label);
setTimeout(function(){
var siren= Ti.Media.createSound({url:'airraid.wav'});
siren.play();
}, 1);
setTimeout(function(){ label.text = '2'; }, 1000);
setTimeout(function(){ label.text = '1'; }, 2000);
setTimeout(function(){ label.text = 'Stopped'; }, 3000);
Attachments
File | Date | Size |
---|---|---|
airraid.wav | 2011-04-15T02:31:03.000+0000 | 1611404 |
Not seeing this behavior any longer.