Last active
August 21, 2023 22:20
-
-
Save mcsee/fd1c07ce153817a5572cb3cb84ae1007 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mp3Converter { | |
convertToMp3(source, mimeType) { | |
if(mimeType.equals("audio/mpeg")) { | |
this.convertMpegToMp3(source) | |
} else if(mimeType.equals("audio/wav")) { | |
this.convertWavToMp3(source) | |
} else if(mimeType.equals("audio/ogg")) { | |
this.convertOggToMp3(source) | |
} else if(...) { | |
// Lots of new clauses | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment