var p=null;
function playVoice(filename){
if ( plus.audio == undefined ) {
mui.toast('Device not ready!',{duration:'long',type:'div'})
} else{
// 播放操作
p = plus.audio.createPlayer("voice/"+filename);
p.play( function () {
//alert( "Audio play success!" );
mui.toast('Audio play success!',{duration:'long',type:'div'})
}, function ( e ) {
//alert( "Audio play failed: " + e.message );
mui.toast("Audio play failed: " + e.message,{duration:'long',type:'div'})
});
}
}
e.message:未知错误
6***@qq.com
这个是对的
2017-03-03 21:26
李世皇朝
的确是对的 正解 打包后 这样搞的 就能运行正常
2018-01-18 23:29