# v2.0 Migration Guide

* Please check the updated [API Documentation](https://sync-api-doc.web.app/) for more details.
* Have a look at the SyncSDK version 2 implentation for reference [here](https://bitbucket.org/svmt/react-demo-sync/src/master/).

#### Improved Player decorator usage

SyncSDK now doesn't have any player-specific logic inside to allow for better control. `PlayerDecorator` example implementation for different players can be found [here](https://bitbucket.org/svmt/react-demo-sync/src/master/src/decorators).&#x20;

* `startSynchronize()` method of SyncSDK no longer accepts `useProgramDateTime` parameter
* `addPlayer()` method of SyncSDK was renamed to `addPlayerClient()`
* `addPlayerClient()` method of SyncSDK no longer accepts `clientType` parameter
* `PlayerDecorator`'s constructor now accepts player instance as a parameter which is stored in `this.player` for further usage by other methods
* `PlayerDecorator` no longer has `setPlayerInstance` method, player instance should now be passed in `PlayerDecorator`'s constructor
* `PlayerType, HtmlVideoPlayer, YoutubePlayer, Player` are no longer exported and can't be used
* `getOffset()` and `setOffset()` SyncSDK methods are no longer available

#### Improved error handling

* `createGroup()` and `startSynchronize()` methods of SyncSDK now return Promise which can be rejected with [SyncError](https://sync-api-doc.web.app/classes/SyncError.html)

#### Better synchronization

* `getPlaybackRate(`) method should now be implemented by `PlayerDecorator` subclasses and return current playback rate

#### Improved group control

* `unmute()` method should now be implemented by `PlayerDecorator` subclasses and unmute player when called
* `unmuteGroup()` method is now available in SyncSDK
* `setGroupPosition()` method of SyncSDK now accepts optional `delta` parameter. The parameter is in milliseconds and will be applied to the position returned by `PlayerDecorator.getCurrentPosition()` before sending to other clients

#### Unification of measurement units

SyncSDK now uses milliseconds for playback position in all methods.

* `getCurrentPosition()` method of `PlayerDecorator` should now return the position in milliseconds
* `fastSeekToPosition()` method of `PlayerDecorator` should now accept the position in milliseconds


---

# 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/tutorials/web/v2.0-migration-guide.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.
