Video SDK v3.7.1 API Reference for Unity
|
Inherits IRtcEngineNative.
Static Public Member Functions | |
static AgoraChannel | CreateChannel (IRtcEngine rtcEngine, string channelId) |
The AgoraChannel class.
agora_gaming_rtc.AgoraChannel.AgoraChannel | ( | IRtcEngine | rtcEngine, |
string | channelId | ||
) |
The AgoraChannel class.
|
static |
Creates and gets an AgoraChannel
object.
To join more than one channel, call this method multiple times to create as many AgoraChannel
objects as needed, and call the JoinChannel method of each created AgoraChannel
object.
After joining multiple channels, you can simultaneously subscribe to streams of all the channels, but publish a stream in only one channel at one time.
rtcEngine | IRtcEngine. |
channelId | The unique channel name for an Agora RTC session. It must be in the string format and not exceed 64 bytes in length. Supported character scopes are:
|
ERR_REFUSED(5)
.AgoraChannel
object, if the method call succeeds.NULL
, if the method call fails.ERR_REFUSED(5)
, if you set channelId
as the empty string "". int agora_gaming_rtc.AgoraChannel.ReleaseChannel | ( | ) |
Releases all AgoraChannel resources.
ERR_NOT_INITIALIZED(7)
: The SDK is not initialized before calling this method.
|
static |
int agora_gaming_rtc.AgoraChannel.JoinChannel | ( | string | token, |
string | info, | ||
uint | uid, | ||
ChannelMediaOptions | channelMediaOptions | ||
) |
Joins a channel with the user ID, and configures whether to publish or automatically subscribe to the audio or video streams.
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.
You must call the LeaveChannel method to exit the current call before entering another channel.
A successful JoinChannel
method call triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile.When the connection between the client and the Agora 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 OnReJoinChannelSuccessHandler callback on the local client.
JoinChannel
method in the IRtcEngine class, this method has the options
parameter, which configures whether the user publishes or automatically subscribes to the audio and video streams in the channel when joining the channel. By default, the user publishes the local audio and video streams and automatically subscribes to the audio and video streams of all the other users in the channel. Subscribing incurs all associated usage costs. To unsubscribe, set the options parameter
or call the Mute
methods accordingly.IRtcEngine
object.token | The token generated at your server. See Authenticate Your Users with Tokens. |
info | (Optional) Reserved for future use. |
uid | The user ID. A 32-bit unsigned integer with a value ranging from 1 to 232-1. The uid must be unique. If a uid is not assigned (or set to 0), the SDK assigns and returns a uid in the OnJoinChannelSuccessHandler callback. Your application must record and maintain the returned uid , because the SDK does not do so.
|
channelMediaOptions | The channel media options: ChannelMediaOptions. |
int agora_gaming_rtc.AgoraChannel.JoinChannelWithUserAccount | ( | string | token, |
string | userAccount, | ||
ChannelMediaOptions | channelMediaOptions | ||
) |
Joins the channel with a user account, and configures whether to publish or automatically subscribe to the audio or video streams.
A successful method call triggers the following callbacks:
COMMUNICATION
profile, or is a host in the LIVE_BROADCASTING
profile.token | The token for authentication:
|
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:
|
channelMediaOptions | The channel media options: ChannelMediaOptions. |
ERR_INVALID_ARGUMENT(-2)
ERR_NOT_READY(-3)
ERR_REFUSED(-5)
int agora_gaming_rtc.AgoraChannel.LeaveChannel | ( | ) |
Allows a user to leave a channel, such as hanging up or exiting a call.
After joining a channel, the user must call the LeaveChannel
method to end the call before joining another channel.
This method returns 0
if the user leaves the channel and releases all resources related to the call.
This method call is asynchronous, and the user has not left the channel when the method call returns. Once the user leaves the channel, the SDK triggers the ChannelOnLeaveChannelHandler callback.
A successful LeaveChannel
method call triggers the following callbacks:
ChannelOnLeaveChannelHandler
LeaveChannel
method, the LeaveChannel
process interrupts, and the ChannelOnLeaveChannelHandler
callback is not triggered.LeaveChannel
method during a CDN live streaming, the SDK triggers the RemovePublishStreamUrl method.int agora_gaming_rtc.AgoraChannel.Publish | ( | ) |
Publishes the local stream to the channel.
You must keep the following restrictions in mind when calling this method. Otherwise, the SDK returns the ERR_REFUSED(-5)
:
AgoraChannel
object.AgoraChannel
object.ERR_REFUSED(-5)
: The method call is refused. int agora_gaming_rtc.AgoraChannel.Unpublish | ( | ) |
Stops publishing a stream to the channel.
If you call this method in a channel where you are not publishing streams, the SDK returns ERR_REFUSED(5)
.
ERR_REFUSED(5)
: The method call is refused. string agora_gaming_rtc.AgoraChannel.ChannelId | ( | ) |
Gets the channel ID of the current AgoraChannel
object.
AgoraChannel
object, if the method call succeeds.string agora_gaming_rtc.AgoraChannel.GetCallId | ( | ) |
Retrieves the current call ID.
When a user joins a channel on a client, a call ID is generated to identify the call from the client. Feedback methods, such as Rate and Complain, must be called after the call ends to submit feedback to the SDK.
The Rate
and Complain
methods require the call ID retrieved from the GetCallId
method during a call. The call ID is passed as an argument into the Rate
and Complain
methods after the call ends.
int agora_gaming_rtc.AgoraChannel.RenewToken | ( | string | token | ) |
Gets a new token when the current token expires after a period of time.
The token
expires after a period of time once the token schema is enabled when:
CONNECTION_CHANGED_TOKEN_EXPIRED(9)
.The application should call this method to get the new token
. Failure to do so will result in the SDK disconnecting from the server.
token | Pointer to the new token. |
int agora_gaming_rtc.AgoraChannel.SetEncryptionSecret | ( | string | secret | ) |
Enables built-in encryption with an encryption password before users join a channel.
All users in a channel must use the same encryption password. The encryption password is automatically cleared once a user leaves the channel.
If an encryption password is not specified, the encryption functionality will be disabled.
secret | The encryption password. |
int agora_gaming_rtc.AgoraChannel.SetEncryptionMode | ( | string | encryptionMode | ) |
Sets the built-in encryption mode.
The Agora Unity SDK supports built-in encryption, which is set to the aes-128-xts
mode by default. Call this method to use other encryption modes.
All users in the same channel must use the same encryption mode and password.
Refer to the information related to the AES encryption algorithm on the differences between the encryption modes.
encryptionMode | The set encryption mode:
|
int agora_gaming_rtc.AgoraChannel.SetClientRole | ( | CLIENT_ROLE_TYPE | role | ) |
Sets the role of the user, such as a host or an audience (default), before joining a channel in an interactive live streaming.
This method can be used to switch the user role in the interactive live streaming after the user joins a channel.
In the Live Broadcast profile, when a user switches user roles after joining a channel, a successful SetClientRole
method call triggers the following callbacks:
role | Sets the role of the user. See CLIENT_ROLE_TYPE. |
int agora_gaming_rtc.AgoraChannel.SetRemoteUserPriority | ( | uint | uid, |
PRIORITY_TYPE | userPriority | ||
) |
Prioritizes a remote user's stream.
Use this method with the SetRemoteSubscribeFallbackOption method. If the fallback function is enabled for a subscribed stream, the SDK ensures the high-priority user gets the best possible stream quality.
userPriority
as high for one user only.uid | The ID of the remote user. |
userPriority | Sets the priority of the remote user. See PRIORITY_TYPE. |
int agora_gaming_rtc.AgoraChannel.SetRemoteVoicePosition | ( | uint | uid, |
double | pan, | ||
double | gain | ||
) |
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. |
int agora_gaming_rtc.AgoraChannel.SetDefaultMuteAllRemoteAudioStreams | ( | bool | mute | ) |
Stops or resumes subscribing to the audio streams of all remote users by default.
Call this method after joining a channel. After successfully calling this method, the local user stops or resumes subscribing to the audio streams of all subsequent users.
SetDefaultMuteAllRemoteAudioStreams(true)
, do the following.mute | Sets whether to stop subscribing to the audio streams of all remote users by default.
|
int agora_gaming_rtc.AgoraChannel.SetDefaultMuteAllRemoteVideoStreams | ( | bool | mute | ) |
Stops or resumes subscribing to the video streams of all remote users by default.
Call this method after joining a channel. After successfully calling this method, the local user stops or resumes subscribing to the video streams of all subsequent users.
SetDefaultMuteAllRemoteVideoStreams(true)
, do the following.mute | Sets whether to stop subscribing to the video streams of all remote users by default.
|
int agora_gaming_rtc.AgoraChannel.MuteAllRemoteAudioStreams | ( | bool | mute | ) |
Stops or resumes subscribing to the audio streams of all remote users.
As of v3.3.1, after successfully calling this method, the local user stops or resumes subscribing to the audio streams of all remote users, including all subsequent users.
mute | Sets whether to stop subscribing to the audio streams of all remote users.
|
int agora_gaming_rtc.AgoraChannel.AdjustUserPlaybackSignalVolume | ( | uint | userId, |
int | volume | ||
) |
Adjusts the playback signal volume of a specified remote user.
You can call this method as many times as necessary to adjust the playback signal volume of different remote users, or to repeatedly adjust the playback signal volume of the same remote user.
userId | The ID of the remote user. |
volume | The playback signal volume of the specified remote user. The value ranges from 0 to 100:
|
int agora_gaming_rtc.AgoraChannel.MuteRemoteAudioStream | ( | uint | userId, |
bool | mute | ||
) |
Stops or resumes subscribing to the audio stream of a specified user.
userId | The user ID of the specified remote user. |
mute | Sets whether to stop subscribing to the audio stream of a specified user.
|
int agora_gaming_rtc.AgoraChannel.MuteAllRemoteVideoStreams | ( | bool | mute | ) |
Stops or resumes subscribing to the video streams of all remote users.
As of v3.3.1, after successfully calling this method, the local user stops or resumes subscribing to the video streams of all remote users, including all subsequent users.
mute | Sets whether to stop subscribing to the video streams of all remote users.
|
int agora_gaming_rtc.AgoraChannel.MuteRemoteVideoStream | ( | uint | userId, |
bool | mute | ||
) |
Stops or resumes subscribing to the video stream of a specified user.
userId | The user ID of the specified remote user. |
mute | Sets whether to stop subscribing to the video stream of a specified user.
|
int agora_gaming_rtc.AgoraChannel.SetRemoteVideoStreamType | ( | uint | userId, |
REMOTE_VIDEO_STREAM_TYPE | streamType | ||
) |
Sets the stream type of the remote video.
Under limited network conditions, if the publisher has not disabled the dual-stream mode using EnableDualStreamMode(false), the receiver can choose to receive either the high-quality video stream (the high resolution, and high bitrate video stream) or the low-video stream (the low resolution, and low bitrate video stream).
By default, users receive the high-quality video stream. Call this method if you want to switch to the low-video stream. This method allows the app to adjust the corresponding video stream type based on the size of the video window to reduce the bandwidth and resources.
The aspect ratio of the low-video stream is the same as the high-quality video stream. Once the resolution of the high-quality video stream is set, the system automatically sets the resolution, frame rate, and bitrate of the low-video stream.
The method result returns in the OnApiExecutedHandler callback.
SetRemoteVideoStreamType
and SetRemoteDefaultVideoStreamType, the SDK applies the settings in the SetRemoteVideoStreamType
.userId | ID of the remote user sending the video stream. |
streamType | Sets the video-stream type. See REMOTE_VIDEO_STREAM_TYPE. |
int agora_gaming_rtc.AgoraChannel.SetRemoteDefaultVideoStreamType | ( | REMOTE_VIDEO_STREAM_TYPE | streamType | ) |
Sets the default video-stream type for the video received by the local user when the remote user sends dual streams.
SetRemoteDefaultVideoStreamType
method allows the application to adjust the corresponding video-stream type according to the size of the video window, reducing the bandwidth and resources.The result after calling this method is returned in the OnApiExecutedHandler callback. The Agora RTC SDK receives the high-stream video by default to reduce the bandwidth. If needed, users can switch to the low-stream video through this method.
SetRemoteDefaultVideoStreamType
and SetRemoteVideoStreamType, the SDK applies the settings in the SetRemoteVideoStreamType
.streamType | Sets the default video stream type. See REMOTE_VIDEO_STREAM_TYPE. |
int agora_gaming_rtc.AgoraChannel.CreateDataStream | ( | bool | reliable, |
bool | ordered | ||
) |
Creates a data stream.
Each user can create up to five data streams during the lifecycle of the AgoraChannel.
reliable
as true
while setting ordered
as false
.reliable | Sets whether or not the recipients are guaranteed to receive the data stream from the sender within five seconds:
|
ordered | Sets whether or not the recipients receive the data stream in the sent order:
|
int agora_gaming_rtc.AgoraChannel.CreateDataStream | ( | DataStreamConfig | config | ) |
Creates a data stream.
Each user can create up to five data streams in a single channel.
This method does not support data reliability. If the receiver receives a data packet five seconds or more after it was sent, the SDK directly discards the data.
config | The configurations for the data stream: DataStreamConfig. |
int agora_gaming_rtc.AgoraChannel.SendStreamMessage | ( | int | streamId, |
string | data, | ||
Int64 | length | ||
) |
Sends data stream messages to all users in a channel.
The SDK has the following restrictions on this method:
A successful SendStreamMessage
method call triggers the ChannelOnStreamMessageHandler callback on the remote client, from which the remote user gets the stream message.
A failed SendStreamMessage
method call triggers the ChannelOnStreamMessageHandler
callback on the remote client.
streamId | The ID of the sent data stream, returned in the CreateDataStream method. |
data | The sent data. |
length | The data length. |
int agora_gaming_rtc.AgoraChannel.AddPublishStreamUrl | ( | string | url, |
bool | transcodingEnabled | ||
) |
Publishes the local stream to a specified CDN streaming URL. (CDN live only.)
The SDK returns the result of this method call in the OnStreamPublishedHandler callback.
The AddPublishStreamUrl
method call triggers the ChannelOnRtmpStreamingStateChangedHandler 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 or RTMPS format. The maximum length of this parameter is 1024 bytes. The CDN streaming URL must not contain special characters, such as Chinese language characters. |
transcodingEnabled | Sets whether transcoding is enabled or disabled:
|
ERR_INVALID_ARGUMENT(-2)
: The CDN streaming URL is null
or has a string length of 0.ERR_NOT_INITIALIZED(-7)
: You have not initialized the RTC engine when publishing the stream. int agora_gaming_rtc.AgoraChannel.RemovePublishStreamUrl | ( | string | url | ) |
Removes an RTMP or RTMPS stream from the CDN. (CDN live only.)
This method removes the CDN streaming URL (added by the AddPublishStreamUrl method) from a CDN live stream. The SDK returns the result of this method call in the OnStreamUnpublishedHandler callback.
The RemovePublishStreamUrl
method call triggers the ChannelOnRtmpStreamingStateChangedHandler callback on the local client to report the state of removing an RTMP or RTMPS stream from the CDN.
url | The CDN streaming URL to be removed. The maximum length of this parameter is 1024 bytes. |
int agora_gaming_rtc.AgoraChannel.SetLiveTranscoding | ( | LiveTranscoding | liveTranscoding | ) |
Sets the video layout and audio settings for CDN live. (CDN live only.)
The SDK triggers the ChannelOnTranscodingUpdatedHandler callback when you call the SetLiveTranscoding
method to update the transcoding setting.
SetLiveTranscoding
method to update the transcoding setting for the first time, the SDK does not trigger the ChannelOnTranscodingUpdatedHandler
callback.liveTranscoding | Sets the CDN live audio or video transcoding settings. See LiveTranscoding. |
int agora_gaming_rtc.AgoraChannel.StartRtmpStreamWithoutTranscoding | ( | string | url | ) |
Starts pushing media streams to a CDN without transcoding.
You can call this method to push a live audio-and-video stream to the specified CDN address. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.
After you call this method, the SDK triggers the OnRtmpStreamingStateChangedHandler callback on the local client to report the state of the streaming.
LIVE_BROADCASTING profile
can call this method.url | The address of the CDN live streaming. The format is RTMP. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. |
ERR_INVALID_ARGUMENT (2)
: The RTMP URL address is NULL or the string length is 0.ERR_NOT_INITIALIZED (7)
: The SDK is not initialized before calling this method. int agora_gaming_rtc.AgoraChannel.StartRtmpStreamWithTranscoding | ( | string | url, |
LiveTranscoding | liveTranscoding | ||
) |
Starts pushing media streams to a CDN and sets the transcoding configuration.
You can call this method to push a live audio-and-video stream to the specified CDN address and set the transcoding configuration. This method can push media streams to only one CDN address at a time, so if you need to push streams to multiple addresses, call this method multiple times.
After you call this method, the SDK triggers the OnRtmpStreamingStateChangedHandler callback on the local client to report the state of the streaming.
LIVE_BROADCASTING profile
can call this method.url | The address of the CDN live streaming. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. |
liveTranscoding | The transcoding configuration for CDN live streaming. See LiveTranscoding. |
int agora_gaming_rtc.AgoraChannel.UpdateRtmpTranscoding | ( | LiveTranscoding | liveTranscoding | ) |
Updates the transcoding configuration.
After you start pushing media streams to CDN with transcoding, you can dynamically update the transcoding configuration according to the scenario. The SDK triggers the OnTranscodingUpdatedHandler callback after the transcoding configuration is updated.
liveTranscoding | The transcoding configuration for CDN live streaming. See LiveTranscoding. |
int agora_gaming_rtc.AgoraChannel.StopRtmpStream | ( | string | url | ) |
Stops pushing media streams to a CDN.
You can call this method to stop the live stream on the specified CDN address. This method can stop pushing media streams to only one CDN address at a time, so if you need to stop pushing streams to multiple addresses, call this method multiple times.
After you call this method, the SDK triggers the OnRtmpStreamingStateChangedHandler callback on the local client to report the state of the streaming.
url | The address of the CDN live streaming. The format is RTMP or RTMPS. The character length cannot exceed 1024 bytes. Special characters such as Chinese characters are not supported. |
int agora_gaming_rtc.AgoraChannel.StartChannelMediaRelay | ( | ChannelMediaRelayConfiguration | channelMediaRelayConfiguration | ) |
Starts to relay media streams across channels.
After a successful method call, the SDK triggers the ChannelOnMediaRelayStateChangedHandler and ChannelOnMediaRelayEventHandler callbacks, and these callbacks return the state and events of the media stream relay.
ChannelOnMediaRelayStateChangedHandler
callback returns RELAY_STATE_RUNNING(2) and RELAY_OK(0), and the ChannelOnMediaRelayEventHandler
callback returns RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL(4), the host starts sending data to the destination channel.ChannelOnMediaRelayStateChangedHandler
callback returns RELAY_STATE_FAILURE(3), an exception occurs during the media stream relay.channelMediaRelayConfiguration | The configuration of the media stream relay: ChannelMediaRelayConfiguration. |
int agora_gaming_rtc.AgoraChannel.UpdateChannelMediaRelay | ( | ChannelMediaRelayConfiguration | channelMediaRelayConfiguration | ) |
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 ChannelOnMediaRelayEventHandler callback with the RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL(7) state code.
StartChannelMediaRelay
method to update the destination channel.channelMediaRelayConfiguration | The media stream relay configuration: ChannelMediaRelayConfiguration. |
int agora_gaming_rtc.AgoraChannel.StopChannelMediaRelay | ( | ) |
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 ChannelOnMediaRelayStateChangedHandler callback. If the callback returns RELAY_STATE_IDLE(0) and RELAY_OK(0), the host successfully stops the relay.
ChannelOnMediaRelayStateChangedHandler
callback with the RELAY_ERROR_SERVER_NO_RESPONSE(2) or RELAY_ERROR_SERVER_CONNECTION_LOST(8) state code. You can leave the channel by calling the LeaveChannel method, and the media stream relay automatically stops.CONNECTION_STATE_TYPE agora_gaming_rtc.AgoraChannel.GetConnectionState | ( | ) |
Retrieves the connection state of the SDK.
int agora_gaming_rtc.AgoraChannel.SetClientRole | ( | CLIENT_ROLE_TYPE | role, |
ClientRoleOptions | audienceLatencyLevel | ||
) |
Sets the role of a user in interactive live streaming.
You can call this method either before or after joining the channel to set the user role as audience or host. If you call this method to switch the user role after joining the channel, the SDK triggers the following callbacks:
LIVE_BROADCASTING
profile only.role | The role of a user in interactive live streaming. See CLIENT_ROLE_TYPE. |
audienceLatencyLevel | The detailed options of a user, including user level. See ClientRoleOptions. |
int agora_gaming_rtc.AgoraChannel.EnableEncryption | ( | bool | enabled, |
EncryptionConfig | encryptionConfig | ||
) |
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. After a user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again.
enabled | Whether to enable the built-in encryption:
|
encryptionConfig | Configurations of built-in encryption schemas. See EncryptionConfig. |
AgoraChannel
instance before calling this method. int agora_gaming_rtc.AgoraChannel.MuteLocalVideoStream | ( | bool | mute | ) |
Stops or resumes publishing the local video stream.
This method only sets the publishing state of the video stream in the channel of AgoraChannel
. A successful method call triggers the OnRemoteVideoStateChangedHandler
callback on the remote client.
You can only publish the local stream in one channel at a time. If you create multiple channels, ensure that you only call MuteLocalVideoStream(false)
in one channel; otherwise, the method call fails, and the SDK returns -5(ERR_REFUSED)
.
JoinChannel
and SetClientRole
methods. mute | Whether to stop publishing the local video stream.
|
int agora_gaming_rtc.AgoraChannel.MuteLocalAudioStream | ( | bool | mute | ) |
Stops or resumes publishing the local audio stream.
This method only sets the publishing state of the audio stream in the channel of AgoraChannel
. A successful method call triggers the OnRemoteAudioStateChangedHandler
callback on the remote client.
You can only publish the local stream in one channel at a time. If you create multiple channels, ensure that you only call MuteLocalAudioStream(false)
in one channel; otherwise, the method call fails, and the SDK returns -5(ERR_REFUSED)
.
JoinChannel
and SetClientRole
methods. mute | Whether to stop publishing the local audio stream.
|
int agora_gaming_rtc.AgoraChannel.EnableRemoteSuperResolution | ( | uint | userId, |
bool | enable | ||
) |
Enables/Disables the super-resolution algorithm for a remote user's video stream.
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.
After calling this method, the SDK triggers the ChannelOnUserSuperResolutionEnabledHandler callback to report whether you have successfully enabled super resolution.
WARN_SUPER_RESOLUTION_STREAM_OVER_LIMITATION (1610)
: The original resolution of the remote user's video is beyond the range where super resolution can be applied.WARN_SUPER_RESOLUTION_USER_COUNT_OVER_LIMITATION (1611)
: Super resolution is already being used to boost another remote user's video.WARN_SUPER_RESOLUTION_DEVICE_NOT_SUPPORTED (1612)
: The device does not support using super resolution.libagora_super_resolution_extension.so
AgoraSuperResolutionExtension.xcframework
userId | The ID of the remote user. |
enable | Determines whether to enable super resolution for the remote user's video:
|
-157 (ERR_MODULE_NOT_FOUND)
: The dynamic library for super resolution is not integrated. int agora_gaming_rtc.AgoraChannel.EnableRemoteSuperResolution | ( | bool | enabled, |
SR_MODE | mode, | ||
uint | userId | ||
) |
Enables/Disables the super-resolution feature for a remote user's video stream. This is a 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.
After calling this method, the SDK triggers the ChannelOnUserSuperResolutionEnabledHandler callback to report whether you have successfully enabled super resolution.
libagora_super_resolution_extension.so
AgoraSuperResolutionExtension.xcframework
libagora_super_resolution_extension.dll
enabled | Determines whether to enable super resolution for the remote user's video:
|
mode | The mode of super resolution. See SR_MODE. |
userId | The user ID of the remote user. This parameter only applies when mode is set as SR_MODE_MANUAL(0) . |
-157 (ERR_MODULE_NOT_FOUND)
: The dynamic library for super resolution is not integrated. ChannelOnWarningHandler agora_gaming_rtc.AgoraChannel.ChannelOnWarning |
ChannelOnErrorHandler agora_gaming_rtc.AgoraChannel.ChannelOnError |
ChannelOnJoinChannelSuccessHandler agora_gaming_rtc.AgoraChannel.ChannelOnJoinChannelSuccess |
ChannelOnReJoinChannelSuccessHandler agora_gaming_rtc.AgoraChannel.ChannelOnReJoinChannelSuccess |
ChannelOnLeaveChannelHandler agora_gaming_rtc.AgoraChannel.ChannelOnLeaveChannel |
ChannelOnClientRoleChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnClientRoleChanged |
ChannelOnUserJoinedHandler agora_gaming_rtc.AgoraChannel.ChannelOnUserJoined |
ChannelOnUserOffLineHandler agora_gaming_rtc.AgoraChannel.ChannelOnUserOffLine |
ChannelOnConnectionLostHandler agora_gaming_rtc.AgoraChannel.ChannelOnConnectionLost |
ChannelOnRequestTokenHandler agora_gaming_rtc.AgoraChannel.ChannelOnRequestToken |
ChannelOnTokenPrivilegeWillExpireHandler agora_gaming_rtc.AgoraChannel.ChannelOnTokenPrivilegeWillExpire |
ChannelOnRtcStatsHandler agora_gaming_rtc.AgoraChannel.ChannelOnRtcStats |
ChannelOnNetworkQualityHandler agora_gaming_rtc.AgoraChannel.ChannelOnNetworkQuality |
ChannelOnRemoteVideoStatsHandler agora_gaming_rtc.AgoraChannel.ChannelOnRemoteVideoStats |
ChannelOnRemoteAudioStatsHandler agora_gaming_rtc.AgoraChannel.ChannelOnRemoteAudioStats |
ChannelOnRemoteAudioStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnRemoteAudioStateChanged |
ChannelOnActiveSpeakerHandler agora_gaming_rtc.AgoraChannel.ChannelOnActiveSpeaker |
ChannelOnVideoSizeChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnVideoSizeChanged |
ChannelOnRemoteVideoStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnRemoteVideoStateChanged |
ChannelOnStreamMessageHandler agora_gaming_rtc.AgoraChannel.ChannelOnStreamMessage |
ChannelOnStreamMessageErrorHandler agora_gaming_rtc.AgoraChannel.ChannelOnStreamMessageError |
ChannelOnMediaRelayStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnMediaRelayStateChanged |
ChannelOnMediaRelayEventHandler agora_gaming_rtc.AgoraChannel.ChannelOnMediaRelayEvent |
ChannelOnRtmpStreamingStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnRtmpStreamingStateChanged |
ChannelOnTranscodingUpdatedHandler agora_gaming_rtc.AgoraChannel.ChannelOnTranscodingUpdated |
ChannelOnStreamInjectedStatusHandler agora_gaming_rtc.AgoraChannel.ChannelOnStreamInjectedStatus |
ChannelOnRemoteSubscribeFallbackToAudioOnlyHandler agora_gaming_rtc.AgoraChannel.ChannelOnRemoteSubscribeFallbackToAudioOnly |
ChannelOnConnectionStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnConnectionStateChanged |
ChannelOnLocalPublishFallbackToAudioOnlyHandler agora_gaming_rtc.AgoraChannel.ChannelOnLocalPublishFallbackToAudioOnly |
ChannelOnRtmpStreamingEventHandler agora_gaming_rtc.AgoraChannel.ChannelOnRtmpStreamingEvent |
ChannelOnAudioPublishStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnAudioPublishStateChanged |
ChannelOnVideoPublishStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnVideoPublishStateChanged |
ChannelOnAudioSubscribeStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnAudioSubscribeStateChanged |
ChannelOnVideoSubscribeStateChangedHandler agora_gaming_rtc.AgoraChannel.ChannelOnVideoSubscribeStateChanged |
ChannelOnUserSuperResolutionEnabledHandler agora_gaming_rtc.AgoraChannel.ChannelOnUserSuperResolutionEnabled |
ChannelOnClientRoleChangeFailedHandler agora_gaming_rtc.AgoraChannel.ChannelOnClientRoleChangeFailed |
ChannelOnFirstRemoteVideoFrameHandler agora_gaming_rtc.AgoraChannel.ChannelOnFirstRemoteVideoFrame |
ChannelOnChannelProxyConnectedHandler agora_gaming_rtc.AgoraChannel.ChannelOnChannelProxyConnected |