Agora Java API Reference for Android
|
Public Member Functions | |
AgoraRtePlayList | createPlayList () |
AgoraRteVideoTrack | getRteVideoTrack () |
AgoraRteAudioTrack | getRteAudioTrack () |
int | open (String url, long startPos, boolean autoPlay) |
int | open (AgoraRtePlayList playList, long startPos, boolean autoPlay) |
int | close () |
boolean | isVideoValid () |
boolean | isAudioValid () |
long | getDuration () |
long | getStreamCount () |
AgoraRtePlayerStreamInfo | getStreamInfo (long index) |
int | setLoopCount (long loopCount) |
int | play () |
int | pause () |
int | stop () |
int | seek (long newPos) |
int | seekToPrev (long pos) |
int | seekToNext (long pos) |
int | seekToFile (int fileId, long pos) |
AgoraRteStreamingSourceStatus | getStreamingSourceStatus () |
long | getCurrPosition () |
AgoraRteStreamingSrcState | getCurrState () |
int | appendSeiData (AgoraRteInputSeiData seiData) |
int | registerObserver (AgoraRteStreamingSourceObserver observer) |
int | unregisterObserver (AgoraRteStreamingSourceObserver observer) |
void | destroy () |
void | setEventHandler (Handler eventHandler) |
AgoraRtePlayList io.agora.rte.media.stream.AgoraRteStreamingSource.createPlayList | ( | ) |
Create the play list
AgoraRteVideoTrack io.agora.rte.media.stream.AgoraRteStreamingSource.getRteVideoTrack | ( | ) |
Retrieve the RTE video track
AgoraRteAudioTrack io.agora.rte.media.stream.AgoraRteStreamingSource.getRteAudioTrack | ( | ) |
Retrieve the RTE audio track
int io.agora.rte.media.stream.AgoraRteStreamingSource.open | ( | String | url, |
long | startPos, | ||
boolean | autoPlay | ||
) |
Opens a media streaming source with a specified URL.
url | The path of the media file. Both the local path and online path are supported. |
startPos | The starting position (ms) for pushing. Default value is 0. |
autoPlay | whether start playing after opened |
int io.agora.rte.media.stream.AgoraRteStreamingSource.open | ( | AgoraRtePlayList | playList, |
long | startPos, | ||
boolean | autoPlay | ||
) |
Open a play list with start position of first file.
playList | The play list which will be played |
startPos | The start position of the file to be opened. |
autoPlay | whether start playing after opened |
int io.agora.rte.media.stream.AgoraRteStreamingSource.close | ( | ) |
Close current media streaming source
boolean io.agora.rte.media.stream.AgoraRteStreamingSource.isVideoValid | ( | ) |
Retrieve whether video stream is valid
boolean io.agora.rte.media.stream.AgoraRteStreamingSource.isAudioValid | ( | ) |
Retrieve whether audio stream is valid
long io.agora.rte.media.stream.AgoraRteStreamingSource.getDuration | ( | ) |
Gets the duration of the streaming source.
long io.agora.rte.media.stream.AgoraRteStreamingSource.getStreamCount | ( | ) |
Gets the number of the streming source
AgoraRtePlayerStreamInfo io.agora.rte.media.stream.AgoraRteStreamingSource.getStreamInfo | ( | long | index | ) |
Gets the detailed information of a media stream.
index | The index of the media stream. |
int io.agora.rte.media.stream.AgoraRteStreamingSource.setLoopCount | ( | long | loopCount | ) |
Sets whether to loop the streaming source for playback.
loopCount | The number of times of looping the media file. |
int io.agora.rte.media.stream.AgoraRteStreamingSource.play | ( | ) |
Play & push the streaming source.
int io.agora.rte.media.stream.AgoraRteStreamingSource.pause | ( | ) |
Pauses the playing & pushing of the streaming source, Keep current position.
int io.agora.rte.media.stream.AgoraRteStreamingSource.stop | ( | ) |
Stop the playing & pushing of the streaming source, set the position to 0.
int io.agora.rte.media.stream.AgoraRteStreamingSource.seek | ( | long | newPos | ) |
Sets the playback positionin current file After seek done, it will return to previous status
newPos | The new playback position (ms). |
int io.agora.rte.media.stream.AgoraRteStreamingSource.seekToPrev | ( | long | pos | ) |
Seek the playing media file to previous file with a start position
pos | The position to be seeked in the file. |
int io.agora.rte.media.stream.AgoraRteStreamingSource.seekToNext | ( | long | pos | ) |
Seek the playing media file to next file with a start position
pos | The position to be seeked in the file. |
int io.agora.rte.media.stream.AgoraRteStreamingSource.seekToFile | ( | int | fileId, |
long | pos | ||
) |
Seek the playing media file to appointed file with a start position directly
fileId | The file id that should be seeked |
pos | The position to be seeked in the file. |
AgoraRteStreamingSourceStatus io.agora.rte.media.stream.AgoraRteStreamingSource.getStreamingSourceStatus | ( | ) |
Get the stream source status
long io.agora.rte.media.stream.AgoraRteStreamingSource.getCurrPosition | ( | ) |
Gets the current playback position of the media file.
AgoraRteStreamingSrcState io.agora.rte.media.stream.AgoraRteStreamingSource.getCurrState | ( | ) |
Gets the status of current streaming source.
int io.agora.rte.media.stream.AgoraRteStreamingSource.appendSeiData | ( | AgoraRteInputSeiData | seiData | ) |
Appends the SEI data, which can be attached to video packet
seiData | the SEI data |
int io.agora.rte.media.stream.AgoraRteStreamingSource.registerObserver | ( | AgoraRteStreamingSourceObserver | observer | ) |
Registers a media player source observer. Once the media player source observer is registered, you can use the observer to monitor the state change of the media player.
observer | StreamingSourceObserver |
int io.agora.rte.media.stream.AgoraRteStreamingSource.unregisterObserver | ( | AgoraRteStreamingSourceObserver | observer | ) |
Unregisters the media player source observer.
observer | StreamingSourceObserver |
void io.agora.rte.media.stream.AgoraRteStreamingSource.destroy | ( | ) |
destroy streaming source
void io.agora.rte.media.stream.AgoraRteStreamingSource.setEventHandler | ( | Handler | eventHandler | ) |
set event handler, and event callback thrown from MainLooper by default
eventHandler | android handler |