TrackSelectionParameters.AudioOffloadPreferences.Builder


public final 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 methods

TrackSelectionParameters.AudioOffloadPreferences

Builds a TrackSelectionParameters instance with the selected values.

TrackSelectionParameters.AudioOffloadPreferences.Builder

Sets the audio offload mode preferences.

TrackSelectionParameters.AudioOffloadPreferences.Builder
@CanIgnoreReturnValue
setIsGaplessSupportRequired(boolean isGaplessSupportRequired)

Sets a constraint on audio offload enablement.

TrackSelectionParameters.AudioOffloadPreferences.Builder
@CanIgnoreReturnValue
setIsSpeedChangeSupportRequired(boolean isSpeedChangeSupportRequired)

Sets a constraint on audio offload enablement.

Public constructors

Builder

public Builder()

Public methods

build

public TrackSelectionParameters.AudioOffloadPreferences build()

Builds a TrackSelectionParameters instance with the selected values.

setAudioOffloadMode

@CanIgnoreReturnValue
public TrackSelectionParameters.AudioOffloadPreferences.Builder setAudioOffloadMode(
    @TrackSelectionParameters.AudioOffloadPreferences.AudioOffloadMode int audioOffloadMode
)

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
public TrackSelectionParameters.AudioOffloadPreferences.Builder setIsGaplessSupportRequired(boolean isGaplessSupportRequired)

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
boolean isGaplessSupportRequired

for playing gapless audio offloaded.

setIsSpeedChangeSupportRequired

@CanIgnoreReturnValue
public TrackSelectionParameters.AudioOffloadPreferences.Builder setIsSpeedChangeSupportRequired(boolean isSpeedChangeSupportRequired)

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
boolean isSpeedChangeSupportRequired

for playing audio offloaded.