|
YAACC - UPNP Client and Server
|
A Player is able to play stop a couple of MediaObjects. More...


Public Member Functions | |
| void | next () |
| play the next item | |
| void | previous () |
| play the previous item | |
| default void | onItemEnded () |
The current item has ended by itself (a timer, or the renderer reported it): go on as the play mode says, which unlike next() repeats the item with repeat one. | |
| void | pause () |
| Pause the current item. | |
| void | play () |
| start playing the current item | |
| void | stop () |
| stops playing. | |
| void | setItems (PlayableItem... items) |
| Set a List of Items. | |
| void | addItems (List< PlayableItem > items) |
| adds additional item to the end of the playlist | |
| void | clear () |
| Drops all Items. | |
| void | onDestroy () |
| Kill the player. | |
| String | getName () |
| Get the player name. | |
| void | setName (String name) |
| Set the name of the player. | |
| String | getShortName () |
| Get the player short name. | |
| void | setShortName (String name) |
| Set the short name of the player. | |
| void | exit () |
| Exit the player. | |
| int | getId () |
| Returns the id of the Player. | |
| void | addPropertyChangeListener (PropertyChangeListener listener) |
| add a property change listener | |
| void | removePropertyChangeListener (PropertyChangeListener listener) |
| remove a property change listener | |
| String | getPositionString () |
| returns the current item position in the playlist | |
| String | getCurrentItemTitle () |
| returns the title of the current item | |
| int | getCurrentItemIndex () |
| boolean | isPlaying () |
| String | getNextItemTitle () |
| returns the title of the next item | |
| String | getDuration () |
| returns the duration of the current item | |
| long | getCurrentPosition () |
| returns the current position of the current item in millis | |
| String | getElapsedTime () |
| returns the elapsed time of the current item | |
| URI | getAlbumArt () |
| Bitmap | getIcon () |
| void | setIcon (Bitmap icon) |
| boolean | getMute () |
| void | setMute (boolean mute) |
| int | getVolume () |
| boolean | hasActionGetVolume () |
| boolean | hasActionGetMute () |
| void | setVolume (int volume) |
| int | getIconResourceId () |
| String | getDeviceId () |
| PendingIntent | getNotificationIntent () |
| Returns the intent which is to be started by pushing the notification entry. | |
| void | seekTo (long millisecondsFromStart) |
| List< PlayableItem > | getItems () |
| void | fastForward (int i) |
| fast forward seconds | |
| void | fastRewind (int i) |
| fast rewind seconds | |
| MediaSessionCompat | getMediaSession () |
| Get the MediaSession for this player (for volume control integration) | |
| boolean | isPaused () |
| boolean | isStopped () |
| PlayMode | getPlayMode () |
| The repeat and shuffle mode of this player. | |
| void | setPlayMode (PlayMode mode) |
| Changes the repeat and shuffle mode of this player; the current item goes on playing. | |
| default int[] | getPlayOrder () |
The order in which the items of the playlist play (with shuffle the shuffled order, otherwise the list order), as the index into getItems() of the item at each position. | |
| default boolean | moveInPlayOrder (int fromPosition, int toPosition) |
| Moves an item in the playlist as the screen shows it: with shuffle the item moves in the play order (the list is not touched), otherwise in the list. | |
| default boolean | removeItem (int itemIndex) |
| Removes an item from the playlist (and from the play order). | |
| default boolean | isPlaylistPositionLocked (int position) |
Public Attributes | |
| String | PROPERTY_PLAY_MODE = "playMode" |
Name of the property change fired (see addPropertyChangeListener) when the play mode changed; old and new value are PlayModes. | |
| String | PROPERTY_PLAYLIST = "playlist" |
| Name of the property change fired when the playlist changed: items set, added, removed or moved, or the play order created again (a stop, a start). | |
| String | PROPERTY_STOPPED = "stopped" |
Name of the property change fired when the player has stopped: stop() is done, whoever called it - the end of the playlist without repeat, the stop button of the app, the media renderer's Stop. | |
A Player is able to play stop a couple of MediaObjects.
| void de.yaacc.player.Player.addItems | ( | List< PlayableItem > | items | ) |
adds additional item to the end of the playlist
| items | the items to be added |
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.addPropertyChangeListener | ( | PropertyChangeListener | listener | ) |
add a property change listener
| listener | the listener |
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| void de.yaacc.player.Player.clear | ( | ) |
Drops all Items.
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.exit | ( | ) |
Exit the player.
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportController, de.yaacc.player.AVTransportPlayer, and de.yaacc.player.LocalImagePlayer.
| void de.yaacc.player.Player.fastForward | ( | int | i | ) |
fast forward seconds
| i | seconds |
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.fastRewind | ( | int | i | ) |
fast rewind seconds
| i | seconds |
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| URI de.yaacc.player.Player.getAlbumArt | ( | ) |
Implemented in de.yaacc.player.OpenHomePlayer.
| String de.yaacc.player.Player.getCurrentItemTitle | ( | ) |
returns the title of the current item
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| long de.yaacc.player.Player.getCurrentPosition | ( | ) |
returns the current position of the current item in millis
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportPlayer, de.yaacc.player.AVTransportPlayerWrapper, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, de.yaacc.player.MultiContentPlayer, and de.yaacc.player.OpenHomePlayer.
| String de.yaacc.player.Player.getDuration | ( | ) |
returns the duration of the current item
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportPlayer, de.yaacc.player.AVTransportPlayerWrapper, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
| String de.yaacc.player.Player.getElapsedTime | ( | ) |
returns the elapsed time of the current item
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
| Bitmap de.yaacc.player.Player.getIcon | ( | ) |
Implemented in de.yaacc.player.OpenHomePlayer.
| int de.yaacc.player.Player.getId | ( | ) |
Returns the id of the Player.
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
Referenced by de.yaacc.player.PlayerService.shutdown().

| MediaSessionCompat de.yaacc.player.Player.getMediaSession | ( | ) |
Get the MediaSession for this player (for volume control integration)
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.LocalMediaSessionPlayer.
| String de.yaacc.player.Player.getName | ( | ) |
Get the player name.
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| String de.yaacc.player.Player.getNextItemTitle | ( | ) |
returns the title of the next item
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.LocalMediaSessionPlayer.
| PendingIntent de.yaacc.player.Player.getNotificationIntent | ( | ) |
Returns the intent which is to be started by pushing the notification entry.
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, de.yaacc.player.MultiContentPlayer, and de.yaacc.player.OpenHomePlayer.
| PlayMode de.yaacc.player.Player.getPlayMode | ( | ) |
The repeat and shuffle mode of this player.
It starts with the mode the settings "replay playlist" and "shuffle music" give a new player and then belongs to the player only: it is never written back to the settings and ends with the player.
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
Referenced by de.yaacc.upnp.server.avtransport.AvTransport.attachPlayers().

| default int[] de.yaacc.player.Player.getPlayOrder | ( | ) |
The order in which the items of the playlist play (with shuffle the shuffled order, otherwise the list order), as the index into getItems() of the item at each position.
The playlist screen shows the items in this order.
Implemented in de.yaacc.player.AbstractPlayer.
| String de.yaacc.player.Player.getPositionString | ( | ) |
returns the current item position in the playlist
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| String de.yaacc.player.Player.getShortName | ( | ) |
Get the player short name.
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| default boolean de.yaacc.player.Player.isPlaylistPositionLocked | ( | int | position | ) |
| position | a position of getPlayOrder() |
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.OpenHomePlayer.
| default boolean de.yaacc.player.Player.moveInPlayOrder | ( | int | fromPosition, |
| int | toPosition ) |
Moves an item in the playlist as the screen shows it: with shuffle the item moves in the play order (the list is not touched), otherwise in the list.
The positions are positions of getPlayOrder(). Fires PROPERTY_PLAYLIST.
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.OpenHomePlayer.
Referenced by de.yaacc.player.PlaylistItemAdapter.moveItem().

| void de.yaacc.player.Player.next | ( | ) |
play the next item
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportController, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
Referenced by de.yaacc.player.Player.onItemEnded().

| void de.yaacc.player.Player.onDestroy | ( | ) |
Kill the player.
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportPlayer, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
Referenced by de.yaacc.player.PlayerService.shutdown().

| default void de.yaacc.player.Player.onItemEnded | ( | ) |
The current item has ended by itself (a timer, or the renderer reported it): go on as the play mode says, which unlike next() repeats the item with repeat one.
The default is next().
Implemented in de.yaacc.player.AbstractPlayer.

| void de.yaacc.player.Player.pause | ( | ) |
Pause the current item.
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportPlayerWrapper, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.play | ( | ) |
start playing the current item
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportController, de.yaacc.player.AVTransportPlayerWrapper, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.previous | ( | ) |
play the previous item
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportController, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
| default boolean de.yaacc.player.Player.removeItem | ( | int | itemIndex | ) |
Removes an item from the playlist (and from the play order).
| itemIndex | the index into getItems() |
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.removePropertyChangeListener | ( | PropertyChangeListener | listener | ) |
remove a property change listener
| listener | the listener |
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| void de.yaacc.player.Player.setItems | ( | PlayableItem... | items | ) |
Set a List of Items.
| items | the items to be played |
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, de.yaacc.player.LocalMediaSessionPlayer, and de.yaacc.player.OpenHomePlayer.
Referenced by de.yaacc.player.PlayerService.createPlayerFor(), and de.yaacc.player.PlayerService.createPlayerForLocalDevice().

| void de.yaacc.player.Player.setName | ( | String | name | ) |
Set the name of the player.
| name | the name |
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| void de.yaacc.player.Player.setPlayMode | ( | PlayMode | mode | ) |
Changes the repeat and shuffle mode of this player; the current item goes on playing.
Fires PROPERTY_PLAY_MODE if the mode differs.
| mode | the new mode, null is ignored |
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| void de.yaacc.player.Player.setShortName | ( | String | name | ) |
Set the short name of the player.
| name | the name |
Implemented in de.yaacc.player.AbstractPlayer, and de.yaacc.player.LocalImagePlayer.
| void de.yaacc.player.Player.stop | ( | ) |
stops playing.
And returns to the beginning of the item list.
Implemented in de.yaacc.player.AbstractPlayer, de.yaacc.player.AVTransportController, de.yaacc.player.AVTransportPlayerWrapper, de.yaacc.player.LocalImagePlayer, and de.yaacc.player.OpenHomePlayer.
| String de.yaacc.player.Player.PROPERTY_PLAYLIST = "playlist" |
Name of the property change fired when the playlist changed: items set, added, removed or moved, or the play order created again (a stop, a start).
Old and new value are null; read the playlist again.
| String de.yaacc.player.Player.PROPERTY_STOPPED = "stopped" |
Name of the property change fired when the player has stopped: stop() is done, whoever called it - the end of the playlist without repeat, the stop button of the app, the media renderer's Stop.
Not fired for a pause or for the end of an item that goes on with the next one. Old and new value are null. May be fired on any thread; a listener must return quickly and must not call back into the player.
Referenced by de.yaacc.player.LocalImagePlayer.stop().