Action.AddMediaItems, Action.ClearMediaItems, Action.ClearVideoSurface, Action.ExecuteRunnable, Action.MoveMediaItem, Action.PlayUntilPosition, Action.Prepare, Action.RemoveMediaItem, Action.RemoveMediaItems, Action.Seek, Action.SendMessages, Action.SetAudioAttributes, Action.SetMediaItems, Action.SetMediaItemsResetPosition, Action.SetPlaybackParameters, Action.SetPlayWhenReady, Action.SetRendererDisabled, Action.SetRepeatMode, Action.SetShuffleModeEnabled, Action.SetShuffleOrder, Action.SetVideoSurface, Action.Stop, Action.ThrowPlaybackException, Action.WaitForIsLoading, Action.WaitForMessage, Action.WaitForPendingPlayerCommands, Action.WaitForPlaybackState, Action.WaitForPlayWhenReady, Action.WaitForPositionDiscontinuity, Action.WaitForTimelineChangedpublic abstract class Action extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Action.AddMediaItems |
|
static class |
Action.ClearMediaItems |
|
static class |
Action.ClearVideoSurface |
|
static class |
Action.ExecuteRunnable |
Calls
Runnable.run(). |
static class |
Action.MoveMediaItem |
|
static class |
Action.PlayUntilPosition |
Schedules a play action to be executed, waits until the player reaches the specified position,
and pauses the player again.
|
static class |
Action.Prepare |
Calls
Player.prepare(). |
static class |
Action.RemoveMediaItem |
|
static class |
Action.RemoveMediaItems |
|
static class |
Action.Seek |
Calls
Player.seekTo(long) or Player.seekTo(int, long). |
static class |
Action.SendMessages |
|
static class |
Action.SetAudioAttributes |
|
static class |
Action.SetMediaItems |
|
static class |
Action.SetMediaItemsResetPosition |
|
static class |
Action.SetPlaybackParameters |
|
static class |
Action.SetPlayWhenReady |
|
static class |
Action.SetRendererDisabled |
Updates the
DefaultTrackSelector.Parameters of a DefaultTrackSelector to specify whether the
renderer at a given index should be disabled. |
static class |
Action.SetRepeatMode |
Calls
Player.setRepeatMode(int). |
static class |
Action.SetShuffleModeEnabled |
|
static class |
Action.SetShuffleOrder |
|
static class |
Action.SetVideoSurface |
|
static class |
Action.Stop |
Calls
Player.stop() or Player.stop(boolean). |
static class |
Action.ThrowPlaybackException |
Throws a playback exception on the playback thread.
|
static class |
Action.WaitForIsLoading |
Waits for a specified loading state, returning either immediately or after a call to
Player.EventListener.onIsLoadingChanged(boolean). |
static class |
Action.WaitForMessage |
Waits for a player message to arrive.
|
static class |
Action.WaitForPendingPlayerCommands |
Waits until the player acknowledged all pending player commands.
|
static class |
Action.WaitForPlaybackState |
Waits for a specified playback state, returning either immediately or after a call to
Player.EventListener.onPlaybackStateChanged(int). |
static class |
Action.WaitForPlayWhenReady |
Waits for a specified playWhenReady value, returning either immediately or after a call to
Player.EventListener.onPlayWhenReadyChanged(boolean, int). |
static class |
Action.WaitForPositionDiscontinuity |
|
static class |
Action.WaitForTimelineChanged |
| Modifier and Type | Method | Description |
|---|---|---|
void |
doActionAndScheduleNext(SimpleExoPlayer player,
DefaultTrackSelector trackSelector,
Surface surface,
HandlerWrapper handler,
com.google.android.exoplayer2.testutil.ActionSchedule.ActionNode nextAction) |
Executes the action and schedules the next.
|
protected void |
doActionAndScheduleNextImpl(SimpleExoPlayer player,
DefaultTrackSelector trackSelector,
Surface surface,
HandlerWrapper handler,
com.google.android.exoplayer2.testutil.ActionSchedule.ActionNode nextAction) |
Called by
doActionAndScheduleNext(SimpleExoPlayer, DefaultTrackSelector, Surface,
HandlerWrapper, ActionNode) to perform the action and to schedule the next action node. |
protected abstract void |
doActionImpl(SimpleExoPlayer player,
DefaultTrackSelector trackSelector,
Surface surface) |
Called by
doActionAndScheduleNextImpl(SimpleExoPlayer, DefaultTrackSelector, Surface,
HandlerWrapper, ActionNode) to perform the action. |
public final void doActionAndScheduleNext(SimpleExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface, HandlerWrapper handler, @Nullable com.google.android.exoplayer2.testutil.ActionSchedule.ActionNode nextAction)
player - The player to which the action should be applied.trackSelector - The track selector to which the action should be applied.surface - The surface to use when applying actions, or null if no surface is
needed.handler - The handler to use to pass to the next action.nextAction - The next action to schedule immediately after this action finished, or
null if there's no next action.protected void doActionAndScheduleNextImpl(SimpleExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface, HandlerWrapper handler, @Nullable com.google.android.exoplayer2.testutil.ActionSchedule.ActionNode nextAction)
doActionAndScheduleNext(SimpleExoPlayer, DefaultTrackSelector, Surface,
HandlerWrapper, ActionNode) to perform the action and to schedule the next action node.player - The player to which the action should be applied.trackSelector - The track selector to which the action should be applied.surface - The surface to use when applying actions, or null if no surface is
needed.handler - The handler to use to pass to the next action.nextAction - The next action to schedule immediately after this action finished, or
null if there's no next action.protected abstract void doActionImpl(SimpleExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface)
doActionAndScheduleNextImpl(SimpleExoPlayer, DefaultTrackSelector, Surface,
HandlerWrapper, ActionNode) to perform the action.player - The player to which the action should be applied.trackSelector - The track selector to which the action should be applied.surface - The surface to use when applying actions, or null if no surface is
needed.