Is there a way to check what WebRTC audio and video codecs are supported by the browser?
I have searched around but I can't seem to find a solution.
UPDATE
To be more precise, I want to be able to get a list of browser-supported audio and video codecs automatically.
Something like the pseudo-code below:
const supportedAudioCodecs = getBrowserAudioCodecs()
// supportedAudioCodecs => { 'mp3', ... }
const supportedVideoCodecs = getBrowserVideoCodecs()
// supportedVideoCodecs => { 'mp4', ... }
I don't want to have to check if a specific codec exists. I just want to be able to get the supported ones. Since these things change, I always want to have updated supported codecs from the browser in some way.
I hope this is clearer.