play
suspend fun MediaPlayer.play(playbackParameters: PlaybackState.PlaybackParameters = PlaybackState.PlaybackParameters(), restartIfStarted: Boolean = false)
Forces the MediaPlayer to start playback and suspends until playback has completed
Parameters
playbackParameters
the PlaybackState.PlaybackParameters to play with
restartIfStarted
if true
this will ensure that playback starts at Duration.ZERO