WTSession.connect(sToken, pName, uC, m)

connect(streamingToken, participantName, userConstraints, metadata)

This method will allow you to connect to the session

  • streamingToken (required) - JWT token which you can get from CAS. Note: For connecting two or users in the same session you need to share tokens between participants.

  • participantName (required) - participant name in the session

  • userConstraints (optional) - object with two fields {audio: boolean, video: boolean, videoCodecs*: Object }

//* Defaults for videoCodecs constraints:
videoCodecs: {
   priorityList: ['H264', 'VP8'],
   forcingCodec: false,
   applyToAnswer: false,
   skipPrioritization: false,

  1. priorityList (Array) - ordered video codecs list by priority (keep in mind that browsers are still select the best approach based on internal algorithms)

  2. forcingCodec (String || boolean) - a specific codec which will be used to prepare a SDP offer (marks that device able use for output streaming video the only selected codec)

  3. applyToAnswer (boolean) - If true codec from forcingCodec property will be applied not only to outgoing video, but onto incoming as well. Keep in mind if some of device doesn’t support selected codec it would not be able to connect

  4. skipPrioritization (boolean) - if true then browser sort and apply codecs according to internal SDP specification

  • metadata (optional) - object allow to share some info between participants

Last updated