public class RemoteControlListener extends Object
Apps should implement their own subclass and register it with the app using
MediaManager.setRemoteControlListener(com.codename1.media.RemoteControlListener)
Constructor and Description |
---|
RemoteControlListener() |
Modifier and Type | Method and Description |
---|---|
void |
fastForward()
Called when user presses the "fast forward" button on remote control.
|
MediaMetaData |
getMetaData()
Should return the meta data about the currently playing media.
|
boolean |
isPlaying()
Is used by remote control to determine if the media is currently playing.
|
void |
pause()
Called when user presses the pause button on remote control.
|
void |
play()
Called when user presses play button on remote control.
|
void |
rewind()
Called when user presses the "rewind" button on remote control.
|
void |
seekTo(long pos)
Called when user seeks to a position of the currently playing media
on the remote control.
|
void |
setVolume(float leftVolume,
float rightVolume)
Is called when the user adjusts the volume on the remote control
|
void |
skipToNext()
Called when user presses the "next" button on remote control.
|
void |
skipToPrevious()
Called when user presses the "previous" button on remote control.
|
void |
stop()
Called when user presses the "Stop" button on remote control.
|
void |
togglePlayPause()
Called when user presses the toggle play/pause button on remote control.
|
public void play()
public void pause()
public void togglePlayPause()
public void seekTo(long pos)
pos
- public void skipToNext()
public void skipToPrevious()
public void stop()
public void fastForward()
public void rewind()
public boolean isPlaying()
public void setVolume(float leftVolume, float rightVolume)
leftVolume
- rightVolume
- public MediaMetaData getMetaData()