Package com.castlabs.android.player
Class AbstractCatchupListener
java.lang.Object
com.castlabs.android.player.AbstractCatchupListener
- All Implemented Interfaces:
CatchupListener
Abstract implementation of
CatchupListener
with empty methods for convenience.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Catchup has ended.void
A seek operation was triggered.void
onCatchupStarted
(float speed) Catchup has started.
-
Constructor Details
-
AbstractCatchupListener
public AbstractCatchupListener()
-
-
Method Details
-
onCatchupStarted
public void onCatchupStarted(float speed) Catchup has started. This is only invoked if the Type isCatchupConfiguration.Type.SPEED
.- Specified by:
onCatchupStarted
in interfaceCatchupListener
- Parameters:
speed
- the catchup speed. Will be the value defined inCatchupConfiguration.speedCoefficient
-
onCatchupEnded
public void onCatchupEnded()Catchup has ended. This is only invoked if the Type isCatchupConfiguration.Type.SPEED
.- Specified by:
onCatchupEnded
in interfaceCatchupListener
-
onCatchupSeek
A seek operation was triggered. There's two possible scenarios for this to happen:- The Type is
CatchupConfiguration.Type.SPEED
. In this case, the callback is triggered when the distance frombuffer end
ormedia end
is bigger thanCatchupConfiguration.fallbackTimeThresholdMs
. - The Type is {@link com.castlabs.android.player.CatchupConfiguration.Type#SEEK}.
In this case, the callback is rtiggered when the distance from
buffer end
ormedia end
is bigger thanCatchupConfiguration.upperTimeThresholdMs
.
- Specified by:
onCatchupSeek
in interfaceCatchupListener
- Parameters:
type
- thetype
of the CatchupConfiguration that triggered the seek operation.
- The Type is
-