ActionSchedule.PlayerTarget


abstract class ActionSchedule.PlayerTarget : PlayerMessage.Target


Provides a wrapper for a Target which has access to the player when handling messages. Can be used with sendMessage.

The target can be passed to waitForMessage to wait for a message to arrive at the target.

Summary

Nested types

Callback to be called when message arrives.

Public constructors

Public functions

Unit
handleMessage(@Renderer.MessageType messageType: Int, message: Any?)

Handles a message delivered to the target.

abstract Unit
handleMessage(player: ExoPlayer!, messageType: Int, message: Any?)

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

Unit

Public constructors

PlayerTarget

PlayerTarget()

Public functions

handleMessage

fun handleMessage(@Renderer.MessageType messageType: Int, message: Any?): Unit

Handles a message delivered to the target.

Parameters
@Renderer.MessageType messageType: Int

The message type.

message: Any?

The message payload.

Throws
androidx.media3.exoplayer.ExoPlaybackException

If an error occurred whilst handling the message. Should only be thrown by targets that handle messages on the playback thread.

handleMessage

abstract fun handleMessage(player: ExoPlayer!, messageType: Int, message: Any?): Unit

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

setCallback

fun setCallback(callback: ActionSchedule.PlayerTarget.Callback!): Unit