getTrackType static method

int getTrackType(
  1. String? mimeType
)

Implementation

static int getTrackType(String? mimeType) {
  if (mimeType?.isNotEmpty == false) return Util.trackTypeUnknown;

  if (isAudio(mimeType)) return Util.trackTypeAudio;
  if (isVideo(mimeType)) return Util.trackTypeVideo;
  if (isText(mimeType) ||
      applicationCea608 == mimeType ||
      applicationCea708 == mimeType ||
      applicationMp4cea608 == mimeType ||
      applicationSubrip == mimeType ||
      applicationTtml == mimeType ||
      applicationTx3g == mimeType ||
      applicationMp4vtt == mimeType ||
      applicationRawcc == mimeType ||
      applicationVobsub == mimeType ||
      applicationPgs == mimeType ||
      applicationDvbsubs == mimeType) {
    return Util.trackTypeText;
  } else if ((applicationId3 == mimeType) ||
      (applicationEmsg == mimeType) ||
      (applicationScte35 == mimeType)) {
    return Util.trackTypeMetadata;
  } else if (applicationCameraMotion == mimeType) {
    return Util.trackTypeCameraMotion;
  } else {
    return getTrackTypeForCustomMimeType(mimeType);
  }
}