Disco service API

The Disco service provides an HTTP API for third party web sites. It provides the stream information for the users.

Given that this API controls access to important resources from the Genvid services, it is secured with a security code in its header. You should only call this code from a trusted server and so route it back from a web server instead of accessing it directly from the web client.

Disco

GET /disco/stream/info

Get the information about the current stream.

Request Headers:
 
  • secret – Secret needed by this service
Response JSON Object:
 
  • name (string) – The name of the stream
  • description (string) – A description of the stream
  • game (string) – The game being played
  • service (string) – The live streaming service type
  • channel (string) – The user-specific channel identifier
  • delayoffset (number) – An optional delay allowing to offset the video stream with regard to the game stream
  • videowidth (integer) – The width, in pixels, of the final video
  • videoheight (integer) – The height, in pixels, of the final video

Example response:

{
  "name": "unknown",
  "description": "",
  "game": "unknown",
  "service": "youtube",
  "channel": "genvid",
  "delayoffset": 0,
  "videowidth": 1920,
  "videoheight": 1080
}
POST /disco/stream/join

Ask the service to join the stream for a user and return the connection information.

Request Headers:
 
  • secret – Secret needed by this service
Response JSON Object:
 
  • info.name (string) – The name of the stream
  • info.description (string) – A description of the stream
  • info.game (string) – The game being played
  • info.service (string) – The live streaming service type
  • info.channel (string) – The user-specific channel identifier
  • info.delayoffset (number) – An optional delay allowing to offset the video stream with regard to the game stream
  • info.videowidth (integer) – The width, in pixels, of the final video
  • info.videoheight (integer) – The height, in pixels, of the final video
  • uri (string) – The connection URI
  • token (string) – The unique authentication token needed to connect.

Example response:

{
  "info": {
    "name": "unknown",
    "description": "",
    "game": "unknown",
    "service": "youtube",
    "channel": "genvid",
    "delayoffset": 0,
    "videowidth": 1920,
    "videoheight": 1080
  },
  "uri": "",
  "token": ""
}