toIndex_(type, ts) {
    return Math.floor((ts - this.drift_) /
                      this.segmentData[type].segmentDuration);
  }
@param {string} type
@param {number} ts
@return {number} The index of the segment which contains the given
    timestamp.
@private