VideoLayout
Layout information of a sub video stream in a composite stream.
@JsonSerializable(explicitToJson: true, includeIfNull: false)
class VideoLayout {
const VideoLayout(
{this.channelId,
this.uid,
this.strUid,
this.x,
this.y,
this.width,
this.height,
this.videoState});
@JsonKey(name: 'channelId')
final String? channelId;
@JsonKey(name: 'uid')
final int? uid;
@JsonKey(name: 'strUid')
final String? strUid;
@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: 'videoState')
final int? videoState;
factory VideoLayout.fromJson(Map<String, dynamic> json) =>
_$VideoLayoutFromJson(json);
Map<String, dynamic> toJson() => _$VideoLayoutToJson(this);
}
Properties
- channelId
- Channel name to which the sub video stream belongs.
- uid
- User ID that publishes the sub video stream.
- strUid
- Reserved parameter.
- x
- The x-coordinate (px) of the sub video stream on the composite canvas. That is, the horizontal offset of the top-left corner of the sub video stream relative to the top-left corner (origin) of the composite canvas.
- y
- The y-coordinate (px) of the sub video stream on the composite canvas. That is, the vertical offset of the top-left corner of the sub video stream relative to the top-left corner (origin) of the composite canvas.
- width
- Width of the sub video stream (px).
- height
- Height of the sub video stream (px)
- videoState
- State of the sub video stream on the composite canvas.
- 0: Normal. The video stream is rendered on the composite canvas.
- 1: Placeholder. The video stream has no video frame and is displayed as a placeholder on the composite canvas.
- 2: Black image. The video stream is replaced with a black image.