Constellation is a websocket based service on Mixer used for many features. The most useful for Developers is liveloading.
Liveloading is an event system on Mixer. When models update, users follow channels, or anything else happens that clients might want to be aware of an event is sent. Users must subscribe to Events to receive them.
Tip: you can view liveloading in-action by viewing your websocket log on mixer.com.
Want us to call you instead? Check out our Webhooks system!
A single IP address can subscribe to up to 1,000,000 events. Beyond this number you will need multiple IP Addresses to receive events.
A number of clients already support Constellation. Try them out for a jump start into Constellation.
You can connect to Constellation by opening a secure websocket connection(wss) to
Users authenticate to Constellation by sending authentication details in socket headers. No external API endpoints are needed.
Users remain connected to Constellation throughout their session. During the session, they may subscribe to events happening on the site and get notifications when those events occur.
Constellation is based on JSON-RPC with additional support for an event system. Initially a user connects to constellation.mixer.com with a standard WebSocket connection. Aside from standard websocket headers, the following headers may also be passed:
x-sec-websocket-protocol: if set to cnstl-gzip, Constellation may choose to send websocket frames down as binary, gzipped JSON rather than plain text. Passing this is generally handled by websocket clients themselves, and are usually configured by specifying a preferred subprotocol.
The client may detect gzipped frames by the fact that they are binary messages and begin with the magic bytes 0x1f and 0x8b as the first and second payload byte, respectively.
Users connecting to Constellation must connect with either the Authorization header or Client-ID header.
There are three packet types, you can read more about them by clicking them in the side menu or the table below:
|Method||Used by clients to instruct the server to do something.|
|Reply||Sent from the server in response to a method|
|Event||Sent from the Server to notify the client that an event has occurred.|
These packets are sent over the websocket as JSON encoded messages. Messages to the client may be gzipped if
x-supports-gzip was passed in the headers, messages sent to Constellation from a client may also be gzipped.