Construct a RemoteSupportClient.
If a required parameter is null.
The base URL of the Remote Support API.
A key for authenticating API access.
The timeout for the WebRTC client to begin reconnect.
The logger instance for this session.
Whether to export logs from this session to permanent storage.
true if the client is connected
Called when an RSQuery is received.
The event that is triggered when both sides of the peer connection have connected.
The event that is triggered when the other side of the peer connection disconnects unexpectedly.
The event that is triggered when the other side of the peer connection intentionally closes the connection.
the event that is invoked when an incoming message has been received, but before it is decoded
The event that is invoked when an outgoing message has been encoded, but before it is sent
Event raised when a message error occurs
The event that is triggered when the other side of the peer connection sends an RSNotification message.
Event raised when the first chunk of a multi-part message is received
Called when an RSQuery is received.
Called when a video stream is added to the current session
Connect the client to an existing support session.
If called when a remote support session is already initialized, or if the remote support session fails to initialize.
the PIN of the remote support session
Send an RSNotification containing a raw bytes to the other side of the peer connection.
The data is sent as a Notification with category Bytes
and tag
application/octet-stream
. * These defaults can be changed using
setDefaultBytesCategoryAndTag
If called before remote support session is initialized.
the ArrayBuffer to send.
Send an RSNotification containing a chat message to the other side of the peer connection.
The data is sent as a Notification with category Chat
and tag
text/plain; charsets=utf-8
. These defaults cannot be changed.
If called before remote support session is initialized.
the text data to send.
The mimetype of the message to send.
The numeric category of the message to send.
Send an RSCommand to the other side of the peer connection.
a receipt used to wait for the command to be acknowledged
If the command has an invalid AcknowledgeOn, or if called before remote support session is initialized.
the command to send
Send an RSNotification containing a log message to the other side of the peer connection.
The data is sent as a Notification with category Log
and tag
text/plain; charsets=utf-8
. These defaults can be changed
using setDefaultLogCategoryAndTag
If called before remote support session is initialized.
The log message to send.
The mimetype of the message to send.
The numeric category of the message to send.
Send an RSNotification to the other side of the peer connection.
If called before remote support session is initialized.
The notification to send
Send an RSNotification containing a stringified JSON object to the other side of the peer connection.
The data is sent as a Notification with category Object
and tag
application/json
. * These defaults can be changed using
setDefaultObjectCategory
the object to JSON-encode and send
Send an RSQuery to the other side of the peer connection.
If called before remote support session is initialized.
Set the category number and mimetype for an RSNotification containing raw bytes.
the category number for raw bytes.
the mimetype for raw bytes.
Set the category number and mimetype for an RSNotification containing a log message.
the category number for log messages.
the mimetype for log messages.
Set the category number and mimetype for an RSNotification containing JSON data.
the category number for JSON data.
A RemoteSupportClient is the primary point of interaction between a client application and remote support. It contains utilities for initiating a new remote support session and connecting to an existing one, building and handling messages that are exchanged between remote support peers, and responding to connection lifecycle events.