Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rte.media.media_player.AgoraRtePlayList Interface Reference

Public Member Functions

int clearFileList ()
 
int getFileCount ()
 
long getTotalDuration ()
 
AgoraRteFileInfo getFileInfoById (int fileId)
 
AgoraRteFileInfo getFileInfoByIndex (int fileIndex)
 
AgoraRteFileInfo getFirstFileInfo ()
 
AgoraRteFileInfo getLastFileInfo ()
 
List< AgoraRteFileInfogetFileList ()
 
int insertFile (String url, int insertIndex, AgoraRteFileInfo fileInfo)
 
int appendFile (String url, AgoraRteFileInfo fileInfo)
 
int removeFileById (int fileId)
 
int removeFileByIndex (int removeIndex)
 
int removeFileByUrl (String url)
 
void destroy ()
 

Member Function Documentation

◆ clearFileList()

int io.agora.rte.media.media_player.AgoraRtePlayList.clearFileList ( )

clear all files in current list if there is a current file , it will return ERR_ALREADY_IN_USE

Returns
error code: < 0 :failure; >= 0 success

◆ getFileCount()

int io.agora.rte.media.media_player.AgoraRtePlayList.getFileCount ( )

retrieve the file count of current list

Returns
error code: < 0 failure; >= 0 success

◆ getTotalDuration()

long io.agora.rte.media.media_player.AgoraRtePlayList.getTotalDuration ( )

Gets the total duration of the list

Returns
the summarization of each file duration

◆ getFileInfoById()

AgoraRteFileInfo io.agora.rte.media.media_player.AgoraRtePlayList.getFileInfoById ( int  fileId)

Get file information by file Id

Parameters
fileIdthe query file id
Returns
file information

◆ getFileInfoByIndex()

AgoraRteFileInfo io.agora.rte.media.media_player.AgoraRtePlayList.getFileInfoByIndex ( int  fileIndex)

Get file information by file index

Parameters
fileIndexthe query file index
Returns
file information

◆ getFirstFileInfo()

AgoraRteFileInfo io.agora.rte.media.media_player.AgoraRtePlayList.getFirstFileInfo ( )

get first file info

Returns
the query file information

◆ getLastFileInfo()

AgoraRteFileInfo io.agora.rte.media.media_player.AgoraRtePlayList.getLastFileInfo ( )

get last file info

Returns
the query file information

◆ getFileList()

List<AgoraRteFileInfo> io.agora.rte.media.media_player.AgoraRtePlayList.getFileList ( )

Get the file information list of current list

Returns
current list

◆ insertFile()

int io.agora.rte.media.media_player.AgoraRtePlayList.insertFile ( String  url,
int  insertIndex,
AgoraRteFileInfo  fileInfo 
)

Insert new file into list at the appointed position

Parameters
urlthe file path url
insertIndexthe index of want to insert, range in [0, (file_count-1)] insert_index <= 0: insert into head of list insert_index >= file_count: insert into tail of list
fileInfooutput the file information
Returns
error code: < 0: failure; >= 0: success

◆ appendFile()

int io.agora.rte.media.media_player.AgoraRtePlayList.appendFile ( String  url,
AgoraRteFileInfo  fileInfo 
)

Append new file into list tail

Parameters
urlthe file path url
fileInfooutput the file information
Returns
error code: < 0: failure; >= 0 success

◆ removeFileById()

int io.agora.rte.media.media_player.AgoraRtePlayList.removeFileById ( int  fileId)

Remove the the appointed file from list If removing current file, it will return @agora::ERR_ALREADY_IN_USE

Parameters
fileIdthe file UUID which want to be removed
Returns
error code: < 0: failure; >= 0: success

◆ removeFileByIndex()

int io.agora.rte.media.media_player.AgoraRtePlayList.removeFileByIndex ( int  removeIndex)

Remove the the all files from list which has appointed file url If removing current file, it will return @agora::ERR_ALREADY_IN_USE

Parameters
removeIndexthe file index which want to be remove
Returns
error code: < 0: failure; >= 0: success

◆ removeFileByUrl()

int io.agora.rte.media.media_player.AgoraRtePlayList.removeFileByUrl ( String  url)

Remove the the all files from list which has appointed file url If removing current file, it will return @agora::ERR_ALREADY_IN_USE

Parameters
urlthe file URL which want to be remove
Returns
error code: < 0: failure; >= 0: success

◆ destroy()

void io.agora.rte.media.media_player.AgoraRtePlayList.destroy ( )

destroy play list