# 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 |                                                                                                                                                                                |
