when
在 artyom 中设置所有可用的捕获器
获取所有artyom中的错误
let artyom = new Artyom();
//All catchable artyom errors will be catched with this
artyom.when("ERROR",function(error){
if(error.code == "network"){
alert("An error ocurred, artyom cannot work without internet connection !");
}
if(error.code == "audio-capture"){
alert("An error ocurred, artyom cannot work without a microphone");
}
if(error.code == "not-allowed"){
alert("An error ocurred, it seems the access to your microphone is denied");
}
console.log(error.message);
});处理其他事件
Last updated
Was this helpful?