Please make sure that the two devices use different
UserID values when running the demo, as TRTC does not support using the same
UserID on two devices simultaneously, unless different
SDKAppID values are used.
Please specify the
TRTCAppScene parameter in
VideoCall mode is optimized for video calls, so when there is only one user in the room, the video image will maintain a low bitrate and frame rate to reduce network traffic usage, which will look lagging and blurry.
This may be because that room permission control has been enabled. Once room permission control is enabled, all rooms under the current
SDKAppID can be entered only after
privateMapKey is set in
TRTCParamEnc, so if your online business is in operation and the relevant logic of
privateMapKey has not been added to it, please do not enable this feature. For more information, please see Configuring Permission for Entering Room.
TRTC logs are compressed and encrypted by default in the
.xlog extension. You can set
setLogCompressEnabled to specify whether to encrypt logs. If the generated log filename contains
C (compressed), the log is compressed and encrypted; if it contains
R (raw), the log is in plaintext.
debugattribute of the <live-pusher> and <live-player> tags and use vConsole to log the printed information
- You need to download the decryption tool to view a .xlog file. Place the tool in the same directory of the .xlog file in Python 2.7 and directly run
python decode_mars_log_file.pyto launch the tool.
- Download address of log decryption tool:
If "Join room failed result: 10006 error: service is suspended,if charge is overdue,renew it" is displayed, please check whether your TRTC application service is available.
Log in to the TRTC Console, click the application you created, click Account Info, and you can view the service status in the account information tab.
This error is due to a
UserSig verification failure, which may be caused by the following:
SDKAppIDparameter passed in is incorrect. You can log in to the TRTC Console, select Application Management, and view the corresponding
UserSigpassed in for the
UserIDparameter is incorrect. You can log in to the TRTC Console and select Development Assistance > UserSig Generation & Verification to verify the
connectOtherRoom API can be used. After calling
connectOtherRoom(), the anchors can get the cross-room competition result through the
onConnectOtherRoom callback. All users in the room of anchor A/B will receive the notification of anchor B/A's room entry through the
exitRoom() API is called, the logic related to room exit will be executed, such as releasing resources of audio/video devices and codecs. Release of hardware devices is an async operation. After resources are released, the SDK will use the
onExitRoom() callback in
TRTCCloudListener to notify the upper layer. If you want to call
enterRoom() again or switch to another audio/video SDK, please do so after receiving the
No matter whether room entry is successful,
enterRoom must be used together with
enterRoom is called again before
exitRoom is called, an unexpected error will occur.
You can solve this problem by setting
TRTCVideoFillMode_Fill (fill mode). The video rendering modes of TRTC include fill and fit. You can set the rendering mode of the local or remote image through
The locally captured image is horizontally reversed by default, which can be set through the setLocalViewMirror API on App. This API changes only the mirroring mode of the preview image of the local camera. You can also use the
setVideoEncoderMirror API to set the mirroring mode of the image output by the encoder. This API does not change the preview image of the local camera; instead, it changes the video image viewed by the remote user (and recorded by the server). Moreover, you can set this on web by using createStream API to modify
You need to set
TRTCGSensorMode_Disable to disable gravity sensing; otherwise, after
setVideoEncoderRotation is called, the image viewed by the remote user will not change.
You can use the
setSystemVolumeTyp API to set the system volume type used during the call to
TRTCSystemVolumeTypeMedia (media volume mode).
Please check whether auto-relay push is enabled in the TRTC Console.
The recording file formats configured in the TRTC Console shall prevail.
You can call the
setSystemVolumeType API to select the media or call volume type as needed.
onCameraDidReady callback is received, the camera is ready.
onMicDidReady callback is received, the mic is ready.
You can use the
onSendFirstLocalVideoFrame callback. The system will start capturing the camera and encode the captured image after successful call of
startLocalPreview. This callback event will be returned after the SDK successfully sends the first video frame data to the cloud.
You can use the
onSendFirstLocalAudioFrame callback. The system will start capturing the mic and encoding the captured audio after successful call of
startLocalPreview. This callback event will be returned after the SDK successfully sends the first audio frame data to the cloud.
Currently, statistics of all
UserID values are not available. After user accounts are successfully signed up on the client, you can write all user information into SQL for management and query.
In TRTC, users with the same
UserID cannot be in the same room at the same time; otherwise, there will be a conflict.
setAudioRouteAPI take effect?
Receiver/Speaker can be switched only in call volume mode, that is, this API will take effect only if it is called when two or more users are co-anchoring.
You can enable manual recording in TRTC in the following steps:
streamidcorresponding to the
UserIDwill be calculated according to the stream ID generation rule.
You can log in to the TRTC Console and select Development Assistance > UserSig Generation & Verification to verify the
You can view the information on the Usage Statistics page in the TRTC Console.
If IM is integrated into your project, you can directly use the IM group user counting API to count the number of viewers in a room. However, the number counted in this method is not very accurate. If you have a low requirement for online viewer count, you can directly use this method.
If you want to count the number of online viewers very accurately, we recommend you implement the following statistics logic on your own:
ERR_SERVER_INFO_SERVICE_SUSPENDED. What should I do?
This error indicates that the service is unavailable. Please check the following:
You can use
onNetworkQuality() to listen on the current upstream/downstream quality of the network and implement the signal strength display feature as instructed here.
If the following conditions are met and
mcumix = 1 is printed in the client log, the new MCU stream mix is used:
onSetMixTranscodingConfig()API and make changes based on the returned error message.
onSetMixTranscodingConfig()returns a success, but the relayed pull through CDN still cannot take effect, it may be caused by the lack of playback domain name. We recommend you check the playback domain name configuration.
You can view the call quality of the corresponding
UserID on the Monitoring Dashboard page in the TRTC Console:
Livemode is used during room entry. As the
VideoCallmode is dedicated to call scenarios and features low-latency and smoothness, it tends to reduce the image quality on a weak network in order to ensure the smoothness. Therefore, we recommend you use the
Livemode in scenarios with a high requirement for image quality.