Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

290
Views
'setCodecPreferences' function 'RTCRtpTransceiver' is removed in TypeScript Version 4.5.5

The following code was compiling successfully on TypeScript version 3.5.0

private SetCodecPreferences (transceiver: RTCRtpTransceiver):
void
{
    transceiver.setCodecPreferences(PREFERRED_VIDEO_CODECS); //PREFERRED_VIDEO_CODECS is of type RTCRtpCodecCapability[]
} 

After updating to TypeScript version 4.5.5, we are getting the below error message

error TS2339: Property 'setCodecPreferences' does not exist on type 'RTCRtpTransceiver'

TypeScript 4.4 libdom changes suggest that function 'setCodecPreferences' is removed in TypeScript 4.4 but not finding any reason. enter image description here

I have 2 questions

  1. How to fix the above issue or Do we have any alternatives? other than (transceiver as any)

  2. Is there any way where we can build code based on 'TypeScript' version i.e. if 'Typescript' version is bellow 4.4 execute specific lines of code, else other.

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

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!