BAPS3 Specification

Playlist

The playlist service maintains a playlist on top of the player service. The playlist contains both file items, which represent files available to load into the player, and text items, which are comments that can be added into the playlist, but are not loadable and will be skipped over by the playlist.

Interface

The playlist service uses the internal API to communicate both with the platform service above it, and the player service below.

The playlist service exposes an API atop that of the player service, delegating any commands it doesn’t understand or outright reject downstream. It adds the following requests to the interface:

  • enqueue — Adds a file or text item into the playlist;

  • dequeue — Removes a file or text item from the playlist;

  • clear — Removes all items from the playlist;

  • select — Selects a file item in the playlist, loading it into the player;

  • list — Enumerates the items in the playlist, alongside their types;

For a playlist, quit also closes any underlying player in addition.

In addition, should the player implement FileLoad, the Playlist feature replaces its functionality in incompatible ways; said feature should be disabled. Thus, the player should reject the following player requests:

  • load — Replaced with enqueue;

  • eject — Replaced with select (with no arguments);

It also adds the following responses to those sent by the player:

  • ENQUEUE — An item has been enqueued;

  • DEQUEUE — An item has been dequeued;

  • SELECT — The current selected item, or lack thereof;

  • COUNT — The current number of items in the playlist;

  • ITEM — A playlist item.

Implemented Features

The playlist must implement, as a minimum, the Playlist and Playlist.AutoAdvance features. It is recommended, but not critical, to implement Playlist.TextItems.

Requirements

Interface compatibility

The playlist must implement the above interface. It may implement a superset of the interface, in order to implement more features than those required by the playlist.

File and text loading

The playlist should allow both files and text items to be enqueued, and must disregard text items for the purposes of selection and auto-advancing. If the playlist does not allow text items, it must notify the platform of this deficiency via the FEATURES response.

Features propagation

The playlist must announce those features of the player to which it allows access, and must hide those features of the player to which it does not.

Flexible player selection

The playlist should allow the configurable selection of the player instance to which it will attach. For example, a TCP/IP-based playlist service should allow the player port and address to be selected. If the playlist spawns, or contains, its own player, this may be disregarded.