ConnectionIdentifier

As developers, we get that sometimes things don't go exactly as the inventor planned. That's where our ConnectionIdentifier module comes in. It's turned on by default, and it'll pop up in your console every 10 seconds with a message like:

log: "PixelStreaming Instance is connected"

But, if you end up starting more than one instance by mistake, ConnectionIdentifier will give you a heads-up:

warn: "2 PixelStreaming Instances is connected"

There might be times you want multiple instances or video frames running - we're not fully there with supporting this yet, though it's doable. Usually, though, if you see a second instance, it's a sign something didn't start up right.

It's always better to play it safe.

If you're worried about multiple instances running without you knowing, you can always take a look at the WebSocketState array to see what's up.

// Getter, returning an array of WebSocketStates, of all ArcwarePixelStreaming Instances created.
// CONNECTING = 0, OPEN = 1, CLOSING = 2, CLOSED = 3
PixelStreaming.WebsocketStates

// Getter, returning number of instances in CONNECTING or OPEN state.
PixelStreaming.ActiveInstances

Last updated