Action.SetRendererDisabled


public final class Action.SetRendererDisabled extends Action


Updates the Parameters of a DefaultTrackSelector to specify whether the renderer at a given index should be disabled.

Summary

Public constructors

SetRendererDisabled(
    @Size(max = 23) String tag,
    int rendererIndex,
    boolean disabled
)

Protected methods

void
doActionImpl(
    ExoPlayer player,
    DefaultTrackSelector trackSelector,
    @Nullable Surface surface
)

Called by doActionAndScheduleNextImpl to perform the action.

Public constructors

SetRendererDisabled

public SetRendererDisabled(
    @Size(max = 23) String tag,
    int rendererIndex,
    boolean disabled
)
Parameters
@Size(max = 23) String tag

A tag to use for logging.

int rendererIndex

The index of the renderer.

boolean disabled

Whether the renderer should be disabled.

Protected methods

doActionImpl

protected void doActionImpl(
    ExoPlayer player,
    DefaultTrackSelector trackSelector,
    @Nullable Surface surface
)

Called by doActionAndScheduleNextImpl to perform the action.

Parameters
ExoPlayer player

The player to which the action should be applied.

DefaultTrackSelector trackSelector

The track selector to which the action should be applied.

@Nullable Surface surface

The surface to use when applying actions, or null if no surface is needed.