Agora RTC Objective-C API Reference  Refactor
Enumerations
AgoraEnumerates.h File Reference

Go to the source code of this file.

Enumerations

enum  AgoraChannelProfile {
  AgoraChannelProfileCommunication = 0, AgoraChannelProfileLiveBroadcasting = 1, AgoraChannelProfileGame = 2, AgoraChannelProfileCloudGaming = 3,
  AgoraChannelProfileCommunication_1v1 = 4
}
 
enum  AgoraClientRole { AgoraClientRoleBroadcaster = 1, AgoraClientRoleAudience = 2 }
 
enum  AgoraUserOfflineReason { AgoraUserOfflineReasonQuit = 0, AgoraUserOfflineReasonDropped = 1, AgoraUserOfflineReasonBecomeAudience = 2 }
 
enum  AgoraLogFilter {
  AgoraLogFilterOff = 0, AgoraLogFilterDebug = 0x080f, AgoraLogFilterInfo = 0x000f, AgoraLogFilterWarning = 0x000e,
  AgoraLogFilterError = 0x000c, AgoraLogFilterCritical = 0x0008
}
 
enum  AgoraNetworkQuality {
  AgoraNetworkQualityUnknown = 0, AgoraNetworkQualityExcellent = 1, AgoraNetworkQualityGood = 2, AgoraNetworkQualityPoor = 3,
  AgoraNetworkQualityBad = 4, AgoraNetworkQualityVBad = 5, AgoraNetworkQualityDown = 6
}
 
enum  AgoraLastmileProbeResultState { AgoraLastmileProbeResultComplete = 1, AgoraLastmileProbeResultIncompleteNoBwe = 2, AgoraLastmileProbeResultUnavailable = 3 }
 
enum  AgoraVideoStreamType { AgoraVideoStreamTypeHigh = 0, AgoraVideoStreamTypeLow = 1 }
 
enum  AgoraVideoRenderMode { AgoraVideoRenderModeHidden = 1, AgoraVideoRenderModeFit = 2, AgoraVideoRenderModeAdaptive =("AgoraVideoRenderModeAdaptive is deprecated.") = 3 }
 
enum  AgoraVideoLocalState { AgoraVideoLocalStateStopped = 0, AgoraVideoLocalStateCapturing = 1, AgoraVideoLocalStateEncoding = 2, AgoraVideoLocalStateFailed = 3 }
 
enum  AgoraLocalVideoStreamError {
  AgoraLocalVideoStreamErrorOK = 0, AgoraLocalVideoStreamErrorFailure = 1, AgoraLocalVideoStreamErrorDeviceNoPermission = 2, AgoraLocalVideoStreamErrorDeviceBusy = 3,
  AgoraLocalVideoStreamErrorCaptureFailure = 4, AgoraLocalVideoStreamErrorEncodeFailure = 5
}
 
enum  AgoraVideoRemoteReason {
  AgoraVideoRemoteReasonInternal = 0, AgoraVideoRemoteReasonCongestion = 1, AgoraVideoRemoteReasonRecovery = 2, AgoraVideoRemoteReasonLocalMuted = 3,
  AgoraVideoRemoteReasonLocalUnmuted = 4, AgoraVideoRemoteReasonRemoteMuted = 5, AgoraVideoRemoteReasonRemoteUnmuted = 6, AgoraVideoRemoteReasonRemoteOffline = 7,
  AgoraVideoRemoteReasonAudioFallback = 8, AgoraVideoRemoteReasonAudioFallbackRecovery = 9
}
 
enum  AgoraAudioLocalState { AgoraAudioLocalStateStopped = 0, AgoraAudioLocalStateRecording = 1, AgoraAudioLocalStateEncoding = 2, AgoraAudioLocalStateFailed = 3 }
 
enum  AgoraAudioLocalError {
  AgoraAudioLocalErrorOK = 0, AgoraAudioLocalErrorFailure = 1, AgoraAudioLocalErrorDeviceNoPermission = 2, AgoraAudioLocalErrorDeviceBusy = 3,
  AgoraAudioLocalErrorRecordFailure = 4, AgoraAudioLocalErrorEncodeFailure = 5
}
 
enum  AgoraAudioRemoteState {
  AgoraAudioRemoteStateStopped = 0, AgoraAudioRemoteStateStarting = 1, AgoraAudioRemoteStateDecoding = 2, AgoraAudioRemoteStateFrozen = 3,
  AgoraAudioRemoteStateFailed = 4
}
 
