Package elisa :: Package core :: Module player_registry :: Class PlayerRegistry
[hide private]
[frames] | no frames]

Class PlayerRegistry

source code


The PlayerRegistry has responsability to create and hold elisa.core.player.Player instances. Additionally it can perform global actions on all the players at the same time.

Player instances are identified by their name, which must be unique, this is the responsability of the developer.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
initialize(self) source code
 
deinitialize(self) source code
elisa.core.player.Player
create_player(self)
Returns a new player instance.
source code
 
remove_player(self, player_instance)
Remove player_instance Player
source code
 
_global_action(self, method_name, *params) source code
 
play_sound(self, uri)
Play the sound located at uri.
source code
 
play_all(self)
Set all players into playing mode.
source code
 
pause_all(self)
Pause all players.
source code
 
stop_all(self)
Stop all currently instantiated players.
source code
 
mute_all(self)
Mute all players.
source code
 
unmute_all(self)
Unmute all players.
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]
 
__classinit__(cls, new_attrs)
Given a class and a new set of attributes (as passed in by __classinit__), create or modify properties based on functions with special names ending in __get, __set, and __del.
source code
Class Variables [hide private]
  name = 'player_registry'

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]
list of elisa.core.player.Player _players
currently instantiated players
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: log.Loggable.__init__

remove_player(self, player_instance)

source code 
Remove player_instance Player
Parameters:
  • player_instance (Player) - Player instance to remove

play_sound(self, uri)

source code 
Play the sound located at uri. If the simple audio player is already playing, the playback is stopped. The playback of the other players is not touched in any way.
Parameters: