to reduce battery consumption ExoPlayer
introduced support for audio offload in 2.12 as an experimental feature.
This function is no longer available in the media3 library for the current Exoplayer
version 1.2.0.
I cannot find anything about this in the documentation. Is there another way to reduce the battery consumption for audio playback?
Thanks GGK
It's still there:
https://developer.android.com/guide/topics/media/exoplayer/track-selection#audioOffload
val audioOffloadPreferences =
AudioOffloadPreferences.Builder()
.setAudioOffloadMode(AudioOffloadPreferences.AUDIO_OFFLOAD_MODE_ENABLED)
// Add additional options as needed
.setIsGaplessSupportRequired(true)
.build()
player.trackSelectionParameters =
player.trackSelectionParameters
.buildUpon()
.setAudioOffloadPreferences(audioOffloadPreferences)
.build()