Stay organized with collections Save and categorize content based on your preferences.

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

interface ActionSchedule.PlayerTarget.Callback

Callback to be called when message arrives.

Public constructors

Public functions

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

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

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

Handles a message delivered to the target.

Unit

Public constructors

PlayerTarget

PlayerTarget()

Public functions

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.

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: 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.

setCallback

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