【发布时间】:2015-03-11 19:07:11
【问题描述】:
每次我调用我的函数来使用 .wav 文件时,我都会收到以下错误:
ERROR: 180: EXCEPTION thrown ('dev!'): -
和
ERROR:> aqsrv> 70: Exception caught in (null) - Error -1
它总是发生在play() 的行中。
它只发生在 IOS - 在 android 上运行良好。
功能:
function sonido() {
var cont=0;
//console.log(arregloDetalles[cont].tVelocidad);
var intervalo=setInterval(function() {
if(bnaddetener==1){
clearInterval(intervalo);
}
if(arregloDetalles[cont].click_clack==1) {
soundclick.play();
} else {
soundclack.play();
console.log("Clack");
}
cont++;
if(cont==arregloDetalles.length) {
banderaclick=1;
cont=0;
}
} ,arregloDetalles[cont].tVelocidad);
}
.wav 文件声明:
var soundclick = Titanium.Media.createSound({
url:'/sonidos/beep-8.wav',
preload:true
});
soundclick.addEventListener('complete', function(e) { soundclick.release(); });
var soundclack = Titanium.Media.createSound({
url:'/sonidos/beep-7.wav',
preload:true
});
soundclack.addEventListener('complete', function(e) { soundclack.release(); });
【问题讨论】:
标签: javascript android ios audio titanium