报错:Object {errCode: -1000, errMsg: "joinVoIPChat:fail: -10088, -10, join room failed. errType: 4, errCode: -12020, errMsg: invalid signature, -1"}
语音能力已开通,实在不理解问题出在哪了,麻烦官方帮忙看看
//后端签名
var str = [appId, groupId, nonceStr, timeStamp].sort().join('')
var hash = CryptoJS.HmacSHA256(str, session_key)
signature = CryptoJS.enc.Hex.stringify(hash)
var data = { Signature: signature, NonceStr: room.NonceStr, TimeStamp: room.TimeStamp, GroupId: room.GroupId }
//前端调用
wx.joinVoIPChat({
roomType:"voice",
signature:data.Signature,
nonceStr:data.NonceStr,
timeStamp:data.TimeStamp,
groupId:data.GroupId,
success(res){
console.log("加入语音房间成功",res)
Tool.OpenRecord()
},
fail(err){
console.log("加入语音房间失败",err)
}
})
自己解决了,时间戳必须精确到秒,精确到毫秒了
在哪引入啊?还是自己写呢