tencent cloud

Feedback

Overview

Last updated: 2018-09-28 16:50:12
The documentation is not available now.

    TRTC Web APIs include the feature APIs for active calling and the event notification APIs with trigger setting, wherein the feature APIs include basic feature APIs and advanced feature APIs, and the event notifications include basic event notifications and advanced event notifications. Junior developers can complete basic development access through basic feature APIs and basic event notifications, and can experience the main features of TRTC. Senior developers can complete the development through advanced feature APIs and advanced event notifications, and can experience the advanced features of TRTC.

    Basic feature APIs

    API Description
    WebRTCAPI.fn.detectRTC Detects whether it supports WebRTC
    WebRTCAPI Initialization
    WebRTCAPI.enterRoom( WebRTCAPI.createRoom ) Creates or enters an audio/video room
    WebRTCAPI.quit Exits an audio/video room

    Basic event notifications

    Event Description
    onLocalStreamAdd Addition/update of local video stream
    onRemoteStreamUpdate Addition/update of remote video stream
    onRemoteStreamRemove Disconnection of remote video stream
    onWebSocketClose Disconnection of websocket
    onRelayTimeout Disconnection of video stream server after timeout
    onKickout Forced logout (The same user logged in repeatedly)

    Advanced feature APIs

    API Description
    WebRTCAPI.startRTC Only used for active push
    WebRTCAPI.stopRtc Stops the push
    WebRTCAPI.getLocalStream Gets local audio/video stream
    WebRTCAPI.updateStream Updates video stream
    WebRTCAPI.openVideo Turns on video collection again during the push process
    WebRTCAPI.closeVideo Temporarily turns off video collection during the push process
    WebRTCAPI.openAudio Turns on audio collection again during the push process
    WebRTCAPI.closeAudio Temporarily turns off audio collection during the push process
    WebRTCAPI.changeSpearRole Switches audio and video parameter settings
    WebRTCAPI.getVideoDevices Enumerates video collection devices
    WebRTCAPI.getAudioDevices Enumerates audio collection devices
    WebRTCAPI.chooseVideoDevice Chooses the video collection device
    WebRTCAPI.chooseAudioDevice Chooses the audio collection device
    WebRTCAPI.SoundMeter Sound input detection

    Advanced event notifications

    Event Description
    onPeerConnectionAdd Notification of PeerConnection addition. Please make sure you understand the role and significance of peer connection notification

    Update log

    2.6.1

    ## WebRTCAPI.getSpeakerDevices
        This API is used to enumerate audio output devices
    ## WebRTCAPI.chooseSpeakerDevice
        This API is used to enumerate audio output devices
    
    
    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