toMediaFormat method

MediaFormat toMediaFormat()

Implementation

MediaFormat toMediaFormat() {
  switch (this) {
    case 'mp3':
      return MediaFormat.mp3;
    case 'mp4':
      return MediaFormat.mp4;
    case 'wav':
      return MediaFormat.wav;
    case 'flac':
      return MediaFormat.flac;
    case 'ogg':
      return MediaFormat.ogg;
    case 'amr':
      return MediaFormat.amr;
    case 'webm':
      return MediaFormat.webm;
  }
  throw Exception('$this is not known in enum MediaFormat');
}