TRTCCloud class

Main API class for the TRTC video call feature

Inheritance

Constructors

TRTCCloud()

Properties

hashCode int
The hash code for this object.
no setterinherited
listener ↔ TRTCCloudListenerWrapper?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

callExperimentalAPI(String jsonStr) Future<void>
Call experimental APIs
connectOtherRoom(String param) Future<void>
Request cross-room calls so that two different rooms can share audio and video streams (e.g., "anchor PK" scenarios).
createSubCloud() Future<TRTCCloud>
Create a child TRTC instance (for concurrent viewing in multiple rooms)
destroySubCloud(TRTCCloud cloud) Future<void>
Destroy the child TRTC instance
disconnectOtherRoom() Future<void>
Exit cross-room call
enableAudioVolumeEvaluation(int intervalMs) Future<void>
Enable volume reminder
enableCustomVideoProcess(bool enable) Future<int?>
Enable/DisEnable Custom Video Process
enableEncSmallVideoStream(bool enable, TRTCVideoEncParam smallVideoEncParam) Future<int?>
Enable dual-channel encoding mode for large and small images, which is convenient for users in different network conditions to subscribe to different images
enterRoom(TRTCParams param, int scene) Future<void>
Enter an audio/video call room (hereinafter referred to as "Enter Room").
exitRoom() Future<void>
Exit room
getAudioCaptureVolume() Future<int?>
Get the capturing volume of local audio
getAudioEffectManager() TXAudioEffectManager
Get sound effect management class TXAudioEffectManager, which is used to set the background music, short sound effects and life effects.
getAudioPlayoutVolume() Future<int?>
Get the playback volume of remote audio
getBeautyManager() TXBeautyManager
Get the beauty filter management object, you can modify the beauty, filter, redness and other parameters
getDeviceManager() TXDeviceManager
Get a device management module for managing audio and video related devices such as cameras, microphones, and speakers
getScreenCaptureSources({required int thumbnailWidth, required int thumbnailHeight, required int iconWidth, required int iconHeight}) Future<TRTCScreenCaptureSourceList>
Enumerate shareable screens and windows (this interface only supports Windows)
getSDKVersion() Future<String?>
Get SDK version information
muteAllRemoteAudio(bool mute) Future<void>
Mute/Unmute all users' audio
muteAllRemoteVideoStreams(bool mute) Future<void>
Pause/Resume subscribing to all remote users' video streams
muteLocalAudio(bool mute) Future<void>
Mute/Unmute local audio
muteLocalVideo(bool mute) Future<void>
Pause/Resume pushing local video data
muteRemoteAudio(String userId, bool mute) Future<void>
Mute/Unmute the specified remote user's audio
muteRemoteVideoStream(String userId, bool mute) Future<void>
Pause/Resume subscribing to remote user's video stream
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseScreenCapture() Future<void>
Pause screen sharing
registerListener(ListenerValue func) → void
Set an event listener, through which users can get various status notifications from TRTCCloud
resumeScreenCapture() Future<void>
Resume screen sharing
selectScreenCaptureTarget(TRTCScreenCaptureSourceInfo sourceInfo, TRTCScreenCaptureProperty property, {int captureLeft = 0, int captureTop = 0, int captureRight = 0, int captureBottom = 0}) Future<void>
Select the screen or window you want to share (this interface only supports Windows)
sendCustomCmdMsg(int cmdID, String data, bool reliable, bool ordered) Future<bool?>
Send a customized message to all users in the room using a UDP channel
sendSEIMsg(String data, int repeatCount) Future<bool?>
Use SEI channel to send custom message to all users in room
setAudioCaptureVolume(int volume) Future<void>
Set the capturing volume of local audio
setAudioFrameListener(TRTCAudioFrameListener? listener) Future<void>
Set custom audio data callback
setAudioPlayoutVolume(int volume) Future<void>
Set the playback volume of remote audio
setConsoleEnabled(bool enabled) Future<void>
Enable or disable console log printing
setDefaultStreamRecvMode(bool autoRecvAudio, bool autoRecvVideo) Future<void>
Set audio/video data reception mode, which must be set before room entry for it to take effect
setGSensorMode(int mode) Future<void>
Set the adaptation mode of the G-sensor
setLocalRenderParams(TRTCRenderParams renderParams) Future<void>
Set the rendering mode of local image
setLocalVideoRenderListener(CustomLocalRender param) Future<int?>
Start the custom rendering of local video with external texture
setLogCompressEnabled(bool enabled) Future<void>
Enable or disable local log compression
setLogDirPath(String path) Future<void>
Modify log storage path
setLogLevel(int level) Future<void>
Set log output level
setMixTranscodingConfig(TRTCTranscodingConfig? config) Future<void>
Set the layout and transcoding parameters of On-Cloud MixTranscoding
setNetworkQosParam(TRTCNetworkQosParam param) Future<void>
Set network quality control parameters
setRemoteAudioVolume(String userId, int volume) Future<void>
Set the playback volume of the specified remote user
setRemoteRenderParams(String userId, int streamType, TRTCRenderParams renderParams) Future<void>
Set remote image parameters
setRemoteVideoRenderListener(CustomRemoteRender param) Future<int?>
Set up a custom rendering callback for the remote video. the SDK will skip the original rendering process and callback the received data. you will need to complete the screen rendering yourself at this time.
setRemoteVideoStreamType(String userId, int streamType) Future<int?>
Select whether to view the big or small image of the specified uid
setSystemAudioLoopbackVolume(int volume) Future<void>
Set the volume of system audio capturing
setVideoEncoderMirror(bool mirror) Future<void>
Set the mirror mode of image output by encoder
setVideoEncoderParam(TRTCVideoEncParam param) Future<void>
Set the encoding parameters of video encoder
setVideoEncoderRotation(int rotation) Future<void>
Set the direction of image output by video encoder (i.e., video image viewed by remote user and recorded by server)
setVideoMuteImage(String? assetUrl, int fps) Future<int?>
Set an alternative image for when the local screen is paused to replace the black screen that users see when they enter a room without video streaming
setWatermark(String assetUrl, int streamType, double x, double y, double width) Future<void>
Adds a watermark to the specified location
showDebugView(int showType) Future<void>
Display debug information floats (can display audio/video information and event information)
snapshotVideo(String? userId, int streamType, int sourceType, String path) Future<void>
Screencapture video
startAudioRecording(TRTCAudioRecordingParams param) Future<int?>
Starts audio recording, mixing and recording all current audio into one file.
startLocalAudio(int quality) Future<void>
Enables local microphone capture and publishes the audio stream to the current room with the ability to set the sound quality.
startLocalPreview(bool frontCamera, int? viewId) Future<void>
Enable the local camera to preview the screen, and turn on video push streaming only when enterRoom is called (if it has been called, video push streaming will start automatically)
startLocalRecording(TRTCLocalRecordingParams param) Future<void>
Start local media recording with both audio and video data
startPublishCDNStream(TRTCPublishCDNParam param) Future<void>
Start relaying to the live streaming CDN of another cloud
startPublishing(String streamId, int streamType) Future<void>
Start pushing to Tencent Cloud CSS CDN
startPublishMediaStream({required TRTCPublishTarget target, TRTCStreamEncoderParam? params, TRTCStreamMixingConfig? config}) Future<void>
Publish a stream. After this API is called, the TRTC server will relay the stream of the local user to a CDN (after transcoding or without transcoding), or transcode and publish the stream to a TRTC room.
startRemoteView(String userId, int streamType, int? viewId) Future<void>
Display remote video image or substream and bind the video rendering control at the same time.
startScreenCapture(int streamType, TRTCVideoEncParam encParams, {String shareUserId = '', String shareUserSig = '', String appGroup = ''}) Future<void>
Start desktop screen sharing, grab what's on the user's screen and share it with other users in the same room
startSpeedTestWithParams(TRTCSpeedTestParams params) Future<int?>
Start a speed test (recommended before entering the room)
startSystemAudioLoopback([String path = '']) Future<void>
Enable system audio capturing
stopAllRemoteView() Future<void>
Stop subscribing to all remote users' video streams and release all rendering resources
stopAudioRecording() Future<void>
Stop audio recording
stopLocalAudio() Future<void>
Disable local audio capturing and upstreaming
stopLocalPreview() Future<void>
Stop local video capturing and preview
stopLocalRecording() Future<void>
Stop local media recording
stopPublishCDNStream() Future<void>
Stop relaying to non-Tencent Cloud address
stopPublishing() Future<void>
Stop pushing to Tencent Cloud CSS CDN
stopPublishMediaStream(String taskId) Future<void>
Stop a task initiated by startPublishMediaStream
stopRemoteView(String userId, int streamType) Future<void>
Stop subscribing to remote user's video stream and release rendering control
stopScreenCapture() Future<void>
Stop screen capture
stopSpeedTest() Future<void>
Stop server speed test
stopSystemAudioLoopback() Future<void>
Stop system audio capturing
switchRole(int role) Future<void>
Switch roles (applicable only to the live streaming scenarios TRTCCloudDef.TRTC_APP_SCENE_LIVE and TRTCCloudDef.TRTC_APP_SCENE_VOICE_CHATROOM)
switchRoom(TRTCSwitchRoomConfig config) Future<void>
Switch room. Allows users to quickly switch from one room to another
toString() String
A string representation of this object.
inherited
unRegisterListener(ListenerValue func) → void
Remove message listener
unregisterTexture(int textureID) Future<void>
Unregister custom rendering callbacks
updateLocalView(int viewId) Future<void>
Update the preview image of local video
updatePublishMediaStream({required String taskId, required TRTCPublishTarget target, TRTCStreamEncoderParam? encoderParam, TRTCStreamMixingConfig? mixingConfig}) Future<void>
Modify publishing parameters. You can use this API to change the parameters of a publishing task initiated by startPublishMediaStream
updateRemoteView(String userId, int streamType, int viewId) Future<void>
Update the window of remote video image

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

destroySharedInstance() Future<void>
Terminate a TRTCCloud singleton
getPlatformVersion() Future<String?>
sharedInstance() Future<TRTCCloud?>
Create a TRTCCloud singleton for room entry, preview, push stream, pull stream, etc.