parseInput = arg => {
        const [mime, codecStr] = arg.trim().split(';')
        let codecs = []
        if (codecStr && codecStr.includes('codecs="')) {
          codecs = codecStr
            .trim()
            .replace(`codecs="`, '')
            .replace(`"`, '')
            .trim()
            .split(',')
            .filter(x => !!x)
            .map(x => x.trim())
        }
        return {
          mime,
          codecStr,
          codecs
        }
      }
Input might look funky, we need to normalize it so e.g. whitespace isn't an issue for our spoofing.

@example
video/webm; codecs="vp8, vorbis"
video/mp4; codecs="avc1.42E01E"
audio/x-m4a;
audio/ogg; codecs="vorbis"
@param {String} arg