let innerAudioContext = null
innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
innerAudioContext.src = encodeURI(sessionStorage.getItem("audioUrl")) ;
jweixin.config({});// 不做任何签名验证都可以
jweixin.ready(function(){
WeixinJSBridge.invoke('getNetworkType', {}, function(e){
innerAudioContext.play()
innerAudioContext.onPlay(() => {
});
innerAudioContext.onEnded(() => {
// alert("!11")
that.hiddenLoading()
innerAudioContext.destroy()
})
innerAudioContext.onError((res) => {
alert(res)
console.log(res.errMsg);
console.log(res.errCode);
});
})
})
1***@qq.com
- 发布:2022-01-15 21:18
- 更新:2022-01-17 23:41
- 阅读:450
1 个回复
小枫叶 - 外包接单加v:wlmk1234567 注明来意
代码不全啊,提供个完整可以复现的demo