Connects to a media socket using the provided connection options.
The connection options.
A promise that resolves to the connected socket.
const options = { apiUserName: 'user123', apiKey: 'yourApiKeyHere', link: 'https://socketlink.com',};try { const socket = await connectSocket(options); console.log('Connected to socket:', socket);} catch (error) { console.error('Failed to connect to socket:', error);} Copy
const options = { apiUserName: 'user123', apiKey: 'yourApiKeyHere', link: 'https://socketlink.com',};try { const socket = await connectSocket(options); console.log('Connected to socket:', socket);} catch (error) { console.error('Failed to connect to socket:', error);}
Connects to a media socket using the provided connection options.