YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
de.yaacc.player.LocalMediaSessionPlayer Class Reference

Local music player using ExoPlayer from PlayerService. More...

Inheritance diagram for de.yaacc.player.LocalMediaSessionPlayer:
Inheritance graph
Collaboration diagram for de.yaacc.player.LocalMediaSessionPlayer:
Collaboration graph

Public Member Functions

 LocalMediaSessionPlayer (UpnpClient upnpClient, String name, String shortName)
 
 LocalMediaSessionPlayer (UpnpClient upnpClient)
 
MediaSession getMedia3Session ()
 Get the Media3 MediaSession (not the legacy MediaSessionCompat).
 
void onServiceConnected (ComponentName className, IBinder binder)
 
int getIconResourceId ()
 
void setItems (PlayableItem... playableItems)
 Set a List of Items.
 
void next ()
 play the next item
 
void previous ()
 play the previous item
 
void syncPlaylistToExoPlayer ()
 Sync ExoPlayer playlist with current items list after reordering.
 
long getCurrentPosition ()
 returns the current position of the current item in millis
 
void seekTo (long millisecondsFromStart)
 
String getDuration ()
 returns the duration of the current item
 
String getElapsedTime ()
 returns the elapsed time of the current item
 
URI getAlbumArt ()
 
PendingIntent getNotificationIntent ()
 Returns the intent which is to be started by pushing the notification entry.
 
MediaSessionCompat getMediaSession ()
 Get the MediaSession for this player.
 
void onDestroy ()
 Kill the player.
 
- Public Member Functions inherited from de.yaacc.player.AbstractPlayer
 AbstractPlayer (UpnpClient upnpClient)
 
void onServiceDisconnected (ComponentName className)
 
Context getContext ()
 
Bitmap getIcon ()
 
void setIcon (Bitmap icon)
 
UpnpClient getUpnpClient ()
 
void startService ()
 
void pause ()
 Pause the current item.
 
void play ()
 start playing the current item
 
void stop ()
 stops playing.
 
void clear ()
 Drops all Items.
 
boolean isPlaying ()
 
void setPlaying (boolean isPlaying)
 
List< PlayableItemgetItems ()
 
void addItems (List< PlayableItem > playableItems)
 adds additional item to the end of the playlist
 
String getPositionString ()
 returns the current item position in the playlist
 
int getCurrentItemIndex ()
 
String getCurrentItemTitle ()
 returns the title of the current item
 
String getNextItemTitle ()
 returns the title of the next current item
 
long getRemainingTime ()
 
void startTimer (final long duration)
 Start a timer for the next item change.
 
String getName ()
 Get the player name.
 
void setName (String name)
 Set the name of the player.
 
boolean isProcessingCommand ()
 
void setProcessingCommand (boolean isProcessingCommand)
 
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
 
boolean getMute ()
 
void setMute (boolean mute)
 
int getVolume ()
 
void setVolume (int volume)
 
String getDeviceId ()
 
String getShortName ()
 Get the player short name.
 
void setShortName (String name)
 Set the short name of the player.
 
boolean hasActionGetVolume ()
 
boolean hasActionGetMute ()
 
void fastForward (int i)
 fast forward seconds
 
void fastRewind (int i)
 fast rewind seconds
 

Protected Member Functions

void startItem (PlayableItem playableItem, Object loadedItem, int index)
 
Object loadItem (PlayableItem playableItem)
 
void stopItem (PlayableItem playableItem)
 
void doPause ()
 
void doResume ()
 
int getNotificationId ()
 Returns the notification id of the player.
 
void showNotificationInternal ()
 
- Protected Member Functions inherited from de.yaacc.player.AbstractPlayer
void configureMediaSession (MediaSessionCompat mediaSession)
 Override this to configure MediaSession (e.g., set volume provider for remote playback).
 
boolean isShufflePlay ()
 is shuffle play enabled.
 
void cancelTimer ()
 
void setCurrentIndex (int currentIndex)
 
Object loadItem (int toLoadIndex)
 
void loadItem (int previousIndex, int nextIndex)
 
void doPostLoadItem (PlayableItem playableItem)
 
