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
restartIfStarted

if true this will ensure that playback starts at Duration.ZERO