Provides the load request, for loading audio files, and the FILE
response, for notifying upstream that a file has been loaded.
FileLoad depends on the concept of an initial file-loaded state,
which is supplied by another feature such as PlayStop. Should
no other feature provide such a state, the default state Ready
may be used.
FileLoad may conflict with any other loading features.
Ejected — no file loadedThe state in which no file is loaded. Unless the server starts
with a file loaded, this should be the initial state, overriding
any initial state provided by a playback control feature (such as
PlayStop), unless explicitly overridden by another feature.
load — load fileload <PATH>
Loads the file at PATH, replacing any previously loaded file.
Will succeed and send FILE if the file has been loaded successfully.
The state should then be set to the initial file-loaded state.
If the load failed, the state should be set to Ejected.
FILE — file loadedFILE <PATH>
FILE should be sent when:
A new upstream connects to a server with the FileLoad feature,
as part of the initial responses; or
A new file has been loaded.
/playerResource group for player-related resources. Behaves as a simple composite resource. If defined in other features, treat as if singly defined.
/player/fileThe currently loaded file.
GETThe GET representation should be equivalent to the file path announced in the latest FILE response (if the state is not Ejected), or nil if there is no file loaded (the state is Ejected). The value when the state is Quitting is undefined.
PUTGiven a string payload, this should behave as equivalent to the load Internal API request with the given string as the file path.
Given the nil payload, this should behave as equivalent to an eject request.
DELETEAs PUT with the nil payload.
/control/state (additional state)Provides the Ejected state. Attempts to PUT the state to Ejected should behave in a manner equivalent to the eject Internal API request.