Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

289
Vistas
'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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda