Back to Exoplayer

ActionSchedule.PlayerTarget (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/ActionSchedule.PlayerTarget.html

latest3.8 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class ActionSchedule.PlayerTarget

  • java.lang.Object

    • com.google.android.exoplayer2.testutil.ActionSchedule.PlayerTarget
  • All Implemented Interfaces:PlayerMessage.TargetEnclosing class:ActionSchedule


public abstract static classActionSchedule.PlayerTargetextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[PlayerMessage.Target](../PlayerMessage.Target.html "interface in com.google.android.exoplayer2")

Provides a wrapper for a PlayerMessage.Target which has access to the player when handling messages. Can be used with ActionSchedule.Builder.sendMessage(Target, long).

The target can be passed to ActionSchedule.Builder.waitForMessage(PlayerTarget) to wait for a message to arrive at the target.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static interface | ActionSchedule.PlayerTarget.Callback | Callback to be called when message arrives. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | PlayerTarget() | |

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | handleMessage​(@com.google.android.exoplayer2.Renderer.MessageType int messageType, Object message) | Handles a message delivered to the target. | | abstract void | handleMessage​(ExoPlayer player, int messageType, Object message) | Handles the message send to the component and additionally provides access to the player. | | void | setCallback​(ActionSchedule.PlayerTarget.Callback callback) | |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

PlayerTarget

public PlayerTarget()

Method Detail

- 

setCallback

public void setCallback​([ActionSchedule.PlayerTarget.Callback](ActionSchedule.PlayerTarget.Callback.html "interface in com.google.android.exoplayer2.testutil")callback)
- 

handleMessage

public abstract void handleMessage​([ExoPlayer](../ExoPlayer.html "interface in com.google.android.exoplayer2")player,
                                   int messageType,
                                   @Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")message)

Handles the message send to the component and additionally provides access to the player.

- 

handleMessage

public final void handleMessage​(@com.google.android.exoplayer2.Renderer.MessageType int messageType,
                                @Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")message)

Description copied from interface: PlayerMessage.Target

Handles a message delivered to the target. Specified by:handleMessage in interface PlayerMessage.TargetParameters:messageType - The message type.message - The message payload.