我正在使用以下代码播放声音。声音在模拟器上正常工作,但在设备上不起作用。两台设备都运行相同的 iOS 版本。
有没有办法调试这个错误?我怎样才能解决这个问题 ?
var soundLabel = Ti.UI.createView({
backgroundColor:'red',
width:125,
height:40,
top:75,
right:340
});
soundLabel.addEventListener('click',function(e){
var sound = Titanium.Media.createSound();
sound.setUrl("/Sound/"+alphabet+".wav");
alert("HERE");
sound.play();
});