Skip to content

Playslave API

Matt Windsor edited this page Jun 25, 2014 · 7 revisions

Playslave API

General

  • An implementation of playslave uses a text-based protocol, for reasons of ease of debugging, manual control of playslave without a frontend, and transparency.
  • The API is separated into requests, sent from the frontend/user to playslave, and responses, sent from playslave to the frontend/user.
  • Requests and responses both take the form WORD arg1 arg2… argn, where arguments are either single words or quoted strings (use \" to escape a string), and WORD is a four-character identifier (lowercase for requests, uppercase for responses).

Requests

play

  • Syntax: play
  • Valid when: stopped

stop

  • Syntax: stop
  • Valid when: playing

load

  • Usage: load FILE
  • Valid when: in any state

ejct

  • Syntax: ejct
  • Valid when: not ejected

seek

  • Syntax: seek TIME
  • Valid when: not ejected

quit

  • Syntax: quit
  • Valid when: in any state

Responses

OHAI

  • Syntax: OHAI MESSAGE

TIME

  • Syntax: TIME MICROSECONDS

TTFN

  • Syntax: TTFN MESSAGE

WHAT

  • Syntax: WHAT MESSAGE

Clone this wiki locally