wai-website-theme 1.3.1 → 1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/different.html +2 -1
- data/_includes/external.html +2 -1
- data/_includes/header.html +2 -1
- data/_includes/menuitem.html +6 -2
- data/_includes/peoplelist.html +21 -0
- data/_includes/prevnext-navigation.html +56 -0
- data/_includes/{prevnext.html → prevnext-order.html} +9 -0
- data/_includes/translation-note-msg.html +5 -3
- data/_includes/video-player.html +2 -2
- data/_layouts/default.html +8 -1
- data/_layouts/news.html +7 -1
- data/_layouts/policy.html +7 -1
- data/_layouts/sidenav.html +8 -1
- data/_layouts/sidenavsidebar.html +8 -1
- data/assets/ableplayer/Gruntfile.js +2 -1
- data/assets/ableplayer/README.md +158 -85
- data/assets/ableplayer/build/ableplayer.dist.js +15445 -13823
- data/assets/ableplayer/build/ableplayer.js +15445 -13823
- data/assets/ableplayer/build/ableplayer.min.css +1 -2
- data/assets/ableplayer/build/ableplayer.min.js +3 -10
- data/assets/ableplayer/package-lock.json +944 -346
- data/assets/ableplayer/package.json +8 -8
- data/assets/ableplayer/scripts/ableplayer-base.js +515 -524
- data/assets/ableplayer/scripts/browser.js +158 -158
- data/assets/ableplayer/scripts/buildplayer.js +1750 -1682
- data/assets/ableplayer/scripts/caption.js +424 -401
- data/assets/ableplayer/scripts/chapters.js +259 -259
- data/assets/ableplayer/scripts/control.js +1831 -1594
- data/assets/ableplayer/scripts/description.js +333 -256
- data/assets/ableplayer/scripts/dialog.js +145 -145
- data/assets/ableplayer/scripts/dragdrop.js +746 -749
- data/assets/ableplayer/scripts/event.js +875 -696
- data/assets/ableplayer/scripts/initialize.js +819 -912
- data/assets/ableplayer/scripts/langs.js +979 -743
- data/assets/ableplayer/scripts/metadata.js +124 -124
- data/assets/ableplayer/scripts/misc.js +170 -137
- data/assets/ableplayer/scripts/preference.js +904 -904
- data/assets/ableplayer/scripts/search.js +172 -172
- data/assets/ableplayer/scripts/sign.js +82 -78
- data/assets/ableplayer/scripts/slider.js +449 -448
- data/assets/ableplayer/scripts/track.js +409 -309
- data/assets/ableplayer/scripts/transcript.js +684 -595
- data/assets/ableplayer/scripts/translation.js +63 -67
- data/assets/ableplayer/scripts/ttml2webvtt.js +85 -85
- data/assets/ableplayer/scripts/vimeo.js +448 -0
- data/assets/ableplayer/scripts/volume.js +395 -380
- data/assets/ableplayer/scripts/vts.js +1077 -1077
- data/assets/ableplayer/scripts/webvtt.js +766 -763
- data/assets/ableplayer/scripts/youtube.js +695 -478
- data/assets/ableplayer/styles/ableplayer.css +54 -46
- data/assets/ableplayer/translations/nl.js +54 -54
- data/assets/ableplayer/translations/pt-br.js +311 -0
- data/assets/ableplayer/translations/tr.js +311 -0
- data/assets/ableplayer/translations/zh-tw.js +1 -1
- data/assets/css/style.css +1 -1
- data/assets/css/style.css.map +1 -1
- data/assets/images/icons.svg +5 -5
- data/assets/scripts/main.js +7 -0
- data/assets/search/tipuesearch.js +3 -3
- metadata +8 -3
|
@@ -1,263 +1,263 @@
|
|
|
1
1
|
(function ($) {
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
3
|
+
AblePlayer.prototype.populateChaptersDiv = function() {
|
|
4
|
+
|
|
5
|
+
var headingLevel, headingType, headingId, $chaptersHeading,
|
|
6
|
+
$chaptersList;
|
|
7
|
+
|
|
8
|
+
if ($('#' + this.chaptersDivLocation)) {
|
|
9
|
+
this.$chaptersDiv = $('#' + this.chaptersDivLocation);
|
|
10
|
+
this.$chaptersDiv.addClass('able-chapters-div');
|
|
11
|
+
|
|
12
|
+
// add optional header
|
|
13
|
+
if (this.chaptersTitle) {
|
|
14
|
+
headingLevel = this.getNextHeadingLevel(this.$chaptersDiv);
|
|
15
|
+
headingType = 'h' + headingLevel.toString();
|
|
16
|
+
headingId = this.mediaId + '-chapters-heading';
|
|
17
|
+
$chaptersHeading = $('<' + headingType + '>', {
|
|
18
|
+
'class': 'able-chapters-heading',
|
|
19
|
+
'id': headingId
|
|
20
|
+
}).text(this.chaptersTitle);
|
|
21
|
+
this.$chaptersDiv.append($chaptersHeading);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
this.$chaptersNav = $('<nav>');
|
|
25
|
+
if (this.chaptersTitle) {
|
|
26
|
+
this.$chaptersNav.attr('aria-labelledby',headingId);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.$chaptersNav.attr('aria-label',this.tt.chapters);
|
|
30
|
+
}
|
|
31
|
+
this.$chaptersDiv.append(this.$chaptersNav);
|
|
32
|
+
|
|
33
|
+
// populate this.$chaptersNav with a list of chapters
|
|
34
|
+
this.updateChaptersList();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
AblePlayer.prototype.updateChaptersList = function() {
|
|
39
|
+
|
|
40
|
+
var thisObj, cues, $chaptersList, c, thisChapter,
|
|
41
|
+
$chapterItem, $chapterButton, buttonId, hasDefault,
|
|
42
|
+
getClickFunction, $clickedItem, $chaptersList, thisChapterIndex;
|
|
43
|
+
|
|
44
|
+
thisObj = this;
|
|
45
|
+
|
|
46
|
+
if (!this.$chaptersNav) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (typeof this.useChapterTimes === 'undefined') {
|
|
51
|
+
if (this.seekbarScope === 'chapter' && this.selectedChapters.cues.length) {
|
|
52
|
+
this.useChapterTimes = true;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.useChapterTimes = false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (this.useChapterTimes) {
|
|
60
|
+
cues = this.selectedChapters.cues;
|
|
61
|
+
}
|
|
62
|
+
else if (this.chapters.length >= 1) {
|
|
63
|
+
cues = this.chapters[0].cues;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
cues = [];
|
|
67
|
+
}
|
|
68
|
+
if (cues.length > 0) {
|
|
69
|
+
$chaptersList = $('<ul>');
|
|
70
|
+
for (c = 0; c < cues.length; c++) {
|
|
71
|
+
thisChapter = c;
|
|
72
|
+
$chapterItem = $('<li></li>');
|
|
73
|
+
$chapterButton = $('<button>',{
|
|
74
|
+
'type': 'button',
|
|
75
|
+
'val': thisChapter
|
|
76
|
+
}).text(this.flattenCueForCaption(cues[thisChapter]));
|
|
77
|
+
|
|
78
|
+
// add event listeners
|
|
79
|
+
getClickFunction = function (time) {
|
|
80
|
+
return function () {
|
|
81
|
+
thisObj.seekTrigger = 'chapter';
|
|
82
|
+
$clickedItem = $(this).closest('li');
|
|
83
|
+
$chaptersList = $(this).closest('ul').find('li');
|
|
84
|
+
thisChapterIndex = $chaptersList.index($clickedItem);
|
|
85
|
+
$chaptersList.removeClass('able-current-chapter').attr('aria-selected','');
|
|
86
|
+
$clickedItem.addClass('able-current-chapter').attr('aria-selected','true');
|
|
87
|
+
// Need to updateChapter before seeking to it
|
|
88
|
+
// Otherwise seekBar is redrawn with wrong chapterDuration and/or chapterTime
|
|
89
|
+
thisObj.updateChapter(time);
|
|
90
|
+
thisObj.seekTo(time);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
$chapterButton.on('click',getClickFunction(cues[thisChapter].start)); // works with Enter too
|
|
94
|
+
$chapterButton.on('focus',function() {
|
|
95
|
+
$(this).closest('ul').find('li').removeClass('able-focus');
|
|
96
|
+
$(this).closest('li').addClass('able-focus');
|
|
97
|
+
});
|
|
98
|
+
$chapterItem.on('hover',function() {
|
|
99
|
+
$(this).closest('ul').find('li').removeClass('able-focus');
|
|
100
|
+
$(this).addClass('able-focus');
|
|
101
|
+
});
|
|
102
|
+
$chapterItem.on('mouseleave',function() {
|
|
103
|
+
$(this).removeClass('able-focus');
|
|
104
|
+
});
|
|
105
|
+
$chapterButton.on('blur',function() {
|
|
106
|
+
$(this).closest('li').removeClass('able-focus');
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// put it all together
|
|
110
|
+
$chapterItem.append($chapterButton);
|
|
111
|
+
$chaptersList.append($chapterItem);
|
|
112
|
+
if (this.defaultChapter === cues[thisChapter].id) {
|
|
113
|
+
$chapterButton.attr('aria-selected','true').parent('li').addClass('able-current-chapter');
|
|
114
|
+
this.currentChapter = cues[thisChapter];
|
|
115
|
+
hasDefault = true;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (!hasDefault) {
|
|
119
|
+
// select the first chapter
|
|
120
|
+
this.currentChapter = cues[0];
|
|
121
|
+
$chaptersList.find('button').first().attr('aria-selected','true')
|
|
122
|
+
.parent('li').addClass('able-current-chapter');
|
|
123
|
+
}
|
|
124
|
+
this.$chaptersNav.html($chaptersList);
|
|
125
|
+
}
|
|
126
|
+
return false;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
AblePlayer.prototype.seekToChapter = function(chapterId) {
|
|
130
|
+
|
|
131
|
+
// step through chapters looking for matching ID
|
|
132
|
+
var i=0;
|
|
133
|
+
while (i < this.selectedChapters.cues.length) {
|
|
134
|
+
if (this.selectedChapters.cues[i].id == chapterId) {
|
|
135
|
+
// found the target chapter! Seek to it
|
|
136
|
+
this.seekTo(this.selectedChapters.cues[i].start);
|
|
137
|
+
this.updateChapter(this.selectedChapters.cues[i].start);
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
i++;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
AblePlayer.prototype.updateChapter = function (now) {
|
|
145
|
+
|
|
146
|
+
// as time-synced chapters change during playback, track changes in current chapter
|
|
147
|
+
if (typeof this.selectedChapters === 'undefined') {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
var chapters, i, thisChapterIndex, chapterLabel;
|
|
152
|
+
|
|
153
|
+
chapters = this.selectedChapters.cues;
|
|
154
|
+
for (i = 0; i < chapters.length; i++) {
|
|
155
|
+
if ((chapters[i].start <= now) && (chapters[i].end > now)) {
|
|
156
|
+
thisChapterIndex = i;
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (typeof thisChapterIndex !== 'undefined') {
|
|
161
|
+
if (this.currentChapter !== chapters[thisChapterIndex]) {
|
|
162
|
+
// this is a new chapter
|
|
163
|
+
this.currentChapter = chapters[thisChapterIndex];
|
|
164
|
+
if (this.useChapterTimes) {
|
|
165
|
+
this.chapterDuration = this.getChapterDuration();
|
|
166
|
+
this.seekIntervalCalculated = false; // will be recalculated in setSeekInterval()
|
|
167
|
+
}
|
|
168
|
+
if (typeof this.$chaptersDiv !== 'undefined') {
|
|
169
|
+
// chapters are listed in an external container
|
|
170
|
+
this.$chaptersDiv.find('ul').find('li').removeClass('able-current-chapter').attr('aria-selected','');
|
|
171
|
+
this.$chaptersDiv.find('ul').find('li').eq(thisChapterIndex)
|
|
172
|
+
.addClass('able-current-chapter').attr('aria-selected','true');
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
AblePlayer.prototype.getChapterDuration = function () {
|
|
179
|
+
|
|
180
|
+
// called if this.seekbarScope === 'chapter'
|
|
181
|
+
// get duration of the current chapter
|
|
182
|
+
|
|
183
|
+
var lastChapterIndex, chapterEnd;
|
|
184
|
+
|
|
185
|
+
if (typeof this.currentChapter === 'undefined') {
|
|
186
|
+
return 0;
|
|
187
|
+
}
|
|
188
|
+
if (typeof this.duration === 'undefined') {
|
|
189
|
+
return 0;
|
|
190
|
+
}
|
|
191
|
+
lastChapterIndex = this.selectedChapters.cues.length-1;
|
|
192
|
+
if (this.selectedChapters.cues[lastChapterIndex] == this.currentChapter) {
|
|
193
|
+
// this is the last chapter
|
|
194
|
+
if (this.currentChapter.end !== this.duration) {
|
|
195
|
+
// chapter ends before or after video ends, adjust chapter end to match video end
|
|
196
|
+
chapterEnd = this.duration;
|
|
197
|
+
this.currentChapter.end = this.duration;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
chapterEnd = this.currentChapter.end;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else { // this is not the last chapter
|
|
204
|
+
chapterEnd = this.currentChapter.end;
|
|
205
|
+
}
|
|
206
|
+
return chapterEnd - this.currentChapter.start;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
AblePlayer.prototype.getChapterElapsed = function () {
|
|
210
|
+
// called if this.seekbarScope === 'chapter'
|
|
211
|
+
// get current elapsed time, relative to the current chapter duration
|
|
212
|
+
|
|
213
|
+
if (typeof this.currentChapter === 'undefined') {
|
|
214
|
+
return 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (this.elapsed > this.currentChapter.start) {
|
|
218
|
+
return this.elapsed - this.currentChapter.start;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
return 0;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
AblePlayer.prototype.convertChapterTimeToVideoTime = function (chapterTime) {
|
|
226
|
+
|
|
227
|
+
// chapterTime is the time within the current chapter
|
|
228
|
+
// return the same time, relative to the entire video
|
|
229
|
+
if (typeof this.currentChapter !== 'undefined') {
|
|
230
|
+
var newTime = this.currentChapter.start + chapterTime;
|
|
231
|
+
if (newTime > this.currentChapter.end) {
|
|
232
|
+
return this.currentChapter.end;
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
return newTime;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
return chapterTime;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
AblePlayer.prototype.getChapterClickFunction = function (time) {
|
|
244
|
+
|
|
245
|
+
// Returns the function used when a chapter is clicked in the chapters menu.
|
|
246
|
+
var thisObj = this;
|
|
247
|
+
return function () {
|
|
248
|
+
thisObj.seekTrigger = 'chapter';
|
|
249
|
+
thisObj.seekTo(time);
|
|
250
|
+
// stopgap to prevent spacebar in Firefox from reopening popup
|
|
251
|
+
// immediately after closing it (used in handleChapters())
|
|
252
|
+
thisObj.hidingPopup = true;
|
|
253
|
+
thisObj.chaptersPopup.hide();
|
|
254
|
+
// Ensure stopgap gets cancelled if handleChapters() isn't called
|
|
255
|
+
// e.g., if user triggered button with Enter or mouse click, not spacebar
|
|
256
|
+
setTimeout(function() {
|
|
257
|
+
thisObj.hidingPopup = false;
|
|
258
|
+
}, 100);
|
|
259
|
+
thisObj.$chaptersButton.focus();
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
262
|
|
|
263
263
|
})(jQuery);
|