tencent cloud

Feedback

Last updated: 2022-09-26 16:45:23

    1. Basics

    

    What browsers does the TRTC web SDK support?

    For details about browser support, please see Browsers Supported. If your browser is not listed in the above document, you can open the TRTC compatibility check page with the browser to test whether it fully supports WebRTC.
    

    How do I test my audio/video devices before making a call?

    

    How do I test my current network quality?

    

    I can use the TRTC web SDK in a local development environment but not after it is deployed online. What should I do?

    To ensure data security and protect users’ privacy, browsers allow access to the mic and camera only in secure environments, for example, when https, localhost, or file:// is used for access. Because HTTP is not secure, browsers block access to media devices when HTTP is used.
    If you can use the SDK in a local development environment but cannot capture data from the camera or mic after deploying it to the web, check whether your webpage is deployed using HTTP. If so, use HTTPS instead and make sure you have a valid HTTPS certificate.
    For more information, see Domain Name and Protocol Support.
    

    Does the web SDK support stream mixing, relaying to CDNs, the dual-stream mode, beauty filters, or watermarking?

    

    What are the known issues of WebRTC?

    2. Publishing and Playing

    

    What do the errors NotFoundError, NotAllowedError, NotReadableError, OverConstrainedError, and AbortError found in the log of the TRTC web SDK mean?

    Error
    Description
    Suggested Solution
    NotFoundError
    The media (audio, video, or screen sharing) specified by the request parameter are not found. This error occurs if, for example, the PC has no cameras but the browser is asked to obtain a video stream.
    Remind users to check devices such as cameras and mics before making a call. If a user does not have a camera and wants to make an audio call, use TRTC.createStream({ audio: true, video: false}) to make the SDK capture audio only.
    NotAllowedError
    The user has rejected the request of the current browser instance to access the camera/mic or share screens.
    Remind the user that audio/video calls are not possible without camera/mic access.
    NotReadableError
    The user has granted access to the requested device, but it is still inaccessible due to a hardware, browser, or webpage error.
    Handle the error according to the error message returned, and send this message to the user: “The camera/mic cannot be accessed. Please make sure that no other applications are requesting access and try again.”
    OverConstrainedError
    The cameraId/microphoneId value is invalid.
    Make sure that a valid cameraId/microphoneId value is passed in.
    AbortError
    The device cannot be accessed due to an unknown reason.
    -
    For more information, see initialize.
    

    Why am I unable to publish or play streams on some mobile browsers?

    For details about browser support, see Browsers Supported. If your browser is not listed in the above document, you can open the TRTC compatibility check page with the browser to test whether it fully supports WebRTC.
    

    In the TRTC web SDK, are resolution settings for stream publishing applicable to all browsers?

    The resolution set may be unattainable due to device and browser restrictions, in which case the browser will adjust the resolution to make it as close as possible to the target. For details, see setVideoProfile.
    

    Can I modify the style of screen sharing in the TRTC web SDK?

    No. The style of screen sharing is controlled by browsers and cannot be modified.
    

    Does the TRTC web SDK support stream mixing?

    Yes, it does. For details, see startMixTranscode.
    

    In the TRTC web SDK, how do I remove a camera from the camera list after it is disconnected?

    You can call TRTC.getCameras to see if you can get the new device list. If there is still information of the disconnected camera, it indicates that the browser has not refreshed the list and the SDK cannot get the new device list.
    

    Why am I unable to publish streams from WeChat’s built-in browser on iOS?

    To learn whether the built-in browser of WeChat for iOS supports publishing or playback, please see Browsers Supported.

    3. Playing

    

    Why is there video but no audio during a call?

    It may be because of the browser’s autoplay policy, which causes the “PLAY_NOT_ALLOWED” error. To solve the problem, display a window on the UI and, in the callback for the window’s clicking event, call Stream.resume() to resume audio playback. For details, please see Suggested Solutions for Autoplay Restrictions.
    This problem may also be caused by an unknown error. Check the audioLevel and audioEnergy of the sender and recipient in the dashboard.
    

    What should I do if video is not displayed during a call?

    Check whether the webpage has obtained any data. If data can be sent and received successfully, check whether the correct mediaStream object is assigned to the srcObject property of <video>. Video will not be displayed if srcObject is incorrect.
    

    What should I do if there is echo or noise during a call or the volume of a call is small?

    These issues are common if the call participants are close to each other. Please ensure a certain distance between call participants when testing. If a non-web client hears echo or noise from a web client, it indicates that 3A is not working on the web end. If you use the browser’s built-in API getUserMedia for custom capturing, you need to enable 3A manually using the parameters below:
    echoCancellation: echo cancellation
    noiseSuppression: noise suppression
    autoGainControl: automatic gain control. For detailed directions, see MediaTrackConstraints.
    If you use the TRTC.createStream API for capturing, you don’t need to set the 3A parameters manually. The TRTC SDK enables 3A by default.

    4. Others

    

    The 2.x and 3.x versions of the SDK cannot make calls on Chrome 96+. What should I do?

    Because Chrome has deprecated Plan B since v96, the earlier versions (2.x and 3.x) of the TRTC web SDK can no longer make calls on Chrome 96+. Please update your SDK to the latest version (4.x). The APIs of v4.x are not compatible with those of v2.x or v3.x. For how to integrate v4.x, see SDK Quick Integration.
    

    What should I do if the error "RtcError: no valid ice candidate found" occurs when I run the TRTC web SDK?

    It indicates that the TRTC web SDK failed to punch a hole via Session Traversal Utilities for NAT (STUN). Please check your firewall configuration. The ports and domain name listed in the document below must be added to the allowlist of your firewall because the SDK uses them for data transfer. After configuration, use the official demo to check whether the configuration has taken effect.
    

    What should I do if the client error "RtcError: ICE/DTLS Transport connection failed" or "RtcError: DTLS Transport connection timeout" occurs?

    It indicates that TRTC SDK for web failed to establish a media transport connection. Please check your firewall configuration. The ports and domain name listed in the document below must be added to the allowlist of your firewall as the SDK uses them for data transfer. After configuration, use the official demo to check whether the configuration has taken effect.
    For details, please see Dealing with Firewall Restrictions.
    

    Does the TRTC web SDK support getting the current volume?

    You can use getAudioLevel to get the current volume. For details, please see Detecting Volume.
    

    What triggers the Client.on(‘client-banned’) event?

    The event is triggered when a user is removed from a room, for example, when the same user ID is used to log in from different devices or when the RESTful API RemoveUser is called to remove a user.
    notice
    Repeated login is not allowed by the SDK (it may cause call exceptions) and should be avoided at the business layer.
    For more information, see CLIENT_BANNED.
    

    Can I listen for room exit by remote users in the TRTC web SDK?

    Yes. You can use the client.on('peer-leave') event to receive notifications when a remote user exits the room.
    

    Is communication possible between the TRTC SDKs for web and PC?

    Yes. TRTC supports communication across all platforms.
    

    How do I take a screenshot in the TRTC web SDK?

    You can use the Stream.getVideoFrame() API to take a screenshot.
    

    How do I record audio-only streams in the TRTC web SDK? Why does recording fail after I enable auto relayed push and auto recording in the console?

    Set the pureAudioPushMode parameter of createClient.
    

    What should I do with Client.on(‘error’)?

    It indicates that the SDK encountered an unrecoverable error. You can refresh the page or call Client.leave to leave the room and then call Client.join to try again.
    

    Does the TRTC SDK for web or WeChat Mini Program support custom stream ID?

    The TRTC web SDK has supported custom stream ID since v4.3.8. You can update your SDK to use the feature. The TRTC Mini Program SDK does not support custom stream ID currently.
    

    How do I capture system audio during screen sharing in the TRTC web SDK?

    See Capturing System Audio During Screen Sharing. Currently, system audio capturing is supported on Chrome M74+ only. On Chrome for Windows and Chrome OS, you can capture the audio of the entire system, while on Chrome for Linux and macOS, you can capture only the audio of Chrome tabs. Other Chrome versions, OS, and browsers do not support system audio capturing.
    

    How do I switch the camera/mic in the TRTC web SDK?

    You can first get the system’s cameras and mics and call switchDevice to switch the camera/mic. For detailed directions, please see Switching Cameras/Mics.
    

    What should I do if the error "Permission denied" occurs when I use the TRTC web SDK in iframes?

    To use WebRTC in iframes, you need to add the following attribute to the iframe tag to obtain the permissions needed. Mic, camera, and screen sharing permissions:
    <iframe allow="microphone; camera; display-capture;">
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support