public enum PlayerEvent extends Enum<PlayerEvent>
Enum Constant and Description |
---|
kSpPlaybackEventAudioFlush
The application should flush its audio buffers
This event occurs for example when seeking to a different position within
a track.
|
kSpPlaybackNotifyAudioDeliveryDone
The library will not send any more audio data
This event occurs when the library reaches the end of a playback context
and has no more audio to deliver.
|
kSpPlaybackNotifyBecameActive
This device has become the active playback device
This event occurs when the users moves playback to this device using
Spotify Connect, or when playback is moved to this device as a side-effect
of invoking one of the SpPlayback...() functions.
|
kSpPlaybackNotifyBecameInactive
This device is no longer the active playback device
This event occurs when the user moves playback to a different device using
Spotify Connect.
|
kSpPlaybackNotifyContextChanged
Playback changed to a different Spotify context
This event occurs when playback starts or changes to a different context
than was playing before, such as a change in album or playlist.
|
kSpPlaybackNotifyLostPermission
This device has temporarily lost permission to stream audio from Spotify
A user can only stream audio on one of her devices at any given time.
|
kSpPlaybackNotifyMetadataChanged
Metadata is changed
This event occurs when playback starts or changes to a different context,
when a track switch occurs, etc.
|
kSpPlaybackNotifyNext
Playback has skipped to the next track
This event occurs when SpPlaybackSkipToNext() was invoked or when
the user skipped to the next track using Spotify Connect.
|
kSpPlaybackNotifyPause
Playback has been paused
\note The application is not supposed to discard audio data that has been
delivered by SpCallbackPlaybackAudioData() but that has not been played yet.
|
kSpPlaybackNotifyPlay
Playback has started or has resumed
|
kSpPlaybackNotifyPrev
Playback as skipped to the previous track
\deprecated Use kSpPlaybackNotifyMetadataChanged instead.
|
kSpPlaybackNotifyRepeatOff
"Repeat" was switched off
|
kSpPlaybackNotifyRepeatOn
"Repeat" was switched on
|
kSpPlaybackNotifyShuffleOff
"Shuffle" was switched off
|
kSpPlaybackNotifyShuffleOn
"Shuffle" was switched on
|
kSpPlaybackNotifyTrackChanged
The current track or its metadata has changed
This event occurs when playback of a new/different track starts.
|
kSpPlaybackNotifyTrackDelivered
Application accepted all samples from the current track
This is an informative event that indicates that all samples from the
current track have been delivered to and accepted by the application.
|
UNKNOWN |
Modifier and Type | Method and Description |
---|---|
static PlayerEvent |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PlayerEvent[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlayerEvent UNKNOWN
public static final PlayerEvent kSpPlaybackNotifyPlay
public static final PlayerEvent kSpPlaybackNotifyPause
public static final PlayerEvent kSpPlaybackNotifyTrackChanged
SpotifyPlayer.getMetadata()
to
reload the metadata when you receive this event.
Note : kSpPlaybackNotifyTrackChanged is only sent if the current
track was changed. kSpPlaybackNotifyMetadataChanged is a more general
event that can be used to detect all kinds of UI changes. If you
display information about the previous and next tracks you should
use kSpPlaybackNotifyMetadataChanged to detect updates to those
as well. For example, if the upcoming track is changed then
kSpPlaybackNotifyTrackChanged will not be sent but
kSpPlaybackNotifyMetadataChanged will be.public static final PlayerEvent kSpPlaybackNotifyNext
public static final PlayerEvent kSpPlaybackNotifyPrev
public static final PlayerEvent kSpPlaybackNotifyShuffleOn
public static final PlayerEvent kSpPlaybackNotifyShuffleOff
public static final PlayerEvent kSpPlaybackNotifyRepeatOn
public static final PlayerEvent kSpPlaybackNotifyRepeatOff
public static final PlayerEvent kSpPlaybackNotifyBecameActive
public static final PlayerEvent kSpPlaybackNotifyBecameInactive
public static final PlayerEvent kSpPlaybackNotifyLostPermission
public static final PlayerEvent kSpPlaybackEventAudioFlush
public static final PlayerEvent kSpPlaybackNotifyAudioDeliveryDone
public static final PlayerEvent kSpPlaybackNotifyContextChanged
public static final PlayerEvent kSpPlaybackNotifyTrackDelivered
public static final PlayerEvent kSpPlaybackNotifyMetadataChanged
public static PlayerEvent[] values()
for (PlayerEvent c : PlayerEvent.values()) System.out.println(c);
public static PlayerEvent valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null