Murl::IMusicPlayerControl Interface Referenceabstract

The IMusicPlayerControl interface. More...

#include "murl_i_music_player_control.h"

Inheritance diagram for Murl::IMusicPlayerControl:

Public Types

enum  MusicPlayer { PLAYER_NONE, PLAYER_APPLICATION, PLAYER_SYSTEM }
 Enumeration of the selected music player. More...
 
enum  PlaybackState {
  PLAYBACK_STOPPED, PLAYBACK_PLAYING, PLAYBACK_PAUSED, PLAYBACK_INTERRUPTED,
  PLAYBACK_SEEKING_FORWARD, PLAYBACK_SEEKING_BACKWARD
}
 Enumeration of the playback state. More...
 
enum  RepeatMode { REPEAT_DEFAULT, REPEAT_NONE, REPEAT_ONE, REPEAT_ALL }
 Enumeration of the repeat mode. More...
 
enum  ShuffleMode { SHUFFLE_DEFAULT, SHUFFLE_OFF, SHUFFLE_SONGS, SHUFFLE_ALBUMS }
 Enumeration of the shuffle mode. More...
 

Public Member Functions

virtual Bool SelectMusicPlayer (MusicPlayer musicPlayer)=0
 Set the selected music player. More...
 
virtual MusicPlayer GetSelectedMusicPlayer () const =0
 Get the selected music player. More...
 
virtual Bool ShowMediaPicker (Bool allowMultipleItems, const String &prompt)=0
 Show the media item picker. More...
 
virtual Bool IsMediaPickerShowing () const =0
 Check if the media item picker is showing. More...
 
virtual Bool Play ()=0
 Initiates playback of the current item. More...
 
virtual Bool Pause ()=0
 Pauses playback of the current item. More...
 
virtual Bool Stop ()=0
 Ends playback of the current item. More...
 
virtual Bool SkipToNextItem ()=0
 Start playback of the next media item in the playback queue. More...
 
virtual Bool SkipToBeginning ()=0
 Restart playback at the beginning of the currently playing media item. More...
 
virtual Bool SkipToPreviousItem ()=0
 Start playback of the previous media item in the playback queue. More...
 
virtual Bool BeginSeekingBackward ()=0
 Begin seeking backward through the media content. More...
 
virtual Bool BeginSeekingForward ()=0
 Begin seeking forward through the media content. More...
 
virtual Bool EndSeeking ()=0
 End forward and backward seeking through the media content. More...
 
virtual Bool HasPlaybackStateChanged (ChangeInspector &inspector) const =0
 Check if the current playback state has changed. More...
 
virtual PlaybackState GetPlaybackState () const =0
 Get the current playback state. More...
 
virtual Double GetCurrentPlaybackTime () const =0
 Get the current playback time. More...
 
virtual Bool HasCurrentItemChanged (ChangeInspector &inspector) const =0
 Check if the current item has changed. More...
 
virtual String GetCurrentTitle () const =0
 Get the title of the current item. More...
 
virtual String GetCurrentAlbumTitle () const =0
 Get the album title of the current item. More...
 
virtual String GetCurrentArtist () const =0
 Get the artist of the current item. More...
 
virtual Double GetCurrentDuration () const =0
 Get the duration of the current item. More...
 
virtual Bool SetRepeatMode (RepeatMode repeatMode)=0
 Set the current repeat mode. More...
 
virtual RepeatMode GetRepeatMode () const =0
 Get the current repeat mode. More...
 
virtual Bool SetShuffleMode (ShuffleMode shuffleMode)=0
 Set the current shuffle mode. More...
 
virtual ShuffleMode GetShuffleMode () const =0
 Get the current shuffle mode. More...
 
- Public Member Functions inherited from Murl::IControlable
virtual const StringGetName () const =0
 Get the controlable's name. More...
 
virtual void FrameUpdate ()=0
 Is executed in the platform thread context each frame tick.
 
virtual void LogicUpdate ()=0
 Is executed in the logic thread context each logic tick.
 
virtual void ConfigChanged (const IAppConfiguration *appConfig)=0
 Notification of changed configuration. More...
 

Detailed Description

The IMusicPlayerControl interface.

