Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rte.media.stream.AgoraRteStreamingSourceObserver Class Referenceabstract

Public Member Functions

void onStateChanged (AgoraRteFileInfo currentFileInfo, AgoraRteStreamingSrcState state, AgoraRteStreamingSrcError errCode)
 
void onOpenDone (AgoraRteFileInfo currentFileInfo, int errCode)
 
void onSeekDone (AgoraRteFileInfo currentFileInfo, int errCode)
 
void onEofOnce (AgoraRteFileInfo currentFileInfo, long progressMs, long repeatCount)
 
void onAllMediasCompleted (int errCode)
 
void onProgress (AgoraRteFileInfo currentFileInfo, long positionMs)
 
void onMetaData (AgoraRteFileInfo currentFileInfo, byte[] data, int length)
 

Member Function Documentation

◆ onStateChanged()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onStateChanged ( AgoraRteFileInfo  currentFileInfo,
AgoraRteStreamingSrcState  state,
AgoraRteStreamingSrcError  errCode 
)

Reports the playback state change. When the state of the playback changes,the SDK triggers this callback to report the new playback state and the reason or error for the change.

Parameters
currentFileInfocurrent file information
stateThe new playback state after change. See {}. errCode The player's error code. See AgoraRteStreamingSrcError}.

◆ onOpenDone()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onOpenDone ( AgoraRteFileInfo  currentFileInfo,
int  errCode 
)

Triggered when file is opened

Parameters
currentFileInfocurrent file information
errCodeThe error code, eumulate with AgoraRteErrorCodeType

◆ onSeekDone()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onSeekDone ( AgoraRteFileInfo  currentFileInfo,
int  errCode 
)

Triggered when seeking is done

Parameters
currentFileInfocurrent file information
errCodeThe error code, eumulate with AgoraRteErrorCodeType

◆ onEofOnce()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onEofOnce ( AgoraRteFileInfo  currentFileInfo,
long  progressMs,
long  repeatCount 
)

Triggered when one file playing is end

Parameters
currentFileInfocurrent file information
progressMsthe progress position
repeatCountmeans repeated count of playing

◆ onAllMediasCompleted()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onAllMediasCompleted ( int  errCode)

Occurs when all media files playback is completed.

Parameters
errCodeThe error code, eumulate with AgoraRteErrorCodeType

◆ onProgress()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onProgress ( AgoraRteFileInfo  currentFileInfo,
long  positionMs 
)

Reports current playback progress. The callback triggered once every one second during the playing status

Parameters
currentFileInfocurrent file information
positionMsthe progress position

◆ onMetaData()

void io.agora.rte.media.stream.AgoraRteStreamingSourceObserver.onMetaData ( AgoraRteFileInfo  currentFileInfo,
byte[]  data,
int  length 
)

Occurs when the metadata is received.The callback occurs when the player receives the media metadata and reports the detailed information of the media metadata.

Parameters
currentFileInfocurrent file information
dataThe detailed data of the media metadata.
lengthThe data length (bytes).