static parseHeader(data, offset) {
    const ADTS = shaka.transmuxer.ADTS;
    // The protection skip bit tells us if we have 2 bytes of CRC data at the
    // end of the ADTS header
    const headerLength = ADTS.getHeaderLength(data, offset);
    if (offset + headerLength <= data.length) {
      // retrieve frame size
      const frameLength = ADTS.getFullFrameLength(data, offset) - headerLength;
      if (frameLength > 0) {
        return {
          headerLength,
          frameLength,
        };
      }
    }
    return null;
  }
@param {!Uint8Array} data
@param {!number} offset
@return {?{headerLength: number, frameLength: number}}