You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My site uses AblePlayer in a Drupal environment. When using AblePlayer for YouTube videos, the library does not always identify an external caption track.
In this situation:
there is no locally-hosted VTT caption file
the YouTube video has captions that are hosted on YouTube
the externally-hosted captions usually appear on the video (about 3 out of 4 times). These can be toggled on/off with the "CC" button
about 1 out of 4 times, no captions appear. The "CC" caption toggle button does not appear
Adding this code to ableplayer.js has remediated the situation for me:
In AblePlayer.prototype.getYouTubeCaptionTracks (line 6262):
if(!triedAgain) {
console.log('searching again for captions');
var triedAgain = true;
this.getYouTubeCaptionTracks();
}
For my own timedtext downloader, I found sometimes up to 3 retries are needed. I put an increasing pause between retries to make it seem like I was not a bot.
Activity
tomByrer commentedon Jun 10, 2025
For my own timedtext downloader, I found sometimes up to 3 retries are needed. I put an increasing pause between retries to make it seem like I was not a bot.