Web - TypeScript/React
Last updated
Was this helpful?
Last updated
Was this helpful?
Follow this step-by-step tutorial to implement the video playback Synchronization SDK.
While the client-side SDK will take care of most of the functionality, in order to make this sample application work, you will need to use the API_KEY provided to you.
A Sceenic account
Code Editor( , )
Access key for sync SDK.
An Access Token
is needed in order to allow a client to connect to a sync group.
Note: It is important that the client application does not request an Access Token directly from the frontend. By doing that you risk exposing the API_TOKEN and API_SECRET.
A successful response will look like that:
Note: Every Sync Token corresponds to one specific sync group only. To allow two different clients to connect to the same group, the clients need to use the same Access Token
.
When moving from the Sandbox environment to production you will need to implement your own authentication server. This server will supply the various clients (Web, Android, and iOS) with a valid Access Token so that they can use the service.
For that you will need:
Your own working authentication server
To create a project we recommended using the following stack: React + TypeScript + SyncSDK.
Create an empty React + Typescript project
Create .npmrc file. In the project’s root folder
Put your Access Token
inside //registry.npmjs.org/:_authToken=YOUR_ACCESS_TOKEN
.
Install Sync SDK via npm i @sscale/syncsdk
.
Add the following import
Create player instance (it is possible to use a simple HTML player)
Create Sync SDK instance
Connect to group or create new
Connect HTML5 video client to the SDK
Enable/disable synchronization
In addition, have a look at the extra features available for you:
Chat
Remote control
Sync process visualization
The Access Token
is a JWT token - more about jwt you can read - .
You can get your API_KEY and API_SECRET in your private area, .
API_KEY, and API_SECRET - can be retrieved in your private area once you
For more information on NPM installation look .
Implement player decorator by extending PlayerDecorator
and implementing required methods. PlayerDecorator
example implementation for different players can be found . Check API of PlayerDecorator
.
Have a look at the to see all the features and API of sync instance .
Need technical support? contact us at .