I have a service player, which is working well. I have list audio sounds, which I want to play sequentially during the different minute times.
My code :
val sourceList = mutableListOf<ExtractorMediaSource>()
listSounds.forEach {
val uri = RawResourceDataSource.buildRawResourceUri(it)
val source = ExtractorMediaSource(uri, dataSourceFactory, extractorsFactory, null, null)
sourceList.add(source)
}
mPlayer!!.prepare(ConcatenatingMediaSource(*sourceList.toTypedArray()))
I want to repeat the source list for 10 or 20 minutes. How can I set the duration ?