public static interface IPlayer.Listener extends IPlayerBase.Listener
Modifier and Type | Method and Description |
---|---|
void |
onABProgress(long position,
long duration,
int abState)
WARNING: use position,duration in
C.STATE_PROGRESS_AB_FINISH , remember to do the
judgment(position>=0 && duration>position) |
void |
onAdded() |
boolean |
onAudioFocusChange(int focusChange) |
boolean |
onIntent(android.content.Intent intent) |
void |
onNotificationRequired(int order)
Notification request(by PlayerService and Notifier maintain)
|
boolean |
onPlayProgress(long position,
long duration) |
void |
onPositionUnitProgress(long position,
int posUnitIndex,
int posUnitState)
WARNING: use position|posUnitIndex in
C.STATE_PROGRESS_POS_UNIT_FINISH , remember to
do the judgment(position>=0) | (posUnitIndex>=0) |
void |
onRemoved()
Some need long term stationed, can be add again when on removed.
|
onBufferingUpdate, onCompletion, onError, onInfo, onPrepared, onSeekComplete, onStateChanged, onVideoSizeChanged
void onAdded()
void onRemoved()
boolean onIntent(android.content.Intent intent)
boolean onPlayProgress(long position, long duration)
position
- current play positionduration
- play durationIPlayer.setUpdatePlayProgressDelayMs(long)
void onPositionUnitProgress(long position, int posUnitIndex, int posUnitState)
C.STATE_PROGRESS_POS_UNIT_FINISH
, remember to
do the judgment(position>=0) | (posUnitIndex>=0)position
- current play positionposUnitIndex
- current position unit indexposUnitState
- IPlayer.setUpdatePlayProgressDelayMs(long)
void onABProgress(long position, long duration, int abState)
C.STATE_PROGRESS_AB_FINISH
, remember to do the
judgment(position>=0 && duration>position)position
- current play ab position (position - abStartPosition)duration
- ab duration (abEndPosition - abStartPosition)abState
- IPlayer.setUpdatePlayProgressDelayMs(long)
void onNotificationRequired(int order)
If you have a custom condition to control whether or not the request notification -> override
@Override public void onNotificationRequired(int order) { if (request conditions) { super.onNotificationRequired(order); } else { super.onNotificationRequired(0); } }
order
- boolean onAudioFocusChange(int focusChange)