IRTCEngine
Create IRTCEngine
Note: the log switch and log path used to be on
IRTCSetting (enable_stream_log / sdk_log_path) and have moved here—
they’re consumed while the engine itself initializes, before any channel object exists.
Release IRTCEngine
Get the version number
Note: the caller must allocate the memory before passing it in, at least 100 bytes.
Get the error code description
Note: the caller must allocate the memory for msg before passing it in, at least 100 bytes. The text is GBK-encoded Chinese.
Basic functions
Set the event handler
Channel functions
You can join multiple channels at the same time. Each channel corresponds to an IRTCChannel object, and channel-level methods and callbacks are all on that object, instead of being distinguished by a leadingchannelId parameter on IRTCEngine as in older versions.
About channelId
channelIdis the value of thechannelfield in the token. The SDK parses it internally, and you get it throughIRTCChannel::getChannelId()channelIdis used only byleaveChannelandgetChannelIds; all other methods are called directly on the channel object
Create a channel object
Note: this only creates the object and doesn’t join the channel. After you get the object, set up its configuration and event handler, then call IRTCChannel::join().
Creating the same channel again returns
Conflict; if no channel can be parsed from the token, it returns SdkTokenInvalid.
Leave a channel
Leave all channels
Get the list of joined channels
Media streaming functions
Network speed test
Note: the test results are returned in the callback.
Get camera info
Get screen info
Get microphone info
Get speaker info
Other
Add a log to upload
Logs you add are uploaded to the log server.