AliVCSDK 6.17.0
阿里云音视频SDK,为视频开发者提供一站式接入服务
 
Loading...
Searching...
No Matches
com.alivc.live.pusher.AlivcLivePushNetworkListener Class Referenceabstract

Live push network listener. More...

Inheritance diagram for com.alivc.live.pusher.AlivcLivePushNetworkListener:

Public Member Functions

abstract void onNetworkPoor (AlivcLivePusher pusher)
 
abstract void onNetworkRecovery (AlivcLivePusher pusher)
 
abstract void onReconnectStart (AlivcLivePusher pusher)
 
abstract void onConnectionLost (AlivcLivePusher pusher)
 
abstract void onReconnectFail (AlivcLivePusher pusher)
 
abstract void onReconnectSucceed (AlivcLivePusher pusher)
 
abstract void onSendDataTimeout (AlivcLivePusher pusher)
 
abstract void onConnectFail (AlivcLivePusher pusher)
 
abstract String onPushURLAuthenticationOverdue (AlivcLivePusher pusher)
 
abstract void onSendMessage (AlivcLivePusher pusher)
 
abstract void onPacketsLost (AlivcLivePusher pusher)
 
void onNetworkQualityChanged (AlivcLiveNetworkQuality upQuality, AlivcLiveNetworkQuality downQuality)
 
void onPushURLTokenWillExpire (AlivcLivePusher pusher)
 
void onPushURLTokenExpired (AlivcLivePusher pusher)
 
void onLastMileDetectResultWithQuality (AlivcLivePusher pusher, AlivcLiveNetworkQuality networkQuality)
 
void onLastMileDetectResultWithBandWidth (AlivcLivePusher pusher, int code, AlivcLiveNetworkQualityProbeResult networkQualityProbeResult)
 
void onConnectionStatusChange (AlivcLivePusher pusher, AlivcLiveConnectionStatus connectionStatus, AlivcLiveConnectionStatusChangeReason connectionStatusChangeReason)
 

Detailed Description

Live push network listener.

Author
aliyun live push sdk
Call Example
mAlivcLivePusher.setLivePushNetworkListener(new AlivcLivePushNetworkListener () {});
See also
com.alivc.live.pusher.AlivcLivePusher::setLivePushNetworkListener(AlivcLivePushNetworkListener)
Handle errors, exceptions, and special cases

Definition at line 18 of file AlivcLivePushNetworkListener.java.

Member Function Documentation

◆ onConnectFail()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onConnectFail ( AlivcLivePusher  pusher)
abstract

connect failed

Parameters
pusherpusher instance

◆ onConnectionLost()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onConnectionLost ( AlivcLivePusher  pusher)
abstract

connect lost

Parameters
pusherpusher instance
Note
This callback indicates that the stream is disconnected

◆ onConnectionStatusChange()

void com.alivc.live.pusher.AlivcLivePushNetworkListener.onConnectionStatusChange ( AlivcLivePusher  pusher,
AlivcLiveConnectionStatus  connectionStatus,
AlivcLiveConnectionStatusChangeReason  connectionStatusChangeReason 
)

Network connection status change callback

Parameters
pusherpusher instance
connectionStatusNetwork connection status
connectionStatusChangeReasonReason for network status change
Attention
This API is only supported in the interactive mode currently

Definition at line 174 of file AlivcLivePushNetworkListener.java.

◆ onLastMileDetectResultWithBandWidth()

void com.alivc.live.pusher.AlivcLivePushNetworkListener.onLastMileDetectResultWithBandWidth ( AlivcLivePusher  pusher,
int  code,
AlivcLiveNetworkQualityProbeResult  networkQualityProbeResult 
)

Callback of network quality detection results

Parameters
pusherpusher instance
codeDetection result, 0: Success, -1: DNS acquisition failed, -2: ICMP module initialization failed, -3: ICMP sending failed for a long time, -4: ICMP cannot receive (it is recommended to allow broadcasting)
networkQualityProbeResultThe results of network detection
Attention
This API is only supported in the interactive mode currently
Note
Suggestion for handling error codes:
1. If the -1, -2, and -3 error codes are directly thrown back, it can prevent the broadcast from starting;
2. Due to some specific networks that may be set to prevent network detection, an error code of -4 may be returned. To avoid detection errors that may cause broadcasters to be unable to start broadcasting, it is recommended to allow streaming to start by returning an error code of -4
This callback will be triggered after calling com.alivc.live.pusher.AlivcLivePusher#startLastMileDetect(com.alivc.live.pusher.AlivcLiveNetworkQualityProbeConfig) before starting streaming

