Google は、黒人コミュニティに対する人種平等の促進に取り組んでいます。取り組みを見る

PlayerCallback

abstract class PlayerCallback
kotlin.Any
   ↳ androidx.media2.common.SessionPlayer.PlayerCallback

A callback class to receive notifications for events on the session player. See registerPlayerCallback(Executor, PlayerCallback) to register this callback.

Summary

Public constructors

A callback class to receive notifications for events on the session player.

Public methods
open Unit
onAudioAttributesChanged(@NonNull player: SessionPlayer, @Nullable attributes: AudioAttributesCompat?)

Called when the player's current audio attributes are changed.

open Unit
onBufferingStateChanged(@NonNull player: SessionPlayer, @Nullable item: MediaItem?, buffState: Int)

Called when a buffering events for a media item happened.

open Unit
onCurrentMediaItemChanged(@NonNull player: SessionPlayer, @NonNull item: MediaItem)

Called when the player's current media item has changed.

open Unit

Called when the player finished playing.

open Unit
onPlaybackSpeedChanged(@NonNull player: SessionPlayer, playbackSpeed: Float)

Called when the playback speed has changed.

open Unit
onPlayerStateChanged(@NonNull player: SessionPlayer, playerState: Int)

Called when the state of the player has changed.

open Unit
onPlaylistChanged(@NonNull player: SessionPlayer, @Nullable list: MutableList<MediaItem!>?, @Nullable metadata: MediaMetadata?)

Called when a playlist is changed.

open Unit
onPlaylistMetadataChanged(@NonNull player: SessionPlayer, @Nullable metadata: MediaMetadata?)

Called when a playlist metadata is changed.

open Unit
onRepeatModeChanged(@NonNull player: SessionPlayer, repeatMode: Int)

Called when the repeat mode is changed.

open Unit
onSeekCompleted(@NonNull player: SessionPlayer, position: Long)

Called when seekTo(long) is completed.

open Unit
onShuffleModeChanged(@NonNull player: SessionPlayer, shuffleMode: Int)

Called when the shuffle mode is changed.

open Unit
onSubtitleData(@NonNull player: SessionPlayer, @NonNull item: MediaItem, @NonNull track: SessionPlayer.TrackInfo, @NonNull data: SubtitleData)

Called when the player's subtitle track has new subtitle data available.

open Unit
onTrackDeselected(@NonNull player: SessionPlayer, @NonNull trackInfo: SessionPlayer.TrackInfo)

Called when a track is deselected.

open Uni