OVI Framework Reference
When connect loads up your webapp the following documented API will be available for you to utilize. In an offline dev-scenario inserting the synergysky_ovi.js at the top of the webapp will enable the same API, with mocked behaviour.
Interfaces
synergysky
The synergysky
interface of OVI is available inside a connect session (or in simulation by including synergysky_ovi.js in the header of your code).
navigator.mediaDevices
The navigator.mediaDevices
interface is the Media Capture and Streams API that provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data. However when in a CONNECT session parts of the Instance methods are overridden.
Instance properties
synergysky.SupportedVersions
The synergysky.SupportedVersions
is a read-only property that provides a list of available version strings.
Examples
synergysky.GetDisplayMediaEventTypes
synergysky.GetDisplayMediaEventTypes
is a JSON object with properties that act as enums for improved coding. They all translate to strings but ensure type safety.
navigator.mediaDevices.getDisplayMedia()
becomes available, typically when a presentation or sharing is started on the connected video conferencing device.
2. An event emitted when the second stream from the video conference unit is stopped.
synergysky.CallerEndedSessionEventTypes
synergysky.CallerEndedSessionEventTypes
is a JSON object with properties that act as enums for improved coding. They all translate to strings but ensure type safety. When an event of a similar name is emitted, it will use the properties from this object to simplify type-safe code.
Example
Instance methods
synergysky.startSession()
The synergysky.startSession()
method of the synergysky interface needs to be called at the start of the session to establish API version in use aswell as integration key.
Warning
The other methods in the API will not be available until startSession
is executed successfully.
Syntax
Parameters
version_string
- a string containing the version you are integration, currently there are only one. A list of supported versions are available in
synergysky.SupportedVersions
property. Available string constants for versions are available insynergysky.Versions
property. integrationKey_string
- a string containing the integration key, without properly validated key, the API will throw error on engagement and malfunction. When using the
synergysky_ovi.js
simulation header, any value is accepted.
Return value
None
Is Throwing
This function will throw on error.
Example
synergysky.endSession()
The synergysky.endSession()
method of the synergysky interface is used to terminate the session in connect, which will leads to connect sending a SIP BYE to the calling video conference endpoint, and eventually destroy the web-session.
Syntax
Parameters
None
Return value
None
Is Throwing
This function will not throw on error.
synergysky.getCallerInfo()
The synergysky.getCallerInfo()
method of the synergysky interface is used for getting a read-only object of session data.
Syntax
Parameters
None
Return value
The method will return a json object with following structure
{
RemoteURI: "meetingroom@customer.com",
DisplayName: "Meeting Room",
DialedURI: "o.acme@joingw.com",
DualScreen: true,
GatewayCallActivityId: "<guid>"
}
Is Throwing
This function will not throw on error.
Example
synergysky.addEventHandler()
The synergysky.addEventHandler()
method of the synergysky interface is used for setting up eventhandlers that allows the OVI API to notify implemented code about various events.
see: Events
Syntax
Parameters
event_name_string
- a string containing the kind of event you want to listen to (see: Events)
async (event_object, action_string) = > { }
-
- either a function or lambda with the signature of
async (event_object, action_string)
event_object
- The event_object type is a read-only object containing timestamp for spawned action aswell as event type, to allow for using same function on multiple events.
action_string
- The action string depends on type of event but would typically be a string constant, or if interaction the DTMF code typed on the remote video conferencing device.
- either a function or lambda with the signature of
Return value
None
Is Throwing
This function will throw on error.
synergysky.removeEventHandler()
The synergysky.removeEventHandler()
method of the synergysky interface is used for removing attached eventhandlers.
see: Events
Syntax
Parameters
event_name_string
- a string containing the kind of event you want to listen to (see: Events)
Return value
None
Is Throwing
This function will throw on error.
synergysky.startSendSecondaryStream() ( not in use )
For future use, not implemented yet.
synergysky.stopSendSecondaryStream() ( not in use )
For future use, not implemented yet.
navigator.mediaDevices.getUserMedia()
This is an overloaded MediaDevices API, and will present the video conferencing device remote camera and microphone. For more details on the API see MediaDevices: getUserMedia() method
navigator.mediaDevices.getDisplayMedia()
This is an overloaded MediaDevices API, and will present the second remote video stream going out from the video conferencing device. Due to the nature of video conferencing devices and the ability to turn on and off the secondary screen, the availability of this stream is notified thru the GetDisplayMedia
event handler.
For more details on the official API see MediaDevices: getDisplayMedia() method
see: GetDisplayMediaEventTypes and addEventHandler
navigator.mediaDevices.enumerateDevices()
This is an overloaded MediaDevices API, and will present the available devices in the connect call. For more details on the API see MediaDevices: enumerateDevices() method
Events
GetDisplayMedia
The GetDisplayMedia
event is fired when a new change to the stream behind navigator.mediaDevices.getDisplayMedia()
is changed
This event is not cancelable and does not bubble.
Syntax
Parameters
event_object
-
- a string containing the kind of event you want to listen to (see: Events)
action_string
- The emitted action, see: GetDisplayMediaEventTypes
Example
CallerInteraction
The CallerInteraction
event is fired when the video conferencing device sends DTMF tones.
This event is not cancelable and does not bubble.
Syntax
Parameters
event_object
-
- a string containing the kind of event you want to listen to (see: Events)
action_string
- The emitted DTMF code
Example
CallerEndedSession
The CallerEndedSession
event is fired when the video conferencing device terminates/hangs-up the call on their side
This event is not cancelable and does not bubble.
Syntax
Parameters
event_object
-
- a string containing the kind of event you want to listen to (see: Events)
action_string
- The emitted action, see: CallerEndedSessionTypes