public static interface RemoteController.OnClientUpdateListener
Modifier and Type | Method and Description |
---|---|
void |
onClientChange(boolean clearing)
Called whenever all information, previously received through the other
methods of the listener, is no longer valid and is about to be refreshed.
|
void |
onClientMetadataUpdate(RemoteController.MetadataEditor metadataEditor)
Called whenever new metadata is available.
|
void |
onClientPlaybackStateUpdate(int state)
Called whenever the playback state has changed.
|
void |
onClientPlaybackStateUpdate(int state,
long stateChangeTimeMs,
long currentPosMs,
float speed)
Called whenever the playback state has changed, and playback position
and speed are known.
|
void |
onClientTransportControlUpdate(int transportControlFlags)
Called whenever the transport control flags have changed.
|
void onClientChange(boolean clearing)
RemoteControlClient
has been selected
by the system to have its media information published.clearing
- true if there is no selected RemoteControlClient and no information
is available.void onClientPlaybackStateUpdate(int state)
state
- one of the playback states authorized
in RemoteControlClient.setPlaybackState(int)
.void onClientPlaybackStateUpdate(int state, long stateChangeTimeMs, long currentPosMs, float speed)
state
- one of the playback states authorized
in RemoteControlClient.setPlaybackState(int)
.stateChangeTimeMs
- the system time at which the state change was reported,
expressed in ms. Based on SystemClock.elapsedRealtime()
.currentPosMs
- a positive value for the current media playback position expressed
in ms, a negative value if the position is temporarily unknown.speed
- a value expressed as a ratio of 1x playback: 1.0f is normal playback,
2.0f is 2x, 0.5f is half-speed, -2.0f is rewind at 2x speed. 0.0f means nothing is
playing (e.g. when state is RemoteControlClient.PLAYSTATE_ERROR
).void onClientTransportControlUpdate(int transportControlFlags)
transportControlFlags
- one of the flags authorized
in RemoteControlClient.setTransportControlFlags(int)
.void onClientMetadataUpdate(RemoteController.MetadataEditor metadataEditor)
MediaMetadataEditor.putLong(int, long)
,
MediaMetadataEditor.putString(int, String)
,
MediaMetadataEditor.putBitmap(int, Bitmap)
, and
MediaMetadataEditor.putObject(int, Object)
methods for the various keys that
can be queried.metadataEditor
- the container of the new metadata.