• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

192
Views
How can I detect WebRTC supported video and audio codecs in the browser using JavaScript?

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.

about 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Not really an out of the box answer, but I think this link is quite usefull : codec capabilities

There is a 10 mins video, explaining the code used to find the codecs supported and some good comments. You can also find there the fiddle link for the code they are using.

The code generate a list of all codecs supported on the browser on send and receive end, not the same at my surprise. I am very new to all of this ^^

In the video/fiddle they are mainly talking about video codec capabilities but it is really easy to adapt this for audio codec too You can see in the script.js file of this link

I tested it on different browser / hardware it seems coherent.

Hope it helps

about 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error