Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The CTLive Agent SDK allows the user to enable the browser's screen sharing feature. The user can choose to share the entire screen or a single application.
The screen sharing function feature is totally controlled managed by the browser based on the WebRTC implementation.

Start the ScreenSharing

contact.screenSharingStart : this method start a new screensharing sessionrequest. A dialog box will be displayed automatically to choose whether to share the whole screen or a single application.

The management and graphic appearance of this dialog is totally delegated to the browser, so there could be little differences between browsers.

Stop the ScreenSharing

contact.screenSharingStop : this method terminate an active screensharing session.

Screensharing

...

management

The contact.bindScreenSharingEvent bind a custom javascript function to be notified of all events occurring on the screensharing session.

Code Block
languagejs
contact.bindScreenSharingEvent(
  function (event, eventName, localWindow, state) {
    // Add your integration code
  }
);

Name

Type

Description

event

Object

jQuery standard event notification object

eventName

String

Screensharing event name. It can be one of the following values:

  • onAdded: a new application window is available for screensharing. The localWindowparameter will be set with an object that refers to the new application window.

  • onRemoved: an existing window is no longer available for screensharing.

  • onSelected: a window has been selected and automatically the screensharing starts. The screenSharingStarted event will be notified on the contact chat object.

  • onStateUpdated: the application windows state changed. The “state” parameter will be set to the new state.

localWindow

Object

The Object that refers to the application window