Skip to content

Commit 5d6ba41

Browse files
committed
Major update to YouTube caption retrieval
1 parent 46de45c commit 5d6ba41

18 files changed

Lines changed: 2557 additions & 1334 deletions

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,10 @@ on the `<video>` element. The value of this attribute must be the 11-character Y
518518
of the described version. If users turn on the Description button on their player controller,
519519
the described version of the video will be loaded instead of the non-described version.
520520

521-
Starting with 2.3.1, a YouTube Data API key is required for playing YouTube videos in Able Player.
521+
Versions 2.3.1 through 3.2.12 required a YouTube Data API key for retrieving caption data from YouTube.
522522
Get a YouTube Data API key by registering your application at the [Google Developer Console][].
523523
For complete instructions, see [Google's Getting Started page]. Note: All that's needed for
524-
playing YouTube videos in Able Player is a simple API key, **not** OAuth 2.0.
524+
playing YouTube videos in Able Player is a simple API key, **not** OAuth 2.0.
525525

526526
After obtaining your YouTube Data API Key, insert the following code into your HTML page:
527527

@@ -536,18 +536,16 @@ After obtaining your YouTube Data API Key, insert the following code into your H
536536
<script src="http://apis.google.com/js/client.js?onload=initGoogleClientApi"></script>
537537
```
538538

539-
If captions or subtitles are available on the YouTube video, these will be displayed for all users,
540-
and can be controlled using Able Player's CC button. Alternatively, if you include your own
541-
`<track kind="captions">` elements, these will be used *instead of* the captions on YouTube.
539+
Starting with version 3.2.13, Able Player no longer requires a YouTube Data API key in order to access caption tracks from YouTube. However, an API key is still encouraged, as it relies on well-documented methods from Google,
540+
whereas operating without an API key relies on methods that are not well documented, and therefore
541+
may not be reliable.
542542

543-
The advantage of managing captions entirely on YouTube is that you only have to manage them in
544-
one place, and they're available everywhere your YouTube video is played.
543+
Also new in 3.2.13, Able Player now handles YouTube captions in the same way it handles HTML `<track kind="captions">` elements. The display of the caption text can be customized via the Preferences menu, and the caption text is used to automatically create an interactive transcript.
545544

546-
The advantages of including captions locally in `<track>` elements include:
545+
YouTube does not currently support chapters, descriptions, and metadata tracks. With Able Player, these features can be added to the video using HTML `<track>` elements, even if the video's captions and subtitles are stored on YouTube. The advantage of managing captions entirely on YouTube is that you only have to manage them in one place, and they're available everywhere your YouTube video is played.
546+
547+
If your video has HTML `<track>` elements for captions and subtitles, these will be used *instead of* the captions on YouTube.
547548

548-
- Able Player can repurpose the captions into an interactive transcript
549-
- The captions are searchable using the **data-search** attribute
550-
- Users can control how the captions are displayed (e.g., color, background color, opacity)
551549

552550
Adjustable playback rate is available for some videos.
553551

0 commit comments

Comments
 (0)