fileExtension property

String get fileExtension

Get the file extension for this MediaFormat.

Implementation

String get fileExtension {
  switch (this) {
    case MediaFormat.gif:
    case MediaFormat.m4a:
    case MediaFormat.mp3:
    case MediaFormat.mp4:
    case MediaFormat.webm:
    case MediaFormat.opus:
    case MediaFormat.eac3:
      return name;

    case MediaFormat.threeGP:
      return "3gp";

    case MediaFormat.oggVorbis:
      return "ogg";
  }
}