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

174
Views
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
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!