LibreTube/app/src/main/java/com/github/libretube/extensions/UpdateParameters.kt

11 lines
316 B
Kotlin
Raw Normal View History

2022-12-22 15:47:34 +05:30
package com.github.libretube.extensions
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector
2022-12-22 15:47:34 +05:30
fun DefaultTrackSelector.updateParameters(
actions: DefaultTrackSelector.Parameters.Builder.() -> Unit
) = apply {
val params = buildUponParameters().apply(actions)
setParameters(params)
2022-12-22 15:47:34 +05:30
}