Checks the Web Browser Compatibility
This method checks the compatibility between the Web SDK and the current web browser.
Use this method before calling createClient to check the compatibility between the system and the web browser.
Note
true
: The Web SDK is compatible with the current web browser.false
: The Web SDK is not compatible with the current web browser.Creates a Client Object
This method creates and returns a client object. You can only call this method once each call session.
Defines the property of the client, see ClientConfig for details.
Creates a Stream Object
This method creates and returns a stream object.
Defines the properties of the stream, see StreamSpec for details.
Enumerates the media devices
This method enumerates the available media input and output devices, such as microphones, cameras, headsets, and so on.
If this method succeeds, the SDK returns a list of media devices in an array of MediaDeviceInfo objects.
Note
"audioinput"
device on Firefox and Safari.The callback when the method succeeds. The SDK returns a list of media devices in an array of MediaDeviceInfo objects.
The callback when the method fails. See the detailed error message in the errStr
parameter.
Gets the Sources for Screen-sharing
To share the screen in Electron, call this method to get the screen sources. See Share the Screen for details.
If this method succeeds, the SDK returns a list of screen sources in an array of DesktopCapturerSource objects.
Gets the supported codec of the web browser
This method returns the codecs supported by both the Agora Web SDK and the web browser. The Agora Web SDK supports VP8 and H.264 for video, and OPUS for audio.
Note
(Optional) Specifies a MediaStream object.
If this parameter is empty, this method gets the supported decoding formats of the web browser as the receiver. Otherwise the method gets the supported encoding formats as the sender. In most cases, the supported decoding and encoding formats are the same.
Returns a Promise
object. In the .then(function(result){})
callback, result
has the following properties:
video
: array, the supported video codecs. The array might include "H264"
and "VP8"
, or be empty.audio
: array, the supported audio codecs. The array might include "OPUS"
, or be empty.
The version of the Agora Web SDK.
AgoraRTC.VERSION