小程序
小游戏
企业微信
微信支付
扫描小程序码分享
scope.camera、scope.record已授权,调用wx.joinVoIPChat接口成功后把获取到的openIdList 绑定到voip-room组件上,但是前台页面是空白,不显示任何信息。
scope.camera
scope.record已授权,调用
接口成功后把获取到的
可以语音聊天,怎么能显示同房间的视频?
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
小程序语音聊天功能,需要申请什么类目
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
你怎么做的语音聊天,能分享下不,我这边老是不成功
nonceStr: nonceStr, //验证所需的随机字符串
timeStamp: timeStamp, //验证所需的时间戳
groupId: groupId, //房间id
muteConfig: {
muteMicrophone: false,
muteEarphone: false
},
success(res) {
page.setData({
openIdList: res.openIdList
})
fail(res) {
console.log('fail', res)
complete(res) {
}
} else { //w网络请求失败
<voip-room
openid="{{item}}"
mode="{{selfOpenId === item ? 'camera' : 'video'}}"
binderror="onErr"
></voip-room>
onLoad: function (options) {
const page = this;
var groupId = '100001001';
var nonceStr = (Math.random().toString(16).substring(2) + Math.random().toString(16).substring(2)).substring(0, 16);
var timeStamp = parseInt((new Date()).valueOf() / 1000);
api.getSignature(nonceStr, timeStamp, groupId, app.globalData.apiToken, function (res) {
if (res.statusCode == 200) {
var signature = res.data;
wx.joinVoIPChat({
roomType: 'video', //房间类型 video
signature: signature, //签名
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
小程序语音聊天功能,需要申请什么类目
你怎么做的语音聊天,能分享下不,我这边老是不成功
nonceStr: nonceStr, //验证所需的随机字符串timeStamp: timeStamp, //验证所需的时间戳groupId: groupId, //房间idmuteConfig: {muteMicrophone: false,muteEarphone: false},success(res) {page.setData({openIdList: res.openIdList})},fail(res) {console.log('fail', res)},complete(res) {}})} else { //w网络请求失败}})}<voip-roomopenid="{{item}}"mode="{{selfOpenId === item ? 'camera' : 'video'}}"binderror="onErr"></voip-room>onLoad: function (options) {const page = this;var groupId = '100001001';var nonceStr = (Math.random().toString(16).substring(2) + Math.random().toString(16).substring(2)).substring(0, 16);var timeStamp = parseInt((new Date()).valueOf() / 1000);api.getSignature(nonceStr, timeStamp, groupId, app.globalData.apiToken, function (res) {if (res.statusCode == 200) {var signature = res.data;wx.joinVoIPChat({roomType: 'video', //房间类型 videosignature: signature, //签名nonceStr: nonceStr, //验证所需的随机字符串