Definition at line 162 of file AlivcLivePushNetworkListener.java.

◆ onLastMileDetectResultWithQuality()

void com.alivc.live.pusher.AlivcLivePushNetworkListener.onLastMileDetectResultWithQuality ( AlivcLivePusher  pusher,
AlivcLiveNetworkQuality  networkQuality 
)

Network quality detection callback

Parameters
pusherpusher instance
networkQualitynetwork quality
Attention
This API is only supported in the interactive mode currently
Note
This callback will be triggered after calling com.alivc.live.pusher.AlivcLivePusher#startLastMileDetect(com.alivc.live.pusher.AlivcLiveNetworkQualityProbeConfig) before starting streaming

Definition at line 146 of file AlivcLivePushNetworkListener.java.

◆ onNetworkPoor()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onNetworkPoor ( AlivcLivePusher  pusher)
abstract

network poor

Parameters
pusherpusher instance
Note
This callback indicates that the streamer has a poor network

◆ onNetworkQualityChanged()

void com.alivc.live.pusher.AlivcLivePushNetworkListener.onNetworkQualityChanged ( AlivcLiveNetworkQuality  upQuality,
AlivcLiveNetworkQuality  downQuality 
)

Definition at line 109 of file AlivcLivePushNetworkListener.java.

◆ onNetworkRecovery()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onNetworkRecovery ( AlivcLivePusher  pusher)
abstract

network recovery

Parameters
pusherpusher instance
Note
This callback indicates that the streamer's network is recovered

◆ onPacketsLost()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onPacketsLost ( AlivcLivePusher  pusher)
abstract

push packet loss

Parameters
pusherpusher instance
Note
The callback for audio/video packet loss due to network reasons

◆ onPushURLAuthenticationOverdue()

abstract String com.alivc.live.pusher.AlivcLivePushNetworkListener.onPushURLAuthenticationOverdue ( AlivcLivePusher  pusher)
abstract

push url authentication is overdue

Parameters
pusherpusher instance
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 com.alivc.live.pusher.AlivcLivePushNetworkListener.onPushURLTokenExpired ( AlivcLivePusher  pusher)

The token of the streaming URL has expired

Parameters
pusherpusher instance
Attention
This API is only supported in the interactive mode currently
Note
basic live mode refer to com.alivc.live.pusher.AlivcLivePushNetworkListener#onPushURLAuthenticationOverdue(com.alivc.live.pusher.AlivcLivePusher)
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.

Definition at line 134 of file AlivcLivePushNetworkListener.java.

◆ onPushURLTokenWillExpire()

void com.alivc.live.pusher.AlivcLivePushNetworkListener.onPushURLTokenWillExpire ( AlivcLivePusher  pusher)

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

Parameters
pusherpusher instance
Attention
This API is only supported in the interactive mode currently
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. com.alivc.live.pusher.AlivcLivePusher#refreshPushURLToken(String)}

Definition at line 121 of file AlivcLivePushNetworkListener.java.

◆ onReconnectFail()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onReconnectFail ( AlivcLivePusher  pusher)
abstract

reconnect failed

Parameters
pusherpusher instance
Note
This callback indicates that reconnection fails

◆ onReconnectStart()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onReconnectStart ( AlivcLivePusher  pusher)
abstract

reconnect start

Parameters
pusherpusher instance
Note
This callback indicates that the push stream is disconnected and being reconnected

◆ onReconnectSucceed()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onReconnectSucceed ( AlivcLivePusher  pusher)
abstract

reconnect success

Parameters
pusherpusher instance
Note
This callback indicates that reconnection is successful

◆ onSendDataTimeout()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onSendDataTimeout ( AlivcLivePusher  pusher)
abstract

send data timeout

Parameters
pusherpusher instance
Note
This callback indicates that data transmission times out

◆ onSendMessage()

abstract void com.alivc.live.pusher.AlivcLivePushNetworkListener.onSendMessage ( AlivcLivePusher  pusher)
abstract

send SEI

Parameters
pusherpusher instance