forked from haltersweb/Accessibility
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b4eac7
commit 11b7b19
Showing
3 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*global | ||
jQuery, NAME, console | ||
*/ | ||
/** | ||
* WebVTT player | ||
*/ | ||
(function ($, NAME, console) { | ||
'use strict'; | ||
var videoElement = document.querySelector('video'); | ||
var textTracks = videoElement.textTracks; | ||
var textTrack = textTracks[0]; | ||
var $ariaContainer = $('[aria-live="polite"]'); | ||
textTrack.oncuechange = function () { | ||
//"this" is a textTrack | ||
if (this.activeCues[0]) { | ||
console.log(this.activeCues[0].text); | ||
NAME.access.announcements($ariaContainer, this.activeCues[0].text); | ||
} | ||
}; | ||
}(jQuery, NAME, console)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
WEBVTT | ||
00:00:21.683 --> 00:00:23.183 | ||
00:00:21.683 --> 00:00:22.000 | ||
Anders Johnson, USA, prepares to jump. | ||
|
||
00:00:25.783 --> 00:00:27.283 | ||
00:00:25.783 --> 00:00:26.000 | ||
Johnson starts down ramp. | ||
|
||
00:00:30.783 --> 00:00:32.283 | ||
00:00:30.783 --> 00:00:31.000 | ||
Johnson launches from ramp. | ||
|
||
00:00:31.283 --> 00:00:33.783 | ||
00:00:31.283 --> 00:00:32.000 | ||
55.2 miles per hour. | ||
|
||
00:00:34.433 --> 00:00:36.933 | ||
00:00:34.433 --> 00:00:35.000 | ||
Johnson lands. | ||
|
||
00:00:42.250 --> 00:00:44.750 | ||
00:00:42.250 --> 00:00:43.000 | ||
95.5 meters jumped. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters