Connects to a media socket using the provided connection options.
The connection options.
A promise that resolves to the connected socket.
Connects to a local media socket using the provided connection options.
The connection options.
A promise that resolves to the connected socket and data.
Disconnects an active socket connection.
The options for disconnecting the socket.
A promise that resolves to true if the socket was disconnected successfully, or false otherwise.
Manages connections to a media socket, allowing users to connect or disconnect based on API credentials.
Name
SocketManager
Description
Provides methods to connect and disconnect from a media socket using a provided API key or token.
Method
validateApiKeyToken - Validates the API key or token for correct format. connectSocket - Establishes a connection to the media socket using either the API key or token. disconnectSocket - Disconnects an active socket connection.
Example
Returns
The active socket instance on connection, or a boolean indicating disconnection success.