IRTCChannel
IRTCChannel represents one channel and is created by IRTCEngine::createChannel.
createChannel only parses the token and creates the object; it doesn’t join the channel. This gives you a chance to set up the
configuration and event handler before join()—onJoinChannel is called back before join() returns, so if you set the handler too late, you miss it.
IRTCChannel itself has no leave().
After the call, the object has been destroyed, and you must set the pointer to null yourself.
Basic functions
Get the channel ID
channel field in the token. The pointer is owned by the SDK and stays valid until you leave the channel; you don’t need to free it.
Get the settings object
Set the event handler
Note: you must set it before
join(); otherwise you don’t receive onJoinChannel.
Join the channel
onJoinChannel has already been called back before it returns. Calling it again returns Conflict. On failure, the channel object still exists,
and you need to reclaim it with IRTCEngine::leaveChannel.
User info functions
Get your own user info
Get channel info
Get info for all users in the channel
Get info for a specific user
Error codes for channel-level methods
Media streaming functions
Get a video track object
Get a screen sharing track object
Get an audio track object
Get a user’s audio track object
Get a user’s video track object
Get the composite stream video track object
Subscribe to a track
Unsubscribe from a track
Publish a video track
Publish an audio track
Note: the two
publish overloads no longer have a default argument (the old publish(tk) was itself an ambiguous call and didn’t compile), so you must pass opt explicitly.