Data Types

Last updated: 2020-10-16 18:36:44

AbnormalEvent

Types of exception events that can cause an exceptional experience

Used by actions: DescribeAbnormalEvent.

Name Type Description
AbnormalEventId Integer Exception event ID. For specific values, please see Appendix. Exceptional Experience ID Mapping Table.
PeerId String Remote user ID. If this parameter is left empty, it indicates that the exception event is not caused by the remote user.
Note: this field may return null, indicating that no valid values can be obtained.

AbnormalExperience

Exceptional user experience and possible causes

Used by actions: DescribeAbnormalEvent.

Name Type Description
UserId String User ID
ExperienceId Integer Exceptional experience ID
RoomId String Room ID in string type
AbnormalEventList Array of AbnormalEvent Exception event array
EventTime Integer Report time of the exception event

EncodeParams

Output stream encoding parameters for MCU On-Cloud MixTranscoding

Used by actions: StartMCUMixTranscode.

Name Type Required Description
AudioSampleRate Integer Yes Output stream audio sample rate for stream mix in Hz. Valid values: 48000, 44100, 32000, 24000, 16000, 12000, 8000.
AudioBitrate Integer Yes Output stream audio bitrate in Kbps for On-Cloud MixTranscoding. Value range: [8, 500].
AudioChannels Integer Yes Number of output stream audio sound channels for On-Cloud MixTranscoding. Value range: [1, 2].
VideoWidth Integer No Output stream width in pixels for On-Cloud MixTranscoding, which is required for audio/video output. Value range: [0, 1920].
VideoHeight Integer No Output stream height in pixels for On-Cloud MixTranscoding, which is required for audio/video output. Value range: [0, 1080].
VideoBitrate Integer No Output stream bitrate in Kbps for On-Cloud MixTranscoding, which is required for audio/video output. Value range: [1, 10000].
VideoFramerate Integer No Output stream frame rate for On-Cloud MixTranscoding, which is required for audio/video output. Value range: [6, 12, 15, 24, 30, 48, 60]. If the frame rate lies outside the valid value range, it will be automatically modified to a value within the range.
VideoGop Integer No Output stream GOP in seconds for On-Cloud MixTranscoding, which is required for audio/video output. Value range: [1, 5].
BackgroundColor Integer No Output stream background color for On-Cloud MixTranscoding.
BackgroundImageId Integer No Output stream background image for stream mix. Its value is the ID of image uploaded through the TRTC Console.

EventList

List of SDK or WebRTC events.

Used by actions: DescribeDetailEvent.

Name Type Description
Content Array of EventMessage Data content
PeerId String Sender userId

EventMessage

Event information, including event timestamp and event ID.

Used by actions: DescribeDetailEvent.

Name Type Description
Type Integer Video stream type:
0: non-video event;
2: big image;
3: small image;
7: relayed stream image.
Time Integer Event reporting time in the format of UNIX timestamp, such as 1589891188801ms
EventId Integer Event ID. Events divide into SDK events and WebRTC events. For more information, please see Appendix - Event ID Mapping Table at https://intl.cloud.tencent.com/document/product/647/44916?from_cn_redirect=1
ParamOne Integer First event parameter, such as video resolution width
ParamTwo Integer Second event parameter, such as video resolution height

LayoutParams

MCU On-Cloud MixTranscoding layout parameters

Used by actions: StartMCUMixTranscode.

Name Type Required Description
Template Integer No On-cloud stream mix layout template ID. 0: floating template (default value); 1: grid template; 2: screen sharing template; 3: picture-in-picture template.
MainVideoUserId String No ID of the user in the big image, which takes effect in a screen sharing, floating, or picture-in-picture template.
MainVideoStreamType Integer No Stream type of the big image, which takes effect in a screen sharing, floating, or picture-in-picture template. 0: camera; 1: screen sharing. If a web user's stream is displayed in the big image on the left, enter 0 for this parameter.
SmallVideoLayoutParams SmallVideoLayoutParams No Layout parameter of the small image, which takes effect in a picture-in-picture template.
MainVideoRightAlign Integer No You can set the layout parameter as 1 or 0 in the screen sharing template. 1: big image on the right and small images on the left, 0: big image on the left and small images on the right. The default value is 0.
MixVideoUids Array of String No A user list, which takes effect for floating, grid, or screen sharing templates. When the user list has been set, the stream mix output for users in this user list will include both audio and video; the stream mix output for users not in the list will only include audio. Up to 16 users can be set.

OutputParams

MCU On-Cloud MixTranscoding output parameters

Used by actions: StartMCUMixTranscode.

Name Type Required Description
StreamId String Yes Custom live stream ID, which must be different from the ID of relayed stream.
PureAudioStream Integer No Value range: [0, 1]. If it is 0, live streams are audio and video; if it is 1, live streams are only audio. Default value: 0.
RecordId String No Custom recording file name
RecordAudioOnly Integer No Value range: [0, 1]. If it is 0, the recording template configured in the console will be used; if it is 1, streams are recorded as .mp3 files.

QualityData

Quality data returned by ES

Used by actions: DescribeCallDetail.

Name Type Description
Content Array of TimeValue Data content
UserId String User ID
PeerId String Peer ID. An empty value indicates that the returned data is upstream.
DataType String Data type

RealtimeData

Returned data of seconds-level monitoring

Used by actions: DescribeRealtimeNetwork, DescribeRealtimeQuality, DescribeRealtimeScale.

Name Type Description
Content Array of TimeValue Returned data
DataType String Data type field

RoomState

Room information list

Used by actions: DescribeRoomInformation.

Name Type Description
CommId String Call ID (unique call ID)
RoomString String Room ID of string type
CreateTime Integer Room creation time
DestroyTime Integer Room termination time
IsFinished Boolean Whether the room is terminated
UserId String Room creator ID

ScaleInfomation

Historical scale information

Used by actions: DescribeHistoryScale.

Name Type Description
Time Integer Start time for each day
UserNumber Integer Number of users in room. If a user enters the room for multiple times, the user will be counted as one user.
Note: this field may return null, indicating that no valid values can be obtained.
UserCount Integer Number of room entries. Every time when a user enters the room, it will be counted as one room entry.
Note: this field may return null, indicating that no valid values can be obtained.
RoomNumbers Integer Number of rooms under sdkappid on a day
Note: this field may return null, indicating that no valid values can be obtained.

SmallVideoLayoutParams

Layout parameter of the small image, which takes effect in a picture-in-picture template

Used by actions: StartMCUMixTranscode.

Name Type Required Description
UserId String Yes ID of the user in the small image.
StreamType Integer Yes Stream type of the small image. 0: camera; 1: screen sharing. If a web user's stream is displayed in the small image, enter 0 for this parameter.
ImageWidth Integer No Output width of the small image in pixels. If this parameter is left empty, 0 will be used by default.
ImageHeight Integer No Output height of the small image in pixels. If this parameter is left empty, 0 will be used by default.
LocationX Integer No Output X-axis offset of the small image in pixels. The sum of LocationX and ImageWidth cannot exceed the total width of the output mixed stream. If this parameter is left empty, 0 will be used by default.
LocationY Integer No Output Y-axis offset of the small image in pixels. The sum of LocationY and ImageHeight cannot exceed the total height of the output mixed stream. If this parameter is left empty, 0 will be used by default.

TimeValue

Returned quality data in the format of time:value

Used by actions: DescribeCallDetail, DescribeRealtimeNetwork, DescribeRealtimeQuality, DescribeRealtimeScale.

Name Type Description
Time Integer Time in the format of UNIX timestamp, such as 1590065877s.
Value Float Parameter value returned in the current time. For example, if bigvCapFps is set to 0 when the current time is 1590065877s (UNIX timestamp), the value of this parameter is 0.

UserInformation

User information, including when the user enters/exits a room

Used by actions: DescribeCallDetail.

Name Type Description
RoomStr String Room ID
UserId String User ID
JoinTs Integer The time when the user enters the room
LeaveTs Integer The time when the user exits the room. If the user is still in the room, the current time will be returned
DeviceType String Device type
SdkVersion String SDK version number
ClientIp String Client IP
Finished Boolean Determine whether a user has left the room

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help