SDK Reference

Initialization

Instantiate the Visionable Client, passing your configuration settings

const client = new VisiWebRTC(settings);

The settings parameter is an object with the following properties:

KeyTypeDescription
emailStringThe user's email address (optional)
passwordStringThe user's password (optional)
meeting_idStringYou can authenticate by meeting ID to join the meeting as a guest (optional)
session_idStringYou can use an existing session_id to authenticate (optional)
serverStringThe hostname of the Visionable UCS
nameStringThe display name you'd like to use
callbackInitializationCallbackCalled when we've finished initializing and connecting to the server

📘

Authentication

You must authenticate using either a username & password, a meeting-id, or a session-id.

Methods

connectToMeeting

client.connectToMeeting(settings)

The settings parameter is an object with the following properties:

KeyTypeDescription
meeting_idStringThe meeting UUID
videoStreamAddedVideoAddedCallbackCalled when a video stream has been added to the meeting
videoStreamRemovedVideoRemovedCallbackCalled when a video stream has been removed from the meeting.
toolsNotificationToolsCallbackCalled when a tools event has occurred.
callbackConnectMeetingCallbackCalled when the meeting join has completed.

enableLocalVideo

client.enableLocalVideo([parent], [callback], [maxBandwidth], [resolution], [deviceId])
ParameterTypeDescription
parentStringDOM selector in which the video should be rendered, defaulting to the document body
callbackFunctionCalled after the stream is enabled
maxBandwidthNumberUsed to limit the send bandwidth for this video stream
resolutionStringCan be one of "320x180", "320x240", "640x480", "640x360", "960x720", or "1280x720"
deviceIdStringCan be one of the device IDs from navigator.mediaDevices.enumerateDevices. If it is unspecified or invalid, the browser's default device will be used

disableLocalVideo

client.disableLocalVideo([deviceId])
ParameterTypeDescription
deviceIdStringThe ID of the device you want to disable

enableRemoteVideo

client.enableRemoteVideo(streamId, parent, callback)
ParameterTypeDescription
streamIdStringThe ID of the remote stream you want to enable
parentStringDOM selector in which the video should be rendered, defaulting to the document body
callbackFunctionCalled after the stream is enabled

disableRemoteVideo

client.disableRemoteVideo(streamId)
ParameterTypeDescription
streamIdStringThe ID of the remote stream you want to disable

enableAudio

Enables the input microphone for the device.

client.enableAudio()

audioOutputVolume

client.audioOutputVolume(volume)
ParameterTypeDescription
volumeNumberA number between 0 and 1

muteAudioInput

Mute your microphone

client.muteAudioInput()

unMuteAudioInput

Unmute your microphone

client.unMuteAudioInput()

muteAudioOutput

Mute your speakers

client.muteAudioOutput()

unMuteAudioOutput

Unmute your speakers

client.unMuteAudioOutput()

disconnect

Disconnect from the meeting

client.disconnect()

tools.Chat

client.tools.Chat(user, message);
ParameterTypeDescription
userStringThe username you'd like to chat to. Set to * to send to the entire meeting
messageStringThe chat message

tools.ShareUrl

client.tools.ShareUrl(url)
ParameterTypeDescription
urlStringURL to share into the meeting

Interfaces

InitializationCallback

function (error)
ParameterTypeDescription
errorString | NullError description, or null on success.

VideoAddedCallback

function (streamId, email, name, camName)
ParameterTypeDescription
streamIdStringThe video stream ID
emailStringThe user's email address
nameStringThe user's display name
camNameStringThe camera identifier

VideoRemovedCallback

function (streamId)
ParameterTypeDescription
streamIdStringThe video stream ID

ToolsCallback

function (xml)
ParameterTypeDescription
xmlStringThe Tools event XML. See Tools Events below

ConnectMeetingCallback

function (error, videoStreamMax, meetingId, subject)
ParameterTypeDescription
errorString | NullError description, or null on success.
videoStreamMaxNumberThe maximum number of video streams you're allowed to send
meetingIdStringThe meeting ID of the meeting you've joined
subjectStringThe meeting subject

Tools Events

chat_user_added

<?xml version="1.0" encoding="UTF-8"?>
<notify>
  <event name="chat_user_added">
    <user id="[email protected]">
      <handle>Example User</handle>
      <status>Online</status>
    </user>
  </event>
</notify>

chat_user_removed

<?xml version="1.0" encoding="UTF-8"?>
<notify>
  <event name="chat_user_removed">
    <user id="[email protected]"/>
  </event>
</notify>

chat_chat

<?xml version="1.0" encoding="UTF-8"?>
<notify>
  <event name="chat_chat">
    <from>[email protected]</from>
    <to>*</to>
    <chat>Hello there!</chat>
  </event>
</notify>

file_added

<?xml version="1.0" encoding="UTF-8"?>
<notify>
  <event name="file_added">
    <user id="[email protected]">
      <file id="house.jpeg">
        <location>http://example.com:554/igpix/c6058646-4d2b-407d-8234-c1347f009ae9/[email protected]/igfiles/house.jpeg</location>
        <size>194</size>
      </file>
    </user>
  </event>
</notify>

file_removed

<?xml version="1.0" encoding="UTF-8"?>
<notify>
  <event name="file_removed">
    <user id="[email protected]">
      <file id="house.jpeg"/>
    </user>
  </event>
</notify>

url_shared

<?xml version="1.0" encoding="UTF-8"?>
<notify>
  <event name="url_shared">
    <user id="[email protected]">
      <url>https://example.com/igpix/e8dc74fa-462c-4fb1-ae36-1678d2196356/[email protected]/igweb.jpg?id=756919</url>
    </user>
  </event>
</notify>