TRTCVideoLayout class

The Video Layout of the Transcoded Stream

This enum type is used by the On-Cloud MixTranscoding parameter TRTCStreamMixingConfig of the publishing API startPublishMediaStream.

You can use this parameter to specify the position, size, layer, and stream type of each video in the transcoded stream.

Constructors

TRTCVideoLayout({int zOrder = 0, TRTCVideoFillMode fillMode = TRTCVideoFillMode.fill, int backgroundColor = 0, TRTCVideoStreamType fixedVideoStreamType = TRTCVideoStreamType.big, TRTCRect? rect, TRTCUser? fixedVideoUser, Uint8List? placeHolderImage})

Properties

backgroundColor int
  • Description: The background color of the mixed stream.
  • Value: The value must be a hex number. For example, "0x61B9F1" represents the RGB color value (97,158,241). Default value: 0x000000 (black).
  • getter/setter pair
    fillMode TRTCVideoFillMode
  • Description: The rendering mode.
  • Value: The rendering mode may be fill (the image may be stretched or cropped) or fit (there may be black bars). Default value: TRTCVideoFillMode.fill.
  • getter/setter pair
    fixedVideoStreamType TRTCVideoStreamType
  • Description: Whether the video is the primary stream (TRTCVideoStreamType.big) or substream (e TRTCVideoStreamType.sub).
  • getter/setter pair
    fixedVideoUser TRTCUser
  • Description: The users whose streams are transcoded.
  • Note: If you do not specify TRTCUser (userId, intRoomId, strRoomId), the TRTC backend will automatically mix the streams of anchors who are sending audio/video in the room according to the video layout you specify.
  • getter/setter pair
    hashCode int
    The hash code for this object.
    no setterinherited
    placeHolderImage Uint8List
  • Description: The URL of the placeholder image. If a user sends only audio, the image specified by the URL will be mixed during On-Cloud MixTranscoding.
  • Value: This parameter is left empty by default, which means no placeholder image will be used.
  • Note:
    • You need to specify the userId parameter in fixedVideoUser.
    • The URL can be 512 bytes long at most, and the image must not exceed 2 MB.
    • The image can be in PNG, JPG, JPEG, or BMP format. We recommend you use a semitransparent image in PNG format.
  • getter/setter pair
    rect TRTCRect
  • Description: The coordinates (in pixels) of the video.
  • getter/setter pair
    runtimeType Type
    A representation of the runtime type of the object.
    no setterinherited
    zOrder int
  • Description: The layer of the video, which must be unique. Value range: 0-15.
  • getter/setter pair

    Methods

    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    toString() String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited