# Watch Together SDK overview

## Overview <a href="#watchtogetheroverview-overview" id="watchtogetheroverview-overview"></a>

Watch Together video-chat is a general-purpose video chatting infrastructure that is aimed to provide high-quality Audio and Video functionality that will allow you to create and provide engaging experiences in your application for your customers.

To register for our service please contact us at <Support@sceenic.co>.

If you already have credentials to the private area, login and retrieve your API\_KEY and API\_SECRET - [Private area](https://media.sceenic.co/)

### Resources

| Resources                                                                                           | SDKs                                                                                                                                |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| [Android Java](https://bitbucket.org/svmt/samplewatchtogether-java-2.0/src/master/)                 | [Web SDK](https://media.sceenic.co/) \*                                                                                             |
| [Android Kotlin](https://bitbucket.org/svmt/samplewatchtogether-kotlin-2.0/src/master/)             | [Android SDK](https://media.sceenic.co/) \*                                                                                         |
| [iOS Objective-c adapter](https://bitbucket.org/svmt/watchtogether-ios-objc/src/master/)            | [i](https://svmtse.atlassian.net/wiki/spaces/SC/pages/75595781/iOS+SDK+-+Swift+-+Garbage+bin)[OS SDK](https://media.sceenic.co/) \* |
| [iOS Swift](https://bitbucket.org/svmt/watchtogether-ios-swift/src/master/)                         |                                                                                                                                     |
| [Web JS sample application code](https://bitbucket.org/svmt/watchtogethersampleappjs/src/master/)   |                                                                                                                                     |
| [React sample application code](https://bitbucket.org/svmt/watchtogethersampleappreact/src/master/) |                                                                                                                                     |

( \* ) SDKs are accessible only from the private area

## Watch Together platform <a href="#watchtogetheroverview-watchtogetherplatform" id="watchtogetheroverview-watchtogetherplatform"></a>

Watch together video-chat application will allow you to create and manage interactive Audio and Video sessions for multiple participants and embed it in your web or mobile applications.\
We will provide you with SDKs for iOS, Android and Web to create and manage your experience.

Watch Together architecture is a client-server architecture whereby:

* Clients - Web, iOS, or Android SDKs which will allow you to manage all the video chat logic (Web {[JS](https://bitbucket.org/svmt/watchtogethersampleappjs/src/master/)
* , [React](https://bitbucket.org/svmt/watchtogethersampleappreact/src/master/)}, iOS {[Swift](https://bitbucket.org/svmt/watchtogether-ios-swift/src/master/), [Obj-c-adpater](https://bitbucket.org/svmt/watchtogether-ios-objc/src/master/)} and Android {[Kotlin](https://bitbucket.org/svmt/samplewatchtogether-kotlin-2.0/src/master/), [Java](https://bitbucket.org/svmt/samplewatchtogether-java-2.0/src/master/)}
* Server - which exposes authentication functionality and responsible for providing a valid token for the various clients ([Authentication overview](/watch-together-sdk/sscale-confluence-overview.md))

**System flow:**

![](/files/-Lrnwj4Cat1anmT6DPvq)

You can expect the following functionality:

### Client SDKs <a href="#watchtogetheroverview-clients" id="watchtogetheroverview-clients"></a>

* Session management functionality
* Connecting and disconnecting from a Session
* Managing Video and Audio streams
  * Enable/Disable video
  * Enable/Disable audio
* Audio routing functionality  -out of the box - managed by the SDK
* Session management functionality
* Connecting and disconnecting from a Session
* Managing Video and Audio streams
* Enable/Disable video Enable/Disable audio
* Active speaker detection
* Quality of Service monitoring
* Resolution and bitrate control
* Screen sharing Camera preview
* Synchronization logic Reconnect functionality (will be deployed soon)
* Big screen flow support (Android and AppleTV) Audio routing functionality

### Server <a href="#watchtogetheroverview-server" id="watchtogetheroverview-server"></a>

* Authentication and client tokens
* Archiving and server-side configuration (Coming soon)

## Sessions <a href="#watchtogetheroverview-sessions" id="watchtogetheroverview-sessions"></a>

When watching together we bring together a few participants that stream Video and Audio. The participants are bound together in a Session.

The Session is the place where participants meet and interact. A Session is a unique entity, it exists once created, and when all participants leave it is erased and cannot be reused.

Once a Session is created it is possible to connect and manage local and remote streams (Audio and video).

Every Session has a unique `sessionId` to identify it which will allow various participants to join the specific Session.

## Connecting and managing streams <a href="#watchtogetheroverview-connectingandmanagingstreams" id="watchtogetheroverview-connectingandmanagingstreams"></a>

Managing streams to provide a good user experience is always a complex task.

To do that we are providing you with the tools to manage many aspects of the Session functionality and life-cycle.

The first step in creating a Watch Together experience is setting your own [Authentication Server](/watch-together-sdk/sscale-confluence-overview.md). The Authentication Server should be hosted in your domain (Customer enclave) for several reasons:

* To provide server-side access for configuration (The available functionality will increase with time)
* Security - you will be responsible to integrate the token distribution to Web and Mobile clients and make sure it is done in a correct and secure way

## Credentials

Setting up the Authentication server requires you to [login](https://media.sceenic.co/) to your private area and retrieve your API\_KEY and API\_SECRET

**Authentication flow:**

![](/files/-Lrnwj4D2sQuDgc3DofJ)

Once Authentication is set up you can retrieve a valid token to allow Web and Mobile clients to use the system.

**Acquiring a valid token:**

* `getToken`

![](/files/-Lrnwj4EDoiz-w-JB5KB)

When the token is acquired, you will be able to connect to a Session by either creating it or joining an existing Session.

* `connect`

**Join session" flow:**

![](/files/-Lrnwj4FuXPaPkyjvXeQ)

Managing the Watch Together experience will be done using the callbacks and methods below:

* `onError`
* `onConnected`
* `onDisconnected`
* `onParticipantJoined`
* `onParticipantLeft`
* `enableAudio`
* `enableVideo`
* `disableVideo`
* `disableAudio`

## Key terms <a href="#watchtogetheroverview-keyterms" id="watchtogetheroverview-keyterms"></a>

* Session- A one-time entity that binds together participants and allows management of participant behavior and experience
* Participant - a local or remote user that streams either Video, Audio or both
* Access token - a token that is made available for clients (Web, Mobile) so that they can authenticate against the service
* Streams - Audio or Video that every participant in the Session can share - at the moment, this object is not exposed
* Client SDKs - iOS, Android or Web SDKs which allows you to communicate with the Media Server Cluster (MSC) and create your custom experiences
* Authentication server - A server, that is hosted in your domain (Customer enclave), whose purpose is to request valid token from the MSC and distribute it to clients

## Resources <a href="#watchtogetheroverview-resources" id="watchtogetheroverview-resources"></a>

* Code samples
  * [Android Kotlin](https://bitbucket.org/svmt/samplewatchtogether-kotlin-2.0/src/master/)
  * [Android Java](https://bitbucket.org/svmt/samplewatchtogether-java-2.0/src/master/)
  * [iOS Swift](https://bitbucket.org/svmt/watchtogether-ios-swift/src/master/)
  * [iOS Objective-c-adapter](https://bitbucket.org/svmt/watchtogether-ios-objc/src/master/)
  * [Web JS sample application code](https://bitbucket.org/svmt/watchtogethersampleappjs/src/master/)
  * [React sample application code](https://bitbucket.org/svmt/watchtogethersampleappreact/src/master/)
* Tutorials
  * [Android tutorial](/watch-together-sdk/sscale-confluence-tutorials/sscale-confluence-android/android-java-kotlin-new.md)
  * [iOS Swift tutorial](/watch-together-sdk/sscale-confluence-tutorials/sscale-confluence-ios/ios-swift-objective-c-adapter-new.md)
  * [iOS Objective-c-adapter](broken://pages/-MX0xIHMVyBdarXcyh5S)
  * [Web (Re](broken://pages/-MNJHvBNmvrN0HRTYGVg)[ct/JS) tutorial](broken://pages/-MNJHvBNmvrN0HRTYGVg)

## Support

Need technical support? contact us at <Support@sceenic.co>.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.sceenic.co/watch-together-sdk/sscale-confluence-watch-together-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
