# Class: Collaboration

## Constructor

#### new Collaboration(collaborationService, whiteboard, contentSharing, slider, collaborationId, callId, callService)

  Collaboration module provides functionality of the screen sharing and the whiteboard drawing to the Client application.
  For the Collaboration module namespace, see Collaboration.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `collaborationService` | AvayaClientServices.Services.Collaboration.CollaborationService |  | collaborationService
  `whiteboard` | AvayaClientServices.Services.Collaboration.Whiteboard |  |
  `contentSharing` | AvayaClientServices.Services.Collaboration.ContentSharing |  |
  `slider` | AvayaClientServices.Services.Collaboration.Slider |  |
  `collaborationId` | String |  |
  `callId` | String | <optional> |
  `callService` | AvayaClientServices.Base.CallService |  |

## Members

#### <protected> _supportedFeatures :Array.<(AvayaClientServices.Services.Collaboration.FeaturesAvailable)>

  List of features currently implemented and supported by the SDK.

  ##### Type:

  - Array.<(AvayaClientServices.Services.Collaboration.FeaturesAvailable)>

## Methods

#### getCallId() → {String}

  Returns the unique string ID for call that is linked with this collaboration.

  ##### Returns:

  { String }

#### getCollaborationId() → {String}

  Returns the unique string ID associated with the particular collaboration object.

  ##### Returns:

  { String }

#### getContentSharing() → {AvayaClientServices.Services.Collaboration.ContentSharing}

  Returns ContentSharing object associated with the collaboration.
  This object provides set of APIs which allows to access different features concerning receiving and sharing a content.

  ##### Returns:

  { AvayaClientServices.Services.Collaboration.ContentSharing }

#### getParticipants() → {AvayaClientServices.Base.DataRetrieval}

  Returns the dataRetrieval object with participants list associated with the collaboration session.

  ##### Returns:

  { AvayaClientServices.Base.DataRetrieval }

#### getSelfParticipant() → {AvayaClientServices.Services.Participant}

  Returns the collaboration participant.

  ##### Returns:

  { AvayaClientServices.Services.Participant }

#### getSlider() → {AvayaClientServices.Services.Collaboration.Slider}

  Returns Slider object associated with the collaboration.
  This object provides set of APIs for receiving slider events.

  ##### Returns:

  { AvayaClientServices.Services.Collaboration.Slider }

#### getWhiteboard() → {AvayaClientServices.Services.Collaboration.Whiteboard}

  Returns Whiteboard object associated with the collaboration.
  This object provides set of APIs which allows to access different features concerning receiving and sharing a whiteboard.

  ##### Returns:

  { AvayaClientServices.Services.Collaboration.Whiteboard }

#### hasModeratorPrivilege() → {Boolean}

  Returns true if the local user has moderator privilege.

  ##### Returns:

  { Boolean }

#### hasPresenterPrivilege() → {Boolean}

  Returns true if the local user has presenter privilege.

  ##### Returns:

  { Boolean }

#### isEjected() → {Boolean}

  Returns true if the local user is ejected.

  ##### Returns:

  { Boolean }

#### isReceivingSharingPaused() → {Boolean}

  Returns true if receiving sharing is paused.

  ##### Returns:

  { Boolean }

#### pause() → {AvayaClientServices.Base.Promise.<(undefined|undefined)>}

  Pauses events stream.

  ##### Returns:

  { AvayaClientServices.Base.Promise.<(undefined|undefined)> }

#### resume() → {AvayaClientServices.Base.Promise.<(undefined|undefined)>}

  Resumes events stream.

  ##### Returns:

  { AvayaClientServices.Base.Promise.<(undefined|undefined)> }

#### start(config, meetingId) → {AvayaClientServices.Base.Promise.<(undefined|undefined)>}

  Starts the collaboration session. Collaboration can not be started twice or during collaboration starting or ending process.

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `config` | AvayaClientServices.Config.UserConfiguration | <optional> | @deprecated This parameter is deprecated since version 1.1. User configuration object.
  `meetingId` | Number | <optional> | @deprecated This parameter is deprecated since version 1.1. ID of meeting to connect to.

  ##### Returns:

  { AvayaClientServices.Base.Promise.<(undefined|undefined)> }

#### stop() → {AvayaClientServices.Base.Promise.<(undefined|AvayaClientServices.Services.Collaboration.CollaborationError)>}

  Ends the collaboration session. Collaboration can not be ended twice or during collaboration starting or ending process.

  ##### Returns:

  { AvayaClientServices.Base.Promise.<(undefined|AvayaClientServices.Services.Collaboration.CollaborationError)> }

### Managing callbacks

#### addOnCollaborationEndedCallback(callback) → {void}

  Adds new onCollaborationEndedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationEndedCallback |

  ##### Returns:

  { void }

#### addOnCollaborationInitializedCallback(callback) → {void}

  Adds new onCollaborationInitializedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationInitializedCallback |

  ##### Returns:

  { void }

#### addOnCollaborationModeratorPrivilegeChangedCallback(callback) → {void}

  Adds new onCollaborationModeratorPrivilegeChangedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationModeratorPrivilegeChangedCallback |

  ##### Returns:

  { void }

#### addOnCollaborationNearEndByEjectCallback(callback) → {void}

  Adds new onCollaborationNearEndByEjectCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationNearEndByEjectCallback |

  ##### Returns:

  { void }

