Class PlaybackStateChange
java.lang.Object
com.castlabs.android.player.state.PlaybackStateChange
Details about a change in the playback state model shared across castLabs player SDKs.
A change has no reason when the shared state model does not define one for that transition.
In that case, getReason() returns null.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the state after this change.Returns a copy of the extra data for this state change.Returns the state before this change.Returns why the state changed, when a reason is available.
-
Field Details
-
KEY_CURRENT_POSITION_MS
Seek source position in milliseconds.- See Also:
-
KEY_TARGET_POSITION_MS
Seek target position in milliseconds.- See Also:
-
-
Method Details
-
getPreviousState
Returns the state before this change.- Returns:
- previous state
-
getCurrentState
Returns the state after this change.- Returns:
- current state
-
getReason
Returns why the state changed, when a reason is available.- Returns:
- transition reason, or
nullwhen no reason applies
-
getMetadata
Returns a copy of the extra data for this state change.- Returns:
- non-null state change data
-