SimpleExoPlayer.Builder


public final class SimpleExoPlayer.Builder


Summary

Public constructors

Builder(Context context)

This method is deprecated.

Use Builder instead.

Builder(Context context, ExtractorsFactory extractorsFactory)

This method is deprecated.

Use Builder and DefaultMediaSourceFactory instead.

Builder(Context context, RenderersFactory renderersFactory)

This method is deprecated.

Use Builder instead.

Builder(
    Context context,
    RenderersFactory renderersFactory,
    ExtractorsFactory extractorsFactory
)

This method is deprecated.

Use Builder and DefaultMediaSourceFactory instead.

Builder(
    Context context,
    RenderersFactory renderersFactory,
    TrackSelector trackSelector,
    MediaSource.Factory mediaSourceFactory,
    LoadControl loadControl,
    BandwidthMeter bandwidthMeter,
    AnalyticsCollector analyticsCollector
)

This method is deprecated.

Use Builder instead.

Public methods

SimpleExoPlayer

This method is deprecated.

Use build instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use experimentalSetForegroundModeTimeoutMs instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setAnalyticsCollector instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setAudioAttributes(
    AudioAttributes audioAttributes,
    boolean handleAudioFocus
)

This method is deprecated.

Use setAudioAttributes instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setBandwidthMeter instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setClock instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setDetachSurfaceTimeoutMs(long detachSurfaceTimeoutMs)

This method is deprecated.

Use setDetachSurfaceTimeoutMs instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setHandleAudioBecomingNoisy(boolean handleAudioBecomingNoisy)

This method is deprecated.

Use setHandleAudioBecomingNoisy instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setLivePlaybackSpeedControl instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setLoadControl instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setLooper instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setMediaSourceFactory instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setPauseAtEndOfMediaItems(boolean pauseAtEndOfMediaItems)

This method is deprecated.

Use setPauseAtEndOfMediaItems instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setPriorityTaskManager instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setReleaseTimeoutMs instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setSeekBackIncrementMs(@IntRange(from = 1) long seekBackIncrementMs)

This method is deprecated.

Use setSeekBackIncrementMs instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setSeekForwardIncrementMs(@IntRange(from = 1) long seekForwardIncrementMs)

This method is deprecated.

Use setSeekForwardIncrementMs instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setSeekParameters instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setSkipSilenceEnabled(boolean skipSilenceEnabled)

This method is deprecated.

Use setSkipSilenceEnabled instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setTrackSelector instead.

SimpleExoPlayer.Builder
@CanIgnoreReturnValue
setUseLazyPreparation(boolean useLazyPreparation)

This method is deprecated.

Use setUseLazyPreparation instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setVideoChangeFrameRateStrategy instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setVideoScalingMode instead.

SimpleExoPlayer.Builder

This method is deprecated.

Use setWakeMode instead.

Public constructors

Builder

public Builder(Context context)

Builder

public Builder(Context context, ExtractorsFactory extractorsFactory)

Builder

public Builder(Context context, RenderersFactory renderersFactory)

Builder

public Builder(
    Context context,
    RenderersFactory renderersFactory,
    ExtractorsFactory extractorsFactory
)

Builder

public Builder(
    Context context,
    RenderersFactory renderersFactory,
    TrackSelector trackSelector,
    MediaSource.Factory mediaSourceFactory,
    LoadControl loadControl,
    BandwidthMeter bandwidthMeter,
    AnalyticsCollector analyticsCollector
)

Public methods

build

public SimpleExoPlayer build()

experimentalSetForegroundModeTimeoutMs

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder experimentalSetForegroundModeTimeoutMs(long timeoutMs)

setAnalyticsCollector

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setAnalyticsCollector(AnalyticsCollector analyticsCollector)

setAudioAttributes

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setAudioAttributes(
    AudioAttributes audioAttributes,
    boolean handleAudioFocus
)

setBandwidthMeter

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setBandwidthMeter(BandwidthMeter bandwidthMeter)

setClock

@CanIgnoreReturnValue
@VisibleForTesting
public SimpleExoPlayer.Builder setClock(Clock clock)

setDetachSurfaceTimeoutMs

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setDetachSurfaceTimeoutMs(long detachSurfaceTimeoutMs)

setHandleAudioBecomingNoisy

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setHandleAudioBecomingNoisy(boolean handleAudioBecomingNoisy)

setLivePlaybackSpeedControl

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setLivePlaybackSpeedControl(
    LivePlaybackSpeedControl livePlaybackSpeedControl
)

setLoadControl

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setLoadControl(LoadControl loadControl)

setLooper

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setLooper(Looper looper)

setMediaSourceFactory

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setMediaSourceFactory(MediaSource.Factory mediaSourceFactory)

setPauseAtEndOfMediaItems

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setPauseAtEndOfMediaItems(boolean pauseAtEndOfMediaItems)

setPriorityTaskManager

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setPriorityTaskManager(
    @Nullable PriorityTaskManager priorityTaskManager
)

setReleaseTimeoutMs

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setReleaseTimeoutMs(long releaseTimeoutMs)

setSeekBackIncrementMs

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setSeekBackIncrementMs(@IntRange(from = 1) long seekBackIncrementMs)

setSeekForwardIncrementMs

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setSeekForwardIncrementMs(@IntRange(from = 1) long seekForwardIncrementMs)

setSeekParameters

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setSeekParameters(SeekParameters seekParameters)

setSkipSilenceEnabled

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setSkipSilenceEnabled(boolean skipSilenceEnabled)

setTrackSelector

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setTrackSelector(TrackSelector trackSelector)

setUseLazyPreparation

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setUseLazyPreparation(boolean useLazyPreparation)

setVideoChangeFrameRateStrategy

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setVideoChangeFrameRateStrategy(
    @C.VideoChangeFrameRateStrategy int videoChangeFrameRateStrategy
)

setVideoScalingMode

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setVideoScalingMode(@C.VideoScalingMode int videoScalingMode)

setWakeMode

@CanIgnoreReturnValue
public SimpleExoPlayer.Builder setWakeMode(@C.WakeMode int wakeMode)