[Pixlib] MVC inside pixlib

dev@binarycrafts.com dev at binarycrafts.com
Thu Mar 1 15:53:03 EST 2007


Couldn't find a better title for this.
What I have is the standard pixlib config but I need to implement a
mediaPlayer that handles multiple types of media ( flv, swf, images, text
).
Now I have my Asset model that fires the onUpdate event and any listener
can grab the items Array from the event. I made a text for flv with a
light view implementing MCHelper that holds a VideoDisplay inside. The
video plays ok when the Asset model changes.
My question is: what would be the best design approach to have a
MediaPlayer that changes presentation and the active media handler (
VideoDisplay, GraphicLib, some other extending AbstractLib ). I also ned
to have the media controls in a different view and those should change the
interface on asset type change also.
I was looking into the State pattern to declare multiple contexts inside a
MediaController as a MVC implementation but I don't know how well it goes
with the AbstractLib and children. I really don't want to lose the great
functionality that these provide.

thanks for any tips you throw my way,
cosmin



More information about the Pixlib mailing list