0
or -1
means to play the music to the end.YES
: short music track that needs to be looped; NO
(default): normal-length music track0
indicates that the music is played once, 1
twice, and so on.YES
: publish the music played locally to the cloud so that remote users can hear it; NO
(default): play the music locally only and do not publish itpath/to/audio.aac
, the recording file will be in AAC format. Please use a valid path that is readable and writable so that the recording file can be generated successfully.TRTCMixUser
to specify the position of the video image of each channel (userId
).roomId
) of the users (userId
) whose streams are to be mixed. null
means the current room.TRTC_VIDEO_STREAM_TYPE_BIG
, default) or screen sharing stream (TRTC_VIDEO_STREAM_TYPE_SUB
) is mixeduserId
) whose streams are to be mixed-Notes:
-Notes:
appId
. In the TRTC console, find the application you created, and click Application Info to view its ID in the Relayed Live Streaming Info section.bizid
. In the TRTC console, find the application you created, and click Application Info to view its bizid
in the Relayed Live Streaming Info section.-Notes:
TRTCCloudDef.TRTC_VIDEO_RENDER_MODE_FILL
.-Notes:
-Notes: -* - TRTCCloudDef.TRTC_VIDEO_ROTATION_0 (default value): do not rotate -* - TRTCCloudDef.TRTC_VIDEO_ROTATION_90: rotate 90 degrees clockwise -* - TRTCCloudDef.TRTC_VIDEO_ROTATION_180: rotate 180 degrees clockwise -* - TRTCCloudDef.TRTC_VIDEO_ROTATION_270: rotate 270 degrees clockwise
userId
) to enter a room.userId
) in the same room can see one another and make a video call.roomId
or strRoomId
. If both are specified, roomId
will be used.userId
, which functions as the login password for Tencent Cloud servicesAppID
-Value: In the TRTC console, find the application created, and click Application Info to view the bizId
in the Relayed Live Streaming Info section.
-Description: audio bitrate (Kbps) of the transcoded stream -Value: value range: [32,192]. Default value: 64
-Description: number of sound channels of the transcoded stream -Values: valid values: 1 (default value); 2
-Description: audio sample rate (Hz) of the transcoded stream -Value: valid values: 12000, 16000, 22050, 24000, 32000, 44100, 48000 (default value)
-Description: background color of the mixed stream. The default color is black, and the value is a hex number. For example: "0x61B9F1" represents the RGB color (97,158,241). -Value: default value: 0x000000 (black)
-Note: You need to upload the image in Application Management > Function Configuration > Material Management in the console.
You will get an image ID for the image uploaded, which you need to convert to a string before using it as the value of `backgroundImage`.<br>
For example, if the image ID is `63`, you should set `backgroundImage` to `63`.<br>
-Description: Tencent Cloud bizid
-Value: In the TRTC console, find the application created, and click Application Info to view the bizId
in the Relayed Live Streaming Info section.
-Description: position of each channel of image
-Description: transcoding configuration mode
-Description: ID of the live stream pushed to CDN
If you do not set this parameter, the SDK will execute the default logic, that is, it will mix multiple streams in the room into the video stream of the API caller, i.e., A + B => A.
If you set this parameter, the SDK will mix multiple streams in the room into a new stream with the specified ID, i.e., A + B => C.
-Value: default value: null, which indicates that multiple streams in the room are mixed into the video stream of the API caller
-Description: video bitrate (Kbps) of the transcoded stream
-Value: If you set this parameter to 0
, the backend will work out a bitrate based on videoWidth
and videoHeight
. You can also refer to the comment for the enumerated value TRTC_VIDEO_RESOLUTION_640_480
.
-Description: frame rate (fps) of the transcoded stream -Value: value range: (0,30]. default value: 15
-Description: keyframe interval (GOP) of the transcoded stream -Value: value range: [1,8]. default value: 2 (sec)
-Description: video height (px) of the transcoded stream
-Value: 640
is recommended. If audio-only streams are mixed, the mixing result will carry a video stream that shows a canvas background. To avoid this, set both the width and height to 0
.
-Description: video width (px) of the transcoded stream
-Value: 360
is recommended. If audio-only streams are mixed, the mixing result will carry a video stream that shows a canvas background. To avoid this, set both the width and height to 0
.
-Value:
- For mobile live streaming, `false` is recommended.
- For video calls, if you prioritize smoothness, set it to `true`, and the SDK will reduce the resolution (for `TRTCVideoStreamTypeBig` only) if the bandwidth is limited.
- Default value: `false`
-Note: If you need to record a call, before setting this parameter to true
, make sure that resolution adjustment won’t affect the recording quality.
-Value:
-If you are tolerant of stutter but have high requirements on clarity, you can set `minVideoBitrate` to 60% of `videoBitrate`.
-If you prioritize smoothness over clarity, you can set `minVideoBitrate` to 200 Kbps.
-Setting `videoBitrate` and `minVideoBitrate` to the same value will disable the SDK’s automatic bitrate control feature.
- If this parameter is `0` (default value), the SDK will determine the lowest bitrate according to the resolution.
-Notes:
- To avoid blurry or pixelated video, you are not advised to set `minVideoBitrate` too low if the target resolution is high.
For example, if the resolution is set to 720p and the bitrate to 200 Kbps, the encoded video will be heavily pixelated.
-Value: Please refer to the recommended bitrates for different TRTCVideoResolution
values. You may increase the value moderately.
For example, the recommended bitrate for `TRTC_VIDEO_RESOLUTION_1280_720` is 1200 Kbps, but you can set the target bitrate to 1500 Kbps for higher video quality.
-Note: Normally, the SDK encodes streams at the bitrate specified by videoBitrate
, but under poor network conditions, it will reduce the bitrate, whose minimum allowed value is determined by minVideoBitrate
.
If you are tolerant of stutter but have high requirements on clarity, you can set `minVideoBitrate` to 60% of `videoBitrate`.
If you prioritize smoothness over clarity, you can set `minVideoBitrate` to 200 Kbps.
Setting `videoBitrate` and `minVideoBitrate` to the same value will disable the SDK’s automatic bitrate control feature.
-Note: On many Android phones, the front camera does not support a capturing frame rate higher than 15 fps. For some that emphasize beauty filters, the frame rate may be lower than 10 fps.
-Value:
Portrait
for resMode
.Portrait
for resMode
.Landscape
for resMode
.-Notes:
TRTCVideoResolution
supports only landscape resolutions, such as 640 × 360.resMode
to Portrait
. For example, if videoResolution
is 640 × 360
and resMode
is set to Portrait
, the resolution 360 × 640 will be used.Portrait
is recommended for mobile live streaming and Landscape
for live streaming on Windows or macOS.-Note: If videoResolution
is set to 640 × 360
and resMode
to Portrait
, the resolution 360 × 640 will be used for encoding.
Generated using TypeDoc