Migrating from 3.4.2 to 3.7.0, CreateRendererView has been deprecated thus we update it using the plain SurfaceView
Old code
SurfaceView surface = RtcEngine.CreateRendererView(this);
surface.setZOrderOnTop(true);
rtcEngine().setupLocalVideo(new VideoCanvas(surface, VideoCanvas.RENDER_MODE_FILL, 0));
mLocalPreview.addView(surface);
New code
SurfaceView surface = new SurfaceView(this);
surface.setZOrderOnTop(true);
rtcEngine().setupLocalVideo(new VideoCanvas(surface, VideoCanvas.RENDER_MODE_FIT, 0));
mLocalPreview.addView(surface, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
The issue is the local video is now always landscape but its rendered remote is fine.
This is the configuration,
public static final VideoEncoderConfiguration.VideoDimensions[] VIDEO_DIMENSIONS = new VideoEncoderConfiguration.VideoDimensions[] {
VideoEncoderConfiguration.VD_320x240,
VideoEncoderConfiguration.VD_480x360,
VideoEncoderConfiguration.VD_640x360,
VideoEncoderConfiguration.VD_640x480,
VideoEncoderConfiguration.VD_840x480,
VideoEncoderConfiguration.VD_960x720,
new VideoEncoderConfiguration.VideoDimensions(960, 540),
VideoEncoderConfiguration.VD_1280x720
};
public static final int DEFAULT_PROFILE_IDX = 7;
rtcEngine().setVideoEncoderConfiguration(new VideoEncoderConfiguration(
AgoraConstants.VIDEO_DIMENSIONS[AgoraConstants.DEFAULT_PROFILE_IDX],
VideoEncoderConfiguration.FRAME_RATE.FRAME_RATE_FPS_30,
VideoEncoderConfiguration.STANDARD_BITRATE,
VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_FIXED_PORTRAIT
));

Migrating from 3.4.2 to 3.7.0,
CreateRendererViewhas been deprecated thus we update it using the plainSurfaceViewOld code
New code
The issue is the local video is now always landscape but its rendered remote is fine.
This is the configuration,