static parseWebmContainer_(initData) {
    const parser = new shaka.dash.EbmlParser(initData);

    // Check that the WebM container data starts with the EBML header, but
    // skip its contents.
    const ebmlElement = parser.parseElement();
    if (ebmlElement.id != shaka.dash.WebmSegmentIndexParser.EBML_ID) {
      shaka.log.error('Not an EBML element.');
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.MEDIA,
          shaka.util.Error.Code.WEBM_EBML_HEADER_ELEMENT_MISSING);
    }

    const segmentElement = parser.parseElement();
    if (segmentElement.id != shaka.dash.WebmSegmentIndexParser.SEGMENT_ID) {
      shaka.log.error('Not a Segment element.');
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.MEDIA,
          shaka.util.Error.Code.WEBM_SEGMENT_ELEMENT_MISSING);
    }

    // This value is used as the initial offset to the first referenced segment.
    const segmentOffset = segmentElement.getOffset();

    // Parse the Segment element to get the segment info.
    const segmentInfo = shaka.dash.WebmSegmentIndexParser.parseSegment_(
        segmentElement);
    return {
      segmentOffset: segmentOffset,
      timecodeScale: segmentInfo.timecodeScale,
      duration: segmentInfo.duration,
    };
  }
Parses a WebM container to get the segment's offset, timecode scale, and
duration.

@param {BufferSource} initData
@return {{segmentOffset: number, timecodeScale: number, duration: number}}
  The segment's offset in bytes, the segment's timecode scale in seconds,
  and the duration in seconds.
@private