On this page

ZegoOrientationMode

ZegoOrientationMode

Orientation mode of the video.

Declared in ZegoExpressDefines.h

Properties

ZegoOrientationModeCustom

ZegoOrientationModeCustom
ZegoOrientationModeCustom=(0)

Custom mode. The default is the custom mode. In this mode, the user needs to set the orientation through [SetAppOrientation], and set the video resolution through [SetVideoConfig] to control the video ratio. The SDK rotates the video at the stream publishing end.

ZegoOrientationModeAdaption

ZegoOrientationModeAdaption
ZegoOrientationModeAdaption=(1)

Player self adaption mode. The video orientation of the stream playing end is automatically vertically upward, and the user of the stream publishing end no longer needs to set the orientation through [SetAppOrientation], and no longer need to set the video resolution to control the video ratio through [SetVideoConfig].

  • Caution: 1. Both the stream publishing end and the stream playing end need to be set to [ZegoOrientationModeAdaption] mode. 2. Media players, cloud recording, local recording, and publish or play streaming scenarios via CDN are not supported. 3. In this mode, the SDK will automatically swap the width and height of the encoding resolution according to the actual orientation of the device.

ZegoOrientationModeAlignment

ZegoOrientationModeAlignment
ZegoOrientationModeAlignment=(2)

Player adapt to pulisher mode. Taking the Status Bar as a reference, the video direction of the stream playing end is the same as the preview video direction of the stream publishing end. The SDK will use the Status Bar as a reference to rotate the image on the stream playing end, and the rotation angle is the same as the rotation angle of the preview on the stream publishing end. Stream publishing end users no longer need to set the orientation through [SetAppOrientation], and no longer need to set the video resolution to control the video ratio through [SetVideoConfig].

  • Caution: 1. Media players, cloud recording, local recording, and publish or play streaming scenarios via CDN are not supported.2. In this mode, the SDK will automatically swap the width and height of the encoding resolution according to the actual position of the Status Bar.

ZegoOrientationModeFixedResolutionRatio

ZegoOrientationModeFixedResolutionRatio
ZegoOrientationModeFixedResolutionRatio=(3)

Fixed resolution ratio mode. Taking the Status Bar as a reference, the video orientation of the stream playing end is the same as the previewed video direction of the stream publishing end, and the video resolution is the same as the encoding resolution. Users of the streaming end no longer need to set the orientation through [SetAppOrientation].

Previous

zegoobjectsegmentationtype

Next

zegoplayermediaevent

On this page

Back to top