# SynchListener

The Interface SyncListener invokes all the events from the SyncSdk.

The SyncListener is created together with the SyncSdk instance.

## Interface Callbacks Summary <a href="#interface-callbacks-summary" id="interface-callbacks-summary"></a>

| Type  | Methods                                                                                            | Parameters                                                                                                                                                                     |
| ----- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| void  | onClientList(syncClients: List\<SyncClient>) - List of all clients in the synchronization group    | <ul><li>syncClients- The list of connected clients in the group</li><li>SyncClient - data class. It contains id, name, isLeader and isLocal properties of the client</li></ul> |
| void  | onSetPlaybackRate(rate: Float) - Set playback rate                                                 | <ul><li>rate - Playback rate</li></ul>                                                                                                                                         |
| void  | onPlaybackFromPosition(psition: Long) - Playback from position, similar to seek to the position    | <ul><li>position - The value is in ms. The point from which the Player should start to play</li></ul>                                                                          |
| Long  | onGetPlayerPosition(): Long - Get player position                                                  | <ul><li>position - The value is in ms. The actual Player current position, must be implemented and return a value</li></ul>                                                    |
| Float | onGetPlaybackRate(): Float - Get playback rate                                                     | <ul><li>rate - The actual Player rate/speed. Must be implemented and return a value</li></ul>                                                                                  |
| void  | onSyncInfo(syncInfo: SyncInfo) - Synchronization infomration about delta and accuracy              | <ul><li>syncInfo - The Object contains the synchronization’s delta and accuracy information</li></ul>                                                                          |
| void  | onDisconnected() - The client has been disconnected from the group. All connections will be closed |                                                                                                                                                                                |


---

# 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/synchronization-sdk/api-references-synch-sdk/android-reference/synchlistener.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.
