function getStartDTS(initData, fmp4) {
  // we need info from two children of each track fragment box
  return findBox(fmp4, ['moof', 'traf']).reduce(function (result, traf) {
    var tfdt = findBox(traf, ['tfdt'])[0];
    var version = tfdt.data[tfdt.start];
    var start = findBox(traf, ['tfhd']).reduce(function (result, tfhd) {
      // get the track id from the tfhd
      var id = readUint32(tfhd, 4);
      var track = initData[id];

      if (track) {
        var baseTime = readUint32(tfdt, 4);

        if (version === 1) {
          baseTime *= Math.pow(2, 32);
          baseTime += readUint32(tfdt, 8);
        } // assume a 90kHz clock if no timescale was specified


        var scale = track.timescale || 90e3; // convert base time to seconds

        var startTime = baseTime / scale;

        if (isFinite(startTime) && (result === null || startTime < result)) {
          return startTime;
        }
      }

      return result;
    }, null);

    if (start !== null && isFinite(start) && (result === null || start < result)) {
      return start;
    }

    return result;
  }, null) || 0;
}
Determine the base media decode start time, in seconds, for an MP4
fragment. If multiple fragments are specified, the earliest time is
returned.

The base media decode time can be parsed from track fragment
metadata:
```
moof > traf > tfdt.baseMediaDecodeTime
```
It requires the timescale value from the mdhd to interpret.

@param initData {InitData} a hash of track type to timescale values
@param fmp4 {Uint8Array} the bytes of the mp4 fragment
@return {number} the earliest base media decode start time for the
fragment, in seconds