Home HelloWorld! Doc API Examples GitHub

Example window sequencing mode (page-local)

The Sequencer may also provide enter and exit events based on a moving window. Window endpoints are implemented by two timing objects. The two endpoints may therefore be controlled independently, though in this demo they are not. Instead, SkewConverter is used to skew a root timing object (by -5 and +4) to create two new (but dependent) timingobjects. Window sequencing may be helpful for timed prefetching, visualization of a sliding window of timed data, etc.


Active Interval : [ , ]


 // Timing Object
var to = new TIMINGSRC.TimingObject({range:[0,52]});
var toA = new TIMINGSRC.SkewConverter(to, -5.0);
var toB = new TIMINGSRC.SkewConverter(to, 4.0);
// Sequencer
var s = new TIMINGSRC.Sequencer(toA, toB);    

// Load Data
Object.keys(data).forEach(function (key) {
  s.addCue(key, new TIMINGSRC.Interval(data[key].start, data[key].end));

// Register Handlers
s.on("change", function (e) {
  var el =  document.getElementById(e.key);
s.on("remove", function (e) {
  var el = document.getElementById(e.key);