Timingsrc v3 Documentation

Timingsrc is hosted at GitHub.

Timingsrc

A programming model for time sensitive Web applications, based on the Timing Object. Precise timing, synchronization and control enabled for single-device and multi-device Web applications.

Welcome to timingsrc!

Timingsrc is a programming model for precisely timed Web applications. The model is based on the Timing Object, which allows precise synchronization and control across multiple media sources, media types, UI components and media frameworks.

For online timing support, connect an online Timing Provider to the Timing Object. The Shared Motion Timing Provider is hosted online and provides millisecond precise timing globally for Web clients and is open for non-commercial experimentation.

Need to synchronize HTML5 video?
Check out Demo MediaSync
Need to synchronize timed data?
Check out Demo Sequencer Point Mode or Demo Sequencer Interval Mode
Need to go online?
Check out Demo TimingProvider

Timing Object

let to = new TimingObject();

The TimingObject is the central concept of the timingsrc programming model. In essence, the timingobject is a timeline with an API for control. If you set velocity, the position on the timeline will increase in time according to that velocity. The timing object additionally supports behavior like time-shifting, different velocities (including backwards), and acceleration.

Timing Converter

let c = new SkewConverter(to, 4.0);

A TimingConverter is a special kind of timing objects that depends on a parent timing object. Timing converters are useful when you need an alternative representations for a timing object. For instance, timing converters may be used to skew or scale the timeline.

Timing Provider

let to = new TimingObject({provider: timing_provider});

Timing objects may be connected to remote timing resources, i.e. timing resources which live outside the browsing context, for instance hosted by an online timing service. This is done by initializing the timing object with a TimingProvider. Timing providers are proxy objects to external timing resources, allowing timing objects to be used across different service implementations for timing resources.

Dataset and Sequencer

let ds = new Dataset();
let s = new Sequencer(ds, to);

Consistent playback of timed data is a key use case for the timing object. This is achieved using Dataset and Sequencer. Dataset allows any type of time data to be represented as cues. Sequencers dynamically provides the set of active cues, always consistent with the timing object. Both dataset and sequencer implement the :ref`cuecollection` interface.

MediaSync

let ms = new MediaSync(to, video_element);

Another important use case is consistent playback of HTML5 audio and video. This is achieved by connecting the video element to the timing object, using the MediaSync wrapper.

Indices and tables