OptionaldeviceDevice id. Defaults to a random id generated once and reused across every reconnect. Keeping it stable matters: Ynison deduplicates broadcast by device, so a fresh id per reconnect makes the server drop this observer from the fan-out and the state goes stale.
OptionaldeviceDevice identity override (defaults to a web SDK identity).
OptionalgoMaximum delay (ms) to honour from a server "go-away" frame before retrying.
Defaults to 60000. Ynison sometimes answers "temporary unavailable" with a
go-away of an hour or more; capping it lets a watcher recover within a minute
of the service returning instead of staying dead for the full hour, while a
single retry per cap interval is gentle enough not to hammer the server.
OptionalreconnectWhether to reconnect automatically. Defaults to true.
OptionalreconnectInitial reconnect backoff in ms. Defaults to 1000.
OptionalreconnectMaximum reconnect backoff in ms. Defaults to 30000.
OptionalresolveOptional resolver mapping a playable id to a Track for trackChange.
OptionalstaleForce a reconnect when the WebSocket shows no activity — no frame, ping or
pong — for this many ms, which means a silently broken pipe with no TCP
reset. 0 (the default) disables the watchdog. A now-playing watcher
typically sets this to ~120000.
This watches transport liveness (kept fresh by the ~20s keep-alive ping/pong), not state-frame arrival: Ynison only pushes a state frame on an actual state change, so a paused or idle player is legitimately silent for minutes while the connection is perfectly healthy. Tearing such a connection down on state-frame silence triggers a reconnect storm that the server answers with rate-limiting and host rebalancing.
OAuth token.
Options for RealtimeClient.