- voip-room组件先进入的人退出就会卡住其他人的画面,重进也不行?
<block v-for="item in openIdList" :key='item'> <voip-room class="room_item" :openid="item" :device-position="device_position" :mode="selfOpenId == item ? 'camera' : 'video'"> </voip-room> </block> jscode: joinRoom() { uni.showLoading({ title: '正在加载视频会议' }) let that = this uni.login({ success(rData) { console.log(rData) that.$http({ url: 'wxpay/createSign', data: { code: rData.code }, }).then(res => { wx.joinVoIPChat({ muteConfig: { muteMicrophone: that.muteMicrophone }, roomType: 'video', signature: res.data.signature, nonceStr: res.data.nonceStr, timeStamp: res.data.timeStamp, groupId: res.data.groupId, success: function(roomData) { that.openIdList = roomData.openIdList that.subscribeVoIPVideoMembers() that.onVoIPChatMembersChanged() that.onVoIPVideoMembersChanged() uni.hideLoading() console.log(roomData) }, fail: function(roomData) { console.log(roomData) } }) }) }, }) }, // 订阅视频成员, 避免人超过两个显示不了视频. subscribeVoIPVideoMembers() { let that = this wx.subscribeVoIPVideoMembers({ openIdList: that.openIdList, success(res) { console.log('subscribeVoIPVideoMembers ok', res); }, fail(err) { console.log('subscribeVoIPVideoMembers fail', err); } }) }, // 成员变化时修改openid列表; onVoIPChatMembersChanged() { let that = this wx.onVoIPChatMembersChanged((result) => { console.log('member change', result); that.openIdList = result.openIdList; that.subscribeVoIPVideoMembers() that.onVoIPVideoMembersChanged() }) }, // 视频成员变化时重新订阅视频成员 onVoIPVideoMembersChanged() { wx.onVoIPVideoMembersChanged((result) => { wx.subscribeVoIPVideoMembers({ openIdList: result.openIdList, success(res) { console.log('onVoIPVideoMembersChanged ok', res); }, fail(err) { console.log('onVoIPVideoMembersChanged fail', err); } }) }) }
2022-04-25 - ad-custom无法继承父盒子的高度?
<View className={styles.guanggao}> { current == 2 || current == 8 || current == 14 ? ( <ad-custom unit-id="adunit-0e449c987fc00bd0" className={styles.guanggao}></ad-custom> ) : (<Video custom-cache={false} onPause={() => store.stopTime(item, index)} onEnded={() => store.endTime(item, index)} onPlay={() => store.timePlay(item, index)} id={`myVideo${index}`} src={item.video_url[0].url} controls={true} show-fullscreen-btn={false} loop={true} className={styles.video} ></Video>) }</View> 最外层的view已经改了宽高各100%,但是ad-custom并没有继承到高度。单独给ad-custom设置高度也没用。
2021-04-06 - videoContext.play()播放视频,音频已经播放了,但是视频还是未播放的状态?
if (this.videoContext) { this.videoContext.pause() //这里暂停上一个播放的视频 } setTimeout(() => { this.videoContext = Taro.createVideoContext('myVideo' + this.current, this) //这里播放当前视频 this.videoContext.seek(0) this.videoContext.play() }, 100); 播放的方法已经触发了,音频都开始播放了,但是视图还是处于未播放的状态。导致可以再次点击播放按钮播放,最终会出现两个音频同时播放
2021-02-20