Frontend API

The following requirements applies to any frontend implementation:

  • A frontend MAY do mostly whatever it wants to, including creating threads, opening TCP ports and exposing Mopidy for a group of clients.
  • A frontend MUST implement at least one Pykka actor, called the “main actor” from here on.
  • The main actor MUST accept two constructor arguments:
    • config, which is a dict structure with the entire Mopidy configuration.
    • core, which will be an ActorProxy for the core actor. This object gives access to the full Core API.
  • It MAY use additional actors to implement whatever it does, and using actors in frontend implementations is encouraged.
  • The frontend is enabled if the extension it is part of is enabled. See Extension development for more information.
  • The main actor MUST be able to start and stop the frontend when the main actor is started and stopped.
  • The frontend MAY require additional settings to be set for it to work.
  • Such settings MUST be documented.
  • The main actor MUST stop itself if the defined settings are not adequate for the frontend to work properly.
  • Any actor which is part of the frontend MAY implement the mopidy.core.CoreListener interface to receive notification of the specified events.

Frontend implementations

Table Of Contents

Previous topic

Audio API

Next topic

Commands API

This Page