Disco service API
The Disco service provides an HTTP API for third-party websites, which provides the stream information for your users.
We include a security code in the header because this API controls access to important resources from the Genvid services. You should always call this code from a trusted server and route it back viea a web server rather than accessing it directly from the web client.
Disco
- GET /disco/stream/info
Get the information required to broadcast the stream.
- Request Headers:
secret – Security token required by the service.
- Response JSON Object:
name (string) – The name of the stream.
description (string) – A description of the stream.
game (string) – The name of the game broadcasting the stream..
service (string) – The live streaming service type.
channel (string) – The user-specific channel identifier.
delayoffset (number) – An optional delay between the video stream and the game stream.
videowidth (integer) – The width of the final video in pixels.
videoheight (integer) – The height of the final video in pixels.
ntpuri (string) – The ntp URI.
Example response:
{ "name": "unknown", "description": "", "game": "unknown", "service": "youtube", "channel": "genvid", "delayoffset": 0, "videowidth": 1920, "videoheight": 1080, "ntpuri": "" }
- POST /disco/stream/join
Send a request to the service for information required to connect a user to the stream.
- Request Headers:
secret – Security token required by the service.
- Response JSON Object:
info.name (string) – The name of the stream.
info.description (string) – A description of the stream.
info.game (string) – The name of the game broadcasting the stream..
info.service (string) – The live streaming service type.
info.channel (string) – The user-specific channel identifier.
info.delayoffset (number) – An optional delay between the video stream and the game stream.
info.videowidth (integer) – The width of the final video in pixels.
info.videoheight (integer) – The height of the final video in pixels.
info.ntpuri (string) – The ntp URI.
uri (string) – The connection URI.
token (string) – The security token required to connect.
Example response:
{ "info": { "name": "unknown", "description": "", "game": "unknown", "service": "youtube", "channel": "genvid", "delayoffset": 0, "videowidth": 1920, "videoheight": 1080, "ntpuri": "" }, "uri": "", "token": "" }