PlaybackStateRepo
open class PlaybackStateRepo(mediaManager: MediaManager, coroutineContext: CoroutineContext) : BasePlaybackStateRepo
A BasePlaybackStateRepo managed using a MediaManager
Parameters
mediaManager
the MediaManager to manage the PlaybackState
coroutineContext
the CoroutineContext the CoroutineContext used to create a coroutine scope for this state machine.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun launchTakeAndChangeState(context: CoroutineContext, action: suspend (PlaybackState) -> suspend () -> PlaybackState): Job
fun <K : PlaybackState> launchTakeAndChangeState(context: CoroutineContext, remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PlaybackState): Job
Link copied to clipboard
fun <Result> launchUseState(context: CoroutineContext, action: suspend (PlaybackState) -> Result): Job
Link copied to clipboard
Link copied to clipboard
suspend fun takeAndChangeState(action: suspend (PlaybackState) -> suspend () -> PlaybackState): PlaybackState
suspend fun <K : PlaybackState> takeAndChangeState(remainIfStateNot: KClass<K>, action: suspend (K) -> suspend () -> PlaybackState): PlaybackState