Motion

This client-side JavaScript library provides access to Shared Motions hosted by Motion Corporation. Shared Motion is a generic programming concept for precise, distributed temporal control across the Internet.

API Description

Motion API

Overview

Shared Motion introduces shared (i.e. synchronized) applications clocks into the Web domain, without making the assumption of synchronized system clocks. Instead, ad-hoc, application level clock synchronisation is performed every time a client connects to an online timing resource (i.e., motion). This guarantees availability of synchronized clocks for application logic on any connected device. The precision of such application-level clocks may be slightly coarser than expected for lower-level synchronization of system-clocks (i.e. millisecond as opposed to microsecond) Still, millisecond precision is suitable for the Web domain in general, and Mediascape use cases in particular.

In addition to clock synchronization, shared motion provides a programming model where applications may define and take direction from many different motions and interact with them in order to change temporal aspects of the application. Efficient, low latency propagation of update requests and change notifications is also encapsulated by the same mechanism.

Shared Motion is an object that describes how an abstract point moves (in time) along a line. The motion describes in detail the position of the point, its velocity and acceleration at a given time. This information is represented by a vector [position, velocity, acceleration, time]. Shared motion is a simple concept encapsulating and solving four important technical challenges in multi-device applications;

  • Distributed media control (i.e. remote controlling)
  • Distributed simultaneity.
  • Distributed timing (i.e. controlling precisely when stuff happens)
  • Interoperability and Extensibility.

Shared Motion has been proposed for Web standardization, by MediaScape partners through the W3C Multi-device Timing Community Group, as basis for a new multi-device timing model in the Web. The central concept in this inititive is the Timing Object, which is based on Shared Motion.

API Documentation

Examples

Here you can find an example of implementation:

Code example