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

Live push info listener. More...

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

Public Member Functions

abstract void onPreviewStarted (AlivcLivePusher pusher)
 
abstract void onPreviewStopped (AlivcLivePusher pusher)
 
abstract void onPushStarted (AlivcLivePusher pusher)
 
abstract void onPushPaused (AlivcLivePusher pusher)
 
abstract void onPushResumed (AlivcLivePusher pusher)
 
abstract void onPushStopped (AlivcLivePusher pusher)
 
abstract void onPushRestarted (AlivcLivePusher pusher)
 
abstract void onFirstFramePreviewed (AlivcLivePusher pusher)
 
abstract void onFirstFramePushed (AlivcLivePusher pusher)
 
abstract void onDropFrame (AlivcLivePusher pusher, int beforeCount, int afterCount)
 
abstract void onAdjustBitrate (AlivcLivePusher pusher, int currentBitrate, int targetBitrate)
 
abstract void onAdjustFps (AlivcLivePusher pusher, int currentFps, int targetFps)
 
abstract void onPushStatistics (AlivcLivePusher pusher, AlivcLivePushStatsInfo statistics)
 
void onSetLiveMixTranscodingConfig (AlivcLivePusher pusher, boolean isSuccess, String msg)
 
void onKickedOutByServer (AlivcLivePusher pusher, AlivcLivePushKickedOutType kickedOutType)
 
void onMicrophoneVolumeUpdate (AlivcLivePusher pusher, int volume)
 
void onLocalRecordEvent (AlivcLiveRecordMediaEvent mediaEvent, String storagePath)
 
void onAudioPublishStateChanged (AlivcLivePublishState oldState, AlivcLivePublishState newState)
 
void onVideoPublishStateChanged (AlivcLivePublishState oldState, AlivcLivePublishState newState)
 
void onScreenSharePublishStateChanged (AlivcLivePublishState oldState, AlivcLivePublishState newState)
 
void onLocalDualAudioStreamPushState (AlivcLivePusher pusher, boolean isPushing)
 
void onRemoteUserEnterRoom (AlivcLivePusher pusher, String userId, boolean isOnline)
 
void onRemoteUserAudioStream (AlivcLivePusher pusher, String userId, boolean isPushing)
 
void onRemoteUserVideoStream (AlivcLivePusher pusher, String userId, AlivcLivePlayVideoStreamType videoStreamType, boolean isPushing)
 

Detailed Description

Live push info listener.

Author
aliyun live push sdk
Call Example
mAlivcLivePusher.setLivePushInfoListener(new AlivcLivePushInfoListener () {});
See also
com.alivc.live.pusher.AlivcLivePusher::setLivePushInfoListener(com.alivc.live.pusher.AlivcLivePushInfoListener)

Definition at line 17 of file AlivcLivePushInfoListener.java.

Member Function Documentation

◆ onAdjustBitrate()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onAdjustBitrate ( AlivcLivePusher  pusher,
int  currentBitrate,
int  targetBitrate 
)
abstract

bitrate adjusted callback

Parameters
pusherpusher instance
currentBitratecurrent bitrate
targetBitratetarget bitrate

◆ onAdjustFps()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onAdjustFps ( AlivcLivePusher  pusher,
int  currentFps,
int  targetFps 
)
abstract

FPS adjusted callback

Parameters
pusherpusher instance
currentFpscurrent FPS
targetFpstarget FPS

◆ onAudioPublishStateChanged()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onAudioPublishStateChanged ( AlivcLivePublishState  oldState,
AlivcLivePublishState  newState 
)

Callback for changes in audio streaming publish state

Parameters
oldStateold publish state
newStatenew publish state
Attention
This API is only supported in the interactive mode currently

Definition at line 181 of file AlivcLivePushInfoListener.java.

◆ onDropFrame()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onDropFrame ( AlivcLivePusher  pusher,
int  beforeCount,
int  afterCount 
)
abstract

