AlivcLivePusher_Interactive v6.17.0
Aliyun Live Pusher Interactive SDK API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AlivcLivePusherNetworkDelegate> Protocol Reference

Callbacks related to network status. More...

#include "AlivcLivePusher.h"

Inheritance diagram for <AlivcLivePusherNetworkDelegate>:

Instance Methods

(void) - onConnectFail:error:
 The callback for failed pusher engine.
 
(void) - onConnectionLost:
 The callback for disconnected stream pusher.
 
(void) - onConnectionStatusChange:connectionStatus:reason:
 Callback when network connection status changes.
 
(void) - onConnectRecovery:
 The callback for network recovery.
 
(void) - onLastmileDetectResultWithBandWidth:code:result:
 Callback of network quality detection results.
 
(void) - onLastmileDetectResultWithQuality:networkQuality:
 Network quality detection callback.
 
(void) - onNetworkPoor:
 The callback for poor network.
 
(void) - onPacketsLost:
 The callback for audio/video packet loss due to network reasons.
 
(void) - onPusherNetworkQualityChanged:upNetworkQuality:downNetworkQuality:
 The message that is sent when the network quality changes.
 
(NSString *) - onPushURLAuthenticationOverdue:
 The callback for expiring signed URL.
 
(void) - onPushURLTokenExpired:
 The token of the streaming URL has expired.
 
(void) - onPushURLTokenWillExpire:
 The token of the streaming URL is about to expire (this callback will be sent within 30s before expiration)
 
(void) - onReconnectError:error:
 The callback for failed reconnection.
 
(void) - onReconnectStart:
 The callback for reconnection attempt.
 
(void) - onReconnectSuccess:
 The callback for successful reconnection.
 
(void) - onSendDataTimeout:
 The callback for data transmission timeout.
 
(void) - onSendSeiMessage:
 The callback for prompt to send an SEI message.
 

Detailed Description

Callbacks related to network status.

Method Documentation

◆ onConnectFail:error:

- (void) onConnectFail: (AlivcLivePusher *)  pusher
error: (AlivcLivePushError *)  error 
required

The callback for failed pusher engine.

Parameters
pusherThe live pusher engine object
errorThe error message AlivcLivePushError

◆ onConnectionLost:

- (void) onConnectionLost: (AlivcLivePusher *)  pusher
required

The callback for disconnected stream pusher.

Parameters
pusherThe 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
pusherThe live pusher engine object
statusCurrent status value, corresponding value reference enumeration AliLiveConnectionStatus
reasonThe specific reason causing the status change, the corresponding value refers to the enumeration AliLiveConnectionStatusChangeReason
Note
This callback only takes effect in interactive mode

◆ onConnectRecovery:

- (void) onConnectRecovery: (AlivcLivePusher *)  pusher
required

The callback for network recovery.

Parameters
pusherThe live pusher engine object
Note
This callback indicates that the streamer's network is recovered

◆ onLastmileDetectResultWithBandWidth:code:result:

- (void) onLastmileDetectResultWithBandWidth: (AlivcLivePusher *)  pusher
code: (int)  code
result: (AliLiveNetworkQualityProbeResult *_Nonnull)  result 
required

Callback of network quality detection results.

Parameters
pusherThe live pusher engine object
codeDetection 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)
resultnetwork result AliLiveNetworkQualityProbeResult
Note
This callback will be triggered when startLastmileDetect is called.

code Error code handling suggestions::

  1. If -1, -2, -3 error codes are directly thrown back, broadcasting can be prevented;
  2. 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
pusherThe live pusher engine object
networkQualitynetwork quality AlivcLiveNetworkQuality
Note
This callback will be triggered after calling startLastmileDetect before startPush

◆ onNetworkPoor:

- (void) onNetworkPoor: (AlivcLivePusher *)  pusher
required

The callback for poor network.

Parameters
pusherThe live pusher engine object
Note
This callback indicates that the streamer has a poor network

◆ onPacketsLost:

- (void) onPacketsLost: (AlivcLivePusher *)  pusher
optional

The callback for audio/video packet loss due to network reasons.

Parameters
pusherThe 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
pusherThe live pusher engine object
upQualityup network quality
downQualitydown network quality
Note
Triggered when peer network quality changes.This callback only takes effect in the interactive mode.

◆ onPushURLAuthenticationOverdue:

- (NSString *) onPushURLAuthenticationOverdue: (AlivcLivePusher *)  pusher
required

The callback for expiring signed URL.

(This callback is sent 1 minute before the signed URL expires.)

Parameters
pusherThe 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:

- (void) onPushURLTokenExpired: (AlivcLivePusher *)  pusher
required

The token of the streaming URL has expired.

Parameters
pusherThe 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:

- (void) onPushURLTokenWillExpire: (AlivcLivePusher *)  pusher
required

The token of the streaming URL is about to expire (this callback will be sent within 30s before expiration)

Parameters
pusherThe 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:

- (void) onReconnectError: (AlivcLivePusher *)  pusher
error: (AlivcLivePushError *)  error 
required

The callback for failed reconnection.

Parameters
pusherThe live pusher engine object
errorThe error message AlivcLivePushError
Note
This callback indicates that reconnection fails

◆ onReconnectStart:

- (void) onReconnectStart: (AlivcLivePusher *)  pusher
required

The callback for reconnection attempt.

Parameters
pusherThe live pusher engine object
Note
This callback indicates that the push stream is disconnected and being reconnected

◆ onReconnectSuccess:

- (void) onReconnectSuccess: (AlivcLivePusher *)  pusher
required

The callback for successful reconnection.

Parameters
pusherThe live pusher engine object
Note
This callback indicates that reconnection is successful

◆ onSendDataTimeout:

- (void) onSendDataTimeout: (AlivcLivePusher *)  pusher
required

The callback for data transmission timeout.

Parameters
pusherThe live pusher engine object
Note
This callback indicates that data transmission times out

◆ onSendSeiMessage:

- (void) onSendSeiMessage: (AlivcLivePusher *)  pusher
required

The callback for prompt to send an SEI message.

Parameters
pusherThe live pusher engine object

The documentation for this protocol was generated from the following file: