function getAllSegmentKeys(manifest) {
      const keys = new Set();

      for (const stream of manifest.streams) {
        for (const segment of stream.segments) {
          if (segment.initSegmentKey != null) {
            keys.add(segment.initSegmentKey);
          }

          keys.add(segment.dataKey);
        }
      }

      return Array.from(keys);
    }
Get the keys for each segment. This will include the init segments.

@param {shaka.extern.ManifestDB} manifest
@return {!Array<number>}