long getSilenceDuration ()
 returns the duration between two items
 
void updateTimer ()
 
long parseTimeStringToMillis (String timeString)
 
void updatePlaybackStateInternal (int state)
 
void updateMetadataInternal ()
 
void firePropertyChange (String property, Object oldValue, Object newValue)
 
void executeCommand (TimerTask command, Date executionTime)
 

Additional Inherited Members

- Static Public Attributes inherited from de.yaacc.player.AbstractPlayer
static final String PLAYER_ID = "PlayerId"
 
static final String PROPERTY_ITEM = "item"
 

Detailed Description

Local music player using ExoPlayer from PlayerService.

Member Function Documentation

◆ doPause()

void de.yaacc.player.LocalMediaSessionPlayer.doPause ( )
protected

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ doResume()

void de.yaacc.player.LocalMediaSessionPlayer.doResume ( )
protected

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getAlbumArt()

URI de.yaacc.player.LocalMediaSessionPlayer.getAlbumArt ( )

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getCurrentPosition()

long de.yaacc.player.LocalMediaSessionPlayer.getCurrentPosition ( )

returns the current position of the current item in millis

Returns
the position

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getDuration()

String de.yaacc.player.LocalMediaSessionPlayer.getDuration ( )

returns the duration of the current item

Returns
the duration

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getElapsedTime()

String de.yaacc.player.LocalMediaSessionPlayer.getElapsedTime ( )

returns the elapsed time of the current item

Returns
the elapsed time

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getIconResourceId()

int de.yaacc.player.LocalMediaSessionPlayer.getIconResourceId ( )

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getMedia3Session()

MediaSession de.yaacc.player.LocalMediaSessionPlayer.getMedia3Session ( )

Get the Media3 MediaSession (not the legacy MediaSessionCompat).

This is registered with PlayerService for system integration.

◆ getMediaSession()

MediaSessionCompat de.yaacc.player.LocalMediaSessionPlayer.getMediaSession ( )

Get the MediaSession for this player.

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getNotificationId()

int de.yaacc.player.LocalMediaSessionPlayer.getNotificationId ( )
protected

Returns the notification id of the player.

Returns
the notification id

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ getNotificationIntent()

PendingIntent de.yaacc.player.LocalMediaSessionPlayer.getNotificationIntent ( )

Returns the intent which is to be started by pushing the notification entry.

Returns
the peneding intent

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ loadItem()

Object de.yaacc.player.LocalMediaSessionPlayer.loadItem ( PlayableItem  playableItem)
protected

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ next()

void de.yaacc.player.LocalMediaSessionPlayer.next ( )

play the next item

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ onDestroy()

void de.yaacc.player.LocalMediaSessionPlayer.onDestroy ( )

Kill the player.

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ onServiceConnected()

void de.yaacc.player.LocalMediaSessionPlayer.onServiceConnected ( ComponentName  className,
IBinder  binder 
)

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ previous()

void de.yaacc.player.LocalMediaSessionPlayer.previous ( )

play the previous item

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ seekTo()

void de.yaacc.player.LocalMediaSessionPlayer.seekTo ( long  millisecondsFromStart)

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ setItems()

void de.yaacc.player.LocalMediaSessionPlayer.setItems ( PlayableItem...  items)

Set a List of Items.

Parameters
itemsthe items to be played

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ showNotificationInternal()

void de.yaacc.player.LocalMediaSessionPlayer.showNotificationInternal ( )
protected

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ startItem()

void de.yaacc.player.LocalMediaSessionPlayer.startItem ( PlayableItem  playableItem,
Object  loadedItem,
int  index 
)
protected

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ stopItem()

void de.yaacc.player.LocalMediaSessionPlayer.stopItem ( PlayableItem  playableItem)
protected

Reimplemented from de.yaacc.player.AbstractPlayer.

◆ syncPlaylistToExoPlayer()

void de.yaacc.player.LocalMediaSessionPlayer.syncPlaylistToExoPlayer ( )

Sync ExoPlayer playlist with current items list after reordering.

Only updates items after current position (since those can be reordered).

Here is the call graph for this function:

The documentation for this class was generated from the following file: