public interface SleepTimer
限定符和类型 | 接口和说明 |
---|---|
static interface |
SleepTimer.OnStateChangeListener
用于监听睡眠定时器的状态改变。
|
static class |
SleepTimer.TimeoutAction
睡眠定时器的时间到时要执行的操作。
|
限定符和类型 | 方法和说明 |
---|---|
void |
cancelSleepTimer()
取消睡眠定时器。
|
void |
startSleepTimer(long time,
SleepTimer.TimeoutAction action)
启动睡眠定时器。
|
void startSleepTimer(long time, SleepTimer.TimeoutAction action)
time
- 定时器的定时时间(单位:毫秒)。播放器会在经过 time 时间后暂停播放。action
- 定时器的的时间到时要执行的操作。void cancelSleepTimer()