TranscodingUser
Settings for each host involved in transcoding and mixing.
class TranscodingUser {
const TranscodingUser(
{this.uid,
this.x,
this.y,
this.width,
this.height,
this.zOrder,
this.alpha,
this.audioChannel});
@JsonKey(name: 'uid')
final int? uid;
@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: 'audioChannel')
final int? audioChannel;
factory TranscodingUser.fromJson(Map<String, dynamic> json) =>
_$TranscodingUserFromJson(json);
Map<String, dynamic> toJson() => _$TranscodingUserToJson(this);
}
Properties
- uid
- User ID of the host.
- x
- X-coordinate (px) of the host video in the output video, with the top-left corner of the output video as the origin. Value range: [0, width], where
widthis set in LiveTranscoding. - y
- Y-coordinate (px) of the host video in the output video, with the top-left corner of the output video as the origin. Value range: [0, height], where
heightis set in LiveTranscoding. - width
- Width of the host video (px).
- height
- Height of the host video (px).
- zOrder
-
Note:Layer number of the host video. Value range: [0,100].
- If the value is less than 0 or greater than 100, an
errInvalidArgumenterror is returned. - Setting
zOrderto 0 is supported.
- 0: (Default) Video is at the bottom layer.
- 100: Video is at the top layer.
- If the value is less than 0 or greater than 100, an
- alpha
- Transparency of the host video. Value range: [0.0, 1.0].
- 0.0: Fully transparent.
- 1.0: (Default) Fully opaque.
- audioChannel
-
Note: When the value is notAudio channel occupied by the host audio in the output audio. Default is 0. Value range: [0,5]:
0, a special player is required.0: (Recommended) Default audio mixing setting, supports up to stereo, related to the host's upstream audio.1: Host audio in the FL channel of the output audio. If the host's upstream audio is multi-channel, the Agora server mixes it into mono.2: Host audio in the FC channel of the output audio. If the host's upstream audio is multi-channel, the Agora server mixes it into mono.3: Host audio in the FR channel of the output audio. If the host's upstream audio is multi-channel, the Agora server mixes it into mono.4: Host audio in the BL channel of the output audio. If the host's upstream audio is multi-channel, the Agora server mixes it into mono.5: Host audio in the BR channel of the output audio. If the host's upstream audio is multi-channel, the Agora server mixes it into mono.0xFFor values greater than5: The host audio is muted, and the Agora server removes the host's audio.