logo
On this page

ZegoCanvas

ZegoCanvas

View object.

Details

Configure view object, view Mode, background color

Declared in ZegoExpressDefines.h

Properties

view

view
nonatomic, strong ZGView * view

View object

viewMode

viewMode
nonatomic, assign ZegoViewMode viewMode

View mode, default is ZegoViewModeAspectFit

backgroundColor

backgroundColor
nonatomic, assign int backgroundColor

Background color, the format is 0xRRGGBB, default is black, which is 0x000000

alphaBlend

alphaBlend
nonatomic, assign BOOL alphaBlend

If enable alpha blend render, default is false.

rotation

rotation
nonatomic, assign int rotation

Rotate the angle counterclockwise, the default is 0. The media player canvas is not supported.

mirror

mirror
nonatomic, assign BOOL mirror

If enable the view mirror, default is false. Only play stream canvas is supported, for publish stream please use [setVideoMirrorMode] interface, for media player please use [enableViewMirror] interface.

viewContext

viewContext
nonatomic, copy NSString * viewContext

Context of view, default is empty string. A utf8 string with a maximum length of 63 bytes or less. Generally no attention is required, it can be used for slitting rendering of mixed stream, to understand the specific use, you need to contact ZEGO technical support.

Methods

canvasWithView

canvasWithView
+ (instancetype)canvasWithView:(ZGView *)view;
Create a ZegoCanvas, default viewMode is ZegoViewModeAspectFit, default background color is black
Declared in ZegoExpressDefines.h

ZegoCanvas instance

initWithView

initWithView
- (instancetype)initWithView:(ZGView *)view;
Create a ZegoCanvas, default viewMode is ZegoViewModeAspectFit, default background color is black
Declared in ZegoExpressDefines.h

ZegoCanvas instance

Previous

zegobroadcastmessageinfo

Next

zegocdnconfig

On this page

Back to top