TranscodingUser

Settings for each host participating in the transcoding mix.

export class TranscodingUser {
  uid?: number
  x?: number
  y?: number
  width?: number
  height?: number
  zOrder?: number
  alpha?: number
  audioChannel?: number
}

Properties

uid
User ID of the host.
x
The x-coordinate (px) of the host's video on the output video, with the top-left corner of the output video as the origin. Value range: [0,width], where width is set in LiveTranscoding.
y
The y-coordinate (px) of the host's video on the output video, with the top-left corner of the output video as the origin. Value range: [0,height], where height is set in LiveTranscoding.
width
Width (px) of the host's video.
height
Height (px) of the host's video.
zOrder
Note:
  • If the value is less than 0 or greater than 100, ErrInvalidArgument is returned.
  • Setting zOrder to 0 is supported.
Layer index of the host's video. Value range: [0,100].
  • 0: (Default) Video is at the bottom layer.
  • 100: Video is at the top layer.
alpha
Transparency of the host's video. Value range: [0.0,1.0].
  • 0.0: Fully transparent.
  • 1.0: (Default) Fully opaque.
audioChannel
Note: When the value is not 0, a special player is required.
Audio channel used by the host in the output audio. Default is 0. Value range: [0,5]:
  • 0: (Recommended) Default audio mixing setting. Supports up to stereo, depending on the host's upstream audio.
  • 1: Host audio in the FL channel of the output. If the host's upstream audio is multi-channel, the Agora server mixes it down to mono.
  • 2: Host audio in the FC channel of the output. If the host's upstream audio is multi-channel, the Agora server mixes it down to mono.
  • 3: Host audio in the FR channel of the output. If the host's upstream audio is multi-channel, the Agora server mixes it down to mono.
  • 4: Host audio in the BL channel of the output. If the host's upstream audio is multi-channel, the Agora server mixes it down to mono.
  • 5: Host audio in the BR channel of the output. If the host's upstream audio is multi-channel, the Agora server mixes it down to mono.
  • 0xFF or values greater than 5: The host's audio is muted and removed by the Agora server.