Agora RTC Objective-C API Reference
Refactor
|
Inherits IRtcEngine.
Public Member Functions | |
virtual int | joinChannelEx (const char *token, const RtcConnection &connection, const ChannelMediaOptions &options, IRtcEngineEventHandler *eventHandler)=0 |
virtual int | leaveChannelEx (const RtcConnection &connection)=0 |
virtual int | leaveChannelEx (const RtcConnection &connection, const LeaveChannelOptions &options)=0 |
virtual int | updateChannelMediaOptionsEx (const ChannelMediaOptions &options, const RtcConnection &connection)=0 |
virtual int | setVideoEncoderConfigurationEx (const VideoEncoderConfiguration &config, const RtcConnection &connection)=0 |
virtual int | setupRemoteVideoEx (const VideoCanvas &canvas, const RtcConnection &connection)=0 |
virtual int | muteRemoteAudioStreamEx (uid_t uid, bool mute, const RtcConnection &connection)=0 |
virtual int | muteRemoteVideoStreamEx (uid_t uid, bool mute, const RtcConnection &connection)=0 |
virtual int | setRemoteVideoStreamTypeEx (uid_t uid, VIDEO_STREAM_TYPE streamType, const RtcConnection &connection)=0 |
virtual int | muteLocalAudioStreamEx (bool mute, const RtcConnection &connection)=0 |
virtual int | muteLocalVideoStreamEx (bool mute, const RtcConnection &connection)=0 |
virtual int | muteAllRemoteAudioStreamsEx (bool mute, const RtcConnection &connection)=0 |
virtual int | muteAllRemoteVideoStreamsEx (bool mute, const RtcConnection &connection)=0 |
virtual int | setSubscribeAudioAllowlistEx (uid_t *uidList, int uidNumber, const RtcConnection &connection)=0 |
virtual int | setSubscribeVideoAllowlistEx (uid_t *uidList, int uidNumber, const RtcConnection &connection)=0 |
virtual int | setRemoteVideoSubscriptionOptionsEx (uid_t uid, const VideoSubscriptionOptions &options, const RtcConnection &connection)=0 |
virtual int | setRemoteVoicePositionEx (uid_t uid, double pan, double gain, const RtcConnection &connection)=0 |
virtual int | setRemoteRenderModeEx (uid_t uid, media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode, const RtcConnection &connection)=0 |
virtual int | enableLoopbackRecordingEx (const RtcConnection &connection, bool enabled, const char *deviceName=NULL)=0 |
virtual int | adjustUserPlaybackSignalVolumeEx (unsigned int uid, int volume, const RtcConnection &connection)=0 |
virtual CONNECTION_STATE_TYPE | getConnectionStateEx (const RtcConnection &connection)=0 |
virtual int | enableEncryptionEx (const RtcConnection &connection, bool enabled, const EncryptionConfig &config)=0 |
virtual int | createDataStreamEx (int *streamId, bool reliable, bool ordered, const RtcConnection &connection)=0 |
virtual int | createDataStreamEx (int *streamId, DataStreamConfig &config, const RtcConnection &connection)=0 |
virtual int | sendStreamMessageEx (int streamId, const char *data, size_t length, const RtcConnection &connection)=0 |
virtual int | addVideoWatermarkEx (const char *watermarkUrl, const WatermarkOptions &options, const RtcConnection &connection)=0 |
virtual int | clearVideoWatermarkEx (const RtcConnection &connection)=0 |
virtual int | sendCustomReportMessageEx (const char *id, const char *category, const char *event, const char *label, int value, const RtcConnection &connection)=0 |
virtual int | enableAudioVolumeIndicationEx (int interval, int smooth, bool reportVad, const RtcConnection &connection)=0 |
virtual int | startRtmpStreamWithoutTranscodingEx (const char *url, const RtcConnection &connection)=0 |
virtual int | startRtmpStreamWithTranscodingEx (const char *url, const LiveTranscoding &transcoding, const RtcConnection &connection)=0 |
virtual int | updateRtmpTranscodingEx (const LiveTranscoding &transcoding, const RtcConnection &connection)=0 |
virtual int | stopRtmpStreamEx (const char *url, const RtcConnection &connection)=0 |
virtual int | startChannelMediaRelayEx (const ChannelMediaRelayConfiguration &configuration, const RtcConnection &connection)=0 |
virtual int | updateChannelMediaRelayEx (const ChannelMediaRelayConfiguration &configuration, const RtcConnection &connection)=0 |
virtual int | stopChannelMediaRelayEx (const RtcConnection &connection)=0 |
virtual int | pauseAllChannelMediaRelayEx (const RtcConnection &connection)=0 |
virtual int | resumeAllChannelMediaRelayEx (const RtcConnection &connection)=0 |
virtual int | getUserInfoByUserAccountEx (const char *userAccount, rtc::UserInfo *userInfo, const RtcConnection &connection)=0 |
virtual int | getUserInfoByUidEx (uid_t uid, rtc::UserInfo *userInfo, const RtcConnection &connection)=0 |
virtual int | setVideoProfileEx (int width, int height, int frameRate, int bitrate)=0 |
virtual int | enableDualStreamModeEx (bool enabled, const SimulcastStreamConfig &streamConfig, const RtcConnection &connection)=0 |
virtual int | setDualStreamModeEx (SIMULCAST_STREAM_MODE mode, const SimulcastStreamConfig &streamConfig, const RtcConnection &connection)=0 |
virtual int | enableWirelessAccelerate (bool enabled)=0 |
virtual int | takeSnapshotEx (const RtcConnection &connection, uid_t uid, const char *filePath)=0 |
virtual void | release (bool sync=false)=0 |
virtual int | initialize (const RtcEngineContext &context)=0 |
virtual int | queryInterface (INTERFACE_ID_TYPE iid, void **inter)=0 |
virtual const char * | getVersion (int *build)=0 |
virtual const char * | getErrorDescription (int code)=0 |
virtual int | joinChannel (const char *token, const char *channelId, const char *info, uid_t uid)=0 |
virtual int | joinChannel (const char *token, const char *channelId, uid_t uid, const ChannelMediaOptions &options)=0 |
virtual int | updateChannelMediaOptions (const ChannelMediaOptions &options)=0 |
virtual int | leaveChannel ()=0 |
virtual int | leaveChannel (const LeaveChannelOptions &options)=0 |
virtual int | renewToken (const char *token)=0 |
virtual int | setChannelProfile (CHANNEL_PROFILE_TYPE profile)=0 |
virtual int | setClientRole (CLIENT_ROLE_TYPE role)=0 |
virtual int | setClientRole (CLIENT_ROLE_TYPE role, const ClientRoleOptions &options)=0 |
virtual int | startEchoTest ()=0 |
virtual int | startEchoTest (int intervalInSeconds)=0 |
virtual int | startEchoTest (const EchoTestConfiguration &config)=0 |
virtual int | enableVideo ()=0 |
virtual int | disableVideo ()=0 |
virtual int | startPreview ()=0 |
virtual int | startPreview (VIDEO_SOURCE_TYPE sourceType)=0 |
virtual int | stopPreview ()=0 |
virtual int | stopPreview (VIDEO_SOURCE_TYPE sourceType)=0 |
virtual int | startLastmileProbeTest (const LastmileProbeConfig &config)=0 |
virtual int | stopLastmileProbeTest ()=0 |
virtual int | setVideoEncoderConfiguration (const VideoEncoderConfiguration &config)=0 |
virtual int | setLowlightEnhanceOptions (bool enabled, const LowlightEnhanceOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0 |
virtual int | setVideoDenoiserOptions (bool enabled, const VideoDenoiserOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0 |
virtual int | setColorEnhanceOptions (bool enabled, const ColorEnhanceOptions &options, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0 |
virtual int | enableVirtualBackground (bool enabled, VirtualBackgroundSource backgroundSource, SegmentationProperty segproperty, agora::media::MEDIA_SOURCE_TYPE type=agora::media::PRIMARY_CAMERA_SOURCE)=0 |
virtual int | enableRemoteSuperResolution (uid_t userId, bool enable)=0 |
virtual int | setupRemoteVideo (const VideoCanvas &canvas)=0 |
virtual int | setupLocalVideo (const VideoCanvas &canvas)=0 |
virtual int | enableAudio ()=0 |
virtual int | disableAudio ()=0 |
virtual int | setAudioProfile (AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) 1=0 |
virtual int | setAudioProfile (AUDIO_PROFILE_TYPE profile)=0 |
virtual int | setAudioScenario (AUDIO_SCENARIO_TYPE scenario)=0 |
virtual int | enableLocalAudio (bool enabled)=0 |
virtual int | muteLocalAudioStream (bool mute)=0 |
virtual int | muteAllRemoteAudioStreams (bool mute)=0 |
virtual int | setDefaultMuteAllRemoteAudioStreams (bool mute) 1=0 |
virtual int | muteRemoteAudioStream (uid_t uid, bool mute)=0 |
virtual int | muteLocalVideoStream (bool mute)=0 |
virtual int | enableLocalVideo (bool enabled)=0 |
virtual int | muteAllRemoteVideoStreams (bool mute)=0 |
virtual int | setDefaultMuteAllRemoteVideoStreams (bool mute) 1=0 |
virtual int | muteRemoteVideoStream (uid_t uid, bool mute)=0 |
virtual int | setRemoteVideoStreamType (uid_t uid, VIDEO_STREAM_TYPE streamType)=0 |
virtual int | setRemoteVideoSubscriptionOptions (uid_t uid, const VideoSubscriptionOptions &options)=0 |
virtual int | setRemoteDefaultVideoStreamType (VIDEO_STREAM_TYPE streamType)=0 |
virtual int | setSubscribeAudioAllowlist (uid_t *uidList, int uidNumber)=0 |
virtual int | setSubscribeVideoAllowlist (uid_t *uidList, int uidNumber)=0 |
virtual int | enableAudioVolumeIndication (int interval, int smooth, bool reportVad)=0 |
virtual int | startAudioRecording (const char *filePath, AUDIO_RECORDING_QUALITY_TYPE quality)=0 |
virtual int | startAudioRecording (const char *filePath, int sampleRate, AUDIO_RECORDING_QUALITY_TYPE quality)=0 |
virtual int | startAudioRecording (const AudioRecordingConfiguration &config)=0 |
virtual int | registerAudioEncodedFrameObserver (const AudioEncodedFrameObserverConfig &config, IAudioEncodedFrameObserver *observer)=0 |
virtual agora_refptr< IMediaPlayer > | createMediaPlayer ()=0 |
virtual int | destroyMediaPlayer (agora_refptr< IMediaPlayer > media_player)=0 |
virtual int | selectAudioTrack (int index)=0 |
virtual int | getAudioTrackCount ()=0 |
virtual int | enableSoundPositionIndication (bool enabled)=0 |
virtual int | setRemoteVoicePosition (uid_t uid, double pan, double gain)=0 |
virtual int | enableSpatialAudio (bool enabled)=0 |
virtual int | setVoiceBeautifierPreset (VOICE_BEAUTIFIER_PRESET preset)=0 |
virtual int | setVoiceConversionPreset (VOICE_CONVERSION_PRESET preset)=0 |
virtual int | setVoiceBeautifierParameters (VOICE_BEAUTIFIER_PRESET preset, int param1, int param2)=0 |
virtual int | setVoiceConversionParameters (VOICE_CONVERSION_PRESET preset, int param1, int param2)=0 |
virtual int | setHeadphoneEQPreset (HEADPHONE_EQUALIZER_PRESET preset)=0 |
virtual int | setHeadphoneEQParameters (int lowGain, int highGain)=0 |
virtual int | setLogFile (const char *filePath)=0 |
virtual int | setLogFilter (unsigned int filter)=0 |
virtual int | setLogLevel (commons::LOG_LEVEL level)=0 |
virtual int | setLogFileSize (unsigned int fileSizeInKBytes)=0 |
virtual int | uploadLogFile (agora::util::AString &requestId)=0 |
virtual int | setLocalRenderMode (media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode)=0 |
virtual int | setLocalRenderMode (media::base::RENDER_MODE_TYPE renderMode)=0 |
virtual int | setRemoteRenderMode (uid_t uid, media::base::RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode)=0 |
virtual int | setLocalVideoMirrorMode (VIDEO_MIRROR_MODE_TYPE mirrorMode)=0 |
virtual int | enableDualStreamMode (bool enabled)=0 |
virtual int | enableDualStreamMode (bool enabled, const SimulcastStreamConfig &streamConfig)=0 |
virtual int | setDualStreamMode (SIMULCAST_STREAM_MODE mode)=0 |
virtual int | setDualStreamMode (SIMULCAST_STREAM_MODE mode, const SimulcastStreamConfig &streamConfig)=0 |
virtual int | enableEchoCancellationExternal (bool enabled, int audioSourceDelay)=0 |
virtual int | enableCustomAudioLocalPlayback (int sourceId, bool enabled)=0 |
virtual int | startPrimaryCustomAudioTrack (const AudioTrackConfig &config)=0 |
virtual int | stopPrimaryCustomAudioTrack ()=0 |
virtual int | startSecondaryCustomAudioTrack (const AudioTrackConfig &config)=0 |
virtual int | stopSecondaryCustomAudioTrack ()=0 |
virtual int | setRecordingAudioFrameParameters (int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall)=0 |
virtual int | setPlaybackAudioFrameParameters (int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall)=0 |
virtual int | setMixedAudioFrameParameters (int sampleRate, int channel, int samplesPerCall)=0 |
virtual int | setEarMonitoringAudioFrameParameters (int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall)=0 |
virtual int | setPlaybackAudioFrameBeforeMixingParameters (int sampleRate, int channel)=0 |
virtual int | enableAudioSpectrumMonitor (int intervalInMS=100)=0 |
virtual int | disableAudioSpectrumMonitor ()=0 |
virtual int | registerAudioSpectrumObserver (agora::media::IAudioSpectrumObserver *observer)=0 |
virtual int | unregisterAudioSpectrumObserver (agora::media::IAudioSpectrumObserver *observer)=0 |
virtual int | adjustRecordingSignalVolume (int volume)=0 |
virtual int | muteRecordingSignal (bool mute)=0 |
virtual int | adjustPlaybackSignalVolume (int volume)=0 |
virtual int | setLocalPublishFallbackOption (STREAM_FALLBACK_OPTIONS option)=0 |
virtual int | setRemoteSubscribeFallbackOption (STREAM_FALLBACK_OPTIONS option)=0 |
virtual int | enableLoopbackRecording (bool enabled, const char *deviceName=NULL)=0 |
virtual int | adjustLoopbackSignalVolume (int volume)=0 |
virtual int | getLoopbackRecordingVolume ()=0 |
virtual int | enableInEarMonitoring (bool enabled, int includeAudioFilters)=0 |
virtual int | setInEarMonitoringVolume (int volume)=0 |
virtual int | setExtensionProviderProperty (const char *provider, const char *key, const char *value)=0 |
virtual int | registerExtension (const char *provider, const char *extension, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0 |
virtual int | enableExtension (const char *provider, const char *extension, bool enable=true, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0 |
virtual int | enableExtension (const char *provider, const char *extension, const ExtensionInfo &extensionInfo, bool enable=true)=0 |
virtual int | setExtensionProperty (const char *provider, const char *extension, const char *key, const char *value, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0 |
virtual int | setExtensionProperty (const char *provider, const char *extension, const ExtensionInfo &extensionInfo, const char *key, const char *value)=0 |
virtual int | getExtensionProperty (const char *provider, const char *extension, const char *key, char *value, int buf_len, agora::media::MEDIA_SOURCE_TYPE type=agora::media::UNKNOWN_MEDIA_SOURCE)=0 |
virtual int | getExtensionProperty (const char *provider, const char *extension, const ExtensionInfo &extensionInfo, const char *key, char *value, int buf_len)=0 |
virtual video_track_id_t | createCustomVideoTrack ()=0 |
virtual video_track_id_t | createCustomEncodedVideoTrack (const SenderOptions &sender_option)=0 |
virtual int | destroyCustomVideoTrack (video_track_id_t video_track_id)=0 |
virtual int | destroyCustomEncodedVideoTrack (video_track_id_t video_track_id)=0 |
virtual int | getCallId (agora::util::AString &callId)=0 |
virtual int | rate (const char *callId, int rating, const char *description)=0 |
virtual int | complain (const char *callId, const char *description)=0 |
virtual int | startRtmpStreamWithoutTranscoding (const char *url)=0 |
virtual int | startRtmpStreamWithTranscoding (const char *url, const LiveTranscoding &transcoding)=0 |
virtual int | updateRtmpTranscoding (const LiveTranscoding &transcoding)=0 |
virtual int | stopRtmpStream (const char *url)=0 |
virtual int | startPrimaryCameraCapture (const CameraCapturerConfiguration &config)=0 |
virtual int | startSecondaryCameraCapture (const CameraCapturerConfiguration &config)=0 |
virtual int | stopPrimaryCameraCapture ()=0 |
virtual int | stopSecondaryCameraCapture ()=0 |
virtual int | setScreenCaptureOrientation (VIDEO_SOURCE_TYPE type, VIDEO_ORIENTATION orientation)=0 |
virtual int | startPrimaryScreenCapture (const ScreenCaptureConfiguration &config)=0 |
virtual int | startSecondaryScreenCapture (const ScreenCaptureConfiguration &config)=0 |
virtual int | stopPrimaryScreenCapture ()=0 |
virtual int | stopSecondaryScreenCapture ()=0 |
virtual CONNECTION_STATE_TYPE | getConnectionState ()=0 |
virtual int | registerPacketObserver (IPacketObserver *observer)=0 |
virtual int | enableEncryption (bool enabled, const EncryptionConfig &config)=0 |
virtual int | createDataStream (int *streamId, bool reliable, bool ordered)=0 |
virtual int | createDataStream (int *streamId, DataStreamConfig &config)=0 |
virtual int | sendStreamMessage (int streamId, const char *data, size_t length)=0 |
virtual int | addVideoWatermark (const RtcImage &watermark)=0 |
virtual int | addVideoWatermark (const char *watermarkUrl, const WatermarkOptions &options)=0 |
virtual int | enableWebSdkInteroperability (bool enabled) 1=0 |
virtual int | sendCustomReportMessage (const char *id, const char *category, const char *event, const char *label, int value)=0 |
virtual int | registerMediaMetadataObserver (IMetadataObserver *observer, IMetadataObserver::METADATA_TYPE type)=0 |
virtual int | unregisterMediaMetadataObserver (IMetadataObserver *observer, IMetadataObserver::METADATA_TYPE type)=0 |
virtual int | startAudioFrameDump (const char *channel_id, uid_t user_id, const char *location, const char *uuid, const char *passwd, long duration_ms, bool auto_upload)=0 |
virtual int | stopAudioFrameDump (const char *channel_id, uid_t user_id, const char *location)=0 |
virtual int | registerLocalUserAccount (const char *appId, const char *userAccount)=0 |
virtual int | joinChannelWithUserAccount (const char *token, const char *channelId, const char *userAccount)=0 |
virtual int | joinChannelWithUserAccount (const char *token, const char *channelId, const char *userAccount, const ChannelMediaOptions &options)=0 |
virtual int | joinChannelWithUserAccountEx (const char *token, const char *channelId, const char *userAccount, const ChannelMediaOptions &options, IRtcEngineEventHandler *eventHandler)=0 |
virtual int | getUserInfoByUserAccount (const char *userAccount, rtc::UserInfo *userInfo)=0 |
virtual int | getUserInfoByUid (uid_t uid, rtc::UserInfo *userInfo)=0 |
virtual int | startChannelMediaRelay (const ChannelMediaRelayConfiguration &configuration)=0 |
virtual int | updateChannelMediaRelay (const ChannelMediaRelayConfiguration &configuration)=0 |
virtual int | stopChannelMediaRelay ()=0 |
virtual int | pauseAllChannelMediaRelay ()=0 |
virtual int | resumeAllChannelMediaRelay ()=0 |
virtual int | setDirectCdnStreamingAudioConfiguration (AUDIO_PROFILE_TYPE profile)=0 |
virtual int | setDirectCdnStreamingVideoConfiguration (const VideoEncoderConfiguration &config)=0 |
virtual int | startDirectCdnStreaming (IDirectCdnStreamingEventHandler *eventHandler, const char *publishUrl, const DirectCdnStreamingMediaOptions &options)=0 |
virtual int | stopDirectCdnStreaming ()=0 |
virtual int | updateDirectCdnStreamingMediaOptions (const DirectCdnStreamingMediaOptions &options)=0 |
virtual int | startRhythmPlayer (const char *sound1, const char *sound2, const AgoraRhythmPlayerConfig &config)=0 |
virtual int | stopRhythmPlayer ()=0 |
virtual int | configRhythmPlayer (const AgoraRhythmPlayerConfig &config)=0 |
virtual int | takeSnapshot (uid_t uid, const char *filePath)=0 |
virtual int | enableContentInspect (bool enabled, const media::ContentInspectConfig &config)=0 |
virtual int | setCloudProxy (CLOUD_PROXY_TYPE proxyType)=0 |
virtual int | setLocalAccessPoint (const LocalAccessPointConfiguration &config)=0 |
virtual int | setAdvancedAudioOptions (AdvancedAudioOptions &options, int sourceType=0)=0 |
virtual int | setAVSyncSource (const char *channelId, uid_t uid)=0 |
virtual int | enableVideoImageSource (bool enable, const ImageTrackOptions &options)=0 |
virtual int | getNetworkType ()=0 |
virtual int | setParameters (const char *parameters)=0 |
|
pure virtual |
Joins a channel with media options.
This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other.
A successful call of this method triggers the following callbacks:
onJoinChannelSuccess
and onConnectionStateChanged
callbacks.onUserJoined
, if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile.When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess
callback on the local client.
Compared to joinChannel
, this method adds the options parameter to configure whether to automatically subscribe to all remote audio and video streams in the channel when the user joins the channel. By default, the user subscribes to the audio and video streams of all the other users in the channel, giving rise to usage and billings. To unsubscribe, set the options
parameter or call the mute
methods accordingly.
initialize
method; otherwise, you may fail to join the channel by token.connection | The RtcConnection object. |
token | The token generated on your server for authentication. |
options | The channel media options: ChannelMediaOptions. |
eventHandler | The event handler: IRtcEngineEventHandler. |
ChannelMediaOptions
structure is invalid. You need to pass in a valid parameter and join the channel again.IRtcEngine
object. You need to reinitialize the IRtcEngine object.stopEchoTest
to stop the test after calling startEchoTest
to start a call loop test. You need to call stopEchoTest
before calling this method.onConnectionStateChanged
callback to get whether the user is in the channel. Do not call this method to join the channel unless you receive the CONNECTION_STATE_DISCONNECTED(1)
state.
|
pure virtual |
Leaves the channel.
This method allows a user to leave the channel, for example, by hanging up or exiting a call.
This method is an asynchronous call, which means that the result of this method returns even before the user has not actually left the channel. Once the user successfully leaves the channel, the SDK triggers the onLeaveChannel callback.
connection | The RtcConnection object. |
|
pure virtual |
Leaves the channel with the connection ID.
connection | connection. |
options | The options for leaving the channel. See #LeaveChannelOptions. |
|
pure virtual |
Updates the channel media options after joining the channel.
options | The channel media options: ChannelMediaOptions. |
connection | The RtcConnection object. |
|
pure virtual |
Sets the video encoder configuration.
Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.
The parameters specified in this method are the maximum values under ideal network conditions. If the video engine cannot render the video using the specified parameters due to poor network conditions, the parameters further down the list are considered until a successful configuration is found.
config | The local video encoder configuration: VideoEncoderConfiguration. |
connection | The RtcConnection object. |
|
pure virtual |
Initializes the video view of a remote user.
This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees.
Usually the app should specify the uid
of the remote video in the method call before the remote user joins the channel. If the remote uid
is unknown to the app, set it later when the app receives the onUserJoined callback.
To unbind the remote user from the view, set view
in VideoCanvas as null
.
canvas | The remote video view settings: VideoCanvas. |
connection | The RtcConnection object. |
|
pure virtual |
Stops or resumes receiving the audio stream of a specified user.
uid | The ID of the specified user. |
mute | Whether to stop receiving the audio stream of the specified user:
|
connection | The RtcConnection object. |
|
pure virtual |
Stops or resumes receiving the video stream of a specified user.
uid | The ID of the specified user. |
mute | Whether to stop receiving the video stream of the specified user:
|
connection | The RtcConnetion object. |
|
pure virtual |
Sets the remote video stream type.
If the remote user has enabled the dual-stream mode, by default the SDK receives the high-stream video by Call this method to switch to the low-stream video.
uid | ID of the remote user sending the video stream. |
streamType | Sets the video stream type: VIDEO_STREAM_TYPE. |
connection | The RtcConnection object. |
|
pure virtual |
Stops or resumes sending the local audio stream with connection.
mute | Determines whether to send or stop sending the local audio stream:
|
connection | The connection of the user ID. |
|
pure virtual |
Stops or resumes sending the local video stream with connection.
mute | Determines whether to send or stop sending the local video stream:
|
connection | The connection of the user ID. |
|
pure virtual |
Stops or resumes receiving all remote audio stream with connection.
mute | Whether to stop receiving remote audio streams:
|
connection | The connection of the user ID. |
|
pure virtual |
Stops or resumes receiving all remote video stream with connection.
mute | Whether to stop receiving remote audio streams:
|
connection | The connection of the user ID. |
|
pure virtual |
Sets the allowlist of subscribe remote stream audio.
uidList | The id list of users who do subscribe to audio. |
uidNumber | The number of uid in uidList. |
connection | The RtcConnection object. |
|
pure virtual |
Sets the allowlist of subscribe remote stream video.
uidList | The id list of users who do subscribe to video. |
uidNumber | The number of uid in uidList. |
connection | The RtcConnection object. |
|
pure virtual |
Sets the remote video subscription options
uid | ID of the remote user sending the video stream. |
options | Sets the video subscription options: VideoSubscriptionOptions. |
connection | The RtcConnection object. |
|
pure virtual |
Sets the sound position and gain of a remote user.
When the local user calls this method to set the sound position of a remote user, the sound difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a real sense of space. This method applies to massively multiplayer online games, such as Battle Royale games.
uid | The ID of the remote user. |
pan | The sound position of the remote user. The value ranges from -1.0 to 1.0:
|
gain | Gain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain. |
connection | The RtcConnection object. |
|
pure virtual |
Updates the display mode of the video view of a remote user.
After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
uid | ID of the remote user. |
renderMode | Sets the remote display mode. See #RENDER_MODE_TYPE. |
mirrorMode | Sets the mirror type. See VIDEO_MIRROR_MODE_TYPE. |
connection | The RtcConnection object. |
|
pure virtual |
Enables loopback recording.
If you enable loopback recording, the output of the default sound card is mixed into the audio stream sent to the other end.
connection | The RtcConnection object. |
enabled | Sets whether to enable/disable loopback recording.
|
deviceName | Pointer to the device name of the sound card. The default value is NULL (the default sound card).
|
|
pure virtual |
Adjust the playback signal volume of a specified remote user. You can call this method as many times as necessary to adjust the playback volume of different remote users, or to repeatedly adjust the playback volume of the same remote user.
uid | The ID of the remote user. |
volume | The playback volume of the specified remote user. The value ranges between 0 and 400, including the following: |
connection | RtcConnection |
|
pure virtual |
Gets the current connection state of the SDK.
connection | The RtcConnection object. |
|
pure virtual |
Enables/Disables the built-in encryption.
In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel.
All users in the same channel must use the same encryption mode and encryption key. Once all users leave the channel, the encryption key of this channel is automatically cleared.
connection | The RtcConnection object. |
enabled | Whether to enable the built-in encryption:
|
config | Configurations of built-in encryption schemas. See EncryptionConfig. |
IRtcEngine
instance before calling this method.
|
pure virtual |
Creates a data stream.
You can call this method to create a data stream and improve the reliability and ordering of data tranmission.
reliable
and ordered
.[out] | streamId | The ID of the stream data. |
reliable | Sets whether the recipients are guaranteed to receive the data stream from the sender within five seconds:
| |
ordered | Sets whether the recipients receive the data stream in the sent order:
| |
connection | The RtcConnection object. |
|
pure virtual |
Creates a data stream.
Each user can create up to five data streams during the lifecycle of the IChannel.
streamId | The ID of the created data stream. |
config | The config of data stream. |
connection | The RtcConnection object. |
|
pure virtual |
Sends a data stream.
After calling createDataStream, you can call this method to send a data stream to all users in the channel.
The SDK has the following restrictions on this method:
After the remote user receives the data stream within 5 seconds, the SDK triggers the onStreamMessage callback on the remote client. After the remote user does not receive the data stream within 5 seconds, the SDK triggers the onStreamMessageError callback on the remote client.
COMMUNICATION
profile or to the hosts in the LIVE_BROADCASTING
profile. If an audience in the LIVE_BROADCASTING
profile calls this method, the audience may be switched to a host.streamId | The ID of the stream data. |
data | The data stream. |
length | The length (byte) of the data stream. |
connection | The RtcConnection object. |
|
pure virtual |
Adds a watermark image to the local video.
This method adds a PNG watermark image to the local video in a live broadcast. Once the watermark image is added, all the audience in the channel (CDN audience included), and the recording device can see and capture it. Agora supports adding only one watermark image onto the local video, and the newly watermark image replaces the previous one.
The watermark position depends on the settings in the setVideoEncoderConfiguration method:
setVideoEncoderConfiguration
method. Otherwise, the watermark image will be cropped.visibleInPreview
member in the WatermarkOptions class to set whether or not the watermark is visible in preview.watermarkUrl | The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path. |
options | Pointer to the watermark's options to be added. See WatermarkOptions for more infomation. |
connection | The RtcConnection object. |
|
pure virtual |
Removes the watermark image on the video stream added by addVideoWatermark().
connection | The RtcConnection object. |
|
pure virtual |
Agora supports reporting and analyzing customized messages.
This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes.
To try out this function, contact support@agora.io and discuss the format of customized messages with us.
|
pure virtual |
Enables the onAudioVolumeIndication
callback to report on which users are speaking and the speakers' volume.
Once the onAudioVolumeIndication callback is enabled, the SDK returns the volume indication in the at the time interval set in enableAudioVolumeIndication
, regardless of whether any user is speaking in the channel.
interval | Sets the time interval between two consecutive volume indications:
|
smooth | The smoothing factor that sets the sensitivity of the audio volume indicator. The value range is [0, 10]. The greater the value, the more sensitive the indicator. The recommended value is 3. |
reportVad |
|
connection | The RtcConnection object. |
|
pure virtual |
Publishes the local stream without transcoding to a specified CDN live RTMP address. (CDN live only.)
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. |
connection | RtcConnection. |
|
pure virtual |
Publishes the local stream with transcoding to a specified CDN live RTMP address. (CDN live only.)
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. |
transcoding | Sets the CDN live audio/video transcoding settings. See LiveTranscoding. |
connection | RtcConnection. |
|
pure virtual |
Update the video layout and audio settings for CDN live. (CDN live only.)
transcoding | Sets the CDN live audio/video transcoding settings. See LiveTranscoding. |
connection | RtcConnection. |
|
pure virtual |
Stop an RTMP stream with transcoding or without transcoding from the CDN. (CDN live only.)
url | The RTMP URL address to be removed. The maximum length of this parameter is 1024 bytes. |
connection | RtcConnection. |
|
pure virtual |
Starts to relay media streams across channels.
configuration | The configuration of the media stream relay:ChannelMediaRelayConfiguration. |
connection | RtcConnection. |
|
pure virtual |
Updates the channels for media stream relay
configuration | The media stream relay configuration: ChannelMediaRelayConfiguration. |
connection | RtcConnection. |
|
pure virtual |
Stops the media stream relay.
Once the relay stops, the host quits all the destination channels.
connection | RtcConnection. |
|
pure virtual |
pause the channels for media stream relay.
connection | RtcConnection. |
|
pure virtual |
resume the channels for media stream relay.
connection | RtcConnection. |
|
pure virtual |
Gets the user information by passing in the user account. It is same as agora::rtc::IRtcEngine::getUserInfoByUserAccount.
userAccount | The user account of the user. Ensure that you set this parameter. | |
[in,out] | userInfo | A userInfo object that identifies the user:
|
connection | The RtcConnection object. |
|
pure virtual |
Gets the user information by passing in the user ID. It is same as agora::rtc::IRtcEngine::getUserInfoByUid.
uid | The user ID of the remote user. Ensure that you set this parameter. | |
[in,out] | userInfo | A userInfo object that identifies the user:
|
connection | The RtcConnection object. |
|
pure virtual |
Specify video stream parameters based on video profile
[in] | width | width of video resolution in pixel |
[in] | height | height of video resolution in pixel |
[in] | frameRate | frame rate in fps |
[in] | bitrate | bit rate in kbps |
|
pure virtual |
Enables or disables the dual video stream mode.
If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.
enabled |
|
streamConfig | The minor stream config |
connection | The RtcConnection object. |
|
pure virtual |
Enables, disables or auto enable the dual video stream mode.
If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.
mode | The dual stream mode: SIMULCAST_STREAM_MODE. |
streamConfig | The configuration of the low stream: SimulcastStreamConfig. |
connection | The RtcConnection object. |
|
pure virtual |
Turns WIFI acceleration on or off.
enabled |
|
Implements IRtcEngine.
|
pure virtual |
Takes a snapshot of a video stream.
This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken
callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.
ChannelMediaOptions
.connection | The RtcConnection object. |
uid | The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. |
filePath | The local path (including filename extensions) of the snapshot. For example:
|
Ensure that the path you specify exists and is writable.
|
pure virtualinherited |
Releases the IRtcEngine object.
This method releases all resources used by the Agora SDK. Use this method for apps in which users occasionally make voice or video calls. When users do not make calls, you can free up resources for other operations.
After a successful method call, you can no longer use any method or callback in the SDK anymore. If you want to use the real-time communication functions again, you must call createAgoraRtcEngine
and initialize
to create a new IRtcEngine
instance.
IRtcEngine
instance after destroying the current one, ensure that you wait till the release
method execution to complete.sync | Determines whether this method is a synchronous call.
|
|
pure virtualinherited |
Initializes IRtcEngine
.
All called methods provided by the IRtcEngine
class are executed asynchronously. Agora recommends calling these methods in the same thread.
createAgoraRtcEngine
and initialize
to create and initialize the IRtcEngine
object.IRtcEngine
instance for an app.context | The RtcEngineContext object. |
|
pure virtualinherited |
Gets the pointer to the specified interface.
iid | The ID of the interface. See INTERFACE_ID_TYPE for details. |
inter | Output parameter. The pointer to the specified interface. |
Implements IEngineBase.
|
pure virtualinherited |
Gets the SDK version.
build | The build number. |
|
pure virtualinherited |
Gets the warning or error description.
code | The error code or warning code reported by the SDK. |
|
pure virtualinherited |
Joins a channel.
This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other.
A successful call of this method triggers the following callbacks:
onJoinChannelSuccess
and onConnectionStateChanged
callbacks.onUserJoined
, if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile.When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess
callback on the local client.
mute
methods.token | The token generated on your server for authentication. |
channelId | The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported character scopes are:
|
info | (Optional) Reserved for future use. |
uid | The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2<h>32</h>-1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so. |
ChannelMediaOptions
structure is invalid. You need to pass in a valid parameter and join the channel again.IRtcEngine
object. You need to reinitialize the IRtcEngine object.stopEchoTest
to stop the test after calling startEchoTest
to start a call loop test. You need to call stopEchoTest
before calling this method.onConnectionStateChanged
callback to get whether the user is in the channel. Do not call this method to join the channel unless you receive the CONNECTION_STATE_DISCONNECTED(1)
state.
|
pure virtualinherited |
Joins a channel with media options.
This method enables users to join a channel. Users in the same channel can talk to each other, and multiple users in the same channel can start a group chat. Users with different App IDs cannot call each other.
A successful call of this method triggers the following callbacks:
onJoinChannelSuccess
and onConnectionStateChanged
callbacks.onUserJoined
, if the user joining the channel is in the Communication profile or is a host in the Live-broadcasting profile.When the connection between the client and Agora's server is interrupted due to poor network conditions, the SDK tries reconnecting to the server. When the local client successfully rejoins the channel, the SDK triggers the onRejoinChannelSuccess
callback on the local client.
Compared to joinChannel
, this method adds the options parameter to configure whether to automatically subscribe to all remote audio and video streams in the channel when the user joins the channel. By default, the user subscribes to the audio and video streams of all the other users in the channel, giving rise to usage and billings. To unsubscribe, set the options
parameter or call the mute
methods accordingly.
initialize
method; otherwise, you may fail to join the channel by token.token | The token generated on your server for authentication. |
channelId | The channel name. This parameter signifies the channel in which users engage in real-time audio and video interaction. Under the premise of the same App ID, users who fill in the same channel ID enter the same channel for audio and video interaction. The string length must be less than 64 bytes. Supported character scopes are:
|
uid | The user ID. This parameter is used to identify the user in the channel for real-time audio and video interaction. You need to set and manage user IDs yourself, and ensure that each user ID in the same channel is unique. This parameter is a 32-bit unsigned integer. The value range is 1 to 2<h>32</h>-1. If the user ID is not assigned (or set to 0), the SDK assigns a random user ID and returns it in the onJoinChannelSuccess callback. Your application must record and maintain the returned user ID, because the SDK does not do so. |
options | The channel media options: ChannelMediaOptions. |
ChannelMediaOptions
structure is invalid. You need to pass in a valid parameter and join the channel again.IRtcEngine
object. You need to reinitialize the IRtcEngine object.stopEchoTest
to stop the test after calling startEchoTest
to start a call loop test. You need to call stopEchoTest
before calling this method.onConnectionStateChanged
callback to get whether the user is in the channel. Do not call this method to join the channel unless you receive the CONNECTION_STATE_DISCONNECTED(1)
state.
|
pure virtualinherited |
Updates the channel media options after joining the channel.
options | The channel media options: ChannelMediaOptions. |
|
pure virtualinherited |
Leaves the channel.
This method allows a user to leave the channel, for example, by hanging up or exiting a call.
This method is an asynchronous call, which means that the result of this method returns even before the user has not actually left the channel. Once the user successfully leaves the channel, the SDK triggers the onLeaveChannel callback.
onLeaveChannel
callback.
|
pure virtualinherited |
Leaves the channel.
options | The leave channel options. |
This method allows a user to leave the channel, for example, by hanging up or exiting a call.
This method is an asynchronous call, which means that the result of this method returns even before the user has not actually left the channel. Once the user successfully leaves the channel, the SDK triggers the onLeaveChannel callback.
onLeaveChannel
callback.
|
pure virtualinherited |
Renews the token.
Once a token is enabled and used, it expires after a certain period of time.
Under the following circumstances, generate a new token on your server, and then call this method to renew it. Failure to do so results in the SDK disconnecting from the server.
ERR_TOKEN_EXPIRED(-109)
error is reported.token | The new token. |
|
pure virtualinherited |
Sets the channel profile.
The IRtcEngine differentiates channel profiles and applies different optimization algorithms accordingly. For example, it prioritizes smoothness and low latency for a video call, and prioritizes video quality for a video broadcast.
joinChannel
. You cannot set the channel profile once you have joined the channel.profile | The channel profile: CHANNEL_PROFILE_TYPE. |
|
pure virtualinherited |
Sets the role of a user.
This method sets the user role as either BROADCASTER or AUDIENCE (default).
By default, all users are audience regardless of the channel profile. Call this method to change the user role to BROADCASTER so that the user can send a stream.
role | The role of the client: CLIENT_ROLE_TYPE. |
|
pure virtualinherited |
Sets the role of the user, such as a host or an audience (default), before joining a channel in the live interactive streaming.
This method can be used to switch the user role in the live interactive streaming after the user joins a channel.
In the LIVE_BROADCASTING
profile, when a user switches user roles after joining a channel, a successful setClientRole method call triggers the following callbacks:
LIVE_BROADCASTING
profile.role | Sets the role of the user. See CLIENT_ROLE_TYPE. |
options | Sets the audience latency level of the user. See #ClientRoleOptions. |
|
pure virtualinherited |
Starts an audio call test.
This method launches an audio call test to determine whether the audio devices (for example, headset and speaker) and the network connection are working properly.
In the test, the user first speaks, and the recording is played back in 10 seconds. If the user can hear the recording in 10 seconds, it indicates that the audio devices and network connection work properly.
|
pure virtualinherited |
Starts an audio call test.
This method starts an audio call test to determine whether the audio devices (for example, headset and speaker) and the network connection are working properly.
In the audio call test, you record your voice. If the recording plays back within the set time interval, the audio devices and the network connection are working properly.
LIVE_BROADCASTING
profile, only a host can call this method. intervalInSeconds | The time interval (s) between when you speak and when the recording plays back. |
|
pure virtualinherited |
Starts a video call test.
config | configuration for video call test. |
|
pure virtualinherited |
Enables the video.
You can call this method either before joining a channel or during a call. If you call this method before entering a channel, the service starts the video; if you call it during a call, the audio call switches to a video call.
|
pure virtualinherited |
Disables the video.
This method stops capturing the local video and receiving any remote video. To enable the local preview function, call enableLocalVideo (true).
|
pure virtualinherited |
Starts the local video preview before joining a channel.
Once you call this method to start the local video preview, if you leave the channel by calling leaveChannel, the local video preview remains until you call stopPreview to disable it.
|
pure virtualinherited |
Starts the local video preview for specific source type.
sourceType | - The video source type. |
|
pure virtualinherited |
Stops the local video preview and the video.
|
pure virtualinherited |
Stops the local video preview for specific source type.
sourceType | - The video source type. |
|
pure virtualinherited |
Starts the last-mile network probe test.
This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
Call this method to check the uplink network quality before users join a channel or before an audience switches to a host. Once this method is enabled, the SDK returns the following callbacks:
config | Sets the configurations of the last-mile network probe test. See LastmileProbeConfig. |
|
pure virtualinherited |
Stops the last-mile network probe test.
|
pure virtualinherited |
Sets the video encoder configuration.
Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.
The parameters specified in this method are the maximum values under ideal network conditions. If the video engine cannot render the video using the specified parameters due to poor network conditions, the parameters further down the list are considered until a successful configuration is found.
config | The local video encoder configuration: VideoEncoderConfiguration. |
|
pure virtualinherited |
Sets low-light enhancement.
The low-light enhancement feature can adaptively adjust the brightness value of the video captured in situations with low or uneven lighting, such as backlit, cloudy, or dark scenes. It restores or highlights the image details and improves the overall visual effect of the video.
You can call this method to enable the low-light enhancement feature and set the options of the low-light enhancement effect.
libagora_segmentation_extension.so
AgoraVideoSegmentationExtension.xcframework
libagora_segmentation_extension.dll
enabled | Sets whether to enable low-light enhancement:
|
options | The low-light enhancement options. See LowlightEnhanceOptions. |
|
pure virtualinherited |
Sets video noise reduction.
Underlit environments and low-end video capture devices can cause video images to contain significant noise, which affects video quality. In real-time interactive scenarios, video noise also consumes bitstream resources and reduces encoding efficiency during encoding.
You can call this method to enable the video noise reduction feature and set the options of the video noise reduction effect.
libagora_segmentation_extension.so
AgoraVideoSegmentationExtension.xcframework
libagora_segmentation_extension.dll
enabled | Sets whether to enable video noise reduction:
|
options | The video noise reduction options. See VideoDenoiserOptions. |
|
pure virtualinherited |
Sets color enhancement.
The video images captured by the camera can have color distortion. The color enhancement feature intelligently adjusts video characteristics such as saturation and contrast to enhance the video color richness and color reproduction, making the video more vivid.
You can call this method to enable the color enhancement feature and set the options of the color enhancement effect.
libagora_segmentation_extension.so
AgoraVideoSegmentationExtension.xcframework
libagora_segmentation_extension.dll
enabled | Sets whether to enable color enhancement:
|
options | The color enhancement options. See ColorEnhanceOptions. |
|
pure virtualinherited |
Enables/Disables the virtual background. (beta function)
After enabling the virtual background function, you can replace the original background image of the local user with a custom background image. After the replacement, all users in the channel can see the custom background image.
libagora_segmentation_extension.dll
(Windows)/AgoraVideoSegmentationExtension.framework
(macOS) dynamic library into the project folder.enabled | Sets whether to enable the virtual background:
|
backgroundSource | The custom background image. See VirtualBackgroundSource. Note: To adapt the resolution of the custom background image to the resolution of the SDK capturing video, the SDK scales and crops the custom background image while ensuring that the content of the custom background image is not distorted. |
|
pure virtualinherited |
Enables/Disables the super resolution feature for a remote user's video. (beta feature)
This feature effectively boosts the resolution of a remote user's video seen by the local user. If the original resolution of a remote user's video is a × b, the local user's device can render the remote video at a resolution of 2a × 2b after you enable this feature.
libagora_super_resolution_extension.so
AgoraSuperResolutionExtension.xcframework
userId | The user ID of the remote user. |
enable | Determines whether to enable super resolution for the remote user's video:
|
|
pure virtualinherited |
Initializes the video view of a remote user.
This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees.
Usually the app should specify the uid
of the remote video in the method call before the remote user joins the channel. If the remote uid
is unknown to the app, set it later when the app receives the onUserJoined callback.
To unbind the remote user from the view, set view
in VideoCanvas as null
.
canvas | The remote video view settings: VideoCanvas. |
|
pure virtualinherited |
Initializes the local video view.
This method initializes the video view of the local stream on the local device. It affects only the video view that the local user sees, not the published local video stream.
To unbind the local video from the view, set view
in VideoCanvas as null
.
canvas | The local video view setting: VideoCanvas. |
|
pure virtualinherited |
Enables the audio.
The audio is enabled by default.
|
pure virtualinherited |
Disables the audio.
|
pure virtualinherited |
Sets the audio parameters and application scenarios.
audioScenario
member in the RtcEngineContext struct.joinChannel
method.profile
as MUSIC_HIGH_QUALITY
(4) and scenario
as AUDIO_SCENARIO_GAME_STREAMING
(3).profile | Sets the sample rate, bitrate, encoding mode, and the number of channels: AUDIO_PROFILE_TYPE. |
scenario | Sets the audio application scenarios: AUDIO_SCENARIO_TYPE. |
|
pure virtualinherited |
Sets the audio profile.
joinChannel
method.profile
as MUSIC_HIGH_QUALITY
(4).audioScenario
member in the RtcEngineContext struct.profile | The audio profile, such as the sample rate, bitrate and codec type: AUDIO_PROFILE_TYPE. |
|
pure virtualinherited |
Set the audio scenario.
scenario | The audio scenario: AUDIO_SCENARIO_TYPE. |
|
pure virtualinherited |
Enables or disables the local audio capture.
The audio function is enabled by default. This method disables or re-enables the local audio function, that is, to stop or restart local audio capture and processing.
This method does not affect receiving or playing the remote audio streams, and enableLocalAudio
(false) is applicable to scenarios where the user wants to receive remote audio streams without sending any audio stream to other users in the channel.
enabled | Determines whether to disable or re-enable the local audio function:
|
|
pure virtualinherited |
Stops or resumes sending the local audio stream.
After calling this method successfully, the SDK triggers the onRemoteAudioStateChanged callback with the following parameters:
mute
is set as true
, this method does not disable the microphone, which does not affect any ongoing recording.setChannelProfile
method.mute | Determines whether to send or stop sending the local audio stream:
|
|
pure virtualinherited |
Stops or resumes receiving all remote audio stream.
This method works for all remote users that join or will join a channel using the joinChannel
method. It is equivalent to the autoSubscribeAudio
member in the ChannelMediaOptions class.
After you successfully call muteAllRemoteAudioStreams(true), you can take the following actions:
enableAudio
after muteAllRemoteAudioStreams(true).disableAudio
after muteAllRemoteAudioStreams(false).joinChannel
. To set whether to receive remote audio streams for a specific channel, Agora recommends using autoSubscribeAudio
in the ChannelMediaOptions class. mute | Whether to stop receiving remote audio streams:
|
|
pure virtualinherited |
Determines whether to receive all remote audio streams by default.
joinChannel
Use this method to set whether to receive audio streams of subsequent peer users. Agora recommends calling it before joining a channel.
A successful call of setDefaultMuteAllRemoteAudioStreams(true) results in that the local user not receiving any audio stream after joining a channel.
mute | Whether to receive remote audio streams by default:
|
|
pure virtualinherited |
Stops or resumes receiving the audio stream of a specified user.
uid | The ID of the specified user. |
mute | Whether to stop receiving the audio stream of the specified user:
|
|
pure virtualinherited |
Stops or resumes sending the local video stream.
mute | Determines whether to send or stop sending the local video stream:
|
|
pure virtualinherited |
Disables or re-enables the local video capture.
Once you enable the video using enableVideo, the local video is enabled by default. This method disables or re-enables the local video capture.
enableLocalVideo(false)
applies to scenarios when the user wants to watch the remote video without sending any video stream to the other user.
enableVideo
. Otherwise, this method may not work properly.enabled | Determines whether to disable or re-enable the local video, including the capturer, renderer, and sender:
|
|
pure virtualinherited |
Stops or resumes receiving all remote video streams.
This method works for all remote users that join or will join a channel using the joinChannel
method. It is equivalent to the autoSubscribeVideo
member in the ChannelMediaOptions class.
After you successfully call muteAllRemoteVideoStreams(true), you can take the following actions:
enableVideo
after muteAllRemoteVideoStreams(true).disableVideo
after muteAllRemoteVideoStreams(false).joinChannel
. To set whether to receive remote audio streams for a specific channel, Agora recommends using autoSubscribeVideo
in the ChannelMediaOptions class. mute | Whether to stop receiving remote video streams:
|
|
pure virtualinherited |
Determines whether to receive all remote video streams by default.
joinChannel
.Use this method to set whether to receive video streams of subsequent peer users. Agora recommends calling it before joining a channel.
A successful call of setDefaultMuteAllRemoteVideoStreams(true) results in that the local user not receiving any video stream after joining a channel.
mute | Whether to receive remote video streams by default:
|
|
pure virtualinherited |
Stops or resumes receiving the video stream of a specified user.
uid | The ID of the specified user. |
mute | Whether to stop receiving the video stream of the specified user:
|
|
pure virtualinherited |
Sets the remote video stream type.
If the remote user has enabled the dual-stream mode, by default the SDK receives the high-stream video by Call this method to switch to the low-stream video.
uid | ID of the remote user sending the video stream. |
streamType | Sets the video stream type: VIDEO_STREAM_TYPE. |
|
pure virtualinherited |
Sets the remote video subscription options
uid | ID of the remote user sending the video stream. |
options | Sets the video subscription options. |
|
pure virtualinherited |
Sets the default stream type of the remote video if the remote user has enabled dual-stream.
streamType | Sets the default video stream type: VIDEO_STREAM_TYPE. |
|
pure virtualinherited |
Sets the allowlist of subscribe remote stream audio.
uidList | The id list of users whose audio you want to subscribe to. |
uidNumber | The number of uid in uidList. |
If a user is in the blocklist and allowlist at the same time, only the blocklist takes effect.
|
pure virtualinherited |
Sets the allowlist of subscribe remote stream video.
uidList | The id list of users whose video you want to subscribe to. |
uidNumber | The number of uid in uidList. |
If a user is in the blocklist and allowlist at the same time, only the blocklist takes effect.
|
pure virtualinherited |
Enables the onAudioVolumeIndication
callback to report on which users are speaking and the speakers' volume.
Once the onAudioVolumeIndication callback is enabled, the SDK returns the volume indication in the at the time interval set in enableAudioVolumeIndication
, regardless of whether any user is speaking in the channel.
interval | Sets the time interval between two consecutive volume indications:
|
smooth | The smoothing factor that sets the sensitivity of the audio volume indicator. The value range is [0, 10]. The greater the value, the more sensitive the indicator. The recommended value is 3. |
reportVad |
|
|
pure virtualinherited |
Starts an audio recording.
The SDK allows recording during a call, which supports either one of the following two formats:
Ensure that the directory to save the recording file exists and is writable. This method is usually called after the joinChannel() method. The recording automatically stops when the leaveChannel() method is called.
filePath | Full file path of the recording file. The string of the file name is in UTF-8 code. |
quality | Sets the audio recording quality: AUDIO_RECORDING_QUALITY_TYPE. |
|
pure virtualinherited |
Starts an audio recording.
The SDK allows recording during a call, which supports either one of the following two formats:
Ensure that the directory to save the recording file exists and is writable. This method is usually called after the joinChannel() method. The recording automatically stops when the leaveChannel() method is called.
filePath | Full file path of the recording file. The string of the file name is in UTF-8 code. |
sampleRate | Sample rate, value should be 16000, 32000, 44100, or 48000. |
quality | Sets the audio recording quality: AUDIO_RECORDING_QUALITY_TYPE. |
|
pure virtualinherited |
Starts an audio recording.
The SDK allows recording during a call, which supports either one of the following two formats:
Ensure that the directory to save the recording file exists and is writable. This method is usually called after the joinChannel() method. The recording automatically stops when the leaveChannel() method is called.
config | Audio recording config. |
|
pure virtualinherited |
register encoded audio frame observer
|
pure virtualinherited |
Creates a media player source object and return its pointer. If full featured media player source is supported, it will create it, or it will create a simple media player.
|
pure virtualinherited |
Destroy a media player source instance. If a media player source instance is destroyed, the video and audio of it cannot be published.
media_player | The pointer to rtc::IMediaPlayerSource. |
|
pure virtualinherited |
Select audio track for the music file.
Call this method when you are in a channel.
|
pure virtualinherited |
Get audio track count of the music file.
Call this method when you are in a channel.
|
pure virtualinherited |
Enables/Disables stereo panning for remote users.
Ensure that you call this method before joinChannel to enable stereo panning for remote users so that the local user can track the position of a remote user by calling setRemoteVoicePosition.
enabled | Sets whether or not to enable stereo panning for remote users:
|
|
pure virtualinherited |
Sets the sound position and gain of a remote user.
When the local user calls this method to set the sound position of a remote user, the sound difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a real sense of space. This method applies to massively multiplayer online games, such as Battle Royale games.
uid | The ID of the remote user. |
pan | The sound position of the remote user. The value ranges from -1.0 to 1.0:
|
gain | Gain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain. |
|
pure virtualinherited |
enable spatial audio
enabled | enable/disable spatial audio:
|
|
pure virtualinherited |
Sets an SDK preset voice beautifier effect.
Call this method to set an SDK preset voice beautifier effect for the local user who sends an audio stream. After setting a voice beautifier effect, all users in the channel can hear the effect.
You can set different voice beautifier effects for different scenarios. See Set the Voice Beautifier and Audio Effects.
To achieve better audio effect quality, Agora recommends calling setAudioProfile and setting the scenario
parameter to AUDIO_SCENARIO_GAME_STREAMING(3)
and the profile
parameter to AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)
or AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)
before calling this method.
profile
parameter of setAudioProfile to AUDIO_PROFILE_SPEECH_STANDARD(1)
or AUDIO_PROFILE_IOT(6)
; otherwise, this method call fails.preset | The options for SDK preset voice beautifier effects: VOICE_BEAUTIFIER_PRESET. |
|
pure virtualinherited |
Sets an SDK preset voice conversion.
Call this method to set an SDK preset voice conversion for the local user who sends an audio stream. After setting an voice conversion, all users in the channel can hear the effect.
You can set different voice conversion for different scenarios. See Set the Voice Beautifier and Audio Effects.
To achieve better voice conversion quality, Agora recommends calling setAudioProfile and setting the scenario
parameter to AUDIO_SCENARIO_GAME_STREAMING(3)
before calling this method.
parameter
of setAudioProfile
to AUDIO_PROFILE_SPEECH_STANDARD(1)
or AUDIO_PROFILE_IOT(6)
; otherwise, this method call fails.preset
parameter to enumerators,setVoiceConversionPreset
:preset | The options for SDK preset voice conversion. See VOICE_CONVERSION_PRESET. |
|
pure virtualinherited |
Sets parameters for SDK preset voice beautifier effects.
Call this method to set a gender characteristic and a reverberation effect for the singing beautifier effect. This method sets parameters for the local user who sends an audio stream.
After you call this method successfully, all users in the channel can hear the relevant effect.
To achieve better audio effect quality, before you call this method, Agora recommends calling setAudioProfile, and setting the scenario
parameter as AUDIO_SCENARIO_GAME_STREAMING(3)
and the profile
parameter as AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)
or AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)
.
profile
parameter of setAudioProfile as AUDIO_PROFILE_SPEECH_STANDARD(1)
or AUDIO_PROFILE_IOT(6)
; otherwise, this method call does not take effect.setVoiceBeautifierParameters
:preset | The options for SDK preset voice beautifier effects:
|
param1 | The gender characteristics options for the singing voice:
|
param2 | The reverberation effects options:
|
|
pure virtualinherited |
Set parameters for SDK preset voice conversion.
preset | The options for SDK preset audio effects. See VOICE_CONVERSION_PRESET. |
param1 | reserved. |
param2 | reserved. |
|
pure virtualinherited |
Sets preset audio playback effect for remote headphones after remote audio is mixed.
preset | The preset key: HEADPHONE_EQUALIZER_PRESET.
|
|
pure virtualinherited |
Sets the parameters of audio playback effect for remote headphones after remote audio is mixed.
lowGain | The higher the parameter value, the deeper the sound. The value range is [-10,10]. |
highGain | The higher the parameter value, the sharper the sound. The value range is [-10,10]. |
|
pure virtualinherited |
DEPRECATED Specifies an SDK output log file.
The log file records all log data for the SDK’s operation. Ensure that the directory for the log file exists and is writable.
filePath | File path of the log file. The string of the log file is in UTF-8. |
|
pure virtualinherited |
Sets the output log filter level of the SDK.
You can use one or a combination of the filters. The log filter level follows the sequence of OFF
, CRITICAL
, ERROR
, WARNING
, INFO
, and DEBUG
. Choose a filter level and you will see logs preceding that filter level. For example, if you set the log filter level to WARNING
, you see the logs within levels CRITICAL
, ERROR
, and WARNING
.
filter | The log filter level:
|
|
pure virtualinherited |
Sets the output log level of the SDK.
You can set the SDK to ouput the log files of the specified level.
level | The log level:
|
|
pure virtualinherited |
Sets the log file size (KB).
The SDK has two log files, each with a default size of 512 KB. If you set fileSizeInBytes
as 1024 KB, the SDK outputs log files with a total maximum size of 2 MB. If the total size of the log files exceed the set value, the new output log files overwrite the old output log files.
fileSizeInKBytes | The SDK log file size (KB). |
|
pure virtualinherited |
Upload current log file immediately to server. only use this when an error occurs block before log file upload success or timeout.
|
pure virtualinherited |
Updates the display mode of the local video view.
After initializing the local video view, you can call this method to update its rendering mode. It affects only the video view that the local user sees, not the published local video stream.
renderMode | Sets the local display mode. See #RENDER_MODE_TYPE. |
mirrorMode | Sets the local mirror mode. See VIDEO_MIRROR_MODE_TYPE. |
|
pure virtualinherited |
Updates the display mode of the local video view.
After initializing the local video view, you can call this method to update its rendering mode. It affects only the video view that the local user sees, not the published local video stream.
renderMode | Sets the local display mode. See #RENDER_MODE_TYPE. |
|
pure virtualinherited |
Updates the display mode of the video view of a remote user.
After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
uid | ID of the remote user. |
renderMode | Sets the remote display mode. See #RENDER_MODE_TYPE. |
mirrorMode | Sets the mirror type. See VIDEO_MIRROR_MODE_TYPE. |
|
pure virtualinherited |
Sets the local video mirror mode.
Use this method before calling the startPreview method, or the mirror mode does not take effect until you call the startPreview
method again.
mirrorMode | Sets the local video mirror mode. See VIDEO_MIRROR_MODE_TYPE. |
|
pure virtualinherited |
Enables or disables the dual video stream mode.
If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.
enabled |
|
|
pure virtualinherited |
Enables or disables the dual video stream mode.
If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.
enabled |
|
streamConfig |
|
|
pure virtualinherited |
Enables, disables or auto enable the dual video stream mode.
If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.
mode |
|
|
pure virtualinherited |
Enables, disables or auto enable the dual video stream mode.
If dual-stream mode is enabled, the subscriber can choose to receive the high-stream (high-resolution high-bitrate video stream) or low-stream (low-resolution low-bitrate video stream) video using setRemoteVideoStreamType.
mode | Dual stream mode: SIMULCAST_STREAM_MODE. |
streamConfig | Configurations of the low stream: SimulcastStreamConfig. |
|
pure virtualinherited |
Enables or disables echo cancellation.
enabled | Whether to enable echo cancellation. |
audioSourceDelay | The delayed time for capturing the audio source. |
|
pure virtualinherited |
Sets the external audio source.
sourceId | custom audio source id. |
enabled | Determines whether to local playback the external audio source:
|
|
pure virtualinherited |
Start primary custom audio track local playback.
|
pure virtualinherited |
Stop primary custom audio track local playback.
|
pure virtualinherited |
Start secondary custom audio track local playback.
|
pure virtualinherited |
Stop secondary custom audio track local playback.
|
pure virtualinherited |
Sets the audio recording format for the onRecordAudioFrame callback.
sampleRate | The sample rate (Hz) of the audio data returned in the onRecordAudioFrame callback, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channel | The number of audio channels of the audio data returned in the onRecordAudioFrame callback, which can be set as 1 or 2:
|
mode | This mode is deprecated. |
samplesPerCall | not support. Sampling points in the called data returned in onRecordAudioFrame(). For example, it is usually set as 1024 for stream pushing. |
|
pure virtualinherited |
Sets the audio playback format for the onPlaybackAudioFrame callback.
sampleRate | Sets the sample rate (Hz) of the audio data returned in the onPlaybackAudioFrame callback, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channel | The number of channels of the audio data returned in the onPlaybackAudioFrame callback, which can be set as 1 or 2:
|
mode | Deprecated. The use mode of the onPlaybackAudioFrame() callback: agora::rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE. |
samplesPerCall | not support. Sampling points in the called data returned in onPlaybackAudioFrame(). For example, it is usually set as 1024 for stream pushing. |
|
pure virtualinherited |
Sets the mixed audio format for the onMixedAudioFrame callback.
sampleRate | The sample rate (Hz) of the audio data returned in the onMixedAudioFrame callback, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channel | The number of channels of the audio data in onMixedAudioFrame callback, which can be set as 1 or 2:
|
samplesPerCall | not support. Sampling points in the called data returned in onMixedAudioFrame . For example, it is usually set as 1024 for stream pushing. |
|
pure virtualinherited |
Sets the audio ear monitoring format for the onEarMonitoringAudioFrame callback.
sampleRate | Sets the sample rate (Hz) of the audio data returned in the onEarMonitoringAudioFrame callback, which can set be as 8000, 16000, 32000, 44100, or 48000. |
channel | The number of channels of the audio data returned in the onEarMonitoringAudioFrame callback, which can be set as 1 or 2:
|
mode | Deprecated. The use mode of the onEarMonitoringAudioFrame() callback: agora::rtc::RAW_AUDIO_FRAME_OP_MODE_TYPE. |
samplesPerCall | not support. Sampling points in the called data returned in onEarMonitoringAudioFrame(). For example, it is usually set as 1024 for stream pushing. |
|
pure virtualinherited |
Sets the audio playback format before mixing in the onPlaybackAudioFrameBeforeMixing callback.
sampleRate | The sample rate (Hz) of the audio data returned in onPlaybackAudioFrameBeforeMixing , which can set be as 8000, 16000, 32000, 44100, or 48000. |
channel | Number of channels of the audio data returned in onPlaybackAudioFrameBeforeMixing , which can be set as 1 or 2:
|
|
pure virtualinherited |
Enable the audio spectrum monitor.
intervalInMS | Sets the time interval(ms) between two consecutive audio spectrum callback. The default value is 100. This param should be larger than 10. |
|
pure virtualinherited |
Disalbe the audio spectrum monitor.
|
pure virtualinherited |
Registers an audio spectrum observer.
You need to implement the IAudioSpectrumObserver
class in this method, and register the following callbacks according to your scenario:
observer | A pointer to the audio spectrum observer: IAudioSpectrumObserver. |
|
pure virtualinherited |
Releases the audio spectrum observer.
observer | The pointer to the audio spectrum observer: IAudioSpectrumObserver. |
|
pure virtualinherited |
Adjusts the recording volume.
volume | The recording volume, which ranges from 0 to 400: |
|
pure virtualinherited |
Mute or resume recording signal volume.
mute | Determines whether to mute or resume the recording signal volume.
|
|
pure virtualinherited |
Adjusts the playback volume.
volume | The playback volume, which ranges from 0 to 400: |
|
pure virtualinherited |
|
pure virtualinherited |
Sets the fallback option for the published video stream based on the network conditions.
If option
is set as STREAM_FALLBACK_OPTION_AUDIO_ONLY (2), the SDK will:
When the published video stream falls back to audio only or when the audio-only stream switches back to the video, the SDK triggers the onLocalPublishFallbackToAudioOnly callback.
option | Sets the fallback option for the published video stream:
|
|
pure virtualinherited |
Sets the fallback option for the remotely subscribed video stream based on the network conditions.
The default setting for option
is STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW (1), where the remotely subscribed video stream falls back to the low-stream video (low resolution and low bitrate) under poor downlink network conditions.
If option
is set as STREAM_FALLBACK_OPTION_AUDIO_ONLY (2), the SDK automatically switches the video from a high-stream to a low-stream, or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. The SDK monitors the network quality and restores the video stream when the network conditions improve.
When the remotely subscribed video stream falls back to audio only or when the audio-only stream switches back to the video stream, the SDK triggers the onRemoteSubscribeFallbackToAudioOnly callback.
option | Sets the fallback option for the remotely subscribed video stream. See STREAM_FALLBACK_OPTIONS. |
|
pure virtualinherited |
Enables loopback recording.
If you enable loopback recording, the output of the default sound card is mixed into the audio stream sent to the other end.
enabled | Sets whether to enable/disable loopback recording.
|
deviceName | Pointer to the device name of the sound card. The default value is NULL (the default sound card).
|
|
pure virtualinherited |
Adjusts the loopback recording volume.
volume | The loopback volume, which ranges from 0 to 100: |
|
pure virtualinherited |
Retrieves the audio volume for recording loopback.
|
pure virtualinherited |
Enables in-ear monitoring.
enabled | Determines whether to enable in-ear monitoring.
|
includeAudioFilters | The type of the ear monitoring: EAR_MONITORING_FILTER_TYPE |
|
pure virtualinherited |
Sets the volume of the in-ear monitor.
volume | Sets the volume of the in-ear monitor. The value ranges between 0 and 100 (default). |
|
pure virtualinherited |
Set extension provider specific property.
provider | The name of the extension provider, e.g. agora.io. |
key | Key for the property. |
value | Property value of json format. |
|
pure virtualinherited |
Registers an extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
type | The name of media source type, e.g. PRIMARY_CAMERA_SOURCE. |
|
pure virtualinherited |
Enable/Disable extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
enable | Enable or disable extension.
|
|
pure virtualinherited |
Enable/Disable extension.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
extensionInfo | The information for extension. |
enable | Enable or disable.
|
|
pure virtualinherited |
Set extension specific property.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
key | Key for the property. |
value | Property value of json format. |
|
pure virtualinherited |
Set extension specific property.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
extensionInfo | The information for extension. |
key | Key for the property. |
value | Property value of json format. |
|
pure virtualinherited |
Get extension specific property.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
key | Key for the property. |
value | Property value of json format. |
buf_len | Max length of the json value buffer |
|
pure virtualinherited |
Get extension specific property.
provider | The name of the extension provider, e.g. agora.io. |
extension | The name of the extension, e.g. agora.beauty. |
extensionInfo | The information for extension. |
key | Key for the property. |
value | Property value of json format. |
buf_len | Max length of the json value buffer |
|
pure virtualinherited |
Get an custom video track id created by internal,which could used to publish or preview
|
pure virtualinherited |
Get an custom encoded video track id created by internal,which could used to publish or preview
|
pure virtualinherited |
destroy a created custom video track id
video_track_id | The video track id which was created by createCustomVideoTrack |
|
pure virtualinherited |
destroy a created custom encoded video track id
video_track_id | The video track id which was created by createCustomEncodedVideoTrack |
|
pure virtualinherited |
Gets the current call ID.
When a user joins a channel on a client, a callId
is generated to identify the call.
After a call ends, you can call rate
or complain
to gather feedback from the customer. These methods require a callId
parameter. To use these feedback methods, call the this method first to retrieve the callId
during the call, and then pass the value as an argument in the rate
or complain
method after the call ends.
callId | The reference to the call ID. |
|
pure virtualinherited |
Allows a user to rate the call.
It is usually called after the call ends.
callId | The call ID retrieved from the getCallId method. |
rating | The rating of the call between 1 (the lowest score) to 5 (the highest score). |
description | (Optional) The description of the rating. The string length must be less than 800 bytes. |
|
pure virtualinherited |
Allows a user to complain about the call quality.
This method is usually called after the call ends.
callId | The call ID retrieved from the getCallId method. |
description | (Optional) The description of the complaint. The string length must be less than 800 bytes. |
|
pure virtualinherited |
Publishes the local stream without transcoding to a specified CDN live RTMP address. (CDN live only.)
The SDK returns the result of this method call in the onStreamPublished callback.
The startRtmpStreamWithoutTranscoding method call triggers the onRtmpStreamingStateChanged callback on the local client to report the state of adding a local stream to the CDN.
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. |
|
pure virtualinherited |
Publishes the local stream with transcoding to a specified CDN live RTMP address. (CDN live only.)
The SDK returns the result of this method call in the onStreamPublished callback.
The startRtmpStreamWithTranscoding method call triggers the onRtmpStreamingStateChanged callback on the local client to report the state of adding a local stream to the CDN.
url | The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. |
transcoding | Sets the CDN live audio/video transcoding settings. See LiveTranscoding. |
|
pure virtualinherited |
Update the video layout and audio settings for CDN live. (CDN live only.)
transcoding | Sets the CDN live audio/video transcoding settings. See LiveTranscoding. |
|
pure virtualinherited |
Stop an RTMP stream with transcoding or without transcoding from the CDN. (CDN live only.)
This method removes the RTMP URL address (added by the startRtmpStreamWithoutTranscoding method or IRtcEngine::startRtmpStreamWithTranscoding "startRtmpStreamWithTranscoding" method) from a CDN live stream. The SDK returns the result of this method call in the onStreamUnpublished callback.
The stopRtmpStream method call triggers the onRtmpStreamingStateChanged callback on the local client to report the state of removing an RTMP stream from the CDN.
url | The RTMP URL address to be removed. The maximum length of this parameter is 1024 bytes. |
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
Starts video capture with a primary camera.
config | The configuration of the video capture with a primary camera. For details, see CameraCaptureConfiguration. |
|
pure virtualinherited |
Starts video capture with a secondary camera.
config | The onfiguration of the video capture with a secondary camera. For details, see CameraCaptureConfiguration. |
|
pure virtualinherited |
Stops capturing video through the primary camera.
You can call this method to stop capturing video through the first camera after calling startPrimaryCameraCapture
.
|
pure virtualinherited |
Stops capturing video through the secondary camera.
You can call this method to stop capturing video through the first camera after calling startSecondaryCameraCapture
.
|
pure virtualinherited |
Sets the rotation angle of the video captured by the screen.
When the screen capture device does not have the gravity sensing function, you can call this method to manually adjust the rotation angle of the captured video.
type | The video source type. See VIDEO_SOURCE_TYPE. |
orientation | The clockwise rotation angle. See VIDEO_ORIENTATION. |
|
pure virtualinherited |
Starts sharing a primary screen.
config | The configuration of the captured screen. For details, see ScreenCaptureConfiguration. |
|
pure virtualinherited |
Starts sharing a secondary screen.
config | The configuration of the captured screen. For details, see ScreenCaptureConfiguration. |
|
pure virtualinherited |
Stop sharing the primary screen.
After calling startPrimaryScreenCapture
, you can call this method to stop sharing the first screen.
|
pure virtualinherited |
Stop sharing a secondary screen.
After calling startSecondaryScreenCapture
, you can call this method to stop sharing the first screen.
|
pure virtualinherited |
Gets the current connection state of the SDK.
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
Registers a packet observer.
The Agora Native SDK allows your app to register a packet observer to receive events whenever a voice or video packet is transmitting.
observer | The IPacketObserver object. |
|
pure virtualinherited |
Enables/Disables the built-in encryption.
In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel.
All users in the same channel must use the same encryption mode and encryption key. Once all users leave the channel, the encryption key of this channel is automatically cleared.
enabled | Whether to enable the built-in encryption:
|
config | Configurations of built-in encryption schemas. See EncryptionConfig. |
IRtcEngine
instance before calling this method.
|
pure virtualinherited |
Creates a data stream.
You can call this method to create a data stream and improve the reliability and ordering of data tranmission.
reliable
and ordered
.[out] | streamId | The ID of the stream data. |
reliable | Sets whether the recipients are guaranteed to receive the data stream from the sender within five seconds:
| |
ordered | Sets whether the recipients receive the data stream in the sent order:
|
|
pure virtualinherited |
Creates a data stream.
Each user can create up to five data streams during the lifecycle of the IChannel.
streamId | The ID of the created data stream. |
config | The config of data stream. |
|
pure virtualinherited |
Sends a data stream.
After calling createDataStream, you can call this method to send a data stream to all users in the channel.
The SDK has the following restrictions on this method:
After the remote user receives the data stream within 5 seconds, the SDK triggers the onStreamMessage callback on the remote client. After the remote user does not receive the data stream within 5 seconds, the SDK triggers the onStreamMessageError callback on the remote client.
COMMUNICATION
profile or to the hosts in the LIVE_BROADCASTING
profile. If an audience in the LIVE_BROADCASTING
profile calls this method, the audience may be switched to a host.streamId | The ID of the stream data. |
data | The data stream. |
length | The length (byte) of the data stream. |
|
pure virtualinherited |
DEPRECATED Adds a watermark image to the local video or CDN live stream.
This method is not recommend, Use addVideoWatermark2 instead.
This method adds a PNG watermark image to the local video stream for the recording device, channel audience, and CDN live audience to view and capture.
To add the PNG file to the CDN live publishing stream, see the setLiveTranscoding method.
watermark | Pointer to the watermark image to be added to the local video stream. See RtcImage. |
|
pure virtualinherited |
Adds a watermark image to the local video.
This method adds a PNG watermark image to the local video in a live broadcast. Once the watermark image is added, all the audience in the channel (CDN audience included), and the recording device can see and capture it. Agora supports adding only one watermark image onto the local video, and the newly watermark image replaces the previous one.
The watermark position depends on the settings in the setVideoEncoderConfiguration method:
setVideoEncoderConfiguration
method. Otherwise, the watermark image will be cropped.visibleInPreview
member in the WatermarkOptions class to set whether or not the watermark is visible in preview.watermarkUrl | The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path. |
options | Pointer to the watermark's options to be added. See WatermarkOptions for more infomation. |
|
pure virtualinherited |
Enables interoperability with the Agora Web SDK (Live Broadcast only).
Use this method when the channel profile is Live Broadcast. Interoperability with the Agora Web SDK is enabled by default when the channel profile is Communication.
enabled | Determines whether to enable interoperability with the Agora Web SDK.
|
|
pure virtualinherited |
Agora supports reporting and analyzing customized messages.
This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes.
To try out this function, contact support@agora.io and discuss the format of customized messages with us.
|
pure virtualinherited |
Registers the metadata observer.
You need to implement the IMetadataObserver class and specify the metadata type in this method. This method enables you to add synchronized metadata in the video stream for more diversified live interactive streaming, such as sending shopping links, digital coupons, and online quizzes.
A successful call of this method triggers the getMaxMetadataSize callback.
joinChannel
method.LIVE_BROADCASTING
channel profile.observer | IMetadataObserver. |
type | The metadata type. See METADATA_TYPE. The SDK supports VIDEO_METADATA (0) only for now. |
|
pure virtualinherited |
Unregisters the metadata observer.
observer | IMetadataObserver. |
type | The metadata type. See METADATA_TYPE. The SDK supports VIDEO_METADATA (0) only for now. |
|
pure virtualinherited |
Start audio frame dump.
Optional location
is: "pre_apm_proc", "apm", "pre_send_proc", "filter", "enc", "tx_mixer", "at_record", "atw_record" for audio sending. "dec", "mixed", "play", "rx_mixer", "playback_mixer", "pcm_source_playback_mixer", "pre_play_proc", "at_playout", "atw_playout" for audio receiving.
|
pure virtualinherited |
Stops the audio frame dump.
|
pure virtualinherited |
Registers a user account.
Once registered, the user account can be used to identify the local user when the user joins the channel. After the user successfully registers a user account, the SDK triggers the onLocalUserRegistered callback on the local client, reporting the user ID and user account of the local user.
To join a channel with a user account, you can choose either of the following:
The difference between the two is that for the former, the time elapsed between calling the joinChannelWithUserAccount method and joining the channel is shorter than the latter.
userAccount
parameter. Otherwise, this method does not take effect.userAccount
parameter is unique in the channel.appId | The App ID of your project. |
userAccount | The user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
|
|
pure virtualinherited |
Joins the channel with a user account.
After the user successfully joins the channel, the SDK triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile.token | The token generated at your server:
|
channelId | The channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are:
|
userAccount | The user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
|
|
pure virtualinherited |
Joins the channel with a user account.
After the user successfully joins the channel, the SDK triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile.token | The token generated at your server:
|
channelId | The channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are:
|
userAccount | The user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
|
options | The channel media options: ChannelMediaOptions |
|
pure virtualinherited |
Joins the channel with a user account.
After the user successfully joins the channel, the SDK triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile.token | The token generated at your server:
|
channelId | The channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are:
|
userAccount | The user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
|
options | The channel media options: ChannelMediaOptions |
eventHandler | The pointer to the IRtcEngine event handler: IRtcEngineEventHandler. |
|
pure virtualinherited |
Gets the user information by passing in the user account.
After a remote user joins the channel, the SDK gets the user ID and user account of the remote user, caches them in a mapping table object (userInfo
), and triggers the onUserInfoUpdated callback on the local client.
After receiving the oonUserInfoUpdated callback, you can call this method to get the user ID of the remote user from the userInfo
object by passing in the user account.
userAccount | The user account of the user. Ensure that you set this parameter. | |
[in,out] | userInfo | A userInfo object that identifies the user:
|
|
pure virtualinherited |
Gets the user information by passing in the user ID.
After a remote user joins the channel, the SDK gets the user ID and user account of the remote user, caches them in a mapping table object (userInfo
), and triggers the onUserInfoUpdated callback on the local client.
After receiving the onUserInfoUpdated callback, you can call this method to get the user account of the remote user from the userInfo
object by passing in the user ID.
uid | The user ID of the remote user. Ensure that you set this parameter. | |
[in,out] | userInfo | A userInfo object that identifies the user:
|
|
pure virtualinherited |
Starts to relay media streams across channels.
After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged and onChannelMediaRelayEvent callbacks, and these callbacks return the state and events of the media stream relay.
LIVE_BROADCASTING
channel.configuration | The configuration of the media stream relay: ChannelMediaRelayConfiguration. |
|
pure virtualinherited |
Updates the channels for media stream relay. After a successful startChannelMediaRelay method call, if you want to relay the media stream to more channels, or leave the current relay channel, you can call the updateChannelMediaRelay method.
After a successful method call, the SDK triggers the onChannelMediaRelayEvent callback with the RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL (7) state code.
configuration | The media stream relay configuration: ChannelMediaRelayConfiguration. |
|
pure virtualinherited |
Stops the media stream relay.
Once the relay stops, the host quits all the destination channels.
After a successful method call, the SDK triggers the onChannelMediaRelayStateChanged callback. If the callback returns RELAY_STATE_IDLE (0) and RELAY_OK (0), the host successfully stops the relay.
|
pure virtualinherited |
pause the channels for media stream relay.
|
pure virtualinherited |
resume the channels for media stream relay.
|
pure virtualinherited |
Set audio parameters for direct streaming to CDN
profile | Sets the sample rate, bitrate, encoding mode, and the number of channels: AUDIO_PROFILE_TYPE. |
|
pure virtualinherited |
Set video parameters for direct streaming to CDN
Each configuration profile corresponds to a set of video parameters, including the resolution, frame rate, and bitrate.
config | The local video encoder configuration: VideoEncoderConfiguration. |
|
pure virtualinherited |
Start direct cdn streaming
eventHandler | A pointer to the direct cdn streaming event handler: IDirectCdnStreamingEventHandler. |
publishUrl | The url of the cdn used to publish the stream. |
options | The direct cdn streaming media options: DirectCdnStreamingMediaOptions. |
|
pure virtualinherited |
Stop direct cdn streaming
|
pure virtualinherited |
Change the media source during the pushing
options | The direct cdn streaming media options: DirectCdnStreamingMediaOptions. |
|
pure virtualinherited |
Enables the rhythm player.
sound1 | The absolute path or URL address (including the filename extensions) of the file for the downbeat. |
sound2 | The absolute path or URL address (including the filename extensions) of the file for the upbeats. |
config | The configuration of rhythm player. |
|
pure virtualinherited |
Disables the rhythm player.
|
pure virtualinherited |
Configures the rhythm player.
config | The configuration of rhythm player. |
|
pure virtualinherited |
Takes a snapshot of a video stream.
This method takes a snapshot of a video stream from the specified user, generates a JPG image, and saves it to the specified path.
The method is asynchronous, and the SDK has not taken the snapshot when the method call returns. After a successful method call, the SDK triggers the onSnapshotTaken
callback to report whether the snapshot is successfully taken, as well as the details for that snapshot.
ChannelMediaOptions
.uid | The user ID. Set uid as 0 if you want to take a snapshot of the local user's video. |
filePath | The local path (including filename extensions) of the snapshot. For example:
|
Ensure that the path you specify exists and is writable.
|
pure virtualinherited |
Enables the content inspect.
enabled | Whether to enable content inspect:
|
config | The configuration for the content inspection. |
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
Sets the Agora cloud proxy service.
When the user's firewall restricts the IP address and port, refer to Use Cloud Proxy to add the specific IP addresses and ports to the firewall allowlist; then, call this method to enable the cloud proxy and set the proxyType
parameter as UDP_PROXY(1)
, which is the cloud proxy for the UDP protocol.
After a successfully cloud proxy connection, the SDK triggers the onConnectionStateChanged (CONNECTION_STATE_CONNECTING, CONNECTION_CHANGED_SETTING_PROXY_SERVER) callback.
To disable the cloud proxy that has been set, call setCloudProxy(NONE_PROXY)
. To change the cloud proxy type that has been set, call setCloudProxy(NONE_PROXY)
first, and then call setCloudProxy
, and pass the value that you expect in proxyType
.
proxyType | The cloud proxy type, see CLOUD_PROXY_TYPE. This parameter is required, and the SDK reports an error if you do not pass in a value. |
-2(ERR_INVALID_ARGUMENT)
: The parameter is invalid.-7(ERR_NOT_INITIALIZED)
: The SDK is not initialized.
|
pure virtualinherited |
set local access point addresses in local proxy mode. use this method before join channel.
config | The LocalAccessPointConfiguration class, See the definition of LocalAccessPointConfiguration for details. |
|
pure virtualinherited |
set advanced audio options.
options | The AdvancedAudioOptions class, See the definition of AdvancedAudioOptions for details. |
|
pure virtualinherited |
Bind local user and a remote user as an audio&video sync group. The remote user is defined by cid and uid. There’s a usage limit that local user must be a video stream sender. On the receiver side, media streams from same sync group will be time-synced
channelId | The channel id |
uid | The user ID of the remote user to be bound with (local user) |
|
pure virtualinherited |
enable or disable video image source to replace the current video source published or resume it
enable | true for enable, false for disable |
options | options for image track |
|
pure virtualinherited |
|
pure virtualinherited |
get network type value
|
pure virtualinherited |
Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options.
parameters | Pointer to the set parameters in a JSON string. |