static getTimescale_(initSegment, mdhdOffset) {
    const dataView = new DataView(initSegment);
    const reader = new shaka.util.DataViewReader(
        dataView, shaka.util.DataViewReader.Endianness.BIG_ENDIAN);
    reader.skip(mdhdOffset);

    const size = reader.readUint32();
    const type = reader.readUint32();
    goog.asserts.assert(
        type == 0x6d646864,  // mdhd
        'initSegment does not contain an mdhd box at the specified offset.');

    const largesizePresent = size == 1;
    if (largesizePresent) {
      shaka.log.v2('\'largesize\' field is present.');
      reader.skip(8);  // Skip 'largesize' field.
    }

    const version = reader.readUint8();
    reader.skip(3);  // Skip 'flags' field.

    // Skip 'creation_time' and 'modification_time' fields.
    if (version == 0) {
      shaka.log.v2('mdhd box is version 0.');
      reader.skip(8);
    } else {
      shaka.log.v2('mdhd box is version 1.');
      reader.skip(16);
    }

    const timescale = reader.readUint32();
    return timescale;
  }
Gets the given initialization segment's movie header box's (mdhd box)
timescale parameter.

@param {!ArrayBuffer} initSegment
@param {number} mdhdOffset The byte offset of the initialization segment's
  mdhd box.
@return {number} The timescale parameter.
@private