The music player's audio session category can be setup by the IEngineConfiguration::SetAudioSessionCategory() during IApp::Configure().

If the configured category is IEnums::AUDIO_SESSION_CATEGORY_DEFAULT the category IEnums::AUDIO_SESSION_CATEGORY_MIX_AMBIENT is used when selecting a music player.

The music player control is currently supported on iOS only.

Member Enumeration Documentation

◆ MusicPlayer

Enumeration of the selected music player.

Use SelectMusicPlayer() to select the current music player, see GetSelectedMusicPlayer() to get the current music player.

Enumerator
PLAYER_NONE 

No music player.

PLAYER_APPLICATION 

The application music player plays music locally within your app.

It does not affect the iPod state. When your app moves to the background, the music player stops if it was playing.

PLAYER_SYSTEM 

The system (iPod) music player employs the iPod app on your behalf.

Music that is playing continues to play when your app moves to the background. On instantiation, it takes on the current iPod app state and controls that state. Specifically, the shared state includes the following:

◆ PlaybackState

Enumeration of the playback state.

Use GetPlaybackState() to get the current playback state.

Enumerator
PLAYBACK_STOPPED 

The music player is stopped.

PLAYBACK_PLAYING 

The music player is playing.

PLAYBACK_PAUSED 

The music player is paused.

PLAYBACK_INTERRUPTED 

The music player has been interrupted, such as by an incoming phone call.

PLAYBACK_SEEKING_FORWARD 

The music player is seeking forward.

PLAYBACK_SEEKING_BACKWARD 

The music player is seeking backward.

◆ RepeatMode

Enumeration of the repeat mode.

Use GetRepeatMode() to get the current repeat mode.

Enumerator
REPEAT_DEFAULT 

The user’s preferred repeat mode.

REPEAT_NONE 

The music player will not repeat the current song or playlist.

REPEAT_ONE 

The music player will repeat the current song.

REPEAT_ALL 

The music player will repeat the current playlist.

◆ ShuffleMode

Enumeration of the shuffle mode.

Use GetShuffleMode() to get the current shuffle mode.

Enumerator
SHUFFLE_DEFAULT 

The user’s preferred shuffle mode.

SHUFFLE_OFF 

The playlist is not shuffled.

SHUFFLE_SONGS 

The playlist is shuffled by song.

SHUFFLE_ALBUMS 

The playlist is shuffled by album.

Member Function Documentation

◆ SelectMusicPlayer()

virtual Bool Murl::IMusicPlayerControl::SelectMusicPlayer ( MusicPlayer  musicPlayer)
pure virtual

Set the selected music player.

Changing between application and system player during runtime is not properly supported by iOS, once a player is selected it should not change until the app is restarted.

Parameters
musicPlayerThe selected music player.
Returns
true if successful.

◆ GetSelectedMusicPlayer()

virtual MusicPlayer Murl::IMusicPlayerControl::GetSelectedMusicPlayer ( ) const
pure virtual

Get the selected music player.

Returns
The selected music player.

◆ ShowMediaPicker()

virtual Bool Murl::IMusicPlayerControl::ShowMediaPicker ( Bool  allowMultipleItems,
const String prompt 
)
pure virtual

Show the media item picker.

The media item picker let a user choose media items from the device iPod library.

Parameters
allowMultipleItemsSpecify multiple (true) or single (false) selection behavior.
promptA prompt for the user that appears above the navigation bar buttons.
Returns
true if successful.

◆ IsMediaPickerShowing()

virtual Bool Murl::IMusicPlayerControl::IsMediaPickerShowing ( ) const
pure virtual

Check if the media item picker is showing.

Returns
true if the media item picker is showing.

◆ Play()

virtual Bool Murl::IMusicPlayerControl::Play ( )
pure virtual

Initiates playback of the current item.

Returns
true if successful.

◆ Pause()

virtual Bool Murl::IMusicPlayerControl::Pause ( )
pure virtual

Pauses playback of the current item.

Returns
true if successful.

◆ Stop()

virtual Bool Murl::IMusicPlayerControl::Stop ( )
pure virtual

Ends playback of the current item.

Returns
true if successful.

◆ SkipToNextItem()

