Move some setup methods to Player construction
Closed this issue · 2 comments
Right now we have a set of methods to setup various aspects of the Player
that could be easily set during construction. In particular:
register_event_handler
register_frame_renderer
disable_video
register_event_handler
register_frame_renderer
With the current design is not feasible to set these parameters at construction since the user can register several event handles and frame renderers.
Yeah. IIRC we are currently calling these methods only once in Servo.
A consumer that wants to handle events in multiple places can always use its own internal mechanism to proxy the events coming through the registered servo-media event handler. Also I don't see the point of having multiple frame renderers. In any case, we could still have these API methods even if we extend the constructor to get an event handler and a frame renderer.
I have an old patch doing this. I'll rebase and open a PR.