修复与PC端连麦画面会拉升放大的问题

This commit is contained in:
zlzw 2023-01-29 16:48:29 +08:00
parent c1aeaa0e1b
commit 344bbcdfc8

View File

@ -83,6 +83,7 @@ import cn.rongcloud.rtc.base.RCRTCRoomType;
import cn.rongcloud.rtc.base.RCRTCStreamType;
import cn.rongcloud.rtc.base.RTCErrorCode;
import cn.rongcloud.rtc.center.stream.RCRTCAudioInputStreamImpl;
import cn.rongcloud.rtc.core.RendererCommon;
public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
@ -891,7 +892,8 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
RCRTCVideoView remoteView = new RCRTCVideoView(contexts);
((RCRTCVideoInputStream) stream).setVideoView(remoteView);
//todo 本demo只演示添加1个远端用户的视图
remoteView.setScalingType(SCALE_ASPECT_FILL);
remoteView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
remoteView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT);
ry_view.addView(remoteView);
Log.e("ry", stream.getMediaType() + "rcrtcOtherRoom成功 " + data.getLiveStreams().size());
}
@ -1072,7 +1074,8 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
});
//todo 本demo只演示添加1个远端用户的视图
ry_view.removeAllViews();
remoteView.setScalingType(SCALE_ASPECT_FILL);
remoteView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
remoteView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT);
ry_view.addView(remoteView);
}
userinputStreamList1.add(stream);