enum  AgoraAudioRemoteReason {
  AgoraAudioRemoteReasonInternal = 0, AgoraAudioRemoteReasonNetworkCongestion = 1, AgoraAudioRemoteReasonNetworkRecovery = 2, AgoraAudioRemoteReasonLocalMuted = 3,
  AgoraAudioRemoteReasonLocalUnmuted = 4, AgoraAudioRemoteReasonRemoteMuted = 5, AgoraAudioRemoteReasonRemoteUnmuted = 6, AgoraAudioRemoteReasonRemoteOffline = 7
}
 
enum  AgoraAudioProfile {
  AgoraAudioProfileDefault = 0, AgoraAudioProfileSpeechStandard = 1, AgoraAudioProfileMusicStandard = 2, AgoraAudioProfileMusicStandardStereo = 3,
  AgoraAudioProfileMusicHighQuality = 4, AgoraAudioProfileMusicHighQualityStereo = 5
}
 
enum  AgoraAudioScenario {
  AgoraAudioScenarioDefault = 0, AgoraAudioScenarioChatRoomEntertainment = 1, AgoraAudioScenarioEducation = 2, AgoraAudioScenarioGameStreaming = 3,
  AgoraAudioScenarioShowRoom = 4, AgoraAudioScenarioChatRoomGaming = 5, AgoraAudioScenarioHighDefinition = 6
}
 
enum  AgoraAudioRawFrameOperationMode { AgoraAudioRawFrameOperationModeReadOnly = 0, AgoraAudioRawFrameOperationModeWriteOnly = 1, AgoraAudioRawFrameOperationModeReadWrite = 2 }
 
enum  AgoraVideoFormat {
  AgoraVideoFormatI420 = 1, AgoraVideoFormatBGRA = 2, AgoraVideoFormatNV21 = 3, AgoraVideoFormatRGBA = 4,
  AgoraVideoFormatIMC2 = 5, AgoraVideoFormatARGB = 7, AgoraVideoFormatNV12 = 8, AgoraVideoFormatCVPixel = 12
}
 
enum  AgoraConnectionState {
  AgoraConnectionStateDisconnected = 1, AgoraConnectionStateConnecting = 2, AgoraConnectionStateConnected = 3, AgoraConnectionStateReconnecting = 4,
  AgoraConnectionStateFailed = 5
}
 
enum  AgoraMaxMetadataSizeType
 
enum  AgoraLogLevel
 
enum  AgoraRtmpStreamPublishState {
  RTMP_STREAM_PUBLISH_STATE_IDLE = 0, RTMP_STREAM_PUBLISH_STATE_CONNECTING = 1, RTMP_STREAM_PUBLISH_STATE_RUNNING = 2, RTMP_STREAM_PUBLISH_STATE_RECOVERING = 3,
  RTMP_STREAM_PUBLISH_STATE_FAILURE = 4
}
 
enum  AgoraRtmpStreamPublishError {
  RTMP_STREAM_PUBLISH_ERROR_FAILED = -1, RTMP_STREAM_PUBLISH_ERROR_OK = 0, RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT = 1, RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED = 2,
  RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT = 3, RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR = 4, RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR = 5, RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN = 6,
  RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT = 7, RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED = 8, RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND = 9, RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED = 10,
  RTMP_STREAM_PUBLISH_ERROR_CDN_ERROR = 11, RTMP_STREAM_PUBLISH_ERROR_ALREADY_IN_USE = 12
}
 

Enumeration Type Documentation

◆ AgoraChannelProfile

The channel profile.

Enumerator
AgoraChannelProfileCommunication 

0: Communication.

Use this profile when there are two users in the channel.

AgoraChannelProfileLiveBroadcasting 

1: (Default) Live Broadcast.

Use this profile when there are more than two users in the channel.

AgoraChannelProfileGame 
Deprecated:
2: Gaming.

This profile uses a codec with a low bitrate and consumes less power. Applies to the gaming scenario, where all game players can talk freely.

AgoraChannelProfileCloudGaming 

3: Cloud Gaming.

This profile is for the interactive streaming scenario, which is highly sensitive to end-to-end latency, and any delay in render impacts the end-user experience. These use cases prioritize reducing delay over any smoothing done at the receiver.

