Rate this page:

createWebSocket

Copy URL
createWebSocket(url: 

string

,
protocols:

string

|

string[]

):

WebSocket

Creates a WebSocket object. Sources can later be attached via the Call.sendMediaTo method.

Parameters

  • url:

    string

    URL to which to connect (wss:// + domain + path).

  • protocols:

    string

    Either a single protocol string or an array of protocol strings. The default value is 'chat'.

Returns