mlvb-live-room按照demo创建房间后没有视频,退出房间失败?
mlvb-live-room
按照demo创建房间
let roomName = self.data.ubdetail.business_title + self.data.ubdetail.ubid
var url = 'room?type=create&roomName=' + roomName + '&userName=' + self.data.userinfo.nickname + '&pureAudio=' + self.data.pureAudio + '&roomID=' + self.data.ubdetail.ubid;
wx.redirectTo({
url: url
});
wx.showToast({
title: '进入房间',
icon: 'success',
duration: 1000
})
self.setData({ 'tapTime': nowTime });
控制台提示:获取推流地址成功,
进入后按照demo的写法,mlvb-live-room.start(),控制台打印组件的房间号为2
但是只有个背景图,视频不出来。
按返回键退出房间后,提示:
退出推流失败:delete pusher need room id,but not in body
减少观众请求失败:
del audience need room id,but not in body
明明组件是带房间号的啊。
另外demo里创建房间为什么没写房间号?
if (role == 'audience') {
self.setData({
roomID: options.roomID,
roomName: options.roomName,
userName: options.userName,
role: role,
showLiveRoom: true
}, function () {
self.start();
})
} else {
self.setData({
roomName: options.roomName,
userName: options.userName,
pureAudio: JSON.parse(options.pureAudio),
role: role,
showLiveRoom: true
}, function () {
console.log('======> page data: ', self.data)
self.start();
})
}