We recommend using this profile in scenarios there users need to interact with each other.

AgoraChannelProfileCommunication_1v1 

4: Communication 1v1.

This profile uses a special network transport strategy for communication 1v1

◆ AgoraClientRole

Client role.

Enumerator
AgoraClientRoleBroadcaster 

Broadcaster

AgoraClientRoleAudience 

Audience

◆ AgoraUserOfflineReason

Reason for the user being offline

Enumerator
AgoraUserOfflineReasonQuit 

A user has quit the call.

AgoraUserOfflineReasonDropped 

The SDK timed out and the user dropped offline because it has not received any data package within a certain period of time. If a user quits the call and the message is not passed to the SDK (due to an unreliable channel), the SDK assumes the event has timed out.

AgoraUserOfflineReasonBecomeAudience 

User switched to an audience

◆ AgoraLogFilter

Output log filter level

Enumerator
AgoraLogFilterOff 

Do not output any log information.

AgoraLogFilterDebug 

Output all API log information

AgoraLogFilterInfo 

Output CRITICAL, ERROR, WARNING, and INFO level log information.

AgoraLogFilterWarning 

Outputs CRITICAL, ERROR, and WARNING level log information.

AgoraLogFilterError 

Outputs CRITICAL and ERROR level log information

AgoraLogFilterCritical 

Outputs CRITICAL level log information.

◆ AgoraNetworkQuality

Network quality

Enumerator
AgoraNetworkQualityUnknown 

The network quality is unknown.

AgoraNetworkQualityExcellent 

The network quality is excellent.

AgoraNetworkQualityGood 

The network quality is quite good, but the bitrate may be slightly lower than excellent.

AgoraNetworkQualityPoor 

Users can feel the communication slightly impaired.

AgoraNetworkQualityBad 

Users can communicate only not very smoothly.

AgoraNetworkQualityVBad 

The network is so bad that users can hardly communicate.

AgoraNetworkQualityDown 

The network is down and users cannot communicate at all.

◆ AgoraLastmileProbeResultState

The state of the probe test.

Enumerator
AgoraLastmileProbeResultComplete 

1: The last-mile network probe test is complete.

AgoraLastmileProbeResultIncompleteNoBwe 

2: The last-mile network probe test is incomplete and the bandwidth estimation is not available, probably due to limited test resources.

AgoraLastmileProbeResultUnavailable 

3: The last-mile network probe test is not carried out, probably due to poor network conditions.

◆ AgoraVideoStreamType

Video stream type

Enumerator
AgoraVideoStreamTypeHigh 

High-video stream

AgoraVideoStreamTypeLow 

Low-video stream

◆ AgoraVideoRenderMode

Video display mode

Enumerator
AgoraVideoRenderModeHidden 

Hidden(1): Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.

AgoraVideoRenderModeFit 

Fit(2): Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to the disparity in the aspect ratio will be filled with black.

AgoraVideoRenderModeAdaptive 
Deprecated:
Adaptive(3):This mode is obsolete.

◆ AgoraVideoLocalState

States of the local video.

Enumerator
AgoraVideoLocalStateStopped 

0: The local video is in the initial state.

AgoraVideoLocalStateCapturing 

1: The capturer starts successfully.

AgoraVideoLocalStateEncoding 

2: The first video frame is encoded successfully.

AgoraVideoLocalStateFailed 

3: The local video fails to start.

◆ AgoraLocalVideoStreamError

States of the local video.

Enumerator
AgoraLocalVideoStreamErrorOK 

0: The local video is normal.

AgoraLocalVideoStreamErrorFailure 

1: No specified reason for the local video failure.

AgoraLocalVideoStreamErrorDeviceNoPermission 

2: No permission to use the local video device.

AgoraLocalVideoStreamErrorDeviceBusy 

3: The local video capturer is in use.

AgoraLocalVideoStreamErrorCaptureFailure 

4: The local video capture fails. Check whether the capturer is working properly.

AgoraLocalVideoStreamErrorEncodeFailure 

5: The local video encoding fails.

◆ AgoraVideoRemoteReason

The reason of the remote video state change.

Enumerator
AgoraVideoRemoteReasonInternal 

0: Internal reasons.

AgoraVideoRemoteReasonCongestion 

1: Network congestion.

AgoraVideoRemoteReasonRecovery 

2: Network recovery.

AgoraVideoRemoteReasonLocalMuted 

