ReadonlykindAlways 'StreamError'. Branch on it to tell this failure from the other SDK errors.
Optional ReadonlyoriginalThe error or value that caused this one, when the SDK was wrapping something else.
For a NetworkError this is the browser's own fetch rejection. It is not
serialized as-is: toJson() takes only an Error cause's
message.
Serializes the error into the JSON-safe ErrorJson payload for logging or reporting.
The payload always carries kind and the message. The cause's message
is added only when originalError is an Error and says
something the message does not, truncated to 256 characters; any other cause is dropped.
Subclasses extend the payload with the fields listed on their own pages.
The error as plain, JSON-serializable data.
Something went wrong inside the live audio and video stream.
Unlike HttpError and NetworkError, which come from REST calls, this one comes from the transport carrying the agent's video, so it is only ever delivered to onError — no call of yours is necessarily in flight when it happens, and nothing throws it. The SDK raises it when:
Stream failed with event <event>.Most of these leave the session unusable, so the useful response is to tell the user and call reconnect(). kind is
'StreamError'. The message describes the failure, and is the plain'Stream Error'when the transport gave no detail; the underlying error, where there was one, is kept as originalError.