DingRTC
DingRTC is the entry point for all callable interfaces in the Real-Time Communication (RTC) Web SDK.
Core interfaces
Interface | Description |
Creates a local client |
Local audio and video capture
Interface | Description |
Creates a microphone audio track object | |
Creates a camera video track object | |
Creates both a microphone audio track and a camera video track | |
Creates a screen-sharing track object | |
Creates a custom audio track object | |
Creates a custom video track object |
Media device query
Interface | Description |
Gets the list of media devices | |
Gets the list of camera devices | |
Gets the list of microphone devices | |
Gets the list of speaker devices |
Global event callbacks
Callback | Description |
Callback for camera device status changes | |
Callback for microphone device status changes | |
Callback for autoplay failure | |
Changing the speaker device |
Others
Interface | Description |
Checks browser compatibility | |
Sets the log level |
DingRTCClient
You can call createClient() to create a DingRTCClient object. This object represents a local user in a call and provides core features for audio and video calls. It includes the following interfaces:
Interface | Description |
Joins a channel | |
Leaves a channel | |
Publishes local audio and video tracks | |
Unpublishes local audio and video tracks | |
Subscribes to the audio and video tracks of a remote user | |
Unsubscribes from the audio and video tracks of a remote user |
LocalTrack class
The `LocalTrack` is the base class for local audio and video tracks in the SDK. It is used for local playback and publishing. You can create various local audio and video tracks, which return different objects derived from the `LocalTrack` class. The following list describes the related classes and their creation methods.
Local audio tracks:
Type
Description
The base object for local audio tracks. It includes basic audio controls, such as playback and volume control.
Create it by calling createCustomAudioTrack().
The object for local microphone audio tracks. It provides more methods to control the microphone than LocalAudioTrack.
Create it by calling createMicrophoneAudioTrack().
Local video tracks:
Type
Description
The base object for local video tracks. It includes basic video controls, such as play and stop.
Create it by calling createCustomVideoTrack() or createScreenVideoTrack().
The object for local camera video tracks. It provides more methods to control the camera and encoding parameters than LocalVideoTrack.
Create it by calling createCameraVideoTrack().
RemoteTrack class
RemoteTrack is the base class for remote audio and video tracks defined in the SDK.
When developing an application, first call subscribe() to subscribe to a remote user. Then, retrieve the RemoteVideoTrack object and RemoteAudioTrack object from the RemoteUser object. These objects are derived from the `RemoteTrack` class.