3: The local user stops receiving the remote video stream or disables the video module.

AgoraVideoRemoteReasonLocalUnmuted 

4: The local user resumes receiving the remote video stream or enables the video module.

AgoraVideoRemoteReasonRemoteMuted 

5: The remote user stops sending the video stream or disables the video module.

AgoraVideoRemoteReasonRemoteUnmuted 

6: The remote user resumes sending the video stream or enables the video module.

AgoraVideoRemoteReasonRemoteOffline 

7: The remote user leaves the channel.

AgoraVideoRemoteReasonAudioFallback 

8: The remote media stream falls back to the audio-only stream due to poor network conditions.

AgoraVideoRemoteReasonAudioFallbackRecovery 

9: The remote media stream switches back to the video stream after the network conditions improve.

◆ AgoraAudioLocalState

The state of the local audio.

Enumerator
AgoraAudioLocalStateStopped 

0: The local audio is in the initial state.

AgoraAudioLocalStateRecording 

1: The recording device starts successfully.

AgoraAudioLocalStateEncoding 

2: The first audio frame encodes successfully.

AgoraAudioLocalStateFailed 

3: The local audio fails to start.

◆ AgoraAudioLocalError

The error information of the local audio.

Enumerator
AgoraAudioLocalErrorOK 

0: No error.

AgoraAudioLocalErrorFailure 

1: No specified reason for the local audio failure.

AgoraAudioLocalErrorDeviceNoPermission 

2: No permission to use the local audio device.

AgoraAudioLocalErrorDeviceBusy 

3: The microphone is in use.

AgoraAudioLocalErrorRecordFailure 

4: The local audio recording fails. Check whether the recording device is working properly.

AgoraAudioLocalErrorEncodeFailure 

5: The local audio encoding fails.

◆ AgoraAudioRemoteState

The state of the remote audio.

Enumerator
AgoraAudioRemoteStateStopped 

0: The remote audio stops (the default state). The following are possible reasons:

AgoraAudioRemoteStateStarting 

1: The first remote audio packet is received.

AgoraAudioRemoteStateDecoding 

2: The remote audio stream is decoded and plays normally. The following are possible reasons:

AgoraAudioRemoteStateFrozen 

3: The remote audio is frozen. The possible reason is AgoraAudioRemoteReasonNetworkCongestion(1).

AgoraAudioRemoteStateFailed 

4: The remote audio fails to start. The possible reason is AgoraAudioRemoteReasonInternal(0).

◆ AgoraAudioRemoteReason

The reason of the remote audio state change.

Enumerator
AgoraAudioRemoteReasonInternal 

0: Internal reasons.

AgoraAudioRemoteReasonNetworkCongestion 

1: Network congestion.

AgoraAudioRemoteReasonNetworkRecovery 

2: Network recovery.

AgoraAudioRemoteReasonLocalMuted 

3: The local user stops receiving the remote audio stream or disables the audio module.

AgoraAudioRemoteReasonLocalUnmuted 

4: The local user resumes receiving the remote audio stream or enables the audio module.

AgoraAudioRemoteReasonRemoteMuted 

5: The remote user stops sending the audio stream or disables the audio module.

AgoraAudioRemoteReasonRemoteUnmuted 

6: The remote user resumes sending the audio stream or enables the audio module.

AgoraAudioRemoteReasonRemoteOffline 

7: The remote user leaves the channel.

◆ AgoraAudioProfile

Audio profile

Enumerator
AgoraAudioProfileDefault 

Default audio profile. In the communication mode, the default value is 1; in the live-broadcast mode, the default value is 2.

AgoraAudioProfileSpeechStandard 

Sampling rate 32 kHz, audio encoding, single channel, and bitrate up to 18 kbit/s.

AgoraAudioProfileMusicStandard 

Sampling rate 48 kHz, music encoding, single channel, and bitrate up to 48 kbit/s.

AgoraAudioProfileMusicStandardStereo 

Sampling rate 48 kHz, music encoding, dual-channel, and bitrate up to 56 kbit/s.

AgoraAudioProfileMusicHighQuality 

Sampling rate 48 kHz, music encoding, single channel, and bitrate up to 128 kbit/s.

AgoraAudioProfileMusicHighQualityStereo 

Sampling rate 48 kHz, music encoding, dual-channel, and bitrate up to 192 kbit/s.

◆ AgoraAudioScenario

Audio scenario

