TrackSelectionParameters.AudioOffloadPreferences.Builder


class TrackSelectionParameters.AudioOffloadPreferences.Builder


A builder for AudioOffloadPreferences. See the AudioOffloadPreferences documentation for explanations of the parameters that can be configured using this builder.

Summary

Public constructors

Public constructors

Builder

Builder()

Public functions

build

fun build(): TrackSelectionParameters.AudioOffloadPreferences!

Builds a TrackSelectionParameters instance with the selected values.

setAudioOffloadMode

@CanIgnoreReturnValue
fun setAudioOffloadMode(
    @TrackSelectionParameters.AudioOffloadPreferences.AudioOffloadMode audioOffloadMode: Int
): TrackSelectionParameters.AudioOffloadPreferences.Builder!

Sets the audio offload mode preferences. For instance if the preferred mode is enabled/disabled or if offload is required for playback. Default value is AUDIO_OFFLOAD_MODE_DISABLED.

setIsGaplessSupportRequired

@CanIgnoreReturnValue
fun setIsGaplessSupportRequired(isGaplessSupportRequired: Boolean): TrackSelectionParameters.AudioOffloadPreferences.Builder!

Sets a constraint on audio offload enablement. If true then audio offload will be enabled only if the device supports gapless transitions during offload or the selected audio is not gapless. Default value is false.

Parameters
isGaplessSupportRequired: Boolean

for playing gapless audio offloaded.

setIsSpeedChangeSupportRequired

@CanIgnoreReturnValue
fun setIsSpeedChangeSupportRequired(isSpeedChangeSupportRequired: Boolean): TrackSelectionParameters.AudioOffloadPreferences.Builder!

Sets a constraint on audio offload enablement. If true, then audio offload will be enabled only if the device supports changing playback speed during offload. Default value is false.

Parameters
isSpeedChangeSupportRequired: Boolean

for playing audio offloaded.