Inter-Home Media Synchronisation

 In
Wikis > DMApp Synchronisation > Inter-Home Media Synchronisation

In the inter-home synchronisation solution, the Timeline Service runs the master timeline. i.e. the experience timeline is the synchronisation timeline.

The WallClock Sync service is used for time synchronisation to establish a common time reference between the Timeline Service and devices participating in the experience.

The Synchronisation Service receives synchronisation timeline updates from the Timeline Service and disseminates these timing updates to all devices connected to it.
The Synchronisation Service TSMaster interface is used by the synchronisation master (the one running the master timeline); here, the synchronisation master is the Timeline Service.

A timeline update is a tuple of the type (WallClock time, synchronisation timeline position, speed).
It is also called a Control Timestamp.

The TSSlave interface of the Synchronisation Service is used to propagate timeline updates to the devices in the different homes.

These timeline updates are specified with respect to the synchronisation timeline i.e. the synchronisation timeline position included in the update is a timestamp from the experience timeline.

When a device such as a TV, laptop or companion device receive a timeline update from the synchronisation service. It needs to map the synchronisation timeline position to the corresponding time position on its media object’s timeline. To enable it to do this mapping from the synchronisation timeline to the media object (played in a DMAppComponent) timeline, a correlation timestamp is passed to the device by the Timeline Service.

inter_home_sync_design

There are two ways the 2IMMClient object can achieve synchrony of its DMAppComponents with the Synchronisation Service:

1. Timeline-Update Registration with the SyncKitClient API

As part of an experience bootstrap process, the web app creates receives a SyncURL from the Timeline Service (via the Layout Service).
It creates a CSASynchroniser object to allow it to receive timeline reports. It can register for to receive periodic reports of the current time on the experience timeline. The CSASynchroniser will essentially compute the current time on the experience timeline based on the Control Timestamps it receives from the Synchronisation Service.


// receive sync_url and correlation from Layout Service
function timelineUpdateCallback(ControlTimestamp)
{
// handle master timeline update
// convert timestamp from master timeline to DMAppComponent's timeline using Correlation
// ...
}
// choose a timeline to receive timeline-updates from the Synchronisation Service
var SET = "tag:rd.bbc.co.uk,2015-12-08:dvb:css:timeline:simple-elapsed-time:1000";
var synchroniser = objectFactory.createCSASynchroniser();
synchroniser.initCSASynchroniser(sync_url,SET);
synchroniser.registerForTimelineUpdates (timelineUpdateCallback);
synchroniser.enableSynchronisation();

2. Control a DMAppComponent using a SyncController object

As part of an experience bootstrap process, the web app (or 2IMMClient object in the figure) creates receives a SyncURL from the Timeline Service (via the Layout Service). It creates a CSASynchroniser object to allow it to receive timeline reports. Once the CSASynchroniser is enabled, the web app creates a SyncController object to attach to each of its DMAppComponent objects.
The SynController will periodically fire a timeUpdate event to notify the DMAppComponent object about its expected time position. The DMAppComponent object compares its current media time against the expected time position and adapts its playback to catchup (slows down, speeds up or seeks to a new position).

// assume a DMAppComponent object dmappc
var synchroniser = objectFactory.createCSASynchroniser();
synchroniser.initCSASynchroniser(sync_url,SET);
synchroniser.enableSynchronisation();
var syncControllerObject = synchroniser.createSyncController(correlation);
dmappc.syncController = syncControllerObject;

Recent Posts
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search