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

173
Vistas
HTML5 video: Get textTracks from youtube, netflix, etc when there are no children <track> elements

Looking at the documentation for HTMLMediaElement.textTracks, it looks like subtitle/caption tracks should be nested under <video> elements. This allows you to call .textTracks on a video reference to get access to subtitles/captions.

I've found a number of smaller sites where this works and is setup as expected (ie: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track). However, on bigger sites like Netflix and Youtube, this doesn't appear to work. In fact, their video elements typically have no children at all from what I can see.

This returns an empty list for a call like document.querySelector("video").textTracks: enter image description here

Is there not a standard way of handling subtitles/captions? Can someone explain why big sites do this differently from the documentation above, and if there's another easy way to access their subtitles/captions? I'd like to build a browser extension that reacts based off of the captions in a video.

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