Skip to content

Commit 4290684

Browse files
committed
Remove the getYouTubeTimedTextUrl function
The API no longer exists, and the Git history is sufficient documentation.
1 parent 3ff9e92 commit 4290684

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

‎scripts/youtube.js‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -305,22 +305,6 @@
305305
return promise;
306306
};
307307

308-
AblePlayer.prototype.getYouTubeTimedTextUrl = function (youTubeId, trackName, trackLang) {
309-
310-
// return URL for retrieving WebVTT source via YouTube's timedtext API
311-
// Note: This API seems to be undocumented, and could break anytime
312-
// UPDATE: Google removed this API on November 10, 2021
313-
// This function is no longer called, but is preserved here for reference
314-
var url = 'https://www.youtube.com/api/timedtext?fmt=vtt';
315-
url += '&v=' + youTubeId;
316-
url += '&lang=' + trackLang;
317-
// if track has a value in the name field, it's *required* in the URL
318-
if (trackName !== '') {
319-
url += '&name=' + trackName;
320-
}
321-
return url;
322-
};
323-
324308
AblePlayer.prototype.getYouTubePosterUrl = function (youTubeId, width) {
325309

326310
// return a URL for retrieving a YouTube poster image

0 commit comments

Comments
 (0)