player: use asynchronous events

Issue #65 resolved
Trek Hopton created an issue

The player has event handlers that in turn can trigger events, we should use an event emitter with asynchronous events to avoid unordered event handling, eg. if event-A-handler triggers event-B, then event-B’s handlers all get called before the rest of event-A’s handlers have been called.

The controller class needs to be given a wrapper function for EventEmitter.emit() that calls it asynchronously.

Comments (1)

  1. Log in to comment