TranscodingVideoStream

The video streams for local video mixing.

@JsonSerializable(explicitToJson: true, includeIfNull: false)
class TranscodingVideoStream {
  const TranscodingVideoStream(
      {this.sourceType,
      this.remoteUserUid,
      this.imageUrl,
      this.mediaPlayerId,
      this.x,
      this.y,
      this.width,
      this.height,
      this.zOrder,
      this.alpha,
      this.mirror});

  @JsonKey(name: 'sourceType')
  final VideoSourceType? sourceType;

  @JsonKey(name: 'remoteUserUid')
  final int? remoteUserUid;

  @JsonKey(name: 'imageUrl')
  final String? imageUrl;

  @JsonKey(name: 'mediaPlayerId')
  final int? mediaPlayerId;

  @JsonKey(name: 'x')
  final int? x;

  @JsonKey(name: 'y')
  final int? y;

  @JsonKey(name: 'width')
  final int? width;

  @JsonKey(name: 'height')
  final int? height;

  @JsonKey(name: 'zOrder')
  final int? zOrder;

  @JsonKey(name: 'alpha')
  final double? alpha;

  @JsonKey(name: 'mirror')
  final bool? mirror;

  factory TranscodingVideoStream.fromJson(Map<String, dynamic> json) =>
      _$TranscodingVideoStreamFromJson(json);

  Map<String, dynamic> toJson() => _$TranscodingVideoStreamToJson(this);
}

Attributes

sourceType
The video source type for local video mixing. See VideoSourceType.
remoteUserUid

The user ID of the remote user.

Attention: Use this parameter only when the source type is videoSourceRemote for local video mixing.
imageUrl
The URL of the image.
Attention: Use this parameter only when the source type is the image for local video mixing.
mediaPlayerId
(Optional) Media player ID. Use the parameter only when you set sourceType to videoSourceMediaPlayer.
x
The relative lateral displacement of the top left corner of the video for local video mixing to the origin (the top left corner of the canvas).
y
The relative longitudinal displacement of the top left corner of the captured video to the origin (the top left corner of the canvas).
width
The width (px) of the video for local video mixing on the canvas.
height
The height (px) of the video for local video mixing on the canvas.
zOrder
The number of the layer to which the video for the local video mixing belongs. The value range is [0, 100].
  • 0: (Default) The layer is at the bottom.
  • 100: The layer is at the top.
alpha
The transparency of the video for local video mixing. The value range is [0.0, 1.0]. 0.0 indicates that the video is completely transparent, and 1.0 indicates that it is opaque.
mirror
Whether to mirror the video for the local video mixing.
  • true: Mirror the video for the local video mixing.
  • false: (Default) Do not mirror the video for the local video mixing.
Attention: This parameter only takes effect on video source types that are cameras.