类 Player.PositionInfo
- java.lang.Object
-
- com.ts.lib.player.Player.PositionInfo
-
-
字段概要
字段 修饰符和类型 字段 说明 longbufferedPositionMs当前缓冲位置longcurrentPositionMs当前播放位置longdurationMs总长度
-
构造器概要
构造器 构造器 说明 PositionInfo()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringformatBufferedTime()格式化已缓冲时间为 格式化总时长为 "MM:SS" or "H:MM:SS" 格式StringformatCurrentPositionElapsedTime()格式化当前播放位置为 "MM:SS" or "H:MM:SS" 格式StringformatDurationTime()格式化总时长为 "MM:SS" or "H:MM:SS" 格式StringformatElapsedTime(long elapsedMilliseconds)格式化已过去的时间为 "MM:SS" or "H:MM:SS" 格式floatgetBufferedPercentage()已缓存百分比longgetIntervalTimeMs()播放进度回调时间间隔,默认DEFAULT_INTERVALvoidsetIntervalTimeMs(long intervalTimeMs)设置回调间隔时间StringtoString()
-
-
-
方法详细资料
-
getIntervalTimeMs
public long getIntervalTimeMs()
播放进度回调时间间隔,默认DEFAULT_INTERVAL- 返回:
- long -
DEFAULT_INTERVAL
-
setIntervalTimeMs
public void setIntervalTimeMs(@IntRange(from=100L,to=1000L) long intervalTimeMs)
设置回调间隔时间- 参数:
intervalTimeMs- - 回调间隔时间
-
formatCurrentPositionElapsedTime
public String formatCurrentPositionElapsedTime()
格式化当前播放位置为 "MM:SS" or "H:MM:SS" 格式- 返回:
- String
-
formatDurationTime
public String formatDurationTime()
格式化总时长为 "MM:SS" or "H:MM:SS" 格式- 返回:
- String
-
formatBufferedTime
public String formatBufferedTime()
格式化已缓冲时间为 格式化总时长为 "MM:SS" or "H:MM:SS" 格式- 返回:
- String
-
formatElapsedTime
public String formatElapsedTime(long elapsedMilliseconds)
格式化已过去的时间为 "MM:SS" or "H:MM:SS" 格式- 返回:
- String
-
getBufferedPercentage
public float getBufferedPercentage()
已缓存百分比- 返回:
- float
-
-