#### addOnCollaborationPresenterPrivilegeChangedCallback(callback) → {void}

  Adds new onCollaborationPresenterPrivilegeChangedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationPresenterPrivilegeChangedCallback |

  ##### Returns:

  { void }

#### addOnCollaborationServiceAvailableCallback(callback) → {void}

  Adds new onCollaborationServiceAvailableCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationServiceAvailableCallback |

  ##### Returns:

  { void }

#### addOnCollaborationServiceUnavailableCallback(callback) → {void}

  Adds new onCollaborationServiceUnavailableCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationServiceUnavailableCallback |

  ##### Returns:

  { void }

#### addOnCollaborationStartedCallback(callback) → {void}

  Adds new onCollaborationStartedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationStartedCallback |

  Deprecated:
    - Yes

  ##### Returns:

  { void }

#### removeOnCollaborationEndedCallback(callback) → {void}

  Removes existing onCollaborationEndedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationEndedCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationInitializedCallback(callback) → {void}

  Removes existing onCollaborationInitializedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationInitializedCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationModeratorPrivilegeChangedCallback(callback) → {void}

  Removes existing onCollaborationModeratorPrivilegeChangedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationModeratorPrivilegeChangedCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationNearEndByEjectCallback(callback) → {void}

  Removes existing onCollaborationNearEndByEjectCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationNearEndByEjectCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationPresenterPrivilegeChangedCallback(callback) → {void}

  Removes existing onCollaborationPresenterPrivilegeChangedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationPresenterPrivilegeChangedCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationServiceAvailableCallback(callback) → {void}

  Removes existing onCollaborationServiceAvailableCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationServiceAvailableCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationServiceUnavailableCallback(callback) → {void}

  Removes existing onCollaborationServiceUnavailableCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationServiceUnavailableCallback |

  ##### Returns:

  { void }

#### removeOnCollaborationStartedCallback(callback) → {void}

  Removes existing onCollaborationStartedCallback.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `callback` | AvayaClientServices.Services.Collaboration.Collaboration#onCollaborationStartedCallback |

  Deprecated:
    - Yes

  ##### Returns:

  { void }

### Capabilities

#### getChatCapability() → {AvayaClientServices.Base.Capability}

  Determines whether the collaboration call supports a chat.
  Please note, that the SDK will not support the Chat in the Collaboration module.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

#### getContentSharingCapability() → {AvayaClientServices.Base.Capability}

  Controls whether or not this participant can start content sharing.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

  Capability object

#### getLibrarySharingCapability() → {AvayaClientServices.Base.Capability}

  Determines whether the collaboration call supports the library sharing.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

#### getMeetingMinutesCapability() → {AvayaClientServices.Base.Capability}

  Determines whether the collaboration call supports meeting minutes.
  Please note, that the SDK will not support the Meeting Minutes in the Collaboration module.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

#### getNetworkLibraryCapability() → {AvayaClientServices.Base.Capability}

  Determines whether the collaboration call supports the library management.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

#### getRetrieveParticipantListCapability() → {AvayaClientServices.Base.Capability}

  Determines whether the collaboration can be queried to get the list of conference participants.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

#### getSliderCapability() → {AvayaClientServices.Base.Capability}

  Determines whether the collaboration call supports slider.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

#### getWhiteboardCapability() → {AvayaClientServices.Base.Capability}

  Controls whether or not this participant can start whiteboard.

  ##### Returns:

  { AvayaClientServices.Base.Capability }

## Type Definitions

#### onCollaborationEndedCallback(collaboration) → {void}

  Interface for callback function to be invoked when a collaboration ends.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  ##### Returns:

  { void }

#### onCollaborationInitializedCallback(collaboration) → {void}

  Interface for callback function to be invoked when the collaboration is initialized (all starting events were processed).

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  ##### Returns:

  { void }

#### onCollaborationModeratorPrivilegeChangedCallback(collaboration) → {void}

  Interface for callback function to be invoked when a participant moderator privilege is changed.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  ##### Returns:

  { void }

#### onCollaborationNearEndByEjectCallback(collaboration) → {void}

  Interface for callback function to be called when a participant is ejected from the collaboration.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  ##### Returns:

  { void }

#### onCollaborationPresenterPrivilegeChangedCallback(collaboration) → {void}

  Interface for callback function to be invoked when a participant presenter privilege is changed.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  ##### Returns:

  { void }

#### onCollaborationServiceAvailableCallback(collaboration) → {void}

  Interface for callback function to be invoked when a collaboration service is available.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  ##### Returns:

  { void }

#### onCollaborationServiceUnavailableCallback(collaboration, permanentlyUnavaliable) → {void}

  Interface for callback function when a collaboration service is unavailable.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.
  `permanentlyUnavaliable` | boolean | Flag indicating whether the collaboration is permanently unavaliable or not.

  ##### Returns:

  { void }

#### onCollaborationStartedCallback(collaboration) → {void}

  Interface for callback function to be invoked when a collaboration starts.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `collaboration` | AvayaClientServices.Services.Collaboration.Collaboration | Collaboration session that the callback is associated with.

  Deprecated:
    - This callback is currently never executed.

  ##### Returns:

  { void }