resetDuration method

dynamic resetDuration()

Implementation

resetDuration() {
  var tracks = this.tracks;
  num duration = 0;

  for (var i = 0, n = tracks.length; i != n; ++i) {
    var track = this.tracks[i];

    duration = Math.max(duration, track.times[track.times.length - 1]);
  }

  this.duration = duration;

  return this;
}