virtual Bool Murl::IMusicPlayerControl::SkipToNextItem ( )
pure virtual

Start playback of the next media item in the playback queue.

If the music player is not playing the next media item is designated as the next to be played.

Returns
true if successful.

◆ SkipToBeginning()

virtual Bool Murl::IMusicPlayerControl::SkipToBeginning ( )
pure virtual

Restart playback at the beginning of the currently playing media item.

Returns
true if successful.

◆ SkipToPreviousItem()

virtual Bool Murl::IMusicPlayerControl::SkipToPreviousItem ( )
pure virtual

Start playback of the previous media item in the playback queue.

If the music player is not playing the previous media item is designated as the next to be played.

Returns
true if successful.

◆ BeginSeekingBackward()

virtual Bool Murl::IMusicPlayerControl::BeginSeekingBackward ( )
pure virtual

Begin seeking backward through the media content.

Returns
true if successful.

◆ BeginSeekingForward()

virtual Bool Murl::IMusicPlayerControl::BeginSeekingForward ( )
pure virtual

Begin seeking forward through the media content.

Returns
true if successful.

◆ EndSeeking()

virtual Bool Murl::IMusicPlayerControl::EndSeeking ( )
pure virtual

End forward and backward seeking through the media content.

Returns
true if successful.

◆ HasPlaybackStateChanged()

virtual Bool Murl::IMusicPlayerControl::HasPlaybackStateChanged ( ChangeInspector inspector) const
pure virtual

Check if the current playback state has changed.

Parameters
inspectorThe change inspector.
Returns
true if the current playback state has changed.

◆ GetPlaybackState()

virtual PlaybackState Murl::IMusicPlayerControl::GetPlaybackState ( ) const
pure virtual

Get the current playback state.

Returns
The current playback state.

◆ GetCurrentPlaybackTime()

virtual Double Murl::IMusicPlayerControl::GetCurrentPlaybackTime ( ) const
pure virtual

Get the current playback time.

Returns
The current playback time in seconds.

◆ HasCurrentItemChanged()

virtual Bool Murl::IMusicPlayerControl::HasCurrentItemChanged ( ChangeInspector inspector) const
pure virtual

Check if the current item has changed.

If the current item has changed one or more of the following properties changed:

Parameters
inspectorThe change inspector.
Returns
true if the current item has changed.

◆ GetCurrentTitle()

virtual String Murl::IMusicPlayerControl::GetCurrentTitle ( ) const
pure virtual

Get the title of the current item.

Returns
The title of the current item.

◆ GetCurrentAlbumTitle()

virtual String Murl::IMusicPlayerControl::GetCurrentAlbumTitle ( ) const
pure virtual

Get the album title of the current item.

Returns
The album title of the current item.

◆ GetCurrentArtist()

virtual String Murl::IMusicPlayerControl::GetCurrentArtist ( ) const
pure virtual

Get the artist of the current item.

Returns
The artist of the current item.

◆ GetCurrentDuration()

virtual Double Murl::IMusicPlayerControl::GetCurrentDuration ( ) const
pure virtual

Get the duration of the current item.

Returns
The duration of the current item in seconds.

◆ SetRepeatMode()

virtual Bool Murl::IMusicPlayerControl::SetRepeatMode ( RepeatMode  repeatMode)
pure virtual

Set the current repeat mode.

Parameters
repeatModeThe current repeat mode.
Returns
true if successful.

◆ GetRepeatMode()

virtual RepeatMode Murl::IMusicPlayerControl::GetRepeatMode ( ) const
pure virtual

Get the current repeat mode.

Returns
The current repeat mode.

◆ SetShuffleMode()

virtual Bool Murl::IMusicPlayerControl::SetShuffleMode ( ShuffleMode  shuffleMode)
pure virtual

Set the current shuffle mode.

Parameters
shuffleModeThe current shuffle mode.
Returns
true if successful.

◆ GetShuffleMode()

virtual ShuffleMode Murl::IMusicPlayerControl::GetShuffleMode ( ) const
pure virtual

Get the current shuffle mode.

Returns
The current shuffle mode.

The documentation for this interface was generated from the following file:
  • murl_i_music_player_control.h


Copyright © 2011-2018 Spraylight GmbH.