Callbacks related to network status.
More...
#include "AlivcLivePusher.h"
Callbacks related to network status.
◆ onConnectFail:error:
The callback for failed pusher engine.
- Parameters
-
◆ onConnectionLost:
The callback for disconnected stream pusher.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback indicates that the stream is disconnected
◆ onConnectionStatusChange:connectionStatus:reason:
- (void) onConnectionStatusChange: |
|
(AlivcLivePusher *) |
pusher |
connectionStatus: |
|
(AliLiveConnectionStatus) |
status |
reason: |
|
(AliLiveConnectionStatusChangeReason) |
reason |
|
|
| |
|
required |
Callback when network connection status changes.
- Parameters
-
pusher | The live pusher engine object |
status | Current status value, corresponding value reference enumeration AliLiveConnectionStatus |
reason | The specific reason causing the status change, the corresponding value refers to the enumeration AliLiveConnectionStatusChangeReason |
- Note
- This callback only takes effect in interactive mode
◆ onConnectRecovery:
The callback for network recovery.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback indicates that the streamer's network is recovered
◆ onLastmileDetectResultWithBandWidth:code:result:
Callback of network quality detection results.
- Parameters
-
pusher | The live pusher engine object |
code | Detection results,0: success, -1: DNS acquisition failed, -2: ICMP module initialization failed, -3: ICMP sending failed for a long time, -4: ICMP cannot be accepted(It is recommended to allow broadcasting) |
result | network result AliLiveNetworkQualityProbeResult |
- Note
- This callback will be triggered when startLastmileDetect is called.
code Error code handling suggestions::
- If -1, -2, -3 error codes are directly thrown back, broadcasting can be prevented;
- Because some specific networks may be configured to prevent network detection, a -4 error code will be returned. In order to avoid detection errors that may cause the host to be unable to start broadcasting, it is recommended to allow the broadcasting and push streaming if a -4 error code is returned.
◆ onLastmileDetectResultWithQuality:networkQuality:
- (void) onLastmileDetectResultWithQuality: |
|
(AlivcLivePusher *) |
pusher |
networkQuality: |
|
(AlivcLiveNetworkQuality) |
networkQuality |
|
|
| |
|
required |
Network quality detection callback.
- Parameters
-
pusher | The live pusher engine object |
networkQuality | network quality AlivcLiveNetworkQuality |
- Note
- This callback will be triggered after calling startLastmileDetect before startPush
◆ onNetworkPoor:
The callback for poor network.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback indicates that the streamer has a poor network
◆ onPacketsLost:
The callback for audio/video packet loss due to network reasons.
- Parameters
-
pusher | The live pusher engine object |
◆ onPusherNetworkQualityChanged:upNetworkQuality:downNetworkQuality:
- (void) onPusherNetworkQualityChanged: |
|
(AlivcLivePusher *) |
pusher |
upNetworkQuality: |
|
(AlivcLiveNetworkQuality) |
upQuality |
downNetworkQuality: |
|
(AlivcLiveNetworkQuality) |
downQuality |
|
|
| |
|
required |
The message that is sent when the network quality changes.
- Parameters
-
pusher | The live pusher engine object |
upQuality | up network quality |
downQuality | down network quality |
- Note
- Triggered when peer network quality changes.This callback only takes effect in the interactive mode.
◆ onPushURLAuthenticationOverdue:
The callback for expiring signed URL.
(This callback is sent 1 minute before the signed URL expires.)
- Parameters
-
pusher | The live pusher engine object |
- Returns
- A new signed ingest URL is generated
- Note
- This callback indicates that the signed URL is about to expire. You need to pass a new signed URL to the SDK.
◆ onPushURLTokenExpired:
The token of the streaming URL has expired.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback only takes effect in the interactive mode. The trigger of this callback means that the authentication information has expired, and it needs to be called to re-push the stream with the URL of the new token after the push ends.
◆ onPushURLTokenWillExpire:
The token of the streaming URL is about to expire (this callback will be sent within 30s before expiration)
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback only takes effect in the interactive mode. The callback is triggered 30 seconds before the authentication information. After receiving the callback, the URL of the new token should be passed to the SDK in time refreshPushURLToken
◆ onReconnectError:error:
The callback for failed reconnection.
- Parameters
-
- Note
- This callback indicates that reconnection fails
◆ onReconnectStart:
The callback for reconnection attempt.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback indicates that the push stream is disconnected and being reconnected
◆ onReconnectSuccess:
The callback for successful reconnection.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback indicates that reconnection is successful
◆ onSendDataTimeout:
The callback for data transmission timeout.
- Parameters
-
pusher | The live pusher engine object |
- Note
- This callback indicates that data transmission times out
◆ onSendSeiMessage:
The callback for prompt to send an SEI message.
- Parameters
-
pusher | The live pusher engine object |
The documentation for this protocol was generated from the following file: