function PalyMp3(type) {
var mp3 = "";
if (type == "OK") {
mp3 = "ScanOK.mp3";
} else {
mp3 = "ScanNG.mp3";
}
var p = plus.audio.createPlayer("_www/Voice/" + mp3);
p.play(function() {
console.log("播放成功");
//p.close();
//mui.toast("播放成功");
}, function(e) {
console.log("播放失败;" + JSON.stringify(e));
mui.toast(e.message);
});
}
2 个回复
d***@163.com
楼主,这问题有解决吗
d***@163.com
在我这边,一定程度上解决了这个问题
function PalyMp3() {
//index += 1;
var f = "_www/Voice/error1.mp3";
if (mp3player == null)
mp3player = plus.audio.createPlayer(f);
}