CloudHubSDK iOS
- Overview
- CloudHubRtcEngineKit
- CloudHubRtcEngineDelegate
- CloudHubRtcChannelKit
- CloudHubRtcChannelDelegate
- CloudHubEnumerates
- CloudHubObjects
Enumerates
CloudHubErrorCode
Description:Error code
CloudHubMovieStateCode
Description:The state of the audio mixing file
CloudHubMovieErrorCode
Description:The error code of the audio mixing file
CloudHubVideoFrameRate
Description:Video frame rate
CloudHubVideoRotation
Description:Video frame rotation
CloudHubChannelProfile
Description:Channel profile
CloudHubClientRole
Description:Client role in a live broadcast
Enum | Description |
---|---|
CloudHubClientRoleBroadcaster | 1:host |
CloudHubClientRoleAudience | 2:audience |
CloudHubLogFilter
Description:Output log filter level
Enum | Description |
---|---|
CloudHubLogFilterAll | 0 |
CloudHubLogFilterDebug | 1 |
CloudHubLogFilterInfo | 2 |
CloudHubLogFilterWarning | 3 |
CloudHubLogFilterError | 4 |
CloudHubLogFilterAlarm | 5 |
CloudHubLogFilterFatal | 6 |
CloudHubVideoRenderMode
Description:Video display mode
CloudHubVideoCodecType
Description:视频编解码的类型
Enum | Description |
---|---|
CloudHubVideoCodecTypeVP8 | 1:标准VP8 |
CloudHubVideoCodecTypeH264 | 2:标准H264 |
CloudHubVideoMirrorMode
Description:Video mirror mode
Enum | Description |
---|---|
CloudHubVideoMirrorModeAuto | 0:(Default) The SDK determines the mirror mode |
CloudHubVideoMirrorModeEnabled | 1:Enables mirror mode |
CloudHubVideoMirrorModeDisabled | 2:Disables mirror mode |
CloudHubVideoRemoteState
Description:The state of the remote video
Enum | Description |
---|---|
CloudHubVideoRemoteStateStopped | 0:The remote video is in the default state, probably due toCloudHubVideoRemoteStateReasonLocalMuted、 CloudHubVideoRemoteStateReasonRemoteMuted or CloudHubVideoRemoteStateReasonRemoteOffline |
CloudHubVideoRemoteStateStarting | 1:The first remote video packet is received |
CloudHubVideoRemoteStateFrozen | 2:The remote video stream is decoded and plays normally, probably due to CloudHubVideoRemoteStateReasonNetworkRecovery、 CloudHubVideoRemoteStateReasonLocalUnmuted、CloudHubVideoRemoteStateReasonRemoteUnmuted or CloudHubVideoRemoteStateReasonAudioFallbackRecovery |
CloudHubVideoRemoteStateFailed | 3:The remote video fails to start, probably due to CloudHubVideoRemoteStateReasonInternal |
CloudHubVideoRemoteStateReason
Description:The reason of the remote video state change
CloudHubAudioRemoteState
Description:The state of the remote audio
Enum | Description |
---|---|
CloudHubAudioRemoteStateStopped | 0:he remote audio is in the default state, probably due to CloudHubAudioRemoteReasonLocalMuted、CloudHubAudioRemoteReasonRemoteMuted or CloudHubAudioRemoteReasonRemoteOffline |
CloudHubAudioRemoteStateStarting | 1:The first remote audio packet is received |
CloudHubAudioRemoteStateDecoding | 2:The remote audio stream is decoded and plays normally, probably due to CloudHubAudioRemoteReasonNetworkRecovery、CloudHubAudioRemoteReasonLocalUnmuted or CloudHubAudioRemoteReasonRemoteUnmuted |
CloudHubAudioRemoteStateFrozen | 3:The remote audio is frozen, probably due to CloudHubAudioRemoteReasonNetworkCongestion |
CloudHubAudioRemoteStateFailed | 4:The remote audio fails to start, probably due to CloudHubAudioRemoteReasonInternal |
CloudHubAudioRemoteStateReason
Description:The reason of the remote audio state change
CloudHubAudioLocalState
Description:The state of the local audio
CloudHubAudioLocalError
Description:The error information of the local audio
CloudHubMediaDeviceType
Description:Media device type
CloudHubConnectionStateType
Description:Connection states
Enum | Description |
---|---|
CloudHubConnectionStateDisconnected | 1:The SDK is disconnected from CloudHub’s edge server This is the initial state before joinChannelByToken:channelId:properties:uid: autosubscribeAudio:autoSubscribeVideo:joinSuccess: The SDK also enters this state when the app calls leaveChannel: |
CloudHubConnectionStateConnecting | 2:The SDK is connecting to CloudHub’s edge server When the app calls joinChannelByToken:channelId:properties:uid: autosubscribeAudio:autoSubscribeVideo:joinSuccess: he SDK starts to establish a connection to the specified channel, triggers the rtcEngine:connectionChangedToState: callback,and switches to the CloudHubConnectionStateConnecting stateWhen the SDK successfully joins the channel, the SDK triggers the rtcEngine:connectionChangedToState: callback and switches to the CloudHubConnectionStateConnected stateAfter the SDK joins the channel and when it finishes initializing the media engine, the SDK triggers the rtcEngine:didJoinChannel:withUid:elapsed: callback |
CloudHubConnectionStateConnected | 3:The SDK is connected to CloudHub’s edge server and joins a channel. You can now publish or subscribe to a media stream in the channel. |
If the connection to the channel is lost because, for example, the network is down or switched, the SDK automatically tries to reconnect and triggers: rtcEngine:connectionChangedToState: callback,and switches to the CloudHubConnectionStateReconnecting state | |
CloudHubConnectionStateReconnecting | 4:The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues. If the SDK cannot rejoin the channel within 10 seconds after being disconnected from CloudHub’s edge server,the SDK stays in the CloudHubConnectionStateReconnecting state,and keeps rejoining the channelIf the SDK fails to rejoin the channel 20 minutes after being disconnected from CloudHub’s edge server,he SDK triggers the rtcEngine:connectionChangedToState: callback,switches to the CloudHubConnectionStateFailed state, and stops rejoining the channel |
CloudHubConnectionStateFailed | 5:The SDK fails to connect to CloudHub’s edge server or join the channel You must call leaveChannel: to leave this state, and calljoinChannelByToken:channelId:properties:uid:autosubscribeAudio:autoSubscribeVideo:joinSuccess: again to rejoin the channel |
CloudHubConnectionChangedReason
Description:Reasons for the connection state change
Enum | Description |
---|---|
CloudHubConnectionChangedConnecting | 0:The SDK is connecting to CloudHub’s edge server |
CloudHubConnectionChangedJoinSuccess | 1:The SDK has joined the channel successfully |
CloudHubConnectionChangedInterrupted | 2:The connection between the SDK and CloudHub’s edge server is interrupted |
CloudHubConnectionChangedBannedByServer | 3:The connection between the SDK and CloudHub’s edge server is banned by CloudHub’s edge server |
CloudHubConnectionChangedJoinFailed | 4:The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel |
CloudHubConnectionChangedLeaveChannel | 5:The SDK has left the channel |
CloudHubConnectionChangedInvalidAppId | 6:The specified App ID is invalid. Try to rejoin the channel with a valid App ID |
CloudHubConnectionChangedInvalidChannelName | 7:The specified channel name is invalid. Try to rejoin the channel with a valid channel name |
CloudHubConnectionChangedInvalidToken | 8:The generated token is invalid probably due to the following reasons: The App Certificate for the project is enabled in Console, but you do not use Token when joining the channel The uid that you specify in the joinChannelByToken:channelId:properties:uid:autosubscribeAudio:autoSubscribeVideo:joinSuccess: method is different from the uid that you pass for generating the token |
CloudHubConnectionChangedTokenExpired | 9:The token has expired. Generate a new token from your server |
CloudHubConnectionChangedRejectedByServer | 10:The user is banned by the server |
CloudHubConnectionChangedSettingProxyServer | 11:The SDK tries to reconnect after setting a proxy server |
CloudHubConnectionChangedRenewToken | 12:The token renews |
CloudHubConnectionChangedClientIpAddressChanged | 13:The client IP address has changed, probably due to a change of the network type, IP address, or network port |
CloudHubConnectionChangedKeepAliveTimeout | 14:Timeout for the keep-alive of the connection between the SDK and CloudHub’s edge server. The connection state changes to CloudHubConnectionStateReconnecting |
CloudHubLocalVideoStreamState
Description:The state of the local video stream
CloudHubLocalVideoStreamError
Description:The detailed error information of the local video
CloudHubRemoteVideoStreamType
Description:Remote video stream types
Enum | Description |
---|---|
CloudHubRemoteVideoStreamHigh | 0:high-stream video |
CloudHubRemoteVideoStreamLow | 1:low-stream video |
CloudHubStreamFallbackOptions
Description:Stream fallback options
CloudHubMediaType
Description:Media state
CloudHubNetworkQuality
Description:Network status
CloudHubRecordingState
Description:Recording status
Enum | Description |
---|---|
CloudHub_RECORDING_STATE_NONE | 0:not recording |
CloudHub_RECORDING_STATE_STARTED | 1:recording |
CloudHub_RECORDING_STATE_PAUSED | 2:paused |
CloudHubVideoCodecProfile
Description:Video codec profile types
CloudHubAudioSampleRate
Description:Audio sampling rate
Enum | Description |
---|---|
CloudHub_AUDIO_SAMPLE_RATE_32000 | 32000: 32 kHz |
CloudHub_AUDIO_SAMPLE_RATE_44100 | 44100: 44.1 khz |
CloudHub_AUDIO_SAMPLE_RATE_48000 | 48000: 48 khz |
CloudHubLastmileProbeResultState
Description:last-mile network state
CloudHubPermissionType
Description:Permission Types
CloudHubMediaRelayState
Description:The state code in channel media relay
CloudHubMediaRelayError
Description:The error code in channel media relay
Enum | Description |
---|---|
CloudHub_RELAY_OK | 0:the state is normal |
CloudHub_RELAY_ERROR_SERVER_ERROR_RESPONSE | 1:an error occurs in the server response |
CloudHub_RELAY_ERROR_SERVER_NO_RESPONSE | 2:no server response. You can call leaveChannel: method to leave the channel |
CloudHub_RELAY_ERROR_NO_RESOURCE_AVAILABLE | 3:the SDK fails to access the service, probably due to limited resources of the server. |
CloudHub_RELAY_ERROR_FAILED_JOIN_SRC | 4:fails to send the relay request |
CloudHub_RELAY_ERROR_FAILED_JOIN_DEST | 5:fails to accept the relay request |
CloudHub_RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC | 6:the server fails to receive the media stream |
CloudHub_RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST | 7:the server fails to send the media stream |
CloudHub_RELAY_ERROR_SERVER_CONNECTION_LOST | 8:the SDK disconnects from the server due to poor network |
CloudHub_RELAY_ERROR_INTERNAL_ERROR | 9:an internal error occurs in the server |
CloudHub_RELAY_ERROR_SRC_TOKEN_EXPIRED | 10:the token of the source channel has expired |
CloudHub_RELAY_ERROR_DEST_TOKEN_EXPIRED | 11:the token of the destination channel has expired |
CloudHubLighteningContrastLevel
Description:亮度明暗对比度
Enum | Description |
---|---|
CloudHubLighteningContrastLow | 0:低对比度 |
CloudHubLighteningContrastNormal | 1:(默认)正常对比度 |
CloudHubLighteningContrastHigh | 2:高对比度 |
CloudHubAudioEqualizationBandFrequency
Description:Center frequency of speech sound effect equalization band
CloudHubAudioReverbType
Description:audio reverb type
CloudHubAudioEffectPreset
Description:Preset sound effects
CloudHubVideoEffectSticker
Description:Sticker
CloudHubAudioQuality
Description:Local publishing audio quality
CloudHubMediaFileType
Description:Media file type
Enum | Description |
---|---|
CloudHub_MediaFile_Ogg | 0:Ogg |
CloudHub_MediaFile_Wav | 1:Wav |
CloudHubAudioOutputRouting
Description:Audio output device type