I need to design architecture for application with Player
.
Player
purpose is playing music. Player
has controls like play, stop, pause, loadSong.
Player
can be used by User
and APController
. APController
and User
can use Player
but User
has higher priority than APController
. If APController
is using Player
to play some music and User
want to play different song this should be possible without waiting. From the other side if User
is playing song via Player
then APController
want's to play some song then it must wait until User
will finish playing with Player
so it can go to idle state. Think about APController
like some AI-User who knows how to use Player
but this AI-User must respect User
priority.
How to design access to this Player
. I think I need some coordinator object and APController
and User
need to talk via this coordinator with Player
. I need also some way to send feedback to coordinator when the Player
is idle (means User
end interaction with it) and let APController
use it if APController
want to use it.
Aucun commentaire:
Enregistrer un commentaire