Enumerator
AgoraAudioScenarioDefault 

Default

AgoraAudioScenarioChatRoomEntertainment 

Entertainment scenario that supports voice during gameplay

AgoraAudioScenarioEducation 

Education scenario that prioritizes fluency and stability

AgoraAudioScenarioGameStreaming 

Live gaming scenario that needs to enable the gaming audio effects in the speaker mode in a live broadcast scenario. Choose this scenario if you wish to achieve high-fidelity music playback

AgoraAudioScenarioShowRoom 

Showroom scenario that optimizes the audio quality with professional external equipment

AgoraAudioScenarioChatRoomGaming 

Gaming scenario

AgoraAudioScenarioHighDefinition 

High definition

◆ AgoraAudioRawFrameOperationMode

Use mode of the onRecordAudioFrame callback

Enumerator
AgoraAudioRawFrameOperationModeReadOnly 

Read-only mode: Users only read the AudioFrame data without modifying anything. For example, when users acquire data with the Agora SDK then push the RTMP streams.

AgoraAudioRawFrameOperationModeWriteOnly 

Write-only mode: Users replace the AudioFrame data with their own data and pass them to the SDK for encoding. For example, when users acquire data.

AgoraAudioRawFrameOperationModeReadWrite 

Read and write mode: Users read the data from AudioFrame, modify it, and then play it. For example, when users have their own sound-effect processing module and do some voice pre-processing such as a voice change.

◆ AgoraVideoFormat

Video frame format

Enumerator
AgoraVideoFormatI420 

i420 video frame fromat

AgoraVideoFormatBGRA 

BGRA video frame fromat

AgoraVideoFormatNV21 

NV21 video frame fromat

AgoraVideoFormatRGBA 

RGBA video frame fromat

AgoraVideoFormatIMC2 

IMC2 video frame fromat

AgoraVideoFormatARGB 

ARGB video frame fromat

AgoraVideoFormatNV12 

NV12 video frame fromat

AgoraVideoFormatCVPixel 

iOS texture (CVPixelBufferRef)

◆ AgoraConnectionState

The connection state of the SDK.

Enumerator
AgoraConnectionStateDisconnected 

1: The SDK is disconnected from the edge server.

AgoraConnectionStateConnecting 

2: The SDK is connecting to the edge server.

AgoraConnectionStateConnected 

3: The SDK is connected to the edge server and has joined a channel. You can now publish or subscribe to a media stream in the channel.

AgoraConnectionStateReconnecting 

4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.

AgoraConnectionStateFailed 

5: The SDK fails to connect to the edge server or join the channel.

◆ AgoraConnectionChangedReason

Enumerator
AgoraConnectionChangedReasonConnecting 

0: The SDK is connecting to Agora's edge server.

AgoraConnectionChangedReasonJoinSuccess 

1: The SDK has joined the channel successfully.

AgoraConnectionChangedReasonInterrupted 

2: The connection between the SDK and Agora's edge server is interrupted.

AgoraConnectionChangedReasonBannedByServer 

3: The connection between the SDK and Agora's edge server is banned by Agora's edge server.

AgoraConnectionChangedReasonJoinFailed 

4: The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel.

AgoraConnectionChangedReasonLeaveChannel 

5: The SDK has left the channel.

AgoraConnectionChangedReasonInvalidAppId 

6: The connection failed since Appid is not valid.

AgoraConnectionChangedReasonInvalidChannelName 

7: The connection failed since channel name is not valid.

AgoraConnectionChangedReasonInvalidToken 

8: The connection failed since token is not valid, possibly because:

  • The App Certificate for the project is enabled in Console, but you do not use Token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
  • The uid that you specify in the joinChannel method is different from the uid that you pass for generating the token.
AgoraConnectionChangedReasonTokenExpired 

9: The connection failed since token is expired.

AgoraConnectionChangedReasonRejectedByServer 

10: The connection is rejected by server.

AgoraConnectionChangedReasonSettingProxyServer 

11: The connection changed to reconnecting since SDK has set a proxy server.

AgoraConnectionChangedReasonRenewToken 

12: When SDK is in connection failed, the renew token operation will make it connecting.

AgoraConnectionChangedReasonClientIpAddressChanged 

13: The IP Address of SDK client has changed. i.e., Network type or IP/Port changed by network operator might change client IP address.

AgoraConnectionChangedReasonKeepAliveTimeout 

