Basic Environment Problem
What Browsers Does the Web SDK Support?
For detailed browser support information of TRTC Web SDK, see TRTC Web SDK Browser Support.
For environments not listed above, you can open TRTC Capability Testing in the current browser to test whether WebRTC features are fully supported.
Pre-Call Audio and Video Device Test?
How to Detect the Current Network Situation in Real Time?
Why Can the TRTC Web SDK Work Normally in Local Development Test but Not When Deployed Online?
Due to considerations of user security and privacy, browsers restrict web pages from accessing microphones and cameras only in secure environments (such as
https, localhost, file:// protocols). The HTTP protocol is insecure, and browsers will prohibit media device access under the HTTP protocol.If your local development and testing work properly, but after the page is deployed, it cannot collect the camera and microphone normally. Then check whether your web page is deployed on the HTTP protocol. If so, deploy your web page using HTTPS and ensure that you have a valid HTTPS security certificate.
Support For Stream Mixing, Bypass Streaming, Large and Small Flows, Beauty Effect, and Watermark?
You can refer to stream mixing, bypass streaming, large and small flows, beauty effect, watermark documents to implement advanced features.
What Are the Known Issues of WebRTC?
2. Push and Pull Stream Problems
Meanings of NotFoundError, NotAllowedError, NotReadableError, OverConstrainedError and AbortError in Web SDK Logs
Error Name | Description | Handling Suggestions |
NotFoundError | Cannot find a media type (including audio, video, screen sharing) that meets the request parameters. For example: If there is no camera on the PC, but the browser is requested to obtain a video stream, this error will be reported. | It is recommended to guide users to check the devices required for calls, such as cameras or microphones, before starting the call. If there is no camera and a voice call is needed, you can specify only capturing the microphone in TRTC.createStream({ audio: true, video: false }). |
NotAllowedError | The user has rejected the current browser instance's requests for access to audio, video, and screen sharing. | Note that users will not be able to make audio and video calls if they do not authorize camera/microphone access. |
NotReadableError | The user has authorized the use of the corresponding device, but the device cannot be accessed due to an error occurring at the hardware, browser, or web page level on the operating system. | Handle according to the browser's error information, and prompt the user "Temporarily unable to access the camera/microphone. Make sure no other applications are currently requesting access to the camera/microphone and try again". |
OverConstrainedError | The value of the cameraId/microphoneId parameter is invalid. | Ensure that the values passed for cameraId/microphoneId are correct and valid. |
AbortError | The device cannot be used due to some unknown reasons. | - |
Some Browsers On Mobile Phones Cannot Run TRTC Normally For Live Streaming, Publishing and Playback?
For detailed browser support information of TRTC Web SDK, see TRTC Web SDK Browser Support.
For environments not listed above, you can open TRTC Capability Testing in the current browser to test whether WebRTC features are fully supported.
Is the Resolution Set By Width and Height For Web - End Streaming Applicable to All Browsers?
Due to device and browser limitations, the video resolution may not match exactly. In this case, the browser will automatically adjust the resolution to make it close to the resolution corresponding to the Profile. For more details, see setVideoProfile.
Can the Style of Web - End Screen Sharing Be Modified?
The style of screen sharing is controlled by the browser and cannot be modified at present.
Does the Web End Support Stream Mixing?
The Web end supports initiating stream mixing. For details, refer to How to Call the Mixed-Stream Transcoding API.
Clearing Data in the Camera List When Unplugging the Camera During the Use of Web SDK
You can try calling the TRTC.getCameras method to see if you can obtain a new device list. If the information of the unplugged camera is still present, it indicates that the browser layer has not refreshed this list either, and the Web end SDK cannot obtain new device list information either.
WeChat Embedded Browser On iOS Can'T Stream Normally?
Refer to Browser Support Status to check the support status of push/pull stream on the WeChat embedded browser on iOS.
Playback Issue
Audio and Video Interconnection Issue Where There Is Picture but No Sound?
Due to browser autoplay policy restrictions, audio playback may encounter a PLAY_NOT_ALLOWED exception. At this time, the business layer needs to guide users to manually operate Stream.resume() to resume audio playback. For details, see Handling Suggestions for Restricted Autoplay.
Caused by unknown exceptions. Please query the audioLevel & audioEnergy at both the sending and receiving ends through the monitoring dashboard.
Web Call Visual Not Displaying?
Check whether data has been obtained on the Web page. When confirming that data transmission and reception are normal, you can check whether the srcObject property of the
<video> element has been assigned the correct mediaStream object. If the assignment is incorrect, it definitely won't display.Echo, Noise, Noise, Low Volume During Web Call?
When the devices of both parties are too close to each other, it is normal. Please keep A greater distance from each other during testing. When the other end hears echo, noise, or other sounds in the Web, it indicates that the 3A processing on the Web has not taken effect.
If you use the native getUserMedia API of the browser for custom capture, you need to manually set the 3A parameters:
echoCancellation: Echo Cancellation Switch
noiseSuppression: Noise Suppression Switch
autoGainControl: Automatic Gain Control Switch. For detailed settings, see media tracking constraints.
If you use the TRTC.createStream API for collection, there is no need to manually set the 3A parameters. The SDK enables 3A by default.
Other
How to Handle It When the SDK of Version 2.x and 3.x Cannot Make Normal Calls in Chrome Version 96+?
The latest version of Chrome 96 has deprecated Plan-B, which will cause the older versions (2.x, 3.x) of TRTC Tencent Real-Time Communication Web SDK to be unable to make calls. Please upgrade your Web SDK to our latest version (4.x) as soon as possible. The API of the 4.x version SDK is not compatible with the older versions (2.x, 3.x). Please refer to Quick Connection (Web) to upgrade and access the 4.x version SDK.
Handling Errors When Running Web SDK: "RtcError: no valid ice candidate found"
This error indicates that the STUN penetration failed in the TRTC desktop browser SDK. Please check the firewall configuration. The TRTC desktop browser SDK relies on the following ports for data transmission. Add them to the firewall allowlist. After the configuration is completed, you can check whether the configuration takes effect by accessing and experiencing Official Website Demo.
Handling Client Errors: "RtcError: ICE/DTLS Transport connection failed" or "RtcError: DTLS Transport connection timeout"
This error indicates that the TRTC desktop browser SDK failed to establish a media transmission channel. Please check the firewall configuration. The TRTC desktop browser SDK relies on the following ports for data transmission. Add them to the firewall allowlist. After the configuration is completed, you can check whether the configuration takes effect by accessing and experiencing Official Website Demo.
Can the Web SDK Get the Current Volume?
You can obtain the current volume through getAudioLevel. For details, please refer to Switching Camera and Microphone.
What Situations Will Trigger Client.on('Client-banned')?
This event will be triggered when a user is kicked out, for example: logging in with the same name user at the same time, or kicking the user out of the room by calling the backend RESTAPI Removing User.
Note
Simultaneous log-in by same-name users is not allowed, which may cause call issues for both parties. The business layer should avoid simultaneous log-in by same-name users.
Can the Web End Listen to the Remote Leaving Room?
Supports listening to remote user departure events. It is recommended to use the client.on('peer-leave') event in client events to implement remote user departure notifications.
Is TRTC'S Web, Mini Program Side and PC Interconnect?
Yes, TRTC (Tencent Real-Time Communication) supports interconnectivity across the platform.
How to Implement the Screenshot Feature of TRTC Web
How Does the Web SDK Record Audio-Only Streaming? Why Does Automatic By-Pass and Automatic Recording Not Succeed When Enabled in the Console?
How to Handle the Client.on('error') Issue?
This indicates that the SDK has encountered an unrecoverable error. The business layer can either refresh the page and retry or call Client.leave to exit the room and then call Client.join to retry.
Do Mini Programs and the Web Support Custom Stream IDs?
Custom Stream ID is supported in Web versions 4.3.8 and above. You can update the SDK version. Mini programs do not support it for now.
How to Capture System Audio During Screen Sharing On the Web End?
For specific operations, see Screen sharing system sound capturing.
Currently, system sound capturing only supports Chrome M74+ . On Windows and Chrome OS, it can capture the audio of the entire system. On Linux and Mac, it can only capture the audio of tabs. Other Chrome versions, other systems, and other browsers are not supported.
How to Switch the Camera and Microphone On the Web End?
You can first obtain the system's camera and microphone devices, and then call switchDevice to switch. For specific operations, see Switch Camera and Microphone.
Permission denied Error When Using TRTC Web SDK in iframe?
Using WebRTC in an iframe requires adding attributes to the iframe tag to enable relevant permissions. For details, see below.
Microphone, camera, and screen sharing permissions:
<iframe allow="microphone; camera; display-capture;">
Can'T Collect Camera and Microphone in WeChat H5?
In this case, it may be that your WeChat has cleared data or it is the first installation of WeChat. In this situation, the browser kernel that comes with WeChat during installation does not support device capturing.
WeChat will automatically download and install the XWeb kernel that supports device capturing when connected to Wi-Fi. You can try again after being connected to Wi-Fi for a while (for example, half an hour).