我使用Quickblox进行视频通话
一切都很好,但在onRemoteVideoTrackReceive之后,localview位于对手视图之下。因此,用户不会查看自己的视频,只能查看对手视图
我的代码:
@Override
public void onLocalVideoTrackReceive(BaseSession baseSession, QBRTCVideoTrack qbrtcVideoTrack) {
Log.i("errorCheck","inVideo 999");
localVideoTrack = qbrtcVideoTrack;
mediaStreamManager = baseSession.getMediaStreamManager();
qbrtcVideoTrack.addRenderer(new VideoRenderer(localView));
}
@Override
public void onRemoteVideoTrackReceive(BaseSession baseSession, QBRTCVideoTrack qbrtcVideoTrack, Integer integer) {
Log.i("errorCheck","inVideo 888");
Log.i("errorCheck","inVideo 888 = "+localVideoTrack);
mediaStreamManager = baseSession.getMediaStreamManager();
qbrtcVideoTrack.addRenderer(new VideoRenderer(opponentView));
localVideoTrack.removeRenderer(localVideoTrack.getRenderer());
localVideoTrack.addRenderer(new VideoRenderer(localView));
localView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FILL);
localView.setMirror(true);
localView.requestLayout();
}