14: Timeout for the keep-alive of the connection between the SDK and Agora's edge server. The connection state changes to CONNECTION_STATE_RECONNECTING(4).

AgoraConnectionChangedReasonRejoinSuccess 

15: The SDK has rejoined the channel successfully.

AgoraConnectionChangedReasonLost 

16: The connection between the SDK and Agora's edge server is lost.

AgoraConnectionChangedReasonEchoTest 

17: The change of connection state is caused by echo test.

◆ AgoraMetadataType

Enumerator
AgoraMetadataTypeUnknown 

-1: the metadata type is unknown.

AgoraMetadataTypeVideo 

0: the metadata type is video.

◆ AgoraMaxMetadataSizeType

The maximum medata size.

Enumerator
AgoraMaxMetadataSizeTypeInvalid 
AgoraMaxMetadataSizeTypeDefault 
AgoraMaxMetadataSizeTypeMax 

◆ AgoraLogLevel

Supported logging severities of SDK.

Enumerator
AgoraLogLevelNone 
AgoraLogLevelInfo 
AgoraLogLevelWarn 
AgoraLogLevelError 
AgoraLogLevelFatal 

◆ AgoraAreaCodeType

Enumerator
AgoraAreaCodeTypeCN 
AgoraAreaCodeTypeNA 
AgoraAreaCodeTypeEUR 
AgoraAreaCodeTypeAS 
AgoraAreaCodeTypeGlobal 

◆ AgoraRtmpStreamPublishState

States of the RTMP streaming.

Enumerator
RTMP_STREAM_PUBLISH_STATE_IDLE 

0: The RTMP streaming has not started or has ended.

This state is also reported after you remove an RTMP address from the CDN by calling removePublishStreamUrl.

RTMP_STREAM_PUBLISH_STATE_CONNECTING 

1: The SDK is connecting to the streaming server and the RTMP server.

This state is reported after you call addPublishStreamUrl.

RTMP_STREAM_PUBLISH_STATE_RUNNING 

2: The RTMP streaming publishes. The SDK successfully publishes the RTMP streaming and returns this state.

RTMP_STREAM_PUBLISH_STATE_RECOVERING 

3: The RTMP streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP streaming and reports this state.

  • If the SDK successfully resumes the streaming, RTMP_STREAM_PUBLISH_STATE_RUNNING(2) is reported.
  • If the streaming does not resume within 60 seconds or server errors occur, RTMP_STREAM_PUBLISH_STATE_FAILURE(4) is reported. You can also reconnect to the server by calling removePublishStreamUrl and addPublishStreamUrl.
RTMP_STREAM_PUBLISH_STATE_FAILURE 

4: The RTMP streaming fails. See the errCode parameter for the detailed error information. You can also call addPublishStreamUrl to publish the RTMP streaming again.

◆ AgoraRtmpStreamPublishError

Error codes of the RTMP streaming.

Enumerator
RTMP_STREAM_PUBLISH_ERROR_FAILED 

-1: The RTMP streaming fails.

RTMP_STREAM_PUBLISH_ERROR_OK 

0: The RTMP streaming publishes successfully.

RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT 

1: Invalid argument. If, for example, you did not call setLiveTranscoding to configure the LiveTranscoding parameters before calling addPublishStreamUrl, the SDK reports this error. Check whether you set the parameters in LiveTranscoding properly.

RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED 

2: The RTMP streaming is encrypted and cannot be published.

RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT 

3: A timeout occurs with the RTMP streaming. Call addPublishStreamUrl to publish the streaming again.

RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR 

4: An error occurs in the streaming server. Call addPublishStreamUrl to publish the stream again.

RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR 

5: An error occurs in the RTMP server.

RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN 

6: The RTMP streaming publishes too frequently.

RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT 

7: The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones.

RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED 

8: The host manipulates other hosts' URLs. Check your app logic.

RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND 

9: The Agora server fails to find the RTMP streaming.

RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED 

10: The format of the RTMP streaming URL is not supported. Check whether the URL format is correct.

RTMP_STREAM_PUBLISH_ERROR_CDN_ERROR 

11: CDN related errors. Remove the original URL address and add a new one by calling removePublishStreamUrl and addPublishStreamUrl.

RTMP_STREAM_PUBLISH_ERROR_ALREADY_IN_USE 

12: Resources are occupied and cannot be reused.