getChapters(language) {
    shaka.Deprecate.deprecateFeature(5,
        'getChapters',
        'Please use an getChaptersAsync.');
    if (!this.externalChaptersStreams_.length) {
      return [];
    }
    const LanguageUtils = shaka.util.LanguageUtils;
    const inputLanguage = LanguageUtils.normalize(language);
    const chapterStreams = this.externalChaptersStreams_
        .filter((c) => LanguageUtils.normalize(c.language) == inputLanguage);
    if (!chapterStreams.length) {
      return [];
    }
    const chapters = [];
    const uniqueChapters = new Set();
    for (const chapterStream of chapterStreams) {
      if (chapterStream.segmentIndex) {
        chapterStream.segmentIndex.forEachTopLevelReference((ref) => {
          const title = ref.getUris()[0];
          const id = ref.startTime + '-' + ref.endTime + '-' + title;
          /** @type {shaka.extern.Chapter} */
          const chapter = {
            id,
            title,
            startTime: ref.startTime,
            endTime: ref.endTime,
          };
          if (!uniqueChapters.has(id)) {
            chapters.push(chapter);
            uniqueChapters.add(id);
          }
        });
      }
    }
    return chapters;
  }
This returns the list of chapters.

@param {string} language
@return {!Array<shaka.extern.Chapter>}
@export