iOS | Android | macOS | Windows | Electron | Web |
✓ | ✓ | ✓ | ✓ | ✓ | × |
supportedInterfaceOrientationsForWindow
method in Appdelegate
.- (UIInterfaceOrientationMask)application:(UIApplication *)applicationsupportedInterfaceOrientationsForWindow:(UIWindow *)window{return UIInterfaceOrientationMaskPortrait ;}
screenOrientation
attribute of the activity element to portrait
:<activity android:name=".trtc.TRTCMainActivity" android:launchMode="singleTask" android:windowSoftInputMode="adjustPan"android:screenOrientation="portrait" />
setVideoEncoderParam
API of TRTCCloud
to set video encoding parameters, set resMode
to TRTCVideoResolutionModePortrait
.
Below is the sample code:TRTCVideoEncParam* encParam = [TRTCVideoEncParam new];encParam.videoResolution = TRTCVideoResolution_640_360;encParam.videoBitrate = 600;encParam.videoFps = 15;encParam.resMode = TRTCVideoResolutionModePortrait; // Set the resolution mode to portrait.[trtc setVideoEncoderParam: encParam];
TRTCCloudDef.TRTCVideoEncParam encParam = new TRTCCloudDef.TRTCVideoEncParam();encParam.videoResolution = TRTCCloudDef.TRTC_VIDEO_RESOLUTION_640_360;encParam.videoBitrate = 600;encParam.videoFps = 15;encParam.videoResolutionMode = TRTCCloudDef.TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT; //Set the resolution mode to portrait.trtc.setVideoEncoderParam(encParam);
resMode
in TRTCVideoEncParam
in step 2,TRTCVideoResolutionModeLandscape
.TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE
.API | Description | Remarks |
setLocalViewRotation | Set the clockwise rotation of the local image preview | Rotate 90, 180, or 270 degrees clockwise |
setLocalViewFillMode | Set the rendering mode of the local image preview | Crop the image or fill the blank space with black bars |
setRemoteViewRotation | Set the clockwise rotation of remote video images | Rotate 90, 180, or 270 degrees clockwise |
setRemoteViewFillMode | Set the rendering mode of remote video images | Crop the image or fill the blank space with black bars |
setVideoEncoderRotation | Set the clockwise rotation of encoded images | Rotate 90, 180, or 270 degrees clockwise |
setGSensorMode
API of TRTCCloud
.
Was this page helpful?