stsd_(streamInfo) {
    const Mp4Generator = shaka.util.Mp4Generator;
    const ContentType = shaka.util.ManifestParserUtils.ContentType;
    let audioCodec = 'aac';
    if (streamInfo.codecs.includes('mp3')) {
      audioCodec = 'mp3';
    } else if (streamInfo.codecs.includes('ac-3')) {
      const device = shaka.device.DeviceFactory.getDevice();
      if (device.requiresEC3InitSegments()) {
        audioCodec = 'ec-3';
      } else {
        audioCodec = 'ac-3';
      }
    } else if (streamInfo.codecs.includes('ec-3')) {
      audioCodec = 'ec-3';
    } else if (streamInfo.codecs.includes('opus')) {
      audioCodec = 'opus';
    }
    let bytes = new Uint8Array([]);
    switch (streamInfo.type) {
      case ContentType.VIDEO:
        if (streamInfo.codecs.includes('avc1')) {
          bytes = this.avc1_(streamInfo);
        } else if (streamInfo.codecs.includes('hvc1')) {
          bytes = this.hvc1_(streamInfo);
        }
        break;
      case ContentType.AUDIO:
        if (audioCodec == 'mp3') {
          bytes = this.mp3_(streamInfo);
        } else if (audioCodec == 'ac-3') {
          bytes = this.ac3_(streamInfo);
        } else if (audioCodec == 'ec-3') {
          bytes = this.ec3_(streamInfo);
        } else if (audioCodec == 'opus') {
          bytes = this.opus_(streamInfo);
        } else {
          bytes = this.mp4a_(streamInfo);
        }
        break;
    }
    return Mp4Generator.box('stsd', Mp4Generator.STSD_, bytes);
  }
Generate a STSD box

@param {shaka.util.Mp4Generator.StreamInfo} streamInfo
@return {!Uint8Array}
@private