drop frame callback

Parameters
pusherpusher instance
beforeCountvideo frame count before
afterCountvideo frame count after

◆ onFirstFramePreviewed()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onFirstFramePreviewed ( AlivcLivePusher  pusher)
abstract

first frame previewed callback (Rendering the first frame of audio and video stream)

Parameters
pusherpusher instance

◆ onFirstFramePushed()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onFirstFramePushed ( AlivcLivePusher  pusher)
abstract

first frame pushed callback (Send the first frame of audio and video stream)

Parameters
pusherpusher instance

◆ onKickedOutByServer()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onKickedOutByServer ( AlivcLivePusher  pusher,
AlivcLivePushKickedOutType  kickedOutType 
)

the callback of being kicked out by server

Parameters
pusherpusher instance
kickedOutTypethe specific reason for being kicked out
Attention
This API is only supported in the interactive mode currently
See also
com.alivc.live.annotations.AlivcLivePushKickedOutType

Definition at line 146 of file AlivcLivePushInfoListener.java.

◆ onLocalDualAudioStreamPushState()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onLocalDualAudioStreamPushState ( AlivcLivePusher  pusher,
boolean  isPushing 
)

The callback for the second audio stream push status callback

Parameters
pusherpusher instance
isPushingisPushing state
Attention
This API is only supported in the interactive mode currently
Note
This callback corresponds to the interface: AlivcLivePusher#startLocalDualAudioStream()
This callback corresponds to the interface: AlivcLivePusher#stopLocalDualAudioStream()

Definition at line 221 of file AlivcLivePushInfoListener.java.

◆ onLocalRecordEvent()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onLocalRecordEvent ( AlivcLiveRecordMediaEvent  mediaEvent,
String  storagePath 
)

Local media recording status callback

Parameters
mediaEventLocal recording status and error codes
storagePathAbsolute path to local recording files
Note
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#startLocalRecord(com.alivc.live.pusher.AlivcLiveLocalRecordConfig)
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#stopLocalRecord()

Definition at line 170 of file AlivcLivePushInfoListener.java.

◆ onMicrophoneVolumeUpdate()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onMicrophoneVolumeUpdate ( AlivcLivePusher  pusher,
int  volume 
)

the callback of microphone volume

Parameters
pusherpusher instance
volumeVolume level, value [0, 255]
Attention
This API is only supported in the interactive mode currently
Note
This callback relies on the Vad function and requires calling the following interface to take effect: com.alivc.live.pusher.AlivcLivePusher#enableAudioVolumeIndication(int, int, int)

Definition at line 158 of file AlivcLivePushInfoListener.java.

◆ onPreviewStarted()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPreviewStarted ( AlivcLivePusher  pusher)
abstract

preview started callback

Parameters
pusherpusher instance

◆ onPreviewStopped()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPreviewStopped ( AlivcLivePusher  pusher)
abstract

preview stopped callback

Parameters
pusherpusher instance

◆ onPushPaused()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPushPaused ( AlivcLivePusher  pusher)
abstract

push paused callback

Parameters
pusherpusher instance

◆ onPushRestarted()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPushRestarted ( AlivcLivePusher  pusher)
abstract

push restarted callback

Parameters
pusherpusher instance
Note
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#restartPush()
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#restartPushAsync()

◆ onPushResumed()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPushResumed ( AlivcLivePusher  pusher)
abstract

push resumed callback

Parameters
pusherpusher instance

◆ onPushStarted()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPushStarted ( AlivcLivePusher  pusher)
abstract

push started callback

Parameters
pusherpusher instance
Note
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#startPush(String)
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#startPushAsync(String)

◆ onPushStatistics()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPushStatistics ( AlivcLivePusher  pusher,
AlivcLivePushStatsInfo  statistics 
)
abstract

push statistics callback

Parameters
pusherpusher instance
statisticspush statistics info
Note
callback every 2s
See also
com.alivc.live.pusher.AlivcLivePushStatsInfo

◆ onPushStopped()

abstract void com.alivc.live.pusher.AlivcLivePushInfoListener.onPushStopped ( AlivcLivePusher  pusher)
abstract

push stopped callback

Parameters
pusherpusher instance

◆ onRemoteUserAudioStream()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onRemoteUserAudioStream ( AlivcLivePusher  pusher,
String  userId,
boolean  isPushing 
)

There are users pushing audio stream callbacks from members in the room

Parameters
pusherpusher instance
userIdUser ID
isPushingpushing state, true->start pushing, false->stop pushing
Attention
This API is only supported in the interactive mode currently

Definition at line 247 of file AlivcLivePushInfoListener.java.

◆ onRemoteUserEnterRoom()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onRemoteUserEnterRoom ( AlivcLivePusher  pusher,
String  userId,
boolean  isOnline 
)

the callback of user being entered the room

Parameters
pusherpusher instance
userIdUser ID
isOnlineonline state,true->join room,false->leave room
Attention
This API is only supported in the interactive mode currently
Note
When the anchor is connecting, after the connected microphone audience starts pushing the stream, the anchor can receive this callback.
After the anchor receives the callback, the anchor can request the pull streaming address by the userId from its business server and use the com.alivc.live.player.AlivcLivePlayer#startPlay(String) interface for pulling streaming

Definition at line 235 of file AlivcLivePushInfoListener.java.

◆ onRemoteUserVideoStream()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onRemoteUserVideoStream ( AlivcLivePusher  pusher,
String  userId,
AlivcLivePlayVideoStreamType  videoStreamType,
boolean  isPushing 
)

A user opens a shared stream callback in the room, which can be a screen sharing stream or a unity stream

Parameters
pusherpusher instance
userIdUser ID
videoStreamTypevideo stream type
isPushingpushing state, true->start pushing, false->stop pushing
Attention
This API is only supported in the interactive mode currently
Note
After the anchor gets the shared stream callback, he can create an AliLivePlayer object, specify the videoStreamType as AlivcLivePlayVideoStreamTypeScreen,
use the userId's link address to pull the stream, and use the interface com.alivc.live.player.AlivcLivePlayer#startPlay(String) to pull the stream.

Definition at line 262 of file AlivcLivePushInfoListener.java.

◆ onScreenSharePublishStateChanged()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onScreenSharePublishStateChanged ( AlivcLivePublishState  oldState,
AlivcLivePublishState  newState 
)

Callback for changes in screen sharing streaming publish state

Parameters
oldStateold publish state
newStatenew publish state
Attention
This API is only supported in the interactive mode currently
Note
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#startScreenShare()
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#stopScreenShare()

Definition at line 207 of file AlivcLivePushInfoListener.java.

◆ onSetLiveMixTranscodingConfig()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onSetLiveMixTranscodingConfig ( AlivcLivePusher  pusher,
boolean  isSuccess,
String  msg 
)

live mix transcoding callback

Parameters
pusherpusher instance
isSuccesstrue->success,false->failed
msgerror msg
Attention
This API is only supported in the interactive mode currently
Note
This callback corresponds to the interface: com.alivc.live.pusher.AlivcLivePusher#setLiveMixTranscodingConfig(com.alivc.live.pusher.AlivcLiveTranscodingConfig)

Definition at line 134 of file AlivcLivePushInfoListener.java.

◆ onVideoPublishStateChanged()

void com.alivc.live.pusher.AlivcLivePushInfoListener.onVideoPublishStateChanged ( AlivcLivePublishState  oldState,
AlivcLivePublishState  newState 
)

Callback for changes in video streaming publish state

Parameters
oldStateold publish state
newStatenew publish state
Attention
This API is only supported in the interactive mode currently

Definition at line 193 of file AlivcLivePushInfoListener.java.