video.js.map
747.4 KB
1
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
{
"version": 3,
"sources": [
"node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-pack/_prelude.js",
"node_modules/global/document.js",
"node_modules/global/window.js",
"node_modules/grunt-browserify/node_modules/browserify/node_modules/browser-resolve/empty.js",
"node_modules/lodash-compat/date/now.js",
"node_modules/lodash-compat/function/debounce.js",
"node_modules/lodash-compat/function/restParam.js",
"node_modules/lodash-compat/function/throttle.js",
"node_modules/lodash-compat/internal/arrayCopy.js",
"node_modules/lodash-compat/internal/arrayEach.js",
"node_modules/lodash-compat/internal/baseCopy.js",
"node_modules/lodash-compat/internal/baseFor.js",
"node_modules/lodash-compat/internal/baseForIn.js",
"node_modules/lodash-compat/internal/baseMerge.js",
"node_modules/lodash-compat/internal/baseMergeDeep.js",
"node_modules/lodash-compat/internal/baseProperty.js",
"node_modules/lodash-compat/internal/bindCallback.js",
"node_modules/lodash-compat/internal/createAssigner.js",
"node_modules/lodash-compat/internal/createBaseFor.js",
"node_modules/lodash-compat/internal/getLength.js",
"node_modules/lodash-compat/internal/getNative.js",
"node_modules/lodash-compat/internal/isArrayLike.js",
"node_modules/lodash-compat/internal/isHostObject.js",
"node_modules/lodash-compat/internal/isIndex.js",
"node_modules/lodash-compat/internal/isIterateeCall.js",
"node_modules/lodash-compat/internal/isLength.js",
"node_modules/lodash-compat/internal/isObjectLike.js",
"node_modules/lodash-compat/internal/shimKeys.js",
"node_modules/lodash-compat/internal/toObject.js",
"node_modules/lodash-compat/lang/isArguments.js",
"node_modules/lodash-compat/lang/isArray.js",
"node_modules/lodash-compat/lang/isFunction.js",
"node_modules/lodash-compat/lang/isNative.js",
"node_modules/lodash-compat/lang/isObject.js",
"node_modules/lodash-compat/lang/isPlainObject.js",
"node_modules/lodash-compat/lang/isString.js",
"node_modules/lodash-compat/lang/isTypedArray.js",
"node_modules/lodash-compat/lang/toPlainObject.js",
"node_modules/lodash-compat/object/keys.js",
"node_modules/lodash-compat/object/keysIn.js",
"node_modules/lodash-compat/object/merge.js",
"node_modules/lodash-compat/support.js",
"node_modules/lodash-compat/utility/identity.js",
"node_modules/object.assign/hasSymbols.js",
"node_modules/object.assign/implementation.js",
"node_modules/object.assign/index.js",
"node_modules/object.assign/node_modules/define-properties/index.js",
"node_modules/object.assign/node_modules/define-properties/node_modules/foreach/index.js",
"node_modules/object.assign/node_modules/function-bind/implementation.js",
"node_modules/object.assign/node_modules/function-bind/index.js",
"node_modules/object.assign/node_modules/object-keys/index.js",
"node_modules/object.assign/node_modules/object-keys/isArguments.js",
"node_modules/object.assign/polyfill.js",
"node_modules/object.assign/shim.js",
"node_modules/safe-json-parse/tuple.js",
"node_modules/tsml/tsml.js",
"node_modules/xhr/index.js",
"node_modules/xhr/node_modules/is-function/index.js",
"node_modules/xhr/node_modules/once/once.js",
"node_modules/xhr/node_modules/parse-headers/node_modules/for-each/index.js",
"node_modules/xhr/node_modules/parse-headers/node_modules/trim/index.js",
"node_modules/xhr/node_modules/parse-headers/parse-headers.js",
"node_modules/xhr/node_modules/xtend/immutable.js",
"src/js/big-play-button.js",
"src/js/button.js",
"src/js/clickable-component.js",
"src/js/close-button.js",
"src/js/component.js",
"src/js/control-bar/control-bar.js",
"src/js/control-bar/fullscreen-toggle.js",
"src/js/control-bar/live-display.js",
"src/js/control-bar/mute-toggle.js",
"src/js/control-bar/play-toggle.js",
"src/js/control-bar/playback-rate-menu/playback-rate-menu-button.js",
"src/js/control-bar/playback-rate-menu/playback-rate-menu-item.js",
"src/js/control-bar/progress-control/load-progress-bar.js",
"src/js/control-bar/progress-control/mouse-time-display.js",
"src/js/control-bar/progress-control/play-progress-bar.js",
"src/js/control-bar/progress-control/progress-control.js",
"src/js/control-bar/progress-control/seek-bar.js",
"src/js/control-bar/spacer-controls/custom-control-spacer.js",
"src/js/control-bar/spacer-controls/spacer.js",
"src/js/control-bar/text-track-controls/caption-settings-menu-item.js",
"src/js/control-bar/text-track-controls/captions-button.js",
"src/js/control-bar/text-track-controls/chapters-button.js",
"src/js/control-bar/text-track-controls/chapters-track-menu-item.js",
"src/js/control-bar/text-track-controls/off-text-track-menu-item.js",
"src/js/control-bar/text-track-controls/subtitles-button.js",
"src/js/control-bar/text-track-controls/text-track-button.js",
"src/js/control-bar/text-track-controls/text-track-menu-item.js",
"src/js/control-bar/time-controls/current-time-display.js",
"src/js/control-bar/time-controls/duration-display.js",
"src/js/control-bar/time-controls/remaining-time-display.js",
"src/js/control-bar/time-controls/time-divider.js",
"src/js/control-bar/volume-control/volume-bar.js",
"src/js/control-bar/volume-control/volume-control.js",
"src/js/control-bar/volume-control/volume-level.js",
"src/js/control-bar/volume-menu-button.js",
"src/js/error-display.js",
"src/js/event-target.js",
"src/js/extend.js",
"src/js/fullscreen-api.js",
"src/js/loading-spinner.js",
"src/js/media-error.js",
"src/js/menu/menu-button.js",
"src/js/menu/menu-item.js",
"src/js/menu/menu.js",
"src/js/modal-dialog.js",
"src/js/player.js",
"src/js/plugins.js",
"src/js/popup/popup-button.js",
"src/js/popup/popup.js",
"src/js/poster-image.js",
"src/js/setup.js",
"src/js/slider/slider.js",
"src/js/tech/flash-rtmp.js",
"src/js/tech/flash.js",
"src/js/tech/html5.js",
"src/js/tech/loader.js",
"src/js/tech/tech.js",
"src/js/tracks/html-track-element-list.js",
"src/js/tracks/html-track-element.js",
"src/js/tracks/text-track-cue-list.js",
"src/js/tracks/text-track-display.js",
"src/js/tracks/text-track-enums.js",
"src/js/tracks/text-track-list-converter.js",
"src/js/tracks/text-track-list.js",
"src/js/tracks/text-track-settings.js",
"src/js/tracks/text-track.js",
"src/js/utils/browser.js",
"src/js/utils/buffer.js",
"src/js/utils/create-deprecation-proxy.js",
"src/js/utils/dom.js",
"src/js/utils/events.js",
"src/js/utils/fn.js",
"src/js/utils/format-time.js",
"src/js/utils/guid.js",
"src/js/utils/log.js",
"src/js/utils/merge-options.js",
"src/js/utils/stylesheet.js",
"src/js/utils/time-ranges.js",
"src/js/utils/to-title-case.js",
"src/js/utils/url.js",
"src/js/video.js"
],
"names": [],
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;wBChBmB,aAAa;;;;2BACV,gBAAgB;;;;;;;;;;;;;;IAWhC,aAAa;YAAb,aAAa;;AAEN,WAFP,aAAa,CAEL,MAAM,EAAE,OAAO,EAAE;0BAFzB,aAAa;;AAGf,uBAAM,MAAM,EAAE,OAAO,CAAC,CAAC;GACxB;;;;;;;;;AAJG,eAAa,WAYjB,aAAa,GAAA,yBAAG;AACd,WAAO,qBAAqB,CAAC;GAC9B;;;;;;;;AAdG,e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,KAAK,CAAC,EAAE;AACjD,QAAM,CAAC,SAAS,EAAE,EAAE,EAAE,YAAU;AAAE,WAAO,OAAO,CAAC;GAAE,CAAC,CAAC;;;CAGtD,MAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AACpE,UAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC;GAC7B;;qBAEc,OAAO",
"file": "generated.js",
"sourceRoot": "",
"sourcesContent": [
"(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})",
"(function (global){\nvar topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nif (typeof document !== 'undefined') {\n module.exports = document;\n} else {\n var doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n\n module.exports = doccy;\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9nbG9iYWwvZG9jdW1lbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgdG9wTGV2ZWwgPSB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6XG4gICAgdHlwZW9mIHdpbmRvdyAhPT0gJ3VuZGVmaW5lZCcgPyB3aW5kb3cgOiB7fVxudmFyIG1pbkRvYyA9IHJlcXVpcmUoJ21pbi1kb2N1bWVudCcpO1xuXG5pZiAodHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJykge1xuICAgIG1vZHVsZS5leHBvcnRzID0gZG9jdW1lbnQ7XG59IGVsc2Uge1xuICAgIHZhciBkb2NjeSA9IHRvcExldmVsWydfX0dMT0JBTF9ET0NVTUVOVF9DQUNIRUA0J107XG5cbiAgICBpZiAoIWRvY2N5KSB7XG4gICAgICAgIGRvY2N5ID0gdG9wTGV2ZWxbJ19fR0xPQkFMX0RPQ1VNRU5UX0NBQ0hFQDQnXSA9IG1pbkRvYztcbiAgICB9XG5cbiAgICBtb2R1bGUuZXhwb3J0cyA9IGRvY2N5O1xufVxuIl19",
"(function (global){\nif (typeof window !== \"undefined\") {\n module.exports = window;\n} else if (typeof global !== \"undefined\") {\n module.exports = global;\n} else if (typeof self !== \"undefined\"){\n module.exports = self;\n} else {\n module.exports = {};\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9nbG9iYWwvd2luZG93LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiaWYgKHR5cGVvZiB3aW5kb3cgIT09IFwidW5kZWZpbmVkXCIpIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IHdpbmRvdztcbn0gZWxzZSBpZiAodHlwZW9mIGdsb2JhbCAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgIG1vZHVsZS5leHBvcnRzID0gZ2xvYmFsO1xufSBlbHNlIGlmICh0eXBlb2Ygc2VsZiAhPT0gXCJ1bmRlZmluZWRcIil7XG4gICAgbW9kdWxlLmV4cG9ydHMgPSBzZWxmO1xufSBlbHNlIHtcbiAgICBtb2R1bGUuZXhwb3J0cyA9IHt9O1xufVxuIl19",
null,
"var getNative = require('../internal/getNative');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeNow = getNative(Date, 'now');\n\n/**\n * Gets the number of milliseconds that have elapsed since the Unix epoch\n * (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @category Date\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => logs the number of milliseconds it took for the deferred function to be invoked\n */\nvar now = nativeNow || function() {\n return new Date().getTime();\n};\n\nmodule.exports = now;\n",
"var isObject = require('../lang/isObject'),\n now = require('../date/now');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed invocations. Provide an options object to indicate that `func`\n * should be invoked on the leading and/or trailing edge of the `wait` timeout.\n * Subsequent calls to the debounced function return the result of the last\n * `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the debounced function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=false] Specify invoking on the leading\n * edge of the timeout.\n * @param {number} [options.maxWait] The maximum time `func` is allowed to be\n * delayed before it's invoked.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // avoid costly calculations while the window size is in flux\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // invoke `sendMail` when the click event is fired, debouncing subsequent calls\n * jQuery('#postbox').on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // ensure `batchLog` is invoked once after 1 second of debounced calls\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', _.debounce(batchLog, 250, {\n * 'maxWait': 1000\n * }));\n *\n * // cancel a debounced call\n * var todoChanges = _.debounce(batchLog, 1000);\n * Object.observe(models.todo, todoChanges);\n *\n * Object.observe(models, function(changes) {\n * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) {\n * todoChanges.cancel();\n * }\n * }, ['delete']);\n *\n * // ...at some point `models.todo` is changed\n * models.todo.completed = true;\n *\n * // ...before 1 second has passed `models.todo` is deleted\n * // which cancels the debounced `todoChanges` call\n * delete models.todo;\n */\nfunction debounce(func, wait, options) {\n var args,\n maxTimeoutId,\n result,\n stamp,\n thisArg,\n timeoutId,\n trailingCall,\n lastCalled = 0,\n maxWait = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = wait < 0 ? 0 : (+wait || 0);\n if (options === true) {\n var leading = true;\n trailing = false;\n } else if (isObject(options)) {\n leading = !!options.leading;\n maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n if (maxTimeoutId) {\n clearTimeout(maxTimeoutId);\n }\n lastCalled = 0;\n maxTimeoutId = timeoutId = trailingCall = undefined;\n }\n\n function complete(isCalled, id) {\n if (id) {\n clearTimeout(id);\n }\n maxTimeoutId = timeoutId = trailingCall = undefined;\n if (isCalled) {\n lastCalled = now();\n result = func.apply(thisArg, args);\n if (!timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n }\n }\n\n function delayed() {\n var remaining = wait - (now() - stamp);\n if (remaining <= 0 || remaining > wait) {\n complete(trailingCall, maxTimeoutId);\n } else {\n timeoutId = setTimeout(delayed, remaining);\n }\n }\n\n function maxDelayed() {\n complete(trailing, timeoutId);\n }\n\n function debounced() {\n args = arguments;\n stamp = now();\n thisArg = this;\n trailingCall = trailing && (timeoutId || !leading);\n\n if (maxWait === false) {\n var leadingCall = leading && !timeoutId;\n } else {\n if (!maxTimeoutId && !leading) {\n lastCalled = stamp;\n }\n var remaining = maxWait - (stamp - lastCalled),\n isCalled = remaining <= 0 || remaining > maxWait;\n\n if (isCalled) {\n if (maxTimeoutId) {\n maxTimeoutId = clearTimeout(maxTimeoutId);\n }\n lastCalled = stamp;\n result = func.apply(thisArg, args);\n }\n else if (!maxTimeoutId) {\n maxTimeoutId = setTimeout(maxDelayed, remaining);\n }\n }\n if (isCalled && timeoutId) {\n timeoutId = clearTimeout(timeoutId);\n }\n else if (!timeoutId && wait !== maxWait) {\n timeoutId = setTimeout(delayed, wait);\n }\n if (leadingCall) {\n isCalled = true;\n result = func.apply(thisArg, args);\n }\n if (isCalled && !timeoutId && !maxTimeoutId) {\n args = thisArg = undefined;\n }\n return result;\n }\n debounced.cancel = cancel;\n return debounced;\n}\n\nmodule.exports = debounce;\n",
"/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as an array.\n *\n * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.restParam(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction restParam(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n rest = Array(length);\n\n while (++index < length) {\n rest[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, args[0], rest);\n case 2: return func.call(this, args[0], args[1], rest);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = rest;\n return func.apply(this, otherArgs);\n };\n}\n\nmodule.exports = restParam;\n",
"var debounce = require('./debounce'),\n isObject = require('../lang/isObject');\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed invocations. Provide an options object to indicate\n * that `func` should be invoked on the leading and/or trailing edge of the\n * `wait` timeout. Subsequent calls to the throttled function return the\n * result of the last `func` call.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked\n * on the trailing edge of the timeout only if the the throttled function is\n * invoked more than once during the `wait` timeout.\n *\n * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.leading=true] Specify invoking on the leading\n * edge of the timeout.\n * @param {boolean} [options.trailing=true] Specify invoking on the trailing\n * edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // avoid excessively updating the position while scrolling\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes\n * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {\n * 'trailing': false\n * }));\n *\n * // cancel a trailing throttled call\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (options === false) {\n leading = false;\n } else if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });\n}\n\nmodule.exports = throttle;\n",
"/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction arrayCopy(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = arrayCopy;\n",
"/**\n * A specialized version of `_.forEach` for arrays without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n",
"/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property names to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @returns {Object} Returns `object`.\n */\nfunction baseCopy(source, props, object) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n object[key] = source[key];\n }\n return object;\n}\n\nmodule.exports = baseCopy;\n",
"var createBaseFor = require('./createBaseFor');\n\n/**\n * The base implementation of `baseForIn` and `baseForOwn` which iterates\n * over `object` properties returned by `keysFunc` invoking `iteratee` for\n * each property. Iteratee functions may exit iteration early by explicitly\n * returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n",
"var baseFor = require('./baseFor'),\n keysIn = require('../object/keysIn');\n\n/**\n * The base implementation of `_.forIn` without support for callback\n * shorthands and `this` binding.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForIn(object, iteratee) {\n return baseFor(object, iteratee, keysIn);\n}\n\nmodule.exports = baseForIn;\n",
"var arrayEach = require('./arrayEach'),\n baseMergeDeep = require('./baseMergeDeep'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isObject = require('../lang/isObject'),\n isObjectLike = require('./isObjectLike'),\n isTypedArray = require('../lang/isTypedArray'),\n keys = require('../object/keys');\n\n/**\n * The base implementation of `_.merge` without support for argument juggling,\n * multiple sources, and `this` binding `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {Object} Returns `object`.\n */\nfunction baseMerge(object, source, customizer, stackA, stackB) {\n if (!isObject(object)) {\n return object;\n }\n var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),\n props = isSrcArr ? undefined : keys(source);\n\n arrayEach(props || source, function(srcValue, key) {\n if (props) {\n key = srcValue;\n srcValue = source[key];\n }\n if (isObjectLike(srcValue)) {\n stackA || (stackA = []);\n stackB || (stackB = []);\n baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);\n }\n else {\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n }\n if ((result !== undefined || (isSrcArr && !(key in object))) &&\n (isCommon || (result === result ? (result !== value) : (value === value)))) {\n object[key] = result;\n }\n }\n });\n return object;\n}\n\nmodule.exports = baseMerge;\n",
"var arrayCopy = require('./arrayCopy'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isArrayLike = require('./isArrayLike'),\n isPlainObject = require('../lang/isPlainObject'),\n isTypedArray = require('../lang/isTypedArray'),\n toPlainObject = require('../lang/toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Array} [stackA=[]] Tracks traversed source objects.\n * @param {Array} [stackB=[]] Associates values with source counterparts.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {\n var length = stackA.length,\n srcValue = source[key];\n\n while (length--) {\n if (stackA[length] == srcValue) {\n object[key] = stackB[length];\n return;\n }\n }\n var value = object[key],\n result = customizer ? customizer(value, srcValue, key, object, source) : undefined,\n isCommon = result === undefined;\n\n if (isCommon) {\n result = srcValue;\n if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {\n result = isArray(value)\n ? value\n : (isArrayLike(value) ? arrayCopy(value) : []);\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n result = isArguments(value)\n ? toPlainObject(value)\n : (isPlainObject(value) ? value : {});\n }\n else {\n isCommon = false;\n }\n }\n // Add the source value to the stack of traversed objects and associate\n // it with its merged value.\n stackA.push(srcValue);\n stackB.push(result);\n\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);\n } else if (result === result ? (result !== value) : (value === value)) {\n object[key] = result;\n }\n}\n\nmodule.exports = baseMergeDeep;\n",
"var toObject = require('./toObject');\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : toObject(object)[key];\n };\n}\n\nmodule.exports = baseProperty;\n",
"var identity = require('../utility/identity');\n\n/**\n * A specialized version of `baseCallback` which only supports `this` binding\n * and specifying the number of arguments to provide to `func`.\n *\n * @private\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {number} [argCount] The number of arguments to provide to `func`.\n * @returns {Function} Returns the callback.\n */\nfunction bindCallback(func, thisArg, argCount) {\n if (typeof func != 'function') {\n return identity;\n }\n if (thisArg === undefined) {\n return func;\n }\n switch (argCount) {\n case 1: return function(value) {\n return func.call(thisArg, value);\n };\n case 3: return function(value, index, collection) {\n return func.call(thisArg, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(thisArg, accumulator, value, index, collection);\n };\n case 5: return function(value, other, key, object, source) {\n return func.call(thisArg, value, other, key, object, source);\n };\n }\n return function() {\n return func.apply(thisArg, arguments);\n };\n}\n\nmodule.exports = bindCallback;\n",
"var bindCallback = require('./bindCallback'),\n isIterateeCall = require('./isIterateeCall'),\n restParam = require('../function/restParam');\n\n/**\n * Creates a `_.assign`, `_.defaults`, or `_.merge` function.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return restParam(function(object, sources) {\n var index = -1,\n length = object == null ? 0 : sources.length,\n customizer = length > 2 ? sources[length - 2] : undefined,\n guard = length > 2 ? sources[2] : undefined,\n thisArg = length > 1 ? sources[length - 1] : undefined;\n\n if (typeof customizer == 'function') {\n customizer = bindCallback(customizer, thisArg, 5);\n length -= 2;\n } else {\n customizer = typeof thisArg == 'function' ? thisArg : undefined;\n length -= (customizer ? 1 : 0);\n }\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n",
"var toObject = require('./toObject');\n\n/**\n * Creates a base function for `_.forIn` or `_.forInRight`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var iterable = toObject(object),\n props = keysFunc(object),\n length = props.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length)) {\n var key = props[index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n",
"var baseProperty = require('./baseProperty');\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\nmodule.exports = getLength;\n",
"var isNative = require('../lang/isNative');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = object == null ? undefined : object[key];\n return isNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n",
"var getLength = require('./getLength'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n */\nfunction isArrayLike(value) {\n return value != null && isLength(getLength(value));\n}\n\nmodule.exports = isArrayLike;\n",
"/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nvar isHostObject = (function() {\n try {\n Object({ 'toString': 0 } + '');\n } catch(e) {\n return function() { return false; };\n }\n return function(value) {\n // IE < 9 presents many host objects as `Object` objects that can coerce\n // to strings despite having improperly defined `toString` methods.\n return typeof value.toString != 'function' && typeof (value + '') == 'string';\n };\n}());\n\nmodule.exports = isHostObject;\n",
"/** Used to detect unsigned integer values. */\nvar reIsUint = /^\\d+$/;\n\n/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\n length = length == null ? MAX_SAFE_INTEGER : length;\n return value > -1 && value % 1 == 0 && value < length;\n}\n\nmodule.exports = isIndex;\n",
"var isArrayLike = require('./isArrayLike'),\n isIndex = require('./isIndex'),\n isObject = require('../lang/isObject');\n\n/**\n * Checks if the provided arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)) {\n var other = object[index];\n return value === value ? (value === other) : (other !== other);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n",
"/**\n * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\n * of an array-like value.\n */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n",
"/**\n * Checks if `value` is object-like.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n",
"var isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isIndex = require('./isIndex'),\n isLength = require('./isLength'),\n isString = require('../lang/isString'),\n keysIn = require('../object/keysIn');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A fallback implementation of `Object.keys` which creates an array of the\n * own enumerable property names of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction shimKeys(object) {\n var props = keysIn(object),\n propsLength = props.length,\n length = propsLength && object.length;\n\n var allowIndexes = !!length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object));\n\n var index = -1,\n result = [];\n\n while (++index < propsLength) {\n var key = props[index];\n if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = shimKeys;\n",
"var isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/**\n * Converts `value` to an object if it's not one.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {Object} Returns the object.\n */\nfunction toObject(value) {\n if (support.unindexedChars && isString(value)) {\n var index = -1,\n length = value.length,\n result = Object(value);\n\n while (++index < length) {\n result[index] = value.charAt(index);\n }\n return result;\n }\n return isObject(value) ? value : Object(value);\n}\n\nmodule.exports = toObject;\n",
"var isArrayLike = require('../internal/isArrayLike'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is classified as an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n return isObjectLike(value) && isArrayLike(value) &&\n hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\n}\n\nmodule.exports = isArguments;\n",
"var getNative = require('../internal/getNative'),\n isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeIsArray = getNative(Array, 'isArray');\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(function() { return arguments; }());\n * // => false\n */\nvar isArray = nativeIsArray || function(value) {\n return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\n};\n\nmodule.exports = isArray;\n",
"var isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in older versions of Chrome and Safari which return 'function' for regexes\n // and Safari 8 which returns 'object' for typed array constructors.\n return isObject(value) && objToString.call(value) == funcTag;\n}\n\nmodule.exports = isFunction;\n",
"var isFunction = require('./isFunction'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** Used to detect host constructors (Safari > 5). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar fnToString = Function.prototype.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n fnToString.call(hasOwnProperty).replace(/[\\\\^$.*+?()[\\]{}|]/g, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * Checks if `value` is a native function.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\nfunction isNative(value) {\n if (value == null) {\n return false;\n }\n if (isFunction(value)) {\n return reIsNative.test(fnToString.call(value));\n }\n return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\n}\n\nmodule.exports = isNative;\n",
"/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(1);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n",
"var baseForIn = require('../internal/baseForIn'),\n isArguments = require('./isArguments'),\n isHostObject = require('../internal/isHostObject'),\n isObjectLike = require('../internal/isObjectLike'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * **Note:** This method assumes objects created by the `Object` constructor\n * have no inherited enumerable properties.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n var Ctor;\n\n // Exit early for non `Object` objects.\n if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||\n (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\n return false;\n }\n // IE < 9 iterates inherited properties before own properties. If the first\n // iterated property is an object's own property then there are no inherited\n // enumerable properties.\n var result;\n if (support.ownLast) {\n baseForIn(value, function(subValue, key, object) {\n result = hasOwnProperty.call(object, key);\n return false;\n });\n return result !== false;\n }\n // In most environments an object's own properties are iterated before\n // its inherited properties. If the last iterated property is an object's\n // own property then there are no inherited enumerable properties.\n baseForIn(value, function(subValue, key) {\n result = key;\n });\n return result === undefined || hasOwnProperty.call(value, result);\n}\n\nmodule.exports = isPlainObject;\n",
"var isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n",
"var isLength = require('../internal/isLength'),\n isObjectLike = require('../internal/isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for native method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n",
"var baseCopy = require('../internal/baseCopy'),\n keysIn = require('../object/keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable\n * properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return baseCopy(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n",
"var getNative = require('../internal/getNative'),\n isArrayLike = require('../internal/isArrayLike'),\n isObject = require('../lang/isObject'),\n shimKeys = require('../internal/shimKeys'),\n support = require('../support');\n\n/* Native method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = getNative(Object, 'keys');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nvar keys = !nativeKeys ? shimKeys : function(object) {\n var Ctor = object == null ? undefined : object.constructor;\n if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\n (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\n return shimKeys(object);\n }\n return isObject(object) ? nativeKeys(object) : [];\n};\n\nmodule.exports = keys;\n",
"var arrayEach = require('../internal/arrayEach'),\n isArguments = require('../lang/isArguments'),\n isArray = require('../lang/isArray'),\n isFunction = require('../lang/isFunction'),\n isIndex = require('../internal/isIndex'),\n isLength = require('../internal/isLength'),\n isObject = require('../lang/isObject'),\n isString = require('../lang/isString'),\n support = require('../support');\n\n/** `Object#toString` result references. */\nvar arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n stringTag = '[object String]';\n\n/** Used to fix the JScript `[[DontEnum]]` bug. */\nvar shadowProps = [\n 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\n 'toLocaleString', 'toString', 'valueOf'\n];\n\n/** Used for native method references. */\nvar errorProto = Error.prototype,\n objectProto = Object.prototype,\n stringProto = String.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objToString = objectProto.toString;\n\n/** Used to avoid iterating over non-enumerable properties in IE < 9. */\nvar nonEnumProps = {};\nnonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\nnonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\nnonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\nnonEnumProps[objectTag] = { 'constructor': true };\n\narrayEach(shadowProps, function(key) {\n for (var tag in nonEnumProps) {\n if (hasOwnProperty.call(nonEnumProps, tag)) {\n var props = nonEnumProps[tag];\n props[key] = hasOwnProperty.call(props, key);\n }\n }\n});\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n if (object == null) {\n return [];\n }\n if (!isObject(object)) {\n object = Object(object);\n }\n var length = object.length;\n\n length = (length && isLength(length) &&\n (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\n\n var Ctor = object.constructor,\n index = -1,\n proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\n isProto = proto === object,\n result = Array(length),\n skipIndexes = length > 0,\n skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\n skipProto = support.enumPrototypes && isFunction(object);\n\n while (++index < length) {\n result[index] = (index + '');\n }\n // lodash skips the `constructor` property when it infers it's iterating\n // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\n // attribute of an existing property and the `constructor` property of a\n // prototype defaults to non-enumerable.\n for (var key in object) {\n if (!(skipProto && key == 'prototype') &&\n !(skipErrorProps && (key == 'message' || key == 'name')) &&\n !(skipIndexes && isIndex(key, length)) &&\n !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n if (support.nonEnumShadows && object !== objectProto) {\n var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\n nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\n\n if (tag == objectTag) {\n proto = objectProto;\n }\n length = shadowProps.length;\n while (length--) {\n key = shadowProps[length];\n var nonEnum = nonEnums[key];\n if (!(isProto && nonEnum) &&\n (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\n result.push(key);\n }\n }\n }\n return result;\n}\n\nmodule.exports = keysIn;\n",
"var baseMerge = require('../internal/baseMerge'),\n createAssigner = require('../internal/createAssigner');\n\n/**\n * Recursively merges own enumerable properties of the source object(s), that\n * don't resolve to `undefined` into the destination object. Subsequent sources\n * overwrite property assignments of previous sources. If `customizer` is\n * provided it's invoked to produce the merged values of the destination and\n * source properties. If `customizer` returns `undefined` merging is handled\n * by the method instead. The `customizer` is bound to `thisArg` and invoked\n * with five arguments: (objectValue, sourceValue, key, object, source).\n *\n * @static\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {*} [thisArg] The `this` binding of `customizer`.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var users = {\n * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]\n * };\n *\n * var ages = {\n * 'data': [{ 'age': 36 }, { 'age': 40 }]\n * };\n *\n * _.merge(users, ages);\n * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }\n *\n * // using a customizer callback\n * var object = {\n * 'fruits': ['apple'],\n * 'vegetables': ['beet']\n * };\n *\n * var other = {\n * 'fruits': ['banana'],\n * 'vegetables': ['carrot']\n * };\n *\n * _.merge(object, other, function(a, b) {\n * if (_.isArray(a)) {\n * return a.concat(b);\n * }\n * });\n * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }\n */\nvar merge = createAssigner(baseMerge);\n\nmodule.exports = merge;\n",
"/** Used for native method references. */\nvar arrayProto = Array.prototype,\n errorProto = Error.prototype,\n objectProto = Object.prototype;\n\n/** Native method references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/**\n * An object environment feature flags.\n *\n * @static\n * @memberOf _\n * @type Object\n */\nvar support = {};\n\n(function(x) {\n var Ctor = function() { this.x = x; },\n object = { '0': x, 'length': x },\n props = [];\n\n Ctor.prototype = { 'valueOf': x, 'y': x };\n for (var key in new Ctor) { props.push(key); }\n\n /**\n * Detect if `name` or `message` properties of `Error.prototype` are\n * enumerable by default (IE < 9, Safari < 5.1).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\n propertyIsEnumerable.call(errorProto, 'name');\n\n /**\n * Detect if `prototype` properties are enumerable by default.\n *\n * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\n * (if the prototype or a property on the prototype has been set)\n * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\n * property to `true`.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\n\n /**\n * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\n *\n * In IE < 9 an object's own properties, shadowing non-enumerable ones,\n * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.nonEnumShadows = !/valueOf/.test(props);\n\n /**\n * Detect if own properties are iterated after inherited properties (IE < 9).\n *\n * @memberOf _.support\n * @type boolean\n */\n support.ownLast = props[0] != 'x';\n\n /**\n * Detect if `Array#shift` and `Array#splice` augment array-like objects\n * correctly.\n *\n * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\n * `shift()` and `splice()` functions that fail to remove the last element,\n * `value[0]`, of array-like objects even though the \"length\" property is\n * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\n * while `splice()` is buggy regardless of mode in IE < 9.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\n\n /**\n * Detect lack of support for accessing string characters by index.\n *\n * IE < 8 can't access characters by index. IE 8 can only access characters\n * by index on string literals, not string objects.\n *\n * @memberOf _.support\n * @type boolean\n */\n support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\n}(1, 0));\n\nmodule.exports = support;\n",
"/**\n * This method returns the first argument provided to it.\n *\n * @static\n * @memberOf _\n * @category Utility\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'user': 'fred' };\n *\n * _.identity(object) === object;\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n",
"'use strict';\n\nvar keys = require('object-keys');\n\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tif (typeof sym === 'string') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(Object(sym) instanceof Symbol)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; }\n\tif (keys(obj).length !== 0) { return false; }\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n",
"'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = require('object-keys');\nvar bind = require('function-bind');\nvar canBeObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\nvar hasSymbols = require('./hasSymbols')();\nvar toObject = Object;\nvar push = bind.call(Function.call, Array.prototype.push);\nvar propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);\n\nmodule.exports = function assign(target, source1) {\n\tif (!canBeObject(target)) { throw new TypeError('target must be an object'); }\n\tvar objTarget = toObject(target);\n\tvar s, source, i, props, syms, value, key;\n\tfor (s = 1; s < arguments.length; ++s) {\n\t\tsource = toObject(arguments[s]);\n\t\tprops = keys(source);\n\t\tif (hasSymbols && Object.getOwnPropertySymbols) {\n\t\t\tsyms = Object.getOwnPropertySymbols(source);\n\t\t\tfor (i = 0; i < syms.length; ++i) {\n\t\t\t\tkey = syms[i];\n\t\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\t\tpush(props, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i = 0; i < props.length; ++i) {\n\t\t\tkey = props[i];\n\t\t\tvalue = source[key];\n\t\t\tif (propIsEnumerable(source, key)) {\n\t\t\t\tobjTarget[key] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn objTarget;\n};\n",
"'use strict';\n\nvar defineProperties = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\ndefineProperties(implementation, {\n\timplementation: implementation,\n\tgetPolyfill: getPolyfill,\n\tshim: shim\n});\n\nmodule.exports = implementation;\n",
"'use strict';\n\nvar keys = require('object-keys');\nvar foreach = require('foreach');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';\n\nvar toStr = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\tObject.defineProperty(obj, 'x', { enumerable: false, value: obj });\n /* eslint-disable no-unused-vars, no-restricted-syntax */\n for (var _ in obj) { return false; }\n /* eslint-enable no-unused-vars, no-restricted-syntax */\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\tObject.defineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = props.concat(Object.getOwnPropertySymbols(map));\n\t}\n\tforeach(props, function (name) {\n\t\tdefineProperty(object, name, map[name], predicates[name]);\n\t});\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n",
"\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nmodule.exports = function forEach (obj, fn, ctx) {\n if (toString.call(fn) !== '[object Function]') {\n throw new TypeError('iterator must be a function');\n }\n var l = obj.length;\n if (l === +l) {\n for (var i = 0; i < l; i++) {\n fn.call(ctx, obj[i], i, obj);\n }\n } else {\n for (var k in obj) {\n if (hasOwn.call(obj, k)) {\n fn.call(ctx, obj[k], k, obj);\n }\n }\n }\n};\n\n",
"var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n",
"var implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n",
"'use strict';\n\n// modified from https://github.com/es-shims/es5-shim\nvar has = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\nvar hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');\nvar hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');\nvar dontEnums = [\n\t'toString',\n\t'toLocaleString',\n\t'valueOf',\n\t'hasOwnProperty',\n\t'isPrototypeOf',\n\t'propertyIsEnumerable',\n\t'constructor'\n];\nvar equalsConstructorPrototype = function (o) {\n\tvar ctor = o.constructor;\n\treturn ctor && ctor.prototype === o;\n};\nvar blacklistedKeys = {\n\t$console: true,\n\t$frame: true,\n\t$frameElement: true,\n\t$frames: true,\n\t$parent: true,\n\t$self: true,\n\t$webkitIndexedDB: true,\n\t$webkitStorageInfo: true,\n\t$window: true\n};\nvar hasAutomationEqualityBug = (function () {\n\t/* global window */\n\tif (typeof window === 'undefined') { return false; }\n\tfor (var k in window) {\n\t\ttry {\n\t\t\tif (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\ttry {\n\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t} catch (e) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}());\nvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t/* global window */\n\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\treturn equalsConstructorPrototype(o);\n\t}\n\ttry {\n\t\treturn equalsConstructorPrototype(o);\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar keysShim = function keys(object) {\n\tvar isObject = object !== null && typeof object === 'object';\n\tvar isFunction = toStr.call(object) === '[object Function]';\n\tvar isArguments = isArgs(object);\n\tvar isString = isObject && toStr.call(object) === '[object String]';\n\tvar theKeys = [];\n\n\tif (!isObject && !isFunction && !isArguments) {\n\t\tthrow new TypeError('Object.keys called on a non-object');\n\t}\n\n\tvar skipProto = hasProtoEnumBug && isFunction;\n\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\ttheKeys.push(String(i));\n\t\t}\n\t}\n\n\tif (isArguments && object.length > 0) {\n\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\ttheKeys.push(String(j));\n\t\t}\n\t} else {\n\t\tfor (var name in object) {\n\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\ttheKeys.push(String(name));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (hasDontEnumBug) {\n\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t}\n\t\t}\n\t}\n\treturn theKeys;\n};\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\treturn (Object.keys(arguments) || '').length === 2;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tvar originalKeys = Object.keys;\n\t\t\tObject.keys = function keys(object) {\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t} else {\n\t\t\t\t\treturn originalKeys(object);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n",
"'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n",
"'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t// v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t// note: this does not detect the bug unless there's 20 characters\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t// Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t// which is 72% slower than our shim, and Firefox 40's native implementation.\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n",
"'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\nmodule.exports = function shimAssign() {\n\tvar polyfill = getPolyfill();\n\tdefine(\n\t\tObject,\n\t\t{ assign: polyfill },\n\t\t{ assign: function () { return Object.assign !== polyfill; } }\n\t);\n\treturn polyfill;\n};\n",
"module.exports = SafeParseTuple\n\nfunction SafeParseTuple(obj, reviver) {\n var json\n var error = null\n\n try {\n json = JSON.parse(obj, reviver)\n } catch (err) {\n error = err\n }\n\n return [error, json]\n}\n",
"function clean (s) {\n return s.replace(/\\n\\r?\\s*/g, '')\n}\n\n\nmodule.exports = function tsml (sa) {\n var s = ''\n , i = 0\n\n for (; i < arguments.length; i++)\n s += clean(sa[i]) + (arguments[i + 1] || '')\n\n return s\n}",
"\"use strict\";\nvar window = require(\"global/window\")\nvar once = require(\"once\")\nvar isFunction = require(\"is-function\")\nvar parseHeaders = require(\"parse-headers\")\nvar xtend = require(\"xtend\")\n\nmodule.exports = createXHR\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n var callback = options.callback\n if(typeof callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n callback = once(callback)\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n loadFunc()\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else if (xhr.responseType === \"text\" || !xhr.responseType) {\n body = xhr.responseText || xhr.responseXML\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n callback(err, response, response.body)\n\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data || null\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n\n if (\"json\" in options) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n aborted=true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n xhr.send(body)\n\n return xhr\n\n\n}\n\nfunction noop() {}\n",
"module.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n",
"module.exports = once\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var called = false\n return function () {\n if (called) return\n called = true\n return fn.apply(this, arguments)\n }\n}\n",
"var isFunction = require('is-function')\n\nmodule.exports = forEach\n\nvar toString = Object.prototype.toString\nvar hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction forEach(list, iterator, context) {\n if (!isFunction(iterator)) {\n throw new TypeError('iterator must be a function')\n }\n\n if (arguments.length < 3) {\n context = this\n }\n \n if (toString.call(list) === '[object Array]')\n forEachArray(list, iterator, context)\n else if (typeof list === 'string')\n forEachString(list, iterator, context)\n else\n forEachObject(list, iterator, context)\n}\n\nfunction forEachArray(array, iterator, context) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n iterator.call(context, array[i], i, array)\n }\n }\n}\n\nfunction forEachString(string, iterator, context) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n iterator.call(context, string.charAt(i), i, string)\n }\n}\n\nfunction forEachObject(object, iterator, context) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n iterator.call(context, object[k], k, object)\n }\n }\n}\n",
"\nexports = module.exports = trim;\n\nfunction trim(str){\n return str.replace(/^\\s*|\\s*$/g, '');\n}\n\nexports.left = function(str){\n return str.replace(/^\\s*/, '');\n};\n\nexports.right = function(str){\n return str.replace(/\\s*$/, '');\n};\n",
"var trim = require('trim')\n , forEach = require('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}",
"module.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n",
"/**\n * @file big-play-button.js\n */\nimport Button from './button.js';\nimport Component from './component.js';\n\n/**\n * Initial play button. Shows before the video has played. The hiding of the\n * big play button is done via CSS and player states.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Button\n * @class BigPlayButton\n */\nclass BigPlayButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return 'vjs-big-play-button';\n }\n\n /**\n * Handles click for play\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.play();\n }\n\n}\n\nBigPlayButton.prototype.controlText_ = 'Play Video';\n\nComponent.registerComponent('BigPlayButton', BigPlayButton);\nexport default BigPlayButton;\n",
"/**\n * @file button.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Base class for all buttons\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends ClickableComponent\n * @class Button\n */\nclass Button extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='button', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass()\n }, props);\n\n if (tag !== 'button') {\n log.warn(`Creating a Button with an HTML element of ${tag} is deprecated; use ClickableComponent instead.`);\n }\n\n // Add attributes for button element\n attributes = assign({\n type: 'button', // Necessary since the default button type is \"submit\"\n 'aria-live': 'polite' // let the screen reader user know that the text of the button may change\n }, attributes);\n\n let el = Component.prototype.createEl.call(this, tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * Adds a child component inside this button\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @deprecated\n * @method addChild\n */\n addChild(child, options={}) {\n let className = this.constructor.name;\n log.warn(`Adding an actionable (user controllable) child to a Button (${className}) is not supported; use a ClickableComponent instead.`);\n\n // Avoid the error message generated by ClickableComponent's addChild method\n return Component.prototype.addChild.call(this, child, options);\n }\n\n /**\n * Handle KeyPress (document level) - Extend with specific functionality for button\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Ignore Space (32) or Enter (13) key operation, which is handled by the browser for a button.\n if (event.which === 32 || event.which === 13) {\n } else {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n}\n\nComponent.registerComponent('Button', Button);\nexport default Button;\n",
"/**\n * @file button.js\n */\nimport Component from './component';\nimport * as Dom from './utils/dom.js';\nimport * as Events from './utils/events.js';\nimport * as Fn from './utils/fn.js';\nimport log from './utils/log.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * Clickable Component which is clickable or keyboard actionable, but is not a native HTML button\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class ClickableComponent\n */\nclass ClickableComponent extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.emitTapEvents();\n\n this.on('tap', this.handleClick);\n this.on('click', this.handleClick);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Element's node type. e.g. 'div'\n * @param {Object=} props An object of properties that should be set on the element\n * @param {Object=} attributes An object of attributes that should be set on the element\n * @return {Element}\n * @method createEl\n */\n createEl(tag='div', props={}, attributes={}) {\n props = assign({\n className: this.buildCSSClass(),\n tabIndex: 0\n }, props);\n\n if (tag === 'button') {\n log.error(`Creating a ClickableComponent with an HTML element of ${tag} is not supported; use a Button instead.`);\n }\n\n // Add ARIA attributes for clickable element which is not a native HTML button\n attributes = assign({\n role: 'button',\n 'aria-live': 'polite' // let the screen reader user know that the text of the element may change\n }, attributes);\n\n let el = super.createEl(tag, props, attributes);\n\n this.createControlTextEl(el);\n\n return el;\n }\n\n /**\n * create control text\n *\n * @param {Element} el Parent element for the control text\n * @return {Element}\n * @method controlText\n */\n createControlTextEl(el) {\n this.controlTextEl_ = Dom.createEl('span', {\n className: 'vjs-control-text'\n });\n\n if (el) {\n el.appendChild(this.controlTextEl_);\n }\n\n this.controlText(this.controlText_);\n\n return this.controlTextEl_;\n }\n\n /**\n * Controls text - both request and localize\n *\n * @param {String} text Text for element\n * @return {String}\n * @method controlText\n */\n controlText(text) {\n if (!text) return this.controlText_ || 'Need Text';\n\n this.controlText_ = text;\n this.controlTextEl_.innerHTML = this.localize(this.controlText_);\n\n return this;\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String}\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-control vjs-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Adds a child component inside this clickable-component\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}) {\n // TODO: Fix adding an actionable child to a ClickableComponent; currently\n // it will cause issues with assistive technology (e.g. screen readers)\n // which support ARIA, since an element with role=\"button\" cannot have\n // actionable child elements.\n\n //let className = this.constructor.name;\n //log.warn(`Adding a child to a ClickableComponent (${className}) can cause issues with assistive technology which supports ARIA, since an element with role=\"button\" cannot have actionable child elements.`);\n\n return super.addChild(child, options);\n }\n\n /**\n * Handle Click - Override with specific functionality for component\n *\n * @method handleClick\n */\n handleClick() {}\n\n /**\n * Handle Focus - Add keyboard functionality to element\n *\n * @method handleFocus\n */\n handleFocus() {\n Events.on(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n /**\n * Handle KeyPress (document level) - Trigger click when Space or Enter key is pressed\n *\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n // Support Space (32) or Enter (13) key operation to fire a click event\n if (event.which === 32 || event.which === 13) {\n event.preventDefault();\n this.handleClick(event);\n } else if (super.handleKeyPress) {\n super.handleKeyPress(event); // Pass keypress handling up for unsupported keys\n }\n }\n\n /**\n * Handle Blur - Remove keyboard triggers\n *\n * @method handleBlur\n */\n handleBlur() {\n Events.off(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n}\n\nComponent.registerComponent('ClickableComponent', ClickableComponent);\nexport default ClickableComponent;\n",
"import Button from './button';\nimport Component from './component';\n\n/**\n * The `CloseButton` component is a button which fires a \"close\" event\n * when it is activated.\n *\n * @extends Button\n * @class CloseButton\n */\nclass CloseButton extends Button {\n\n constructor(player, options) {\n super(player, options);\n this.controlText(options && options.controlText || this.localize('Close'));\n }\n\n buildCSSClass() {\n return `vjs-close-button ${super.buildCSSClass()}`;\n }\n\n handleClick() {\n this.trigger({type: 'close', bubbles: false});\n }\n}\n\nComponent.registerComponent('CloseButton', CloseButton);\nexport default CloseButton;\n",
"/**\n * @file component.js\n *\n * Player Component - Base class for all UI objects\n */\n\nimport window from 'global/window';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as Events from './utils/events.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\n\n\n/**\n * Base UI Component class\n * Components are embeddable UI objects that are represented by both a\n * javascript object and an element in the DOM. They can be children of other\n * components, and can have many children themselves.\n * ```js\n * // adding a button to the player\n * var button = player.addChild('button');\n * button.el(); // -> button element\n * ```\n * ```html\n * <div class=\"video-js\">\n * <div class=\"vjs-button\">Button</div>\n * </div>\n * ```\n * Components are also event targets.\n * ```js\n * button.on('click', function(){\n * console.log('Button Clicked!');\n * });\n * button.trigger('customevent');\n * ```\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @class Component\n */\nclass Component {\n\n constructor(player, options, ready) {\n\n // The component might be the player itself and we can't pass `this` to super\n if (!player && this.play) {\n this.player_ = player = this; // eslint-disable-line\n } else {\n this.player_ = player;\n }\n\n // Make a copy of prototype.options_ to protect against overriding defaults\n this.options_ = mergeOptions({}, this.options_);\n\n // Updated options with supplied options\n options = this.options_ = mergeOptions(this.options_, options);\n\n // Get ID from options or options element if one is supplied\n this.id_ = options.id || (options.el && options.el.id);\n\n // If there was no ID from the options, generate one\n if (!this.id_) {\n // Don't require the player ID function in the case of mock players\n let id = player && player.id && player.id() || 'no_player';\n\n this.id_ = `${id}_component_${Guid.newGUID()}`;\n }\n\n this.name_ = options.name || null;\n\n // Create element if one wasn't provided in options\n if (options.el) {\n this.el_ = options.el;\n } else if (options.createEl !== false) {\n this.el_ = this.createEl();\n }\n\n this.children_ = [];\n this.childIndex_ = {};\n this.childNameIndex_ = {};\n\n // Add any child components in options\n if (options.initChildren !== false) {\n this.initChildren();\n }\n\n this.ready(ready);\n // Don't want to trigger ready here or it will before init is actually\n // finished for all children that run this constructor\n\n if (options.reportTouchActivity !== false) {\n this.enableTouchActivity();\n }\n }\n\n /**\n * Dispose of the component and all child components\n *\n * @method dispose\n */\n dispose() {\n this.trigger({ type: 'dispose', bubbles: false });\n\n // Dispose all children.\n if (this.children_) {\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i].dispose) {\n this.children_[i].dispose();\n }\n }\n }\n\n // Delete child references\n this.children_ = null;\n this.childIndex_ = null;\n this.childNameIndex_ = null;\n\n // Remove all event listeners.\n this.off();\n\n // Remove element from DOM\n if (this.el_.parentNode) {\n this.el_.parentNode.removeChild(this.el_);\n }\n\n Dom.removeElData(this.el_);\n this.el_ = null;\n }\n\n /**\n * Return the component's player\n *\n * @return {Player}\n * @method player\n */\n player() {\n return this.player_;\n }\n\n /**\n * Deep merge of options objects\n * Whenever a property is an object on both options objects\n * the two properties will be merged using mergeOptions.\n *\n * ```js\n * Parent.prototype.options_ = {\n * optionSet: {\n * 'childOne': { 'foo': 'bar', 'asdf': 'fdsa' },\n * 'childTwo': {},\n * 'childThree': {}\n * }\n * }\n * newOptions = {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'abc': '123' }\n * 'childTwo': null,\n * 'childFour': {}\n * }\n * }\n *\n * this.options(newOptions);\n * ```\n * RESULT\n * ```js\n * {\n * optionSet: {\n * 'childOne': { 'foo': 'baz', 'asdf': 'fdsa', 'abc': '123' },\n * 'childTwo': null, // Disabled. Won't be initialized.\n * 'childThree': {},\n * 'childFour': {}\n * }\n * }\n * ```\n *\n * @param {Object} obj Object of new option values\n * @return {Object} A NEW object of this.options_ and obj merged\n * @method options\n */\n options(obj) {\n log.warn('this.options() has been deprecated and will be moved to the constructor in 6.0');\n\n if (!obj) {\n return this.options_;\n }\n\n this.options_ = mergeOptions(this.options_, obj);\n return this.options_;\n }\n\n /**\n * Get the component's DOM element\n * ```js\n * var domEl = myComponent.el();\n * ```\n *\n * @return {Element}\n * @method el\n */\n el() {\n return this.el_;\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} tagName Element's node type. e.g. 'div'\n * @param {Object=} properties An object of properties that should be set\n * @param {Object=} attributes An object of attributes that should be set\n * @return {Element}\n * @method createEl\n */\n createEl(tagName, properties, attributes) {\n return Dom.createEl(tagName, properties, attributes);\n }\n\n localize(string) {\n let code = this.player_.language && this.player_.language();\n let languages = this.player_.languages && this.player_.languages();\n\n if (!code || !languages) {\n return string;\n }\n\n let language = languages[code];\n\n if (language && language[string]) {\n return language[string];\n }\n\n let primaryCode = code.split('-')[0];\n let primaryLang = languages[primaryCode];\n\n if (primaryLang && primaryLang[string]) {\n return primaryLang[string];\n }\n\n return string;\n }\n\n /**\n * Return the component's DOM element where children are inserted.\n * Will either be the same as el() or a new element defined in createEl().\n *\n * @return {Element}\n * @method contentEl\n */\n contentEl() {\n return this.contentEl_ || this.el_;\n }\n\n /**\n * Get the component's ID\n * ```js\n * var id = myComponent.id();\n * ```\n *\n * @return {String}\n * @method id\n */\n id() {\n return this.id_;\n }\n\n /**\n * Get the component's name. The name is often used to reference the component.\n * ```js\n * var name = myComponent.name();\n * ```\n *\n * @return {String}\n * @method name\n */\n name() {\n return this.name_;\n }\n\n /**\n * Get an array of all child components\n * ```js\n * var kids = myComponent.children();\n * ```\n *\n * @return {Array} The children\n * @method children\n */\n children() {\n return this.children_;\n }\n\n /**\n * Returns a child component with the provided ID\n *\n * @return {Component}\n * @method getChildById\n */\n getChildById(id) {\n return this.childIndex_[id];\n }\n\n /**\n * Returns a child component with the provided name\n *\n * @return {Component}\n * @method getChild\n */\n getChild(name) {\n return this.childNameIndex_[name];\n }\n\n /**\n * Adds a child component inside this component\n * ```js\n * myComponent.el();\n * // -> <div class='my-component'></div>\n * myComponent.children();\n * // [empty array]\n *\n * var myButton = myComponent.addChild('MyButton');\n * // -> <div class='my-component'><div class=\"my-button\">myButton<div></div>\n * // -> myButton === myComponent.children()[0];\n * ```\n * Pass in options for child constructors and options for children of the child\n * ```js\n * var myButton = myComponent.addChild('MyButton', {\n * text: 'Press Me',\n * buttonChildExample: {\n * buttonChildOption: true\n * }\n * });\n * ```\n *\n * @param {String|Component} child The class name or instance of a child to add\n * @param {Object=} options Options, including options to be passed to children of the child.\n * @param {Number} index into our children array to attempt to add the child\n * @return {Component} The child component (created by this process if a string was used)\n * @method addChild\n */\n addChild(child, options={}, index=this.children_.length) {\n let component;\n let componentName;\n\n // If child is a string, create nt with options\n if (typeof child === 'string') {\n componentName = child;\n\n // Options can also be specified as a boolean, so convert to an empty object if false.\n if (!options) {\n options = {};\n }\n\n // Same as above, but true is deprecated so show a warning.\n if (options === true) {\n log.warn('Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`.');\n options = {};\n }\n\n // If no componentClass in options, assume componentClass is the name lowercased\n // (e.g. playButton)\n let componentClassName = options.componentClass || toTitleCase(componentName);\n\n // Set name through options\n options.name = componentName;\n\n // Create a new object & element for this controls set\n // If there's no .player_, this is a player\n let ComponentClass = Component.getComponent(componentClassName);\n\n if (!ComponentClass) {\n throw new Error(`Component ${componentClassName} does not exist`);\n }\n\n // data stored directly on the videojs object may be\n // misidentified as a component to retain\n // backwards-compatibility with 4.x. check to make sure the\n // component class can be instantiated.\n if (typeof ComponentClass !== 'function') {\n return null;\n }\n\n component = new ComponentClass(this.player_ || this, options);\n\n // child is a component instance\n } else {\n component = child;\n }\n\n this.children_.splice(index, 0, component);\n\n if (typeof component.id === 'function') {\n this.childIndex_[component.id()] = component;\n }\n\n // If a name wasn't used to create the component, check if we can use the\n // name function of the component\n componentName = componentName || (component.name && component.name());\n\n if (componentName) {\n this.childNameIndex_[componentName] = component;\n }\n\n // Add the UI object's element to the container div (box)\n // Having an element is not required\n if (typeof component.el === 'function' && component.el()) {\n let childNodes = this.contentEl().children;\n let refNode = childNodes[index] || null;\n this.contentEl().insertBefore(component.el(), refNode);\n }\n\n // Return so it can stored on parent object if desired.\n return component;\n }\n\n /**\n * Remove a child component from this component's list of children, and the\n * child component's element from this component's element\n *\n * @param {Component} component Component to remove\n * @method removeChild\n */\n removeChild(component) {\n if (typeof component === 'string') {\n component = this.getChild(component);\n }\n\n if (!component || !this.children_) {\n return;\n }\n\n let childFound = false;\n\n for (let i = this.children_.length - 1; i >= 0; i--) {\n if (this.children_[i] === component) {\n childFound = true;\n this.children_.splice(i, 1);\n break;\n }\n }\n\n if (!childFound) {\n return;\n }\n\n this.childIndex_[component.id()] = null;\n this.childNameIndex_[component.name()] = null;\n\n let compEl = component.el();\n\n if (compEl && compEl.parentNode === this.contentEl()) {\n this.contentEl().removeChild(component.el());\n }\n }\n\n /**\n * Add and initialize default child components from options\n * ```js\n * // when an instance of MyComponent is created, all children in options\n * // will be added to the instance by their name strings and options\n * MyComponent.prototype.options_ = {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * };\n *\n * // Or when creating the component\n * var myComp = new MyComponent(player, {\n * children: [\n * 'myChildComponent'\n * ],\n * myChildComponent: {\n * myChildOption: true\n * }\n * });\n * ```\n * The children option can also be an array of\n * child options objects (that also include a 'name' key).\n * This can be used if you have two child components of the\n * same type that need different options.\n * ```js\n * var myComp = new MyComponent(player, {\n * children: [\n * 'button',\n * {\n * name: 'button',\n * someOtherOption: true\n * },\n * {\n * name: 'button',\n * someOtherOption: false\n * }\n * ]\n * });\n * ```\n *\n * @method initChildren\n */\n initChildren() {\n let children = this.options_.children;\n\n if (children) {\n // `this` is `parent`\n let parentOptions = this.options_;\n\n let handleAdd = (child) => {\n let name = child.name;\n let opts = child.opts;\n\n // Allow options for children to be set at the parent options\n // e.g. videojs(id, { controlBar: false });\n // instead of videojs(id, { children: { controlBar: false });\n if (parentOptions[name] !== undefined) {\n opts = parentOptions[name];\n }\n\n // Allow for disabling default components\n // e.g. options['children']['posterImage'] = false\n if (opts === false) {\n return;\n }\n\n // Allow options to be passed as a simple boolean if no configuration\n // is necessary.\n if (opts === true) {\n opts = {};\n }\n\n // We also want to pass the original player options to each component as well so they don't need to\n // reach back into the player for options later.\n opts.playerOptions = this.options_.playerOptions;\n\n // Create and add the child component.\n // Add a direct reference to the child by name on the parent instance.\n // If two of the same component are used, different names should be supplied\n // for each\n let newChild = this.addChild(name, opts);\n if (newChild) {\n this[name] = newChild;\n }\n };\n\n // Allow for an array of children details to passed in the options\n let workingChildren;\n let Tech = Component.getComponent('Tech');\n\n if (Array.isArray(children)) {\n workingChildren = children;\n } else {\n workingChildren = Object.keys(children);\n }\n\n workingChildren\n // children that are in this.options_ but also in workingChildren would\n // give us extra children we do not want. So, we want to filter them out.\n .concat(Object.keys(this.options_)\n .filter(function(child) {\n return !workingChildren.some(function(wchild) {\n if (typeof wchild === 'string') {\n return child === wchild;\n } else {\n return child === wchild.name;\n }\n });\n }))\n .map((child) => {\n let name, opts;\n\n if (typeof child === 'string') {\n name = child;\n opts = children[name] || this.options_[name] || {};\n } else {\n name = child.name;\n opts = child;\n }\n\n return {name, opts};\n })\n .filter((child) => {\n // we have to make sure that child.name isn't in the techOrder since\n // techs are registerd as Components but can't aren't compatible\n // See https://github.com/videojs/video.js/issues/2772\n let c = Component.getComponent(child.opts.componentClass ||\n toTitleCase(child.name));\n return c && !Tech.isTech(c);\n })\n .forEach(handleAdd);\n }\n }\n\n /**\n * Allows sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n // Child classes can include a function that does:\n // return 'CLASS NAME' + this._super();\n return '';\n }\n\n /**\n * Add an event listener to this component's element\n * ```js\n * var myFunc = function(){\n * var myComponent = this;\n * // Do something when the event is fired\n * };\n *\n * myComponent.on('eventType', myFunc);\n * ```\n * The context of myFunc will be myComponent unless previously bound.\n * Alternatively, you can add a listener to another element or component.\n * ```js\n * myComponent.on(otherElement, 'eventName', myFunc);\n * myComponent.on(otherComponent, 'eventName', myFunc);\n * ```\n * The benefit of using this over `VjsEvents.on(otherElement, 'eventName', myFunc)`\n * and `otherComponent.on('eventName', myFunc)` is that this way the listeners\n * will be automatically cleaned up when either component is disposed.\n * It will also bind myComponent as the context of myFunc.\n * **NOTE**: When using this on elements in the page other than window\n * and document (both permanent), if you remove the element from the DOM\n * you need to call `myComponent.trigger(el, 'dispose')` on it to clean up\n * references to it and allow the browser to garbage collect it.\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The event handler or event type\n * @param {Function} third The event handler\n * @return {Component}\n * @method on\n */\n on(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.on(this.el_, first, Fn.bind(this, second));\n\n // Targeting another component or element\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n // When this component is disposed, remove the listener from the other component\n const removeOnDispose = () => this.off(target, type, fn);\n\n // Use the same function ID so we can remove it later it using the ID\n // of the original listener\n removeOnDispose.guid = fn.guid;\n this.on('dispose', removeOnDispose);\n\n // If the other component is disposed first we need to clean the reference\n // to the other component in this component's removeOnDispose listener\n // Otherwise we create a memory leak.\n const cleanRemover = () => this.off('dispose', removeOnDispose);\n\n // Add the same function ID so we can easily remove it later\n cleanRemover.guid = fn.guid;\n\n // Check if this is a DOM node\n if (first.nodeName) {\n // Add the listener to the other element\n Events.on(target, type, fn);\n Events.on(target, 'dispose', cleanRemover);\n\n // Should be a component\n // Not using `instanceof Component` because it makes mock players difficult\n } else if (typeof first.on === 'function') {\n // Add the listener to the other component\n target.on(type, fn);\n target.on('dispose', cleanRemover);\n }\n }\n\n return this;\n }\n\n /**\n * Remove an event listener from this component's element\n * ```js\n * myComponent.off('eventType', myFunc);\n * ```\n * If myFunc is excluded, ALL listeners for the event type will be removed.\n * If eventType is excluded, ALL listeners will be removed from the component.\n * Alternatively you can use `off` to remove listeners that were added to other\n * elements or components using `myComponent.on(otherComponent...`.\n * In this case both the event type and listener function are REQUIRED.\n * ```js\n * myComponent.off(otherElement, 'eventType', myFunc);\n * myComponent.off(otherComponent, 'eventType', myFunc);\n * ```\n *\n * @param {String=|Component} first The event type or other component\n * @param {Function=|String} second The listener function or event type\n * @param {Function=} third The listener for other component\n * @return {Component}\n * @method off\n */\n off(first, second, third) {\n if (!first || typeof first === 'string' || Array.isArray(first)) {\n Events.off(this.el_, first, second);\n } else {\n const target = first;\n const type = second;\n // Ensure there's at least a guid, even if the function hasn't been used\n const fn = Fn.bind(this, third);\n\n // Remove the dispose listener on this component,\n // which was given the same guid as the event listener\n this.off('dispose', fn);\n\n if (first.nodeName) {\n // Remove the listener\n Events.off(target, type, fn);\n // Remove the listener for cleaning the dispose listener\n Events.off(target, 'dispose', fn);\n } else {\n target.off(type, fn);\n target.off('dispose', fn);\n }\n }\n\n return this;\n }\n\n /**\n * Add an event listener to be triggered only once and then removed\n * ```js\n * myComponent.one('eventName', myFunc);\n * ```\n * Alternatively you can add a listener to another element or component\n * that will be triggered only once.\n * ```js\n * myComponent.one(otherElement, 'eventName', myFunc);\n * myComponent.one(otherComponent, 'eventName', myFunc);\n * ```\n *\n * @param {String|Component} first The event type or other component\n * @param {Function|String} second The listener function or event type\n * @param {Function=} third The listener function for other component\n * @return {Component}\n * @method one\n */\n one(first, second, third) {\n if (typeof first === 'string' || Array.isArray(first)) {\n Events.one(this.el_, first, Fn.bind(this, second));\n } else {\n const target = first;\n const type = second;\n const fn = Fn.bind(this, third);\n\n const newFunc = () => {\n this.off(target, type, newFunc);\n fn.apply(null, arguments);\n };\n\n // Keep the same function ID so we can remove it later\n newFunc.guid = fn.guid;\n\n this.on(target, type, newFunc);\n }\n\n return this;\n }\n\n /**\n * Trigger an event on an element\n * ```js\n * myComponent.trigger('eventName');\n * myComponent.trigger({'type':'eventName'});\n * myComponent.trigger('eventName', {data: 'some data'});\n * myComponent.trigger({'type':'eventName'}, {data: 'some data'});\n * ```\n *\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Component} self\n * @method trigger\n */\n trigger(event, hash) {\n Events.trigger(this.el_, event, hash);\n return this;\n }\n\n /**\n * Bind a listener to the component's ready state.\n * Different from event listeners in that if the ready event has already happened\n * it will trigger the function immediately.\n *\n * @param {Function} fn Ready listener\n * @param {Boolean} sync Exec the listener synchronously if component is ready\n * @return {Component}\n * @method ready\n */\n ready(fn, sync=false) {\n if (fn) {\n if (this.isReady_) {\n if (sync) {\n fn.call(this);\n } else {\n // Call the function asynchronously by default for consistency\n this.setTimeout(fn, 1);\n }\n } else {\n this.readyQueue_ = this.readyQueue_ || [];\n this.readyQueue_.push(fn);\n }\n }\n return this;\n }\n\n /**\n * Trigger the ready listeners\n *\n * @return {Component}\n * @method triggerReady\n */\n triggerReady() {\n this.isReady_ = true;\n\n // Ensure ready is triggerd asynchronously\n this.setTimeout(function(){\n let readyQueue = this.readyQueue_;\n\n // Reset Ready Queue\n this.readyQueue_ = [];\n\n if (readyQueue && readyQueue.length > 0) {\n readyQueue.forEach(function(fn){\n fn.call(this);\n }, this);\n }\n\n // Allow for using event listeners also\n this.trigger('ready');\n }, 1);\n }\n\n /**\n * Finds a single DOM element matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\n $(selector, context) {\n return Dom.$(selector, context || this.contentEl());\n }\n\n /**\n * Finds a all DOM elements matching `selector` within the component's\n * `contentEl` or another custom context.\n *\n * @method $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\n $$(selector, context) {\n return Dom.$$(selector, context || this.contentEl());\n }\n\n /**\n * Check if a component's element has a CSS class name\n *\n * @param {String} classToCheck Classname to check\n * @return {Component}\n * @method hasClass\n */\n hasClass(classToCheck) {\n return Dom.hasElClass(this.el_, classToCheck);\n }\n\n /**\n * Add a CSS class name to the component's element\n *\n * @param {String} classToAdd Classname to add\n * @return {Component}\n * @method addClass\n */\n addClass(classToAdd) {\n Dom.addElClass(this.el_, classToAdd);\n return this;\n }\n\n /**\n * Remove a CSS class name from the component's element\n *\n * @param {String} classToRemove Classname to remove\n * @return {Component}\n * @method removeClass\n */\n removeClass(classToRemove) {\n Dom.removeElClass(this.el_, classToRemove);\n return this;\n }\n\n /**\n * Add or remove a CSS class name from the component's element\n *\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n *\n * @return {Component}\n * @method toggleClass\n */\n toggleClass(classToToggle, predicate) {\n Dom.toggleElClass(this.el_, classToToggle, predicate);\n return this;\n }\n\n /**\n * Show the component element if hidden\n *\n * @return {Component}\n * @method show\n */\n show() {\n this.removeClass('vjs-hidden');\n return this;\n }\n\n /**\n * Hide the component element if currently showing\n *\n * @return {Component}\n * @method hide\n */\n hide() {\n this.addClass('vjs-hidden');\n return this;\n }\n\n /**\n * Lock an item in its visible state\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method lockShowing\n */\n lockShowing() {\n this.addClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Unlock an item to be hidden\n * To be used with fadeIn/fadeOut.\n *\n * @return {Component}\n * @private\n * @method unlockShowing\n */\n unlockShowing() {\n this.removeClass('vjs-lock-showing');\n return this;\n }\n\n /**\n * Set or get the width of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num Optional width number\n * @param {Boolean} skipListeners Skip the 'resize' event trigger\n * @return {Component} This component, when setting the width\n * @return {Number|String} The width, when getting\n * @method width\n */\n width(num, skipListeners) {\n return this.dimension('width', num, skipListeners);\n }\n\n /**\n * Get or set the height of the component (CSS values)\n * Setting the video tag dimension values only works with values in pixels.\n * Percent values will not work.\n * Some percents can be used, but width()/height() will return the number + %,\n * not the actual computed width/height.\n *\n * @param {Number|String=} num New component height\n * @param {Boolean=} skipListeners Skip the resize event trigger\n * @return {Component} This component, when setting the height\n * @return {Number|String} The height, when getting\n * @method height\n */\n height(num, skipListeners) {\n return this.dimension('height', num, skipListeners);\n }\n\n /**\n * Set both width and height at the same time\n *\n * @param {Number|String} width Width of player\n * @param {Number|String} height Height of player\n * @return {Component} The component\n * @method dimensions\n */\n dimensions(width, height) {\n // Skip resize listeners on width for optimization\n return this.width(width, true).height(height);\n }\n\n /**\n * Get or set width or height\n * This is the shared code for the width() and height() methods.\n * All for an integer, integer + 'px' or integer + '%';\n * Known issue: Hidden elements officially have a width of 0. We're defaulting\n * to the style.width value and falling back to computedStyle which has the\n * hidden element issue. Info, but probably not an efficient fix:\n * http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\n *\n * @param {String} widthOrHeight 'width' or 'height'\n * @param {Number|String=} num New dimension\n * @param {Boolean=} skipListeners Skip resize event trigger\n * @return {Component} The component if a dimension was set\n * @return {Number|String} The dimension if nothing was set\n * @private\n * @method dimension\n */\n dimension(widthOrHeight, num, skipListeners) {\n if (num !== undefined) {\n // Set to zero if null or literally NaN (NaN !== NaN)\n if (num === null || num !== num) {\n num = 0;\n }\n\n // Check if using css width/height (% or px) and adjust\n if (('' + num).indexOf('%') !== -1 || ('' + num).indexOf('px') !== -1) {\n this.el_.style[widthOrHeight] = num;\n } else if (num === 'auto') {\n this.el_.style[widthOrHeight] = '';\n } else {\n this.el_.style[widthOrHeight] = num + 'px';\n }\n\n // skipListeners allows us to avoid triggering the resize event when setting both width and height\n if (!skipListeners) {\n this.trigger('resize');\n }\n\n // Return component\n return this;\n }\n\n // Not setting a value, so getting it\n // Make sure element exists\n if (!this.el_) {\n return 0;\n }\n\n // Get dimension value from style\n let val = this.el_.style[widthOrHeight];\n let pxIndex = val.indexOf('px');\n\n if (pxIndex !== -1) {\n // Return the pixel value with no 'px'\n return parseInt(val.slice(0, pxIndex), 10);\n }\n\n // No px so using % or no style was set, so falling back to offsetWidth/height\n // If component has display:none, offset will return 0\n // TODO: handle display:none and no dimension style using px\n return parseInt(this.el_['offset' + toTitleCase(widthOrHeight)], 10);\n }\n\n /**\n * Emit 'tap' events when touch events are supported\n * This is used to support toggling the controls through a tap on the video.\n * We're requiring them to be enabled because otherwise every component would\n * have this extra overhead unnecessarily, on mobile devices where extra\n * overhead is especially bad.\n *\n * @private\n * @method emitTapEvents\n */\n emitTapEvents() {\n // Track the start time so we can determine how long the touch lasted\n let touchStart = 0;\n let firstTouch = null;\n\n // Maximum movement allowed during a touch event to still be considered a tap\n // Other popular libs use anywhere from 2 (hammer.js) to 15, so 10 seems like a nice, round number.\n const tapMovementThreshold = 10;\n\n // The maximum length a touch can be while still being considered a tap\n const touchTimeThreshold = 200;\n\n let couldBeTap;\n\n this.on('touchstart', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length === 1) {\n // Copy the touches object to prevent modifying the original\n firstTouch = assign({}, event.touches[0]);\n // Record start time so we can detect a tap vs. \"touch and hold\"\n touchStart = new Date().getTime();\n // Reset couldBeTap tracking\n couldBeTap = true;\n }\n });\n\n this.on('touchmove', function(event) {\n // If more than one finger, don't consider treating this as a click\n if (event.touches.length > 1) {\n couldBeTap = false;\n } else if (firstTouch) {\n // Some devices will throw touchmoves for all but the slightest of taps.\n // So, if we moved only a small distance, this could still be a tap\n const xdiff = event.touches[0].pageX - firstTouch.pageX;\n const ydiff = event.touches[0].pageY - firstTouch.pageY;\n const touchDistance = Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n\n if (touchDistance > tapMovementThreshold) {\n couldBeTap = false;\n }\n }\n });\n\n const noTap = function() {\n couldBeTap = false;\n };\n\n // TODO: Listen to the original target. http://youtu.be/DujfpXOKUp8?t=13m8s\n this.on('touchleave', noTap);\n this.on('touchcancel', noTap);\n\n // When the touch ends, measure how long it took and trigger the appropriate\n // event\n this.on('touchend', function(event) {\n firstTouch = null;\n // Proceed only if the touchmove/leave/cancel event didn't happen\n if (couldBeTap === true) {\n // Measure how long the touch lasted\n const touchTime = new Date().getTime() - touchStart;\n\n // Make sure the touch was less than the threshold to be considered a tap\n if (touchTime < touchTimeThreshold) {\n // Don't let browser turn this into a click\n event.preventDefault();\n this.trigger('tap');\n // It may be good to copy the touchend event object and change the\n // type to tap, if the other event properties aren't exact after\n // Events.fixEvent runs (e.g. event.target)\n }\n }\n });\n }\n\n /**\n * Report user touch activity when touch events occur\n * User activity is used to determine when controls should show/hide. It's\n * relatively simple when it comes to mouse events, because any mouse event\n * should show the controls. So we capture mouse events that bubble up to the\n * player and report activity when that happens.\n * With touch events it isn't as easy. We can't rely on touch events at the\n * player level, because a tap (touchstart + touchend) on the video itself on\n * mobile devices is meant to turn controls off (and on). User activity is\n * checked asynchronously, so what could happen is a tap event on the video\n * turns the controls off, then the touchend event bubbles up to the player,\n * which if it reported user activity, would turn the controls right back on.\n * (We also don't want to completely block touch events from bubbling up)\n * Also a touchmove, touch+hold, and anything other than a tap is not supposed\n * to turn the controls back on on a mobile device.\n * Here we're setting the default component behavior to report user activity\n * whenever touch events happen, and this can be turned off by components that\n * want touch events to act differently.\n *\n * @method enableTouchActivity\n */\n enableTouchActivity() {\n // Don't continue if the root player doesn't support reporting user activity\n if (!this.player() || !this.player().reportUserActivity) {\n return;\n }\n\n // listener for reporting that the user is active\n const report = Fn.bind(this.player(), this.player().reportUserActivity);\n\n let touchHolding;\n\n this.on('touchstart', function() {\n report();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(touchHolding);\n // report at the same interval as activityCheck\n touchHolding = this.setInterval(report, 250);\n });\n\n const touchEnd = function(event) {\n report();\n // stop the interval that maintains activity if the touch is holding\n this.clearInterval(touchHolding);\n };\n\n this.on('touchmove', report);\n this.on('touchend', touchEnd);\n this.on('touchcancel', touchEnd);\n }\n\n /**\n * Creates timeout and sets up disposal automatically.\n *\n * @param {Function} fn The function to run after the timeout.\n * @param {Number} timeout Number of ms to delay before executing specified function.\n * @return {Number} Returns the timeout ID\n * @method setTimeout\n */\n setTimeout(fn, timeout) {\n fn = Fn.bind(this, fn);\n\n // window.setTimeout would be preferable here, but due to some bizarre issue with Sinon and/or Phantomjs, we can't.\n let timeoutId = window.setTimeout(fn, timeout);\n\n const disposeFn = function() {\n this.clearTimeout(timeoutId);\n };\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.on('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Clears a timeout and removes the associated dispose listener\n *\n * @param {Number} timeoutId The id of the timeout to clear\n * @return {Number} Returns the timeout ID\n * @method clearTimeout\n */\n clearTimeout(timeoutId) {\n window.clearTimeout(timeoutId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-timeout-${timeoutId}`;\n\n this.off('dispose', disposeFn);\n\n return timeoutId;\n }\n\n /**\n * Creates an interval and sets up disposal automatically.\n *\n * @param {Function} fn The function to run every N seconds.\n * @param {Number} interval Number of ms to delay before executing specified function.\n * @return {Number} Returns the interval ID\n * @method setInterval\n */\n setInterval(fn, interval) {\n fn = Fn.bind(this, fn);\n\n let intervalId = window.setInterval(fn, interval);\n\n const disposeFn = function() {\n this.clearInterval(intervalId);\n };\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.on('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Clears an interval and removes the associated dispose listener\n *\n * @param {Number} intervalId The id of the interval to clear\n * @return {Number} Returns the interval ID\n * @method clearInterval\n */\n clearInterval(intervalId) {\n window.clearInterval(intervalId);\n\n const disposeFn = function() {};\n\n disposeFn.guid = `vjs-interval-${intervalId}`;\n\n this.off('dispose', disposeFn);\n\n return intervalId;\n }\n\n /**\n * Registers a component\n *\n * @param {String} name Name of the component to register\n * @param {Object} comp The component to register\n * @static\n * @method registerComponent\n */\n static registerComponent(name, comp) {\n if (!Component.components_) {\n Component.components_ = {};\n }\n\n Component.components_[name] = comp;\n return comp;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getComponent(name) {\n if (Component.components_ && Component.components_[name]) {\n return Component.components_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)`);\n return window.videojs[name];\n }\n }\n\n /**\n * Sets up the constructor using the supplied init method\n * or uses the init of the parent object\n *\n * @param {Object} props An object of properties\n * @static\n * @deprecated\n * @method extend\n */\n static extend(props) {\n props = props || {};\n\n log.warn('Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead');\n\n // Set up the constructor using the supplied init method\n // or using the init of the parent object\n // Make sure to check the unobfuscated version for external libs\n let init = props.init || props.init || this.prototype.init || this.prototype.init || function() {};\n // In Resig's simple class inheritance (previously used) the constructor\n // is a function that calls `this.init.apply(arguments)`\n // However that would prevent us from using `ParentObject.call(this);`\n // in a Child constructor because the `this` in `this.init`\n // would still refer to the Child and cause an infinite loop.\n // We would instead have to do\n // `ParentObject.prototype.init.apply(this, arguments);`\n // Bleh. We're not creating a _super() function, so it's good to keep\n // the parent constructor reference simple.\n let subObj = function() {\n init.apply(this, arguments);\n };\n\n // Inherit from this object's prototype\n subObj.prototype = Object.create(this.prototype);\n // Reset the constructor property for subObj otherwise\n // instances of subObj would have the constructor of the parent Object\n subObj.prototype.constructor = subObj;\n\n // Make the class extendable\n subObj.extend = Component.extend;\n\n // Extend subObj's prototype with functions and other properties from props\n for (let name in props) {\n if (props.hasOwnProperty(name)) {\n subObj.prototype[name] = props[name];\n }\n }\n\n return subObj;\n }\n}\n\nComponent.registerComponent('Component', Component);\nexport default Component;\n",
"/**\n * @file control-bar.js\n */\nimport Component from '../component.js';\n\n// Required children\nimport PlayToggle from './play-toggle.js';\nimport CurrentTimeDisplay from './time-controls/current-time-display.js';\nimport DurationDisplay from './time-controls/duration-display.js';\nimport TimeDivider from './time-controls/time-divider.js';\nimport RemainingTimeDisplay from './time-controls/remaining-time-display.js';\nimport LiveDisplay from './live-display.js';\nimport ProgressControl from './progress-control/progress-control.js';\nimport FullscreenToggle from './fullscreen-toggle.js';\nimport VolumeControl from './volume-control/volume-control.js';\nimport VolumeMenuButton from './volume-menu-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport ChaptersButton from './text-track-controls/chapters-button.js';\nimport SubtitlesButton from './text-track-controls/subtitles-button.js';\nimport CaptionsButton from './text-track-controls/captions-button.js';\nimport PlaybackRateMenuButton from './playback-rate-menu/playback-rate-menu-button.js';\nimport CustomControlSpacer from './spacer-controls/custom-control-spacer.js';\n\n/**\n * Container of main controls\n *\n * @extends Component\n * @class ControlBar\n */\nclass ControlBar extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-control-bar',\n dir: 'ltr'\n }, {\n 'role': 'group' // The control bar is a group, so it can contain menuitems\n });\n }\n}\n\nControlBar.prototype.options_ = {\n loadEvent: 'play',\n children: [\n 'playToggle',\n 'volumeMenuButton',\n 'currentTimeDisplay',\n 'timeDivider',\n 'durationDisplay',\n 'progressControl',\n 'liveDisplay',\n 'remainingTimeDisplay',\n 'customControlSpacer',\n 'playbackRateMenuButton',\n 'chaptersButton',\n 'subtitlesButton',\n 'captionsButton',\n 'fullscreenToggle'\n ]\n};\n\nComponent.registerComponent('ControlBar', ControlBar);\nexport default ControlBar;\n",
"/**\n * @file fullscreen-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Toggle fullscreen video\n *\n * @extends Button\n * @class FullscreenToggle\n */\nclass FullscreenToggle extends Button {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-fullscreen-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles click for full screen\n *\n * @method handleClick\n */\n handleClick() {\n if (!this.player_.isFullscreen()) {\n this.player_.requestFullscreen();\n this.controlText('Non-Fullscreen');\n } else {\n this.player_.exitFullscreen();\n this.controlText('Fullscreen');\n }\n }\n\n}\n\nFullscreenToggle.prototype.controlText_ = 'Fullscreen';\n\nComponent.registerComponent('FullscreenToggle', FullscreenToggle);\nexport default FullscreenToggle;\n",
"/**\n * @file live-display.js\n */\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * Displays the live indicator\n * TODO - Future make it click to snap to live\n *\n * @extends Component\n * @class LiveDisplay\n */\nclass LiveDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.updateShowing();\n this.on(this.player(), 'durationchange', this.updateShowing);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n var el = super.createEl('div', {\n className: 'vjs-live-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-live-display',\n innerHTML: `<span class=\"vjs-control-text\">${this.localize('Stream Type')}</span>${this.localize('LIVE')}`\n }, {\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n updateShowing() {\n if (this.player().duration() === Infinity) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n}\n\nComponent.registerComponent('LiveDisplay', LiveDisplay);\nexport default LiveDisplay;\n",
"/**\n * @file mute-toggle.js\n */\nimport Button from '../button';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\n\n/**\n * A button component for muting the audio\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MuteToggle\n */\nclass MuteToggle extends Button {\n\n constructor(player, options) {\n super(player, options);\n\n this.on(player, 'volumechange', this.update);\n\n // hide mute toggle if the current tech doesn't support volume control\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n\n this.on(player, 'loadstart', function() {\n this.update(); // We need to update the button to account for a default muted state.\n\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-mute-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click on mute\n *\n * @method handleClick\n */\n handleClick() {\n this.player_.muted( this.player_.muted() ? false : true );\n }\n\n /**\n * Update volume\n *\n * @method update\n */\n update() {\n var vol = this.player_.volume(),\n level = 3;\n\n if (vol === 0 || this.player_.muted()) {\n level = 0;\n } else if (vol < 0.33) {\n level = 1;\n } else if (vol < 0.67) {\n level = 2;\n }\n\n // Don't rewrite the button text if the actual text doesn't change.\n // This causes unnecessary and confusing information for screen reader users.\n // This check is needed because this function gets called every time the volume level is changed.\n let toMute = this.player_.muted() ? 'Unmute' : 'Mute';\n if (this.controlText() !== toMute) {\n this.controlText(toMute);\n }\n\n /* TODO improve muted icon classes */\n for (var i = 0; i < 4; i++) {\n Dom.removeElClass(this.el_, `vjs-vol-${i}`);\n }\n Dom.addElClass(this.el_, `vjs-vol-${level}`);\n }\n\n}\n\nMuteToggle.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('MuteToggle', MuteToggle);\nexport default MuteToggle;\n",
"/**\n * @file play-toggle.js\n */\nimport Button from '../button.js';\nimport Component from '../component.js';\n\n/**\n * Button to toggle between play and pause\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PlayToggle\n */\nclass PlayToggle extends Button {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'play', this.handlePlay);\n this.on(player, 'pause', this.handlePause);\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-play-control ${super.buildCSSClass()}`;\n }\n\n /**\n * Handle click to toggle between play and pause\n *\n * @method handleClick\n */\n handleClick() {\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n /**\n * Add the vjs-playing class to the element so it can change appearance\n *\n * @method handlePlay\n */\n handlePlay() {\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n this.controlText('Pause'); // change the button text to \"Pause\"\n }\n\n /**\n * Add the vjs-paused class to the element so it can change appearance\n *\n * @method handlePause\n */\n handlePause() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.controlText('Play'); // change the button text to \"Play\"\n }\n\n}\n\nPlayToggle.prototype.controlText_ = 'Play';\n\nComponent.registerComponent('PlayToggle', PlayToggle);\nexport default PlayToggle;\n",
"/**\n * @file playback-rate-menu-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Menu from '../../menu/menu.js';\nimport PlaybackRateMenuItem from './playback-rate-menu-item.js';\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * The component for controlling the playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class PlaybackRateMenuButton\n */\nclass PlaybackRateMenuButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n this.updateVisibility();\n this.updateLabel();\n\n this.on(player, 'loadstart', this.updateVisibility);\n this.on(player, 'ratechange', this.updateLabel);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl();\n\n this.labelEl_ = Dom.createEl('div', {\n className: 'vjs-playback-rate-value',\n innerHTML: 1.0\n });\n\n el.appendChild(this.labelEl_);\n\n return el;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-playback-rate ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the playback rate menu\n *\n * @return {Menu} Menu object populated with items\n * @method createMenu\n */\n createMenu() {\n let menu = new Menu(this.player());\n let rates = this.playbackRates();\n\n if (rates) {\n for (let i = rates.length - 1; i >= 0; i--) {\n menu.addChild(\n new PlaybackRateMenuItem(this.player(), { 'rate': rates[i] + 'x'})\n );\n }\n }\n\n return menu;\n }\n\n /**\n * Updates ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current playback rate\n this.el().setAttribute('aria-valuenow', this.player().playbackRate());\n }\n\n /**\n * Handle menu item click\n *\n * @method handleClick\n */\n handleClick() {\n // select next rate option\n let currentRate = this.player().playbackRate();\n let rates = this.playbackRates();\n\n // this will select first one if the last one currently selected\n let newRate = rates[0];\n for (let i = 0; i < rates.length ; i++) {\n if (rates[i] > currentRate) {\n newRate = rates[i];\n break;\n }\n }\n this.player().playbackRate(newRate);\n }\n\n /**\n * Get possible playback rates\n *\n * @return {Array} Possible playback rates\n * @method playbackRates\n */\n playbackRates() {\n return this.options_['playbackRates'] || (this.options_.playerOptions && this.options_.playerOptions['playbackRates']);\n }\n\n /**\n * Get supported playback rates\n *\n * @return {Array} Supported playback rates\n * @method playbackRateSupported\n */\n playbackRateSupported() {\n return this.player().tech_\n && this.player().tech_['featuresPlaybackRate']\n && this.playbackRates()\n && this.playbackRates().length > 0\n ;\n }\n\n /**\n * Hide playback rate controls when they're no playback rate options to select\n *\n * @method updateVisibility\n */\n updateVisibility() {\n if (this.playbackRateSupported()) {\n this.removeClass('vjs-hidden');\n } else {\n this.addClass('vjs-hidden');\n }\n }\n\n /**\n * Update button label when rate changed\n *\n * @method updateLabel\n */\n updateLabel() {\n if (this.playbackRateSupported()) {\n this.labelEl_.innerHTML = this.player().playbackRate() + 'x';\n }\n }\n\n}\n\nPlaybackRateMenuButton.prototype.controlText_ = 'Playback Rate';\n\nComponent.registerComponent('PlaybackRateMenuButton', PlaybackRateMenuButton);\nexport default PlaybackRateMenuButton;\n",
"/**\n * @file playback-rate-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The specific menu item type for selecting a playback rate\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class PlaybackRateMenuItem\n */\nclass PlaybackRateMenuItem extends MenuItem {\n\n constructor(player, options){\n let label = options['rate'];\n let rate = parseFloat(label, 10);\n\n // Modify options for parent MenuItem class's init.\n options['label'] = label;\n options['selected'] = rate === 1;\n super(player, options);\n\n this.label = label;\n this.rate = rate;\n\n this.on(player, 'ratechange', this.update);\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player().playbackRate(this.rate);\n }\n\n /**\n * Update playback rate with selected rate\n *\n * @method update\n */\n update() {\n this.selected(this.player().playbackRate() === this.rate);\n }\n\n}\n\nPlaybackRateMenuItem.prototype.contentElType = 'button';\n\nComponent.registerComponent('PlaybackRateMenuItem', PlaybackRateMenuItem);\nexport default PlaybackRateMenuItem;\n",
"/**\n * @file load-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\n\n/**\n * Shows load progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class LoadProgressBar\n */\nclass LoadProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'progress', this.update);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-load-progress',\n innerHTML: `<span class=\"vjs-control-text\"><span>${this.localize('Loaded')}</span>: 0%</span>`\n });\n }\n\n /**\n * Update progress bar\n *\n * @method update\n */\n update() {\n let buffered = this.player_.buffered();\n let duration = this.player_.duration();\n let bufferedEnd = this.player_.bufferedEnd();\n let children = this.el_.children;\n\n // get the percent width of a time compared to the total end\n let percentify = function (time, end){\n let percent = (time / end) || 0; // no NaN\n return ((percent >= 1 ? 1 : percent) * 100) + '%';\n };\n\n // update the width of the progress bar\n this.el_.style.width = percentify(bufferedEnd, duration);\n\n // add child elements to represent the individual buffered time ranges\n for (let i = 0; i < buffered.length; i++) {\n let start = buffered.start(i);\n let end = buffered.end(i);\n let part = children[i];\n\n if (!part) {\n part = this.el_.appendChild(Dom.createEl());\n }\n\n // set the percent based on the width of the progress bar (bufferedEnd)\n part.style.left = percentify(start, bufferedEnd);\n part.style.width = percentify(end - start, bufferedEnd);\n }\n\n // remove unused buffered range elements\n for (let i = children.length; i > buffered.length; i--) {\n this.el_.removeChild(children[i-1]);\n }\n }\n\n}\n\nComponent.registerComponent('LoadProgressBar', LoadProgressBar);\nexport default LoadProgressBar;\n",
"/**\n * @file mouse-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport throttle from 'lodash-compat/function/throttle';\n\n/**\n * The Mouse Time Display component shows the time you will seek to\n * when hovering over the progress bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class MouseTimeDisplay\n */\nclass MouseTimeDisplay extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n this.update(0, 0);\n\n player.on('ready', () => {\n this.on(player.controlBar.progressControl.el(), 'mousemove', throttle(Fn.bind(this, this.handleMouseMove), 25));\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-mouse-display'\n });\n }\n\n handleMouseMove(event) {\n let duration = this.player_.duration();\n let newTime = this.calculateDistance(event) * duration;\n let position = event.pageX - Dom.findElPosition(this.el().parentNode).left;\n\n this.update(newTime, position);\n }\n\n update(newTime, position) {\n let time = formatTime(newTime, this.player_.duration());\n\n this.el().style.left = position + 'px';\n this.el().setAttribute('data-current-time', time);\n }\n\n calculateDistance(event) {\n return Dom.getPointerPosition(this.el().parentNode, event).x;\n }\n}\n\nComponent.registerComponent('MouseTimeDisplay', MouseTimeDisplay);\nexport default MouseTimeDisplay;\n",
"/**\n * @file play-progress-bar.js\n */\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Shows play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class PlayProgressBar\n */\nclass PlayProgressBar extends Component {\n\n constructor(player, options){\n super(player, options);\n this.updateDataAttr();\n this.on(player, 'timeupdate', this.updateDataAttr);\n player.ready(Fn.bind(this, this.updateDataAttr));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-play-progress vjs-slider-bar',\n innerHTML: `<span class=\"vjs-control-text\"><span>${this.localize('Progress')}</span>: 0%</span>`\n });\n }\n\n updateDataAttr() {\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('data-current-time', formatTime(time, this.player_.duration()));\n }\n\n}\n\nComponent.registerComponent('PlayProgressBar', PlayProgressBar);\nexport default PlayProgressBar;\n",
"/**\n * @file progress-control.js\n */\nimport Component from '../../component.js';\nimport SeekBar from './seek-bar.js';\nimport MouseTimeDisplay from './mouse-time-display.js';\n\n/**\n * The Progress Control component contains the seek bar, load progress,\n * and play progress\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class ProgressControl\n */\nclass ProgressControl extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-control vjs-control'\n });\n }\n}\n\nProgressControl.prototype.options_ = {\n children: [\n 'seekBar'\n ]\n};\n\nComponent.registerComponent('ProgressControl', ProgressControl);\nexport default ProgressControl;\n",
"/**\n * @file seek-bar.js\n */\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport LoadProgressBar from './load-progress-bar.js';\nimport PlayProgressBar from './play-progress-bar.js';\nimport * as Fn from '../../utils/fn.js';\nimport formatTime from '../../utils/format-time.js';\nimport assign from 'object.assign';\n\n/**\n * Seek Bar and holder for the progress bars\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class SeekBar\n */\nclass SeekBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'timeupdate', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-progress-holder'\n }, {\n 'aria-label': 'video progress bar'\n });\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n this.el_.setAttribute('aria-valuenow', (this.getPercent() * 100).toFixed(2)); // machine readable value of progress bar (percentage complete)\n this.el_.setAttribute('aria-valuetext', formatTime(time, this.player_.duration())); // human readable value of progress bar (time complete)\n }\n\n /**\n * Get percentage of video played\n *\n * @return {Number} Percentage played\n * @method getPercent\n */\n getPercent() {\n let percent = this.player_.currentTime() / this.player_.duration();\n return percent >= 1 ? 1 : percent;\n }\n\n /**\n * Handle mouse down on seek bar\n *\n * @method handleMouseDown\n */\n handleMouseDown(event) {\n super.handleMouseDown(event);\n\n this.player_.scrubbing(true);\n\n this.videoWasPlaying = !this.player_.paused();\n this.player_.pause();\n }\n\n /**\n * Handle mouse move on seek bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n let newTime = this.calculateDistance(event) * this.player_.duration();\n\n // Don't let video end while scrubbing.\n if (newTime === this.player_.duration()) { newTime = newTime - 0.1; }\n\n // Set new time (tell player to seek to new time)\n this.player_.currentTime(newTime);\n }\n\n /**\n * Handle mouse up on seek bar\n *\n * @method handleMouseUp\n */\n handleMouseUp(event) {\n super.handleMouseUp(event);\n\n this.player_.scrubbing(false);\n if (this.videoWasPlaying) {\n this.player_.play();\n }\n }\n\n /**\n * Move more quickly fast forward for keyboard-only users\n *\n * @method stepForward\n */\n stepForward() {\n this.player_.currentTime(this.player_.currentTime() + 5); // more quickly fast forward for keyboard-only users\n }\n\n /**\n * Move more quickly rewind for keyboard-only users\n *\n * @method stepBack\n */\n stepBack() {\n this.player_.currentTime(this.player_.currentTime() - 5); // more quickly rewind for keyboard-only users\n }\n\n}\n\nSeekBar.prototype.options_ = {\n children: [\n 'loadProgressBar',\n 'mouseTimeDisplay',\n 'playProgressBar'\n ],\n 'barName': 'playProgressBar'\n};\n\nSeekBar.prototype.playerEvent = 'timeupdate';\n\nComponent.registerComponent('SeekBar', SeekBar);\nexport default SeekBar;\n",
"/**\n * @file custom-control-spacer.js\n */\nimport Spacer from './spacer.js';\nimport Component from '../../component.js';\n\n/**\n * Spacer specifically meant to be used as an insertion point for new plugins, etc.\n *\n * @extends Spacer\n * @class CustomControlSpacer\n */\nclass CustomControlSpacer extends Spacer {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-custom-control-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl({\n className: this.buildCSSClass(),\n });\n\n // No-flex/table-cell mode requires there be some content\n // in the cell to fill the remaining space of the table.\n el.innerHTML = ' ';\n return el;\n }\n}\n\nComponent.registerComponent('CustomControlSpacer', CustomControlSpacer);\nexport default CustomControlSpacer;\n",
"/**\n * @file spacer.js\n */\nimport Component from '../../component.js';\n\n/**\n * Just an empty spacer element that can be used as an append point for plugins, etc.\n * Also can be used to create space between elements when necessary.\n *\n * @extends Component\n * @class Spacer\n */\nclass Spacer extends Component {\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-spacer ${super.buildCSSClass()}`;\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n}\n\nComponent.registerComponent('Spacer', Spacer);\n\nexport default Spacer;\n",
"/**\n * @file caption-settings-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * The menu item for caption track settings menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class CaptionSettingsMenuItem\n */\n class CaptionSettingsMenuItem extends TextTrackMenuItem {\n\n constructor(player, options) {\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' settings',\n 'selectable': false,\n 'default': false,\n mode: 'disabled'\n };\n\n // CaptionSettingsMenuItem has no concept of 'selected'\n options['selectable'] = false;\n\n super(player, options);\n this.addClass('vjs-texttrack-settings');\n this.controlText(', opens ' + options['kind'] + ' settings dialog');\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n this.player().getChild('textTrackSettings').show();\n this.player().getChild('textTrackSettings').el_.focus();\n }\n\n}\n\nComponent.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);\nexport default CaptionSettingsMenuItem;\n",
"/**\n * @file captions-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport CaptionSettingsMenuItem from './caption-settings-menu-item.js';\n\n/**\n * The button component for toggling and selecting captions\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class CaptionsButton\n */\nclass CaptionsButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Captions Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-captions-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Update caption menu items\n *\n * @method update\n */\n update() {\n let threshold = 2;\n super.update();\n\n // if native, then threshold is 1 because no settings button\n if (this.player().tech_ && this.player().tech_['featuresNativeTextTracks']) {\n threshold = 1;\n }\n\n if (this.items && this.items.length > threshold) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Create caption menu items\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n if (!(this.player().tech_ && this.player().tech_['featuresNativeTextTracks'])) {\n items.push(new CaptionSettingsMenuItem(this.player_, { 'kind': this.kind_ }));\n }\n\n return super.createItems(items);\n }\n\n}\n\nCaptionsButton.prototype.kind_ = 'captions';\nCaptionsButton.prototype.controlText_ = 'Captions';\n\nComponent.registerComponent('CaptionsButton', CaptionsButton);\nexport default CaptionsButton;\n",
"/**\n * @file chapters-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport ChaptersTrackMenuItem from './chapters-track-menu-item.js';\nimport Menu from '../../menu/menu.js';\nimport * as Dom from '../../utils/dom.js';\nimport * as Fn from '../../utils/fn.js';\nimport toTitleCase from '../../utils/to-title-case.js';\nimport window from 'global/window';\n\n/**\n * The button component for toggling and selecting chapters\n * Chapters act much differently than other text tracks\n * Cues are navigation vs. other tracks of alternative languages\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class ChaptersButton\n */\nclass ChaptersButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Chapters Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-chapters-button ${super.buildCSSClass()}`;\n }\n\n /**\n * Create a menu item for each text track\n *\n * @return {Array} Array of menu items\n * @method createItems\n */\n createItems() {\n let items = [];\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n /**\n * Create menu from chapter buttons\n *\n * @return {Menu} Menu of chapter buttons\n * @method createMenu\n */\n createMenu() {\n let tracks = this.player_.textTracks() || [];\n let chaptersTrack;\n let items = this.items = [];\n\n for (let i = 0, length = tracks.length; i < length; i++) {\n let track = tracks[i];\n\n if (track['kind'] === this.kind_) {\n chaptersTrack = track;\n\n break;\n }\n }\n\n let menu = this.menu;\n if (menu === undefined) {\n menu = new Menu(this.player_);\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.kind_),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n if (chaptersTrack && chaptersTrack.cues == null) {\n chaptersTrack['mode'] = 'hidden';\n\n let remoteTextTrackEl = this.player_.remoteTextTrackEls().getTrackElementByTrack_(chaptersTrack);\n\n if (remoteTextTrackEl) {\n remoteTextTrackEl.addEventListener('load', (event) => this.update());\n }\n }\n\n if (chaptersTrack && chaptersTrack.cues && chaptersTrack.cues.length > 0) {\n let cues = chaptersTrack['cues'], cue;\n\n for (let i = 0, l = cues.length; i < l; i++) {\n cue = cues[i];\n\n let mi = new ChaptersTrackMenuItem(this.player_, {\n 'track': chaptersTrack,\n 'cue': cue\n });\n\n items.push(mi);\n\n menu.addChild(mi);\n }\n\n this.addChild(menu);\n }\n\n if (this.items.length > 0) {\n this.show();\n }\n\n return menu;\n }\n\n}\n\nChaptersButton.prototype.kind_ = 'chapters';\nChaptersButton.prototype.controlText_ = 'Chapters';\n\nComponent.registerComponent('ChaptersButton', ChaptersButton);\nexport default ChaptersButton;\n",
"/**\n * @file chapters-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n/**\n * The chapter track menu item\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class ChaptersTrackMenuItem\n */\nclass ChaptersTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let cue = options['cue'];\n let currentTime = player.currentTime();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = cue.text;\n options['selected'] = (cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n super(player, options);\n\n this.track = track;\n this.cue = cue;\n track.addEventListener('cuechange', Fn.bind(this, this.update));\n }\n\n /**\n * Handle click on menu item\n *\n * @method handleClick\n */\n handleClick() {\n super.handleClick();\n this.player_.currentTime(this.cue.startTime);\n this.update(this.cue.startTime);\n }\n\n /**\n * Update chapter menu item\n *\n * @method update\n */\n update() {\n let cue = this.cue;\n let currentTime = this.player_.currentTime();\n\n // vjs.log(currentTime, cue.startTime);\n this.selected(cue['startTime'] <= currentTime && currentTime < cue['endTime']);\n }\n\n}\n\nComponent.registerComponent('ChaptersTrackMenuItem', ChaptersTrackMenuItem);\nexport default ChaptersTrackMenuItem;\n",
"/**\n * @file off-text-track-menu-item.js\n */\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport Component from '../../component.js';\n\n/**\n * A special menu item for turning of a specific type of text track\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends TextTrackMenuItem\n * @class OffTextTrackMenuItem\n */\nclass OffTextTrackMenuItem extends TextTrackMenuItem {\n\n constructor(player, options){\n // Create pseudo track info\n // Requires options['kind']\n options['track'] = {\n 'kind': options['kind'],\n 'player': player,\n 'label': options['kind'] + ' off',\n 'default': false,\n 'mode': 'disabled'\n };\n\n // MenuItem is selectable\n options['selectable'] = true;\n\n super(player, options);\n this.selected(true);\n }\n\n /**\n * Handle text track change\n *\n * @param {Object} event Event object\n * @method handleTracksChange\n */\n handleTracksChange(event){\n let tracks = this.player().textTracks();\n let selected = true;\n\n for (let i = 0, l = tracks.length; i < l; i++) {\n let track = tracks[i];\n if (track['kind'] === this.track['kind'] && track['mode'] === 'showing') {\n selected = false;\n break;\n }\n }\n\n this.selected(selected);\n }\n\n}\n\nComponent.registerComponent('OffTextTrackMenuItem', OffTextTrackMenuItem);\nexport default OffTextTrackMenuItem;\n",
"/**\n * @file subtitles-button.js\n */\nimport TextTrackButton from './text-track-button.js';\nimport Component from '../../component.js';\n\n/**\n * The button component for toggling and selecting subtitles\n *\n * @param {Object} player Player object\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends TextTrackButton\n * @class SubtitlesButton\n */\nclass SubtitlesButton extends TextTrackButton {\n\n constructor(player, options, ready){\n super(player, options, ready);\n this.el_.setAttribute('aria-label','Subtitles Menu');\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n return `vjs-subtitles-button ${super.buildCSSClass()}`;\n }\n\n}\n\nSubtitlesButton.prototype.kind_ = 'subtitles';\nSubtitlesButton.prototype.controlText_ = 'Subtitles';\n\nComponent.registerComponent('SubtitlesButton', SubtitlesButton);\nexport default SubtitlesButton;\n",
"/**\n * @file text-track-button.js\n */\nimport MenuButton from '../../menu/menu-button.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport TextTrackMenuItem from './text-track-menu-item.js';\nimport OffTextTrackMenuItem from './off-text-track-menu-item.js';\n\n/**\n * The base class for buttons that toggle specific text track types (e.g. subtitles)\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuButton\n * @class TextTrackButton\n */\nclass TextTrackButton extends MenuButton {\n\n constructor(player, options){\n super(player, options);\n\n let tracks = this.player_.textTracks();\n\n if (this.items.length <= 1) {\n this.hide();\n }\n\n if (!tracks) {\n return;\n }\n\n let updateHandler = Fn.bind(this, this.update);\n tracks.addEventListener('removetrack', updateHandler);\n tracks.addEventListener('addtrack', updateHandler);\n\n this.player_.on('dispose', function() {\n tracks.removeEventListener('removetrack', updateHandler);\n tracks.removeEventListener('addtrack', updateHandler);\n });\n }\n\n // Create a menu item for each text track\n createItems(items=[]) {\n // Add an OFF menu item to turn all tracks off\n items.push(new OffTextTrackMenuItem(this.player_, { 'kind': this.kind_ }));\n\n let tracks = this.player_.textTracks();\n\n if (!tracks) {\n return items;\n }\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // only add tracks that are of the appropriate kind and have a label\n if (track['kind'] === this.kind_) {\n items.push(new TextTrackMenuItem(this.player_, {\n // MenuItem is selectable\n 'selectable': true,\n 'track': track\n }));\n }\n }\n\n return items;\n }\n\n}\n\nComponent.registerComponent('TextTrackButton', TextTrackButton);\nexport default TextTrackButton;\n",
"/**\n * @file text-track-menu-item.js\n */\nimport MenuItem from '../../menu/menu-item.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * The specific menu item type for selecting a language within a text track kind\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends MenuItem\n * @class TextTrackMenuItem\n */\nclass TextTrackMenuItem extends MenuItem {\n\n constructor(player, options){\n let track = options['track'];\n let tracks = player.textTracks();\n\n // Modify options for parent MenuItem class's init.\n options['label'] = track['label'] || track['language'] || 'Unknown';\n options['selected'] = track['default'] || track['mode'] === 'showing';\n\n super(player, options);\n\n this.track = track;\n\n if (tracks) {\n let changeHandler = Fn.bind(this, this.handleTracksChange);\n\n tracks.addEventListener('change', changeHandler);\n this.on('dispose', function() {\n tracks.removeEventListener('change', changeHandler);\n });\n }\n\n // iOS7 doesn't dispatch change events to TextTrackLists when an\n // associated track's mode changes. Without something like\n // Object.observe() (also not present on iOS7), it's not\n // possible to detect changes to the mode attribute and polyfill\n // the change event. As a poor substitute, we manually dispatch\n // change events whenever the controls modify the mode.\n if (tracks && tracks.onchange === undefined) {\n let event;\n\n this.on(['tap', 'click'], function() {\n if (typeof window.Event !== 'object') {\n // Android 2.3 throws an Illegal Constructor error for window.Event\n try {\n event = new window.Event('change');\n } catch(err){}\n }\n\n if (!event) {\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n\n tracks.dispatchEvent(event);\n });\n }\n }\n\n /**\n * Handle click on text track\n *\n * @method handleClick\n */\n handleClick(event) {\n let kind = this.track['kind'];\n let tracks = this.player_.textTracks();\n\n super.handleClick(event);\n\n if (!tracks) return;\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n if (track['kind'] !== kind) {\n continue;\n }\n\n if (track === this.track) {\n track['mode'] = 'showing';\n } else {\n track['mode'] = 'disabled';\n }\n }\n }\n\n /**\n * Handle text track change\n *\n * @method handleTracksChange\n */\n handleTracksChange(event){\n this.selected(this.track['mode'] === 'showing');\n }\n\n}\n\nComponent.registerComponent('TextTrackMenuItem', TextTrackMenuItem);\nexport default TextTrackMenuItem;\n",
"/**\n * @file current-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the current time\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class CurrentTimeDisplay\n */\nclass CurrentTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-current-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-current-time-display',\n // label the current time for screen reader users\n innerHTML: '<span class=\"vjs-control-text\">Current Time </span>' + '0:00',\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update current time display\n *\n * @method updateContent\n */\n updateContent() {\n // Allows for smooth scrubbing, when player can't keep up.\n let time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n let localizedText = this.localize('Current Time');\n let formattedTime = formatTime(time, this.player_.duration());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `<span class=\"vjs-control-text\">${localizedText}</span> ${formattedTime}`;\n }\n }\n\n}\n\nComponent.registerComponent('CurrentTimeDisplay', CurrentTimeDisplay);\nexport default CurrentTimeDisplay;\n",
"/**\n * @file duration-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the duration\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class DurationDisplay\n */\nclass DurationDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,\n // however the durationchange event fires before this.player_.duration() is set,\n // so the value cannot be written out using this method.\n // Once the order of durationchange and this.player_.duration() being set is figured out,\n // this can be updated.\n this.on(player, 'timeupdate', this.updateContent);\n this.on(player, 'loadedmetadata', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-duration vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-duration-display',\n // label the duration time for screen reader users\n innerHTML: `<span class=\"vjs-control-text\">${this.localize('Duration Time')}</span> 0:00`\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update duration time display\n *\n * @method updateContent\n */\n updateContent() {\n let duration = this.player_.duration();\n if (duration && this.duration_ !== duration) {\n this.duration_ = duration;\n let localizedText = this.localize('Duration Time');\n let formattedTime = formatTime(duration);\n this.contentEl_.innerHTML = `<span class=\"vjs-control-text\">${localizedText}</span> ${formattedTime}`; // label the duration time for screen reader users\n }\n }\n\n}\n\nComponent.registerComponent('DurationDisplay', DurationDisplay);\nexport default DurationDisplay;\n",
"/**\n * @file remaining-time-display.js\n */\nimport Component from '../../component.js';\nimport * as Dom from '../../utils/dom.js';\nimport formatTime from '../../utils/format-time.js';\n\n/**\n * Displays the time left in the video\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class RemainingTimeDisplay\n */\nclass RemainingTimeDisplay extends Component {\n\n constructor(player, options){\n super(player, options);\n\n this.on(player, 'timeupdate', this.updateContent);\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = super.createEl('div', {\n className: 'vjs-remaining-time vjs-time-control vjs-control'\n });\n\n this.contentEl_ = Dom.createEl('div', {\n className: 'vjs-remaining-time-display',\n // label the remaining time for screen reader users\n innerHTML: `<span class=\"vjs-control-text\">${this.localize('Remaining Time')}</span> -0:00`,\n }, {\n // tell screen readers not to automatically read the time as it changes\n 'aria-live': 'off'\n });\n\n el.appendChild(this.contentEl_);\n return el;\n }\n\n /**\n * Update remaining time display\n *\n * @method updateContent\n */\n updateContent() {\n if (this.player_.duration()) {\n const localizedText = this.localize('Remaining Time');\n const formattedTime = formatTime(this.player_.remainingTime());\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = `<span class=\"vjs-control-text\">${localizedText}</span> -${formattedTime}`;\n }\n }\n\n // Allows for smooth scrubbing, when player can't keep up.\n // var time = (this.player_.scrubbing()) ? this.player_.getCache().currentTime : this.player_.currentTime();\n // this.contentEl_.innerHTML = vjs.formatTime(time, this.player_.duration());\n }\n\n}\n\nComponent.registerComponent('RemainingTimeDisplay', RemainingTimeDisplay);\nexport default RemainingTimeDisplay;\n",
"/**\n * @file time-divider.js\n */\nimport Component from '../../component.js';\n\n/**\n * The separator between the current time and duration.\n * Can be hidden if it's not needed in the design.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class TimeDivider\n */\nclass TimeDivider extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-time-control vjs-time-divider',\n innerHTML: '<div><span>/</span></div>'\n });\n }\n\n}\n\nComponent.registerComponent('TimeDivider', TimeDivider);\nexport default TimeDivider;\n",
"/**\n * @file volume-bar.js\n */\nimport Slider from '../../slider/slider.js';\nimport Component from '../../component.js';\nimport * as Fn from '../../utils/fn.js';\n\n// Required children\nimport VolumeLevel from './volume-level.js';\n\n/**\n * The bar that contains the volume level and can be clicked on to adjust the level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Slider\n * @class VolumeBar\n */\nclass VolumeBar extends Slider {\n\n constructor(player, options){\n super(player, options);\n this.on(player, 'volumechange', this.updateARIAAttributes);\n player.ready(Fn.bind(this, this.updateARIAAttributes));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-bar vjs-slider-bar'\n }, {\n 'aria-label': 'volume level'\n });\n }\n\n /**\n * Handle mouse move on volume bar\n *\n * @method handleMouseMove\n */\n handleMouseMove(event) {\n this.checkMuted();\n this.player_.volume(this.calculateDistance(event));\n }\n\n checkMuted() {\n if (this.player_.muted()) {\n this.player_.muted(false);\n }\n }\n\n /**\n * Get percent of volume level\n *\n * @retun {Number} Volume level percent\n * @method getPercent\n */\n getPercent() {\n if (this.player_.muted()) {\n return 0;\n } else {\n return this.player_.volume();\n }\n }\n\n /**\n * Increase volume level for keyboard users\n *\n * @method stepForward\n */\n stepForward() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() + 0.1);\n }\n\n /**\n * Decrease volume level for keyboard users\n *\n * @method stepBack\n */\n stepBack() {\n this.checkMuted();\n this.player_.volume(this.player_.volume() - 0.1);\n }\n\n /**\n * Update ARIA accessibility attributes\n *\n * @method updateARIAAttributes\n */\n updateARIAAttributes() {\n // Current value of volume bar as a percentage\n let volume = (this.player_.volume() * 100).toFixed(2);\n this.el_.setAttribute('aria-valuenow', volume);\n this.el_.setAttribute('aria-valuetext', volume + '%');\n }\n\n}\n\nVolumeBar.prototype.options_ = {\n children: [\n 'volumeLevel'\n ],\n 'barName': 'volumeLevel'\n};\n\nVolumeBar.prototype.playerEvent = 'volumechange';\n\nComponent.registerComponent('VolumeBar', VolumeBar);\nexport default VolumeBar;\n",
"/**\n * @file volume-control.js\n */\nimport Component from '../../component.js';\n\n// Required children\nimport VolumeBar from './volume-bar.js';\n\n/**\n * The component for controlling the volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeControl\n */\nclass VolumeControl extends Component {\n\n constructor(player, options){\n super(player, options);\n\n // hide volume controls when they're not supported by the current tech\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n }\n this.on(player, 'loadstart', function(){\n if (player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-control vjs-control'\n });\n }\n\n}\n\nVolumeControl.prototype.options_ = {\n children: [\n 'volumeBar'\n ]\n};\n\nComponent.registerComponent('VolumeControl', VolumeControl);\nexport default VolumeControl;\n",
"/**\n * @file volume-level.js\n */\nimport Component from '../../component.js';\n\n/**\n * Shows volume level\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class VolumeLevel\n */\nclass VolumeLevel extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-volume-level',\n innerHTML: '<span class=\"vjs-control-text\"></span>'\n });\n }\n\n}\n\nComponent.registerComponent('VolumeLevel', VolumeLevel);\nexport default VolumeLevel;\n",
"/**\n * @file volume-menu-button.js\n */\nimport * as Fn from '../utils/fn.js';\nimport Component from '../component.js';\nimport Popup from '../popup/popup.js';\nimport PopupButton from '../popup/popup-button.js';\nimport MuteToggle from './mute-toggle.js';\nimport VolumeBar from './volume-control/volume-bar.js';\nimport document from 'global/document';\n\n/**\n * Button for volume popup\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends PopupButton\n * @class VolumeMenuButton\n */\nclass VolumeMenuButton extends PopupButton {\n\n constructor(player, options={}){\n // Default to inline\n if (options.inline === undefined) {\n options.inline = true;\n }\n\n // If the vertical option isn't passed at all, default to true.\n if (options.vertical === undefined) {\n // If an inline volumeMenuButton is used, we should default to using\n // a horizontal slider for obvious reasons.\n if (options.inline) {\n options.vertical = false;\n } else {\n options.vertical = true;\n }\n }\n\n // The vertical option needs to be set on the volumeBar as well,\n // since that will need to be passed along to the VolumeBar constructor\n options.volumeBar = options.volumeBar || {};\n options.volumeBar.vertical = !!options.vertical;\n\n super(player, options);\n\n // Same listeners as MuteToggle\n this.on(player, 'volumechange', this.volumeUpdate);\n this.on(player, 'loadstart', this.volumeUpdate);\n\n // hide mute toggle if the current tech doesn't support volume control\n function updateVisibility() {\n if (player.tech_ && player.tech_['featuresVolumeControl'] === false) {\n this.addClass('vjs-hidden');\n } else {\n this.removeClass('vjs-hidden');\n }\n }\n\n updateVisibility.call(this);\n this.on(player, 'loadstart', updateVisibility);\n\n this.on(this.volumeBar, ['slideractive', 'focus'], function(){\n this.addClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['sliderinactive', 'blur'], function(){\n this.removeClass('vjs-slider-active');\n });\n\n this.on(this.volumeBar, ['focus'], function(){\n this.addClass('vjs-lock-showing');\n });\n\n this.on(this.volumeBar, ['blur'], function(){\n this.removeClass('vjs-lock-showing');\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n let orientationClass = '';\n if (!!this.options_.vertical) {\n orientationClass = 'vjs-volume-menu-button-vertical';\n } else {\n orientationClass = 'vjs-volume-menu-button-horizontal';\n }\n\n return `vjs-volume-menu-button ${super.buildCSSClass()} ${orientationClass}`;\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {Popup} The volume popup button\n * @method createPopup\n */\n createPopup() {\n let popup = new Popup(this.player_, {\n contentElType: 'div'\n });\n\n let vb = new VolumeBar(this.player_, this.options_.volumeBar);\n\n popup.addChild(vb);\n\n this.volumeBar = vb;\n\n this.attachVolumeBarEvents();\n\n return popup;\n }\n\n /**\n * Handle click on volume popup and calls super\n *\n * @method handleClick\n */\n handleClick() {\n MuteToggle.prototype.handleClick.call(this);\n super.handleClick();\n }\n\n attachVolumeBarEvents() {\n this.on(['mousedown', 'touchdown'], this.handleMouseDown);\n }\n\n handleMouseDown(event) {\n this.on(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n this.on(document, ['mouseup', 'touchend'], this.handleMouseUp);\n }\n\n handleMouseUp(event) {\n this.off(['mousemove', 'touchmove'], Fn.bind(this.volumeBar, this.volumeBar.handleMouseMove));\n }\n}\n\nVolumeMenuButton.prototype.volumeUpdate = MuteToggle.prototype.update;\nVolumeMenuButton.prototype.controlText_ = 'Mute';\n\nComponent.registerComponent('VolumeMenuButton', VolumeMenuButton);\nexport default VolumeMenuButton;\n",
"/**\n * @file error-display.js\n */\nimport Component from './component';\nimport ModalDialog from './modal-dialog';\n\nimport * as Dom from './utils/dom';\nimport mergeOptions from './utils/merge-options';\n\n/**\n * Display that an error has occurred making the video unplayable.\n *\n * @extends ModalDialog\n * @class ErrorDisplay\n */\nclass ErrorDisplay extends ModalDialog {\n\n /**\n * Constructor for error display modal.\n *\n * @param {Player} player\n * @param {Object} [options]\n */\n constructor(player, options) {\n super(player, options);\n this.on(player, 'error', this.open);\n }\n\n /**\n * Include the old class for backward-compatibility.\n *\n * This can be removed in 6.0.\n *\n * @method buildCSSClass\n * @deprecated\n * @return {String}\n */\n buildCSSClass() {\n return `vjs-error-display ${super.buildCSSClass()}`;\n }\n\n /**\n * Generates the modal content based on the player error.\n *\n * @return {String|Null}\n */\n content() {\n let error = this.player().error();\n return error ? this.localize(error.message) : '';\n }\n}\n\nErrorDisplay.prototype.options_ = mergeOptions(ModalDialog.prototype.options_, {\n fillAlways: true,\n temporary: false,\n uncloseable: true\n});\n\nComponent.registerComponent('ErrorDisplay', ErrorDisplay);\nexport default ErrorDisplay;\n",
"/**\n * @file event-target.js\n */\nimport * as Events from './utils/events.js';\n\nvar EventTarget = function() {};\n\nEventTarget.prototype.allowedEvents_ = {};\n\nEventTarget.prototype.on = function(type, fn) {\n // Remove the addEventListener alias before calling Events.on\n // so we don't get into an infinite type loop\n let ael = this.addEventListener;\n this.addEventListener = Function.prototype;\n Events.on(this, type, fn);\n this.addEventListener = ael;\n};\nEventTarget.prototype.addEventListener = EventTarget.prototype.on;\n\nEventTarget.prototype.off = function(type, fn) {\n Events.off(this, type, fn);\n};\nEventTarget.prototype.removeEventListener = EventTarget.prototype.off;\n\nEventTarget.prototype.one = function(type, fn) {\n Events.one(this, type, fn);\n};\n\nEventTarget.prototype.trigger = function(event) {\n let type = event.type || event;\n\n if (typeof event === 'string') {\n event = {\n type: type\n };\n }\n event = Events.fixEvent(event);\n\n if (this.allowedEvents_[type] && this['on' + type]) {\n this['on' + type](event);\n }\n\n Events.trigger(this, event);\n};\n// The standard DOM EventTarget.dispatchEvent() is aliased to trigger()\nEventTarget.prototype.dispatchEvent = EventTarget.prototype.trigger;\n\nexport default EventTarget;\n",
"import log from './utils/log';\n\n/*\n * @file extend.js\n *\n * A combination of node inherits and babel's inherits (after transpile).\n * Both work the same but node adds `super_` to the subClass\n * and Bable adds the superClass as __proto__. Both seem useful.\n */\nconst _inherits = function (subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n\n if (superClass) {\n // node\n subClass.super_ = superClass;\n }\n};\n\n/*\n * Function for subclassing using the same inheritance that\n * videojs uses internally\n * ```js\n * var Button = videojs.getComponent('Button');\n * ```\n * ```js\n * var MyButton = videojs.extend(Button, {\n * constructor: function(player, options) {\n * Button.call(this, player, options);\n * },\n * onClick: function() {\n * // doSomething\n * }\n * });\n * ```\n */\nconst extendFn = function(superClass, subClassMethods={}) {\n let subClass = function() {\n superClass.apply(this, arguments);\n };\n let methods = {};\n\n if (typeof subClassMethods === 'object') {\n if (typeof subClassMethods.init === 'function') {\n log.warn('Constructor logic via init() is deprecated; please use constructor() instead.');\n subClassMethods.constructor = subClassMethods.init;\n }\n if (subClassMethods.constructor !== Object.prototype.constructor) {\n subClass = subClassMethods.constructor;\n }\n methods = subClassMethods;\n } else if (typeof subClassMethods === 'function') {\n subClass = subClassMethods;\n }\n\n _inherits(subClass, superClass);\n\n // Extend subObj's prototype with functions and other properties from props\n for (var name in methods) {\n if (methods.hasOwnProperty(name)) {\n subClass.prototype[name] = methods[name];\n }\n }\n\n return subClass;\n};\n\nexport default extendFn;\n",
"/**\n * @file fullscreen-api.js\n */\nimport document from 'global/document';\n\n/*\n * Store the browser-specific methods for the fullscreen API\n * @type {Object|undefined}\n * @private\n */\nlet FullscreenApi = {};\n\n// browser API methods\n// map approach from Screenful.js - https://github.com/sindresorhus/screenfull.js\nconst apiMap = [\n // Spec: https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html\n [\n 'requestFullscreen',\n 'exitFullscreen',\n 'fullscreenElement',\n 'fullscreenEnabled',\n 'fullscreenchange',\n 'fullscreenerror'\n ],\n // WebKit\n [\n 'webkitRequestFullscreen',\n 'webkitExitFullscreen',\n 'webkitFullscreenElement',\n 'webkitFullscreenEnabled',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Old WebKit (Safari 5.1)\n [\n 'webkitRequestFullScreen',\n 'webkitCancelFullScreen',\n 'webkitCurrentFullScreenElement',\n 'webkitCancelFullScreen',\n 'webkitfullscreenchange',\n 'webkitfullscreenerror'\n ],\n // Mozilla\n [\n 'mozRequestFullScreen',\n 'mozCancelFullScreen',\n 'mozFullScreenElement',\n 'mozFullScreenEnabled',\n 'mozfullscreenchange',\n 'mozfullscreenerror'\n ],\n // Microsoft\n [\n 'msRequestFullscreen',\n 'msExitFullscreen',\n 'msFullscreenElement',\n 'msFullscreenEnabled',\n 'MSFullscreenChange',\n 'MSFullscreenError'\n ]\n];\n\nlet specApi = apiMap[0];\nlet browserApi;\n\n// determine the supported set of functions\nfor (let i = 0; i < apiMap.length; i++) {\n // check for exitFullscreen function\n if (apiMap[i][1] in document) {\n browserApi = apiMap[i];\n break;\n }\n}\n\n// map the browser API names to the spec API names\nif (browserApi) {\n for (let i=0; i<browserApi.length; i++) {\n FullscreenApi[specApi[i]] = browserApi[i];\n }\n}\n\nexport default FullscreenApi;\n",
"/**\n * @file loading-spinner.js\n */\nimport Component from './component';\n\n/* Loading Spinner\n================================================================================ */\n/**\n * Loading spinner for waiting events\n *\n * @extends Component\n * @class LoadingSpinner\n */\nclass LoadingSpinner extends Component {\n\n /**\n * Create the component's DOM element\n *\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-loading-spinner',\n dir: 'ltr'\n });\n }\n}\n\nComponent.registerComponent('LoadingSpinner', LoadingSpinner);\nexport default LoadingSpinner;\n",
"/**\n * @file media-error.js\n */\nimport assign from 'object.assign';\n\n/*\n * Custom MediaError to mimic the HTML5 MediaError\n *\n * @param {Number} code The media error code\n */\nlet MediaError = function(code){\n if (typeof code === 'number') {\n this.code = code;\n } else if (typeof code === 'string') {\n // default code is zero, so this is a custom error\n this.message = code;\n } else if (typeof code === 'object') { // object\n assign(this, code);\n }\n\n if (!this.message) {\n this.message = MediaError.defaultMessages[this.code] || '';\n }\n};\n\n/*\n * The error code that refers two one of the defined\n * MediaError types\n *\n * @type {Number}\n */\nMediaError.prototype.code = 0;\n\n/*\n * An optional message to be shown with the error.\n * Message is not part of the HTML5 video spec\n * but allows for more informative custom errors.\n *\n * @type {String}\n */\nMediaError.prototype.message = '';\n\n/*\n * An optional status code that can be set by plugins\n * to allow even more detail about the error.\n * For example the HLS plugin might provide the specific\n * HTTP status code that was returned when the error\n * occurred, then allowing a custom error overlay\n * to display more information.\n *\n * @type {Array}\n */\nMediaError.prototype.status = null;\n\nMediaError.errorTypes = [\n 'MEDIA_ERR_CUSTOM', // = 0\n 'MEDIA_ERR_ABORTED', // = 1\n 'MEDIA_ERR_NETWORK', // = 2\n 'MEDIA_ERR_DECODE', // = 3\n 'MEDIA_ERR_SRC_NOT_SUPPORTED', // = 4\n 'MEDIA_ERR_ENCRYPTED' // = 5\n];\n\nMediaError.defaultMessages = {\n 1: 'You aborted the media playback',\n 2: 'A network error caused the media download to fail part-way.',\n 3: 'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.',\n 4: 'The media could not be loaded, either because the server or network failed or because the format is not supported.',\n 5: 'The media is encrypted and we do not have the keys to decrypt it.'\n};\n\n// Add types as properties on MediaError\n// e.g. MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = 4;\nfor (var errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {\n MediaError[MediaError.errorTypes[errNum]] = errNum;\n // values should be accessible on both the class and instance\n MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;\n}\n\nexport default MediaError;\n",
"/**\n * @file menu-button.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport Menu from './menu.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * A button class with a popup menu\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuButton\n */\nclass MenuButton extends ClickableComponent {\n\n constructor(player, options={}){\n super(player, options);\n\n this.update();\n\n this.el_.setAttribute('aria-haspopup', true);\n this.el_.setAttribute('role', 'menuitem');\n this.on('keydown', this.handleSubmenuKeyPress);\n }\n\n /**\n * Update menu\n *\n * @method update\n */\n update() {\n let menu = this.createMenu();\n\n if (this.menu) {\n this.removeChild(this.menu);\n }\n\n this.menu = menu;\n this.addChild(menu);\n\n /**\n * Track the state of the menu button\n *\n * @type {Boolean}\n * @private\n */\n this.buttonPressed_ = false;\n this.el_.setAttribute('aria-expanded', false);\n\n if (this.items && this.items.length === 0) {\n this.hide();\n } else if (this.items && this.items.length > 1) {\n this.show();\n }\n }\n\n /**\n * Create menu\n *\n * @return {Menu} The constructed menu\n * @method createMenu\n */\n createMenu() {\n var menu = new Menu(this.player_);\n\n // Add a title list item to the top\n if (this.options_.title) {\n let title = Dom.createEl('li', {\n className: 'vjs-menu-title',\n innerHTML: toTitleCase(this.options_.title),\n tabIndex: -1\n });\n menu.children_.unshift(title);\n Dom.insertElFirst(title, menu.contentEl());\n }\n\n this.items = this['createItems']();\n\n if (this.items) {\n // Add menu items to the menu\n for (var i = 0; i < this.items.length; i++) {\n menu.addItem(this.items[i]);\n }\n }\n\n return menu;\n }\n\n /**\n * Create the list of menu items. Specific to each subclass.\n *\n * @method createItems\n */\n createItems(){}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n /**\n * When you click the button it adds focus, which\n * will show the menu indefinitely.\n * So we'll remove focus when the mouse leaves the button.\n * Focus is needed for tab navigation.\n * Allow sub components to stack CSS class names\n *\n * @method handleClick\n */\n handleClick() {\n this.one('mouseout', Fn.bind(this, function(){\n this.menu.unlockShowing();\n this.el_.blur();\n }));\n if (this.buttonPressed_){\n this.unpressButton();\n } else {\n this.pressButton();\n }\n }\n\n /**\n * Handle key press on menu\n *\n * @param {Object} event Key press event\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9) {\n if (this.buttonPressed_) {\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n // Up (38) key or Down (40) key press the 'button'\n } else if (event.which === 38 || event.which === 40) {\n if (!this.buttonPressed_) {\n this.pressButton();\n event.preventDefault();\n }\n } else {\n super.handleKeyPress(event);\n }\n }\n\n /**\n * Handle key press on submenu\n *\n * @param {Object} event Key press event\n * @method handleSubmenuKeyPress\n */\n handleSubmenuKeyPress(event) {\n\n // Escape (27) key or Tab (9) key unpress the 'button'\n if (event.which === 27 || event.which === 9){\n if (this.buttonPressed_){\n this.unpressButton();\n }\n // Don't preventDefault for Tab key - we still want to lose focus\n if (event.which !== 9) {\n event.preventDefault();\n }\n }\n }\n\n /**\n * Makes changes based on button pressed\n *\n * @method pressButton\n */\n pressButton() {\n this.buttonPressed_ = true;\n this.menu.lockShowing();\n this.el_.setAttribute('aria-expanded', true);\n this.menu.focus(); // set the focus into the submenu\n }\n\n /**\n * Makes changes based on button unpressed\n *\n * @method unpressButton\n */\n unpressButton() {\n this.buttonPressed_ = false;\n this.menu.unlockShowing();\n this.el_.setAttribute('aria-expanded', false);\n this.el_.focus(); // Set focus back to this menu button\n }\n}\n\nComponent.registerComponent('MenuButton', MenuButton);\nexport default MenuButton;\n",
"/**\n * @file menu-item.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport assign from 'object.assign';\n\n/**\n * The component for a menu item. `<li>`\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class MenuItem\n */\nclass MenuItem extends ClickableComponent {\n\n constructor(player, options) {\n super(player, options);\n\n this.selectable = options['selectable'];\n\n this.selected(options['selected']);\n\n if (this.selectable) {\n // TODO: May need to be either menuitemcheckbox or menuitemradio,\n // and may need logical grouping of menu items.\n this.el_.setAttribute('role', 'menuitemcheckbox');\n } else {\n this.el_.setAttribute('role', 'menuitem');\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String=} type Desc\n * @param {Object=} props Desc\n * @return {Element}\n * @method createEl\n */\n createEl(type, props, attrs) {\n return super.createEl('li', assign({\n className: 'vjs-menu-item',\n innerHTML: this.localize(this.options_['label']),\n tabIndex: -1\n }, props), attrs);\n }\n\n /**\n * Handle a click on the menu item, and set it to selected\n *\n * @method handleClick\n */\n handleClick() {\n this.selected(true);\n }\n\n /**\n * Set this menu item as selected or not\n *\n * @param {Boolean} selected\n * @method selected\n */\n selected(selected) {\n if (this.selectable) {\n if (selected) {\n this.addClass('vjs-selected');\n this.el_.setAttribute('aria-checked',true);\n // aria-checked isn't fully supported by browsers/screen readers,\n // so indicate selected state to screen reader in the control text.\n this.controlText(', selected');\n } else {\n this.removeClass('vjs-selected');\n this.el_.setAttribute('aria-checked',false);\n // Indicate un-selected state to screen reader\n // Note that a space clears out the selected state text\n this.controlText(' ');\n }\n }\n }\n}\n\nComponent.registerComponent('MenuItem', MenuItem);\nexport default MenuItem;\n",
"/**\n * @file menu.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Menu component is used to build pop up menus, including subtitle and\n * captions selection menus.\n *\n * @extends Component\n * @class Menu\n */\nclass Menu extends Component {\n\n constructor (player, options) {\n super(player, options);\n\n this.focusedChild_ = -1;\n\n this.on('keydown', this.handleKeyPress);\n }\n\n /**\n * Add a menu item to the menu\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n //TODO: Need to set keyboard focus back to the menuButton\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n this.contentEl_.setAttribute('role', 'menu');\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.setAttribute('role', 'presentation');\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Menu Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n\n /**\n * Handle key press for menu\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n handleKeyPress (event) {\n if (event.which === 37 || event.which === 40) { // Left and Down Arrows\n event.preventDefault();\n this.stepForward();\n } else if (event.which === 38 || event.which === 39) { // Up and Right Arrows\n event.preventDefault();\n this.stepBack();\n }\n }\n\n /**\n * Move to next (lower) menu item for keyboard users\n *\n * @method stepForward\n */\n stepForward () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ + 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Move to previous (higher) menu item for keyboard users\n *\n * @method stepBack\n */\n stepBack () {\n let stepChild = 0;\n\n if (this.focusedChild_ !== undefined) {\n stepChild = this.focusedChild_ - 1;\n }\n this.focus(stepChild);\n }\n\n /**\n * Set focus on a menu item in the menu\n *\n * @param {Object|String} item Index of child item set focus on\n * @method focus\n */\n focus (item = 0) {\n let children = this.children().slice();\n let haveTitle = children.length && children[0].className &&\n /vjs-menu-title/.test(children[0].className);\n\n if (haveTitle) {\n children.shift();\n }\n\n if (children.length > 0) {\n if (item < 0) {\n item = 0;\n } else if (item >= children.length) {\n item = children.length - 1;\n }\n\n this.focusedChild_ = item;\n\n children[item].el_.focus();\n }\n }\n}\n\nComponent.registerComponent('Menu', Menu);\nexport default Menu;\n",
"/**\n * @file modal-dialog.js\n */\nimport document from 'global/document';\n\nimport * as Dom from './utils/dom';\nimport * as Fn from './utils/fn';\nimport log from './utils/log';\n\nimport Component from './component';\nimport CloseButton from './close-button';\n\nconst MODAL_CLASS_NAME = 'vjs-modal-dialog';\nconst ESC = 27;\n\n/**\n * The `ModalDialog` displays over the video and its controls, which blocks\n * interaction with the player until it is closed.\n *\n * Modal dialogs include a \"Close\" button and will close when that button\n * is activated - or when ESC is pressed anywhere.\n *\n * @extends Component\n * @class ModalDialog\n */\nclass ModalDialog extends Component {\n\n /**\n * Constructor for modals.\n *\n * @param {Player} player\n * @param {Object} [options]\n * @param {Mixed} [options.content=undefined]\n * Provide customized content for this modal.\n *\n * @param {String} [options.description]\n * A text description for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.fillAlways=false]\n * Normally, modals are automatically filled only the first time\n * they open. This tells the modal to refresh its content\n * every time it opens.\n *\n * @param {String} [options.label]\n * A text label for the modal, primarily for accessibility.\n *\n * @param {Boolean} [options.temporary=true]\n * If `true`, the modal can only be opened once; it will be\n * disposed as soon as it's closed.\n *\n * @param {Boolean} [options.uncloseable=false]\n * If `true`, the user will not be able to close the modal\n * through the UI in the normal ways. Programmatic closing is\n * still possible.\n *\n */\n constructor(player, options) {\n super(player, options);\n this.opened_ = this.hasBeenOpened_ = this.hasBeenFilled_ = false;\n\n this.closeable(!this.options_.uncloseable);\n this.content(this.options_.content);\n\n // Make sure the contentEl is defined AFTER any children are initialized\n // because we only want the contents of the modal in the contentEl\n // (not the UI elements like the close button).\n this.contentEl_ = Dom.createEl('div', {\n className: `${MODAL_CLASS_NAME}-content`\n }, {\n role: 'document'\n });\n\n this.descEl_ = Dom.createEl('p', {\n className: `${MODAL_CLASS_NAME}-description vjs-offscreen`,\n id: this.el().getAttribute('aria-describedby')\n });\n\n Dom.textContent(this.descEl_, this.description());\n this.el_.appendChild(this.descEl_);\n this.el_.appendChild(this.contentEl_);\n }\n\n /**\n * Create the modal's DOM element\n *\n * @method createEl\n * @return {Element}\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass(),\n tabIndex: -1\n }, {\n 'aria-describedby': `${this.id()}_description`,\n 'aria-hidden': 'true',\n 'aria-label': this.label(),\n role: 'dialog'\n });\n }\n\n /**\n * Build the modal's CSS class.\n *\n * @method buildCSSClass\n * @return {String}\n */\n buildCSSClass() {\n return `${MODAL_CLASS_NAME} vjs-hidden ${super.buildCSSClass()}`;\n }\n\n /**\n * Handles key presses on the document, looking for ESC, which closes\n * the modal.\n *\n * @method handleKeyPress\n * @param {Event} e\n */\n handleKeyPress(e) {\n if (e.which === ESC && this.closeable()) {\n this.close();\n }\n }\n\n /**\n * Returns the label string for this modal. Primarily used for accessibility.\n *\n * @return {String}\n */\n label() {\n return this.options_.label || this.localize('Modal Window');\n }\n\n /**\n * Returns the description string for this modal. Primarily used for\n * accessibility.\n *\n * @return {String}\n */\n description() {\n let desc = this.options_.description || this.localize('This is a modal window.');\n\n // Append a universal closeability message if the modal is closeable.\n if (this.closeable()) {\n desc += ' ' + this.localize('This modal can be closed by pressing the Escape key or activating the close button.');\n }\n\n return desc;\n }\n\n /**\n * Opens the modal.\n *\n * @method open\n * @return {ModalDialog}\n */\n open() {\n if (!this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalopen');\n this.opened_ = true;\n\n // Fill content if the modal has never opened before and\n // never been filled.\n if (this.options_.fillAlways || !this.hasBeenOpened_ && !this.hasBeenFilled_) {\n this.fill();\n }\n\n // If the player was playing, pause it and take note of its previously\n // playing state.\n this.wasPlaying_ = !player.paused();\n\n if (this.wasPlaying_) {\n player.pause();\n }\n\n if (this.closeable()) {\n this.on(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(false);\n this.show();\n this.el().setAttribute('aria-hidden', 'false');\n this.trigger('modalopen');\n this.hasBeenOpened_ = true;\n }\n return this;\n }\n\n /**\n * Whether or not the modal is opened currently.\n *\n * @method opened\n * @param {Boolean} [value]\n * If given, it will open (`true`) or close (`false`) the modal.\n *\n * @return {Boolean}\n */\n opened(value) {\n if (typeof value === 'boolean') {\n this[value ? 'open' : 'close']();\n }\n return this.opened_;\n }\n\n /**\n * Closes the modal.\n *\n * @method close\n * @return {ModalDialog}\n */\n close() {\n if (this.opened_) {\n let player = this.player();\n\n this.trigger('beforemodalclose');\n this.opened_ = false;\n\n if (this.wasPlaying_) {\n player.play();\n }\n\n if (this.closeable()) {\n this.off(document, 'keydown', Fn.bind(this, this.handleKeyPress));\n }\n\n player.controls(true);\n this.hide();\n this.el().setAttribute('aria-hidden', 'true');\n this.trigger('modalclose');\n\n if (this.options_.temporary) {\n this.dispose();\n }\n }\n return this;\n }\n\n /**\n * Whether or not the modal is closeable via the UI.\n *\n * @method closeable\n * @param {Boolean} [value]\n * If given as a Boolean, it will set the `closeable` option.\n *\n * @return {Boolean}\n */\n closeable(value) {\n if (typeof value === 'boolean') {\n let closeable = this.closeable_ = !!value;\n let close = this.getChild('closeButton');\n\n // If this is being made closeable and has no close button, add one.\n if (closeable && !close) {\n\n // The close button should be a child of the modal - not its\n // content element, so temporarily change the content element.\n let temp = this.contentEl_;\n this.contentEl_ = this.el_;\n close = this.addChild('closeButton');\n this.contentEl_ = temp;\n this.on(close, 'close', this.close);\n }\n\n // If this is being made uncloseable and has a close button, remove it.\n if (!closeable && close) {\n this.off(close, 'close', this.close);\n this.removeChild(close);\n close.dispose();\n }\n }\n return this.closeable_;\n }\n\n /**\n * Fill the modal's content element with the modal's \"content\" option.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fill\n * @return {ModalDialog}\n */\n fill() {\n return this.fillWith(this.content());\n }\n\n /**\n * Fill the modal's content element with arbitrary content.\n *\n * The content element will be emptied before this change takes place.\n *\n * @method fillWith\n * @param {Mixed} [content]\n * The same rules apply to this as apply to the `content` option.\n *\n * @return {ModalDialog}\n */\n fillWith(content) {\n let contentEl = this.contentEl();\n let parentEl = contentEl.parentNode;\n let nextSiblingEl = contentEl.nextSibling;\n\n this.trigger('beforemodalfill');\n this.hasBeenFilled_ = true;\n\n // Detach the content element from the DOM before performing\n // manipulation to avoid modifying the live DOM multiple times.\n parentEl.removeChild(contentEl);\n this.empty();\n Dom.insertContent(contentEl, content);\n this.trigger('modalfill');\n\n // Re-inject the re-filled content element.\n if (nextSiblingEl) {\n parentEl.insertBefore(contentEl, nextSiblingEl);\n } else {\n parentEl.appendChild(contentEl);\n }\n\n return this;\n }\n\n /**\n * Empties the content element.\n *\n * This happens automatically anytime the modal is filled.\n *\n * @method empty\n * @return {ModalDialog}\n */\n empty() {\n this.trigger('beforemodalempty');\n Dom.emptyEl(this.contentEl());\n this.trigger('modalempty');\n return this;\n }\n\n /**\n * Gets or sets the modal content, which gets normalized before being\n * rendered into the DOM.\n *\n * This does not update the DOM or fill the modal, but it is called during\n * that process.\n *\n * @method content\n * @param {Mixed} [value]\n * If defined, sets the internal content value to be used on the\n * next call(s) to `fill`. This value is normalized before being\n * inserted. To \"clear\" the internal content value, pass `null`.\n *\n * @return {Mixed}\n */\n content(value) {\n if (typeof value !== 'undefined') {\n this.content_ = value;\n }\n return this.content_;\n }\n}\n\n/*\n * Modal dialog default options.\n *\n * @type {Object}\n * @private\n */\nModalDialog.prototype.options_ = {\n temporary: true\n};\n\nComponent.registerComponent('ModalDialog', ModalDialog);\nexport default ModalDialog;\n",
"/**\n * @file player.js\n */\n // Subclasses Component\nimport Component from './component.js';\n\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Events from './utils/events.js';\nimport * as Dom from './utils/dom.js';\nimport * as Fn from './utils/fn.js';\nimport * as Guid from './utils/guid.js';\nimport * as browser from './utils/browser.js';\nimport log from './utils/log.js';\nimport toTitleCase from './utils/to-title-case.js';\nimport { createTimeRange } from './utils/time-ranges.js';\nimport { bufferedPercent } from './utils/buffer.js';\nimport * as stylesheet from './utils/stylesheet.js';\nimport FullscreenApi from './fullscreen-api.js';\nimport MediaError from './media-error.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport assign from 'object.assign';\nimport mergeOptions from './utils/merge-options.js';\nimport textTrackConverter from './tracks/text-track-list-converter.js';\n\n// Include required child components (importing also registers them)\nimport MediaLoader from './tech/loader.js';\nimport PosterImage from './poster-image.js';\nimport TextTrackDisplay from './tracks/text-track-display.js';\nimport LoadingSpinner from './loading-spinner.js';\nimport BigPlayButton from './big-play-button.js';\nimport ControlBar from './control-bar/control-bar.js';\nimport ErrorDisplay from './error-display.js';\nimport TextTrackSettings from './tracks/text-track-settings.js';\nimport ModalDialog from './modal-dialog';\n\n// Require html5 tech, at least for disposing the original video tag\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\n\n/**\n * An instance of the `Player` class is created when any of the Video.js setup methods are used to initialize a video.\n * ```js\n * var myPlayer = videojs('example_video_1');\n * ```\n * In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.\n * ```html\n * <video id=\"example_video_1\" data-setup='{}' controls>\n * <source src=\"my-source.mp4\" type=\"video/mp4\">\n * </video>\n * ```\n * After an instance has been created it can be accessed globally using `Video('example_video_1')`.\n *\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Player\n */\nclass Player extends Component {\n\n /**\n * player's constructor function\n *\n * @constructs\n * @method init\n * @param {Element} tag The original video tag used for configuring options\n * @param {Object=} options Player options\n * @param {Function=} ready Ready callback function\n */\n constructor(tag, options, ready){\n // Make sure tag ID exists\n tag.id = tag.id || `vjs_video_${Guid.newGUID()}`;\n\n // Set Options\n // The options argument overrides options set in the video tag\n // which overrides globally set options.\n // This latter part coincides with the load order\n // (tag must exist before Player)\n options = assign(Player.getTagSettings(tag), options);\n\n // Delay the initialization of children because we need to set up\n // player properties first, and can't use `this` before `super()`\n options.initChildren = false;\n\n // Same with creating the element\n options.createEl = false;\n\n // we don't want the player to report touch activity on itself\n // see enableTouchActivity in Component\n options.reportTouchActivity = false;\n\n // Run base component initializing with new options\n super(null, options, ready);\n\n // if the global option object was accidentally blown away by\n // someone, bail early with an informative error\n if (!this.options_ ||\n !this.options_.techOrder ||\n !this.options_.techOrder.length) {\n throw new Error('No techOrder specified. Did you overwrite ' +\n 'videojs.options instead of just changing the ' +\n 'properties you want to override?');\n }\n\n this.tag = tag; // Store the original tag used to set options\n\n // Store the tag attributes used to restore html5 element\n this.tagAttributes = tag && Dom.getElAttributes(tag);\n\n // Update current language\n this.language(this.options_.language);\n\n // Update Supported Languages\n if (options.languages) {\n // Normalise player option languages to lowercase\n let languagesToLower = {};\n\n Object.getOwnPropertyNames(options.languages).forEach(function(name) {\n languagesToLower[name.toLowerCase()] = options.languages[name];\n });\n this.languages_ = languagesToLower;\n } else {\n this.languages_ = Player.prototype.options_.languages;\n }\n\n // Cache for video property values.\n this.cache_ = {};\n\n // Set poster\n this.poster_ = options.poster || '';\n\n // Set controls\n this.controls_ = !!options.controls;\n\n // Original tag settings stored in options\n // now remove immediately so native controls don't flash.\n // May be turned back on by HTML5 tech if nativeControlsForTouch is true\n tag.controls = false;\n\n /*\n * Store the internal state of scrubbing\n *\n * @private\n * @return {Boolean} True if the user is scrubbing\n */\n this.scrubbing_ = false;\n\n this.el_ = this.createEl();\n\n // We also want to pass the original player options to each component and plugin\n // as well so they don't need to reach back into the player for options later.\n // We also need to do another copy of this.options_ so we don't end up with\n // an infinite loop.\n let playerOptionsCopy = mergeOptions(this.options_);\n\n // Load plugins\n if (options.plugins) {\n let plugins = options.plugins;\n\n Object.getOwnPropertyNames(plugins).forEach(function(name){\n if (typeof this[name] === 'function') {\n this[name](plugins[name]);\n } else {\n log.error('Unable to find plugin:', name);\n }\n }, this);\n }\n\n this.options_.playerOptions = playerOptionsCopy;\n\n this.initChildren();\n\n // Set isAudio based on whether or not an audio tag was used\n this.isAudio(tag.nodeName.toLowerCase() === 'audio');\n\n // Update controls className. Can't do this when the controls are initially\n // set because the element doesn't exist yet.\n if (this.controls()) {\n this.addClass('vjs-controls-enabled');\n } else {\n this.addClass('vjs-controls-disabled');\n }\n\n if (this.isAudio()) {\n this.addClass('vjs-audio');\n }\n\n if (this.flexNotSupported_()) {\n this.addClass('vjs-no-flex');\n }\n\n // TODO: Make this smarter. Toggle user state between touching/mousing\n // using events, since devices can have both touch and mouse events.\n // if (browser.TOUCH_ENABLED) {\n // this.addClass('vjs-touch-enabled');\n // }\n\n // iOS Safari has broken hover handling\n if (!browser.IS_IOS) {\n this.addClass('vjs-workinghover');\n }\n\n // Make player easily findable by ID\n Player.players[this.id_] = this;\n\n // When the player is first initialized, trigger activity so components\n // like the control bar show themselves if needed\n this.userActive(true);\n this.reportUserActivity();\n this.listenForUserActivity_();\n\n this.on('fullscreenchange', this.handleFullscreenChange_);\n this.on('stageclick', this.handleStageClick_);\n }\n\n /**\n * Destroys the video player and does any necessary cleanup\n * ```js\n * myPlayer.dispose();\n * ```\n * This is especially helpful if you are dynamically adding and removing videos\n * to/from the DOM.\n *\n * @method dispose\n */\n dispose() {\n this.trigger('dispose');\n // prevent dispose from being called twice\n this.off('dispose');\n\n if (this.styleEl_ && this.styleEl_.parentNode) {\n this.styleEl_.parentNode.removeChild(this.styleEl_);\n }\n\n // Kill reference to this player\n Player.players[this.id_] = null;\n if (this.tag && this.tag.player) { this.tag.player = null; }\n if (this.el_ && this.el_.player) { this.el_.player = null; }\n\n if (this.tech_) { this.tech_.dispose(); }\n\n super.dispose();\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = this.el_ = super.createEl('div');\n let tag = this.tag;\n\n // Remove width/height attrs from tag so CSS can make it 100% width/height\n tag.removeAttribute('width');\n tag.removeAttribute('height');\n\n // Copy over all the attributes from the tag, including ID and class\n // ID will now reference player box, not the video tag\n const attrs = Dom.getElAttributes(tag);\n\n Object.getOwnPropertyNames(attrs).forEach(function(attr){\n // workaround so we don't totally break IE7\n // http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7\n if (attr === 'class') {\n el.className = attrs[attr];\n } else {\n el.setAttribute(attr, attrs[attr]);\n }\n });\n\n // Update tag id/class for use as HTML5 playback tech\n // Might think we should do this after embedding in container so .vjs-tech class\n // doesn't flash 100% width/height, but class only applies with .video-js parent\n tag.playerId = tag.id;\n tag.id += '_html5_api';\n tag.className = 'vjs-tech';\n\n // Make player findable on elements\n tag.player = el.player = this;\n // Default state of video is paused\n this.addClass('vjs-paused');\n\n // Add a style element in the player that we'll use to set the width/height\n // of the player in a way that's still overrideable by CSS, just like the\n // video element\n this.styleEl_ = stylesheet.createStyleElement('vjs-styles-dimensions');\n let defaultsStyleEl = Dom.$('.vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(this.styleEl_, defaultsStyleEl ? defaultsStyleEl.nextSibling : head.firstChild);\n\n // Pass in the width/height/aspectRatio options which will update the style el\n this.width(this.options_.width);\n this.height(this.options_.height);\n this.fluid(this.options_.fluid);\n this.aspectRatio(this.options_.aspectRatio);\n\n // insertElFirst seems to cause the networkState to flicker from 3 to 2, so\n // keep track of the original for later so we can know if the source originally failed\n tag.initNetworkState_ = tag.networkState;\n\n // Wrap video tag in div (el/box) container\n if (tag.parentNode) {\n tag.parentNode.insertBefore(el, tag);\n }\n\n // insert the tag as the first child of the player element\n // then manually add it to the children array so that this.addChild\n // will work properly for other components\n Dom.insertElFirst(tag, el); // Breaks iPhone, fixed in HTML5 setup.\n this.children_.unshift(tag);\n\n this.el_ = el;\n\n return el;\n }\n\n /**\n * Get/set player width\n *\n * @param {Number=} value Value for width\n * @return {Number} Width when getting\n * @method width\n */\n width(value) {\n return this.dimension('width', value);\n }\n\n /**\n * Get/set player height\n *\n * @param {Number=} value Value for height\n * @return {Number} Height when getting\n * @method height\n */\n height(value) {\n return this.dimension('height', value);\n }\n\n /**\n * Get/set dimension for player\n *\n * @param {String} dimension Either width or height\n * @param {Number=} value Value for dimension\n * @return {Component}\n * @method dimension\n */\n dimension(dimension, value) {\n let privDimension = dimension + '_';\n\n if (value === undefined) {\n return this[privDimension] || 0;\n }\n\n if (value === '') {\n // If an empty string is given, reset the dimension to be automatic\n this[privDimension] = undefined;\n } else {\n let parsedVal = parseFloat(value);\n\n if (isNaN(parsedVal)) {\n log.error(`Improper value \"${value}\" supplied for for ${dimension}`);\n return this;\n }\n\n this[privDimension] = parsedVal;\n }\n\n this.updateStyleEl_();\n return this;\n }\n\n /**\n * Add/remove the vjs-fluid class\n *\n * @param {Boolean} bool Value of true adds the class, value of false removes the class\n * @method fluid\n */\n fluid(bool) {\n if (bool === undefined) {\n return !!this.fluid_;\n }\n\n this.fluid_ = !!bool;\n\n if (bool) {\n this.addClass('vjs-fluid');\n } else {\n this.removeClass('vjs-fluid');\n }\n }\n\n /**\n * Get/Set the aspect ratio\n *\n * @param {String=} ratio Aspect ratio for player\n * @return aspectRatio\n * @method aspectRatio\n */\n aspectRatio(ratio) {\n if (ratio === undefined) {\n return this.aspectRatio_;\n }\n\n // Check for width:height format\n if (!/^\\d+\\:\\d+$/.test(ratio)) {\n throw new Error('Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.');\n }\n this.aspectRatio_ = ratio;\n\n // We're assuming if you set an aspect ratio you want fluid mode,\n // because in fixed mode you could calculate width and height yourself.\n this.fluid(true);\n\n this.updateStyleEl_();\n }\n\n /**\n * Update styles of the player element (height, width and aspect ratio)\n *\n * @method updateStyleEl_\n */\n updateStyleEl_() {\n let width;\n let height;\n let aspectRatio;\n let idClass;\n\n // The aspect ratio is either used directly or to calculate width and height.\n if (this.aspectRatio_ !== undefined && this.aspectRatio_ !== 'auto') {\n // Use any aspectRatio that's been specifically set\n aspectRatio = this.aspectRatio_;\n } else if (this.videoWidth()) {\n // Otherwise try to get the aspect ratio from the video metadata\n aspectRatio = this.videoWidth() + ':' + this.videoHeight();\n } else {\n // Or use a default. The video element's is 2:1, but 16:9 is more common.\n aspectRatio = '16:9';\n }\n\n // Get the ratio as a decimal we can use to calculate dimensions\n let ratioParts = aspectRatio.split(':');\n let ratioMultiplier = ratioParts[1] / ratioParts[0];\n\n if (this.width_ !== undefined) {\n // Use any width that's been specifically set\n width = this.width_;\n } else if (this.height_ !== undefined) {\n // Or calulate the width from the aspect ratio if a height has been set\n width = this.height_ / ratioMultiplier;\n } else {\n // Or use the video's metadata, or use the video el's default of 300\n width = this.videoWidth() || 300;\n }\n\n if (this.height_ !== undefined) {\n // Use any height that's been specifically set\n height = this.height_;\n } else {\n // Otherwise calculate the height from the ratio and the width\n height = width * ratioMultiplier;\n }\n\n // Ensure the CSS class is valid by starting with an alpha character\n if (/^[^a-zA-Z]/.test(this.id())) {\n idClass = 'dimensions-'+this.id();\n } else {\n idClass = this.id()+'-dimensions';\n }\n\n // Ensure the right class is still on the player for the style element\n this.addClass(idClass);\n\n stylesheet.setTextContent(this.styleEl_, `\n .${idClass} {\n width: ${width}px;\n height: ${height}px;\n }\n\n .${idClass}.vjs-fluid {\n padding-top: ${ratioMultiplier * 100}%;\n }\n `);\n }\n\n /**\n * Load the Media Playback Technology (tech)\n * Load/Create an instance of playback technology including element and API methods\n * And append playback element in player div.\n *\n * @param {String} techName Name of the playback technology\n * @param {String} source Video source\n * @method loadTech_\n * @private\n */\n loadTech_(techName, source) {\n\n // Pause and remove current playback technology\n if (this.tech_) {\n this.unloadTech_();\n }\n\n // get rid of the HTML5 video tag as soon as we are using another tech\n if (techName !== 'Html5' && this.tag) {\n Tech.getTech('Html5').disposeMediaElement(this.tag);\n this.tag.player = null;\n this.tag = null;\n }\n\n this.techName_ = techName;\n\n // Turn off API access because we're loading a new tech that might load asynchronously\n this.isReady_ = false;\n\n // Grab tech-specific options from player options and add source and parent element to use.\n var techOptions = assign({\n 'nativeControlsForTouch': this.options_.nativeControlsForTouch,\n 'source': source,\n 'playerId': this.id(),\n 'techId': `${this.id()}_${techName}_api`,\n 'textTracks': this.textTracks_,\n 'autoplay': this.options_.autoplay,\n 'preload': this.options_.preload,\n 'loop': this.options_.loop,\n 'muted': this.options_.muted,\n 'poster': this.poster(),\n 'language': this.language(),\n 'vtt.js': this.options_['vtt.js']\n }, this.options_[techName.toLowerCase()]);\n\n if (this.tag) {\n techOptions.tag = this.tag;\n }\n\n if (source) {\n this.currentType_ = source.type;\n if (source.src === this.cache_.src && this.cache_.currentTime > 0) {\n techOptions.startTime = this.cache_.currentTime;\n }\n\n this.cache_.src = source.src;\n }\n\n // Initialize tech instance\n let techComponent = Tech.getTech(techName);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techComponent) {\n techComponent = Component.getComponent(techName);\n }\n this.tech_ = new techComponent(techOptions);\n\n // player.triggerReady is always async, so don't need this to be async\n this.tech_.ready(Fn.bind(this, this.handleTechReady_), true);\n\n textTrackConverter.jsonToTextTracks(this.textTracksJson_ || [], this.tech_);\n\n // Listen to all HTML5-defined events and trigger them on the player\n this.on(this.tech_, 'loadstart', this.handleTechLoadStart_);\n this.on(this.tech_, 'waiting', this.handleTechWaiting_);\n this.on(this.tech_, 'canplay', this.handleTechCanPlay_);\n this.on(this.tech_, 'canplaythrough', this.handleTechCanPlayThrough_);\n this.on(this.tech_, 'playing', this.handleTechPlaying_);\n this.on(this.tech_, 'ended', this.handleTechEnded_);\n this.on(this.tech_, 'seeking', this.handleTechSeeking_);\n this.on(this.tech_, 'seeked', this.handleTechSeeked_);\n this.on(this.tech_, 'play', this.handleTechPlay_);\n this.on(this.tech_, 'firstplay', this.handleTechFirstPlay_);\n this.on(this.tech_, 'pause', this.handleTechPause_);\n this.on(this.tech_, 'progress', this.handleTechProgress_);\n this.on(this.tech_, 'durationchange', this.handleTechDurationChange_);\n this.on(this.tech_, 'fullscreenchange', this.handleTechFullscreenChange_);\n this.on(this.tech_, 'error', this.handleTechError_);\n this.on(this.tech_, 'suspend', this.handleTechSuspend_);\n this.on(this.tech_, 'abort', this.handleTechAbort_);\n this.on(this.tech_, 'emptied', this.handleTechEmptied_);\n this.on(this.tech_, 'stalled', this.handleTechStalled_);\n this.on(this.tech_, 'loadedmetadata', this.handleTechLoadedMetaData_);\n this.on(this.tech_, 'loadeddata', this.handleTechLoadedData_);\n this.on(this.tech_, 'timeupdate', this.handleTechTimeUpdate_);\n this.on(this.tech_, 'ratechange', this.handleTechRateChange_);\n this.on(this.tech_, 'volumechange', this.handleTechVolumeChange_);\n this.on(this.tech_, 'texttrackchange', this.handleTechTextTrackChange_);\n this.on(this.tech_, 'loadedmetadata', this.updateStyleEl_);\n this.on(this.tech_, 'posterchange', this.handleTechPosterChange_);\n\n this.usingNativeControls(this.techGet_('controls'));\n\n if (this.controls() && !this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n\n // Add the tech element in the DOM if it was not already there\n // Make sure to not insert the original video element if using Html5\n if (this.tech_.el().parentNode !== this.el() && (techName !== 'Html5' || !this.tag)) {\n Dom.insertElFirst(this.tech_.el(), this.el());\n }\n\n // Get rid of the original video tag reference after the first tech is loaded\n if (this.tag) {\n this.tag.player = null;\n this.tag = null;\n }\n }\n\n /**\n * Unload playback technology\n *\n * @method unloadTech_\n * @private\n */\n unloadTech_() {\n // Save the current text tracks so that we can reuse the same text tracks with the next tech\n this.textTracks_ = this.textTracks();\n this.textTracksJson_ = textTrackConverter.textTracksToJson(this.tech_);\n\n this.isReady_ = false;\n\n this.tech_.dispose();\n\n this.tech_ = false;\n }\n\n /**\n * Return a reference to the current tech.\n * It will only return a reference to the tech if given an object with the\n * `IWillNotUseThisInPlugins` property on it. This is try and prevent misuse\n * of techs by plugins.\n *\n * @param {Object}\n * @return {Object} The Tech\n * @method tech\n */\n tech(safety) {\n if (safety && safety.IWillNotUseThisInPlugins) {\n return this.tech_;\n }\n let errorText = `\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n \\`IWillNotUseThisInPlugins\\` to the \\`tech\\` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n `;\n window.alert(errorText);\n throw new Error(errorText);\n }\n\n /**\n * Set up click and touch listeners for the playback element\n *\n * On desktops, a click on the video itself will toggle playback,\n * on a mobile device a click on the video toggles controls.\n * (toggling controls is done by toggling the user state between active and\n * inactive)\n * A tap can signal that a user has become active, or has become inactive\n * e.g. a quick tap on an iPhone movie should reveal the controls. Another\n * quick tap should hide them again (signaling the user is in an inactive\n * viewing state)\n * In addition to this, we still want the user to be considered inactive after\n * a few seconds of inactivity.\n * Note: the only part of iOS interaction we can't mimic with this setup\n * is a touch and hold on the video element counting as activity in order to\n * keep the controls showing, but that shouldn't be an issue. A touch and hold\n * on any controls will still keep the user active\n *\n * @private\n * @method addTechControlsListeners_\n */\n addTechControlsListeners_() {\n // Make sure to remove all the previous listeners in case we are called multiple times.\n this.removeTechControlsListeners_();\n\n // Some browsers (Chrome & IE) don't trigger a click on a flash swf, but do\n // trigger mousedown/up.\n // http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object\n // Any touch events are set to block the mousedown event from happening\n this.on(this.tech_, 'mousedown', this.handleTechClick_);\n\n // If the controls were hidden we don't want that to change without a tap event\n // so we'll check if the controls were already showing before reporting user\n // activity\n this.on(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.on(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.on(this.tech_, 'touchend', this.handleTechTouchEnd_);\n\n // The tap listener needs to come after the touchend listener because the tap\n // listener cancels out any reportedUserActivity when setting userActive(false)\n this.on(this.tech_, 'tap', this.handleTechTap_);\n }\n\n /**\n * Remove the listeners used for click and tap controls. This is needed for\n * toggling to controls disabled, where a tap/touch should do nothing.\n *\n * @method removeTechControlsListeners_\n * @private\n */\n removeTechControlsListeners_() {\n // We don't want to just use `this.off()` because there might be other needed\n // listeners added by techs that extend this.\n this.off(this.tech_, 'tap', this.handleTechTap_);\n this.off(this.tech_, 'touchstart', this.handleTechTouchStart_);\n this.off(this.tech_, 'touchmove', this.handleTechTouchMove_);\n this.off(this.tech_, 'touchend', this.handleTechTouchEnd_);\n this.off(this.tech_, 'mousedown', this.handleTechClick_);\n }\n\n /**\n * Player waits for the tech to be ready\n *\n * @method handleTechReady_\n * @private\n */\n handleTechReady_() {\n this.triggerReady();\n\n // Keep the same volume as before\n if (this.cache_.volume) {\n this.techCall_('setVolume', this.cache_.volume);\n }\n\n // Look if the tech found a higher resolution poster while loading\n this.handleTechPosterChange_();\n\n // Update the duration if available\n this.handleTechDurationChange_();\n\n // Chrome and Safari both have issues with autoplay.\n // In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.\n // In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)\n // This fixes both issues. Need to wait for API, so it updates displays correctly\n if (this.src() && this.tag && this.options_.autoplay && this.paused()) {\n delete this.tag.poster; // Chrome Fix. Fixed in Chrome v16.\n this.play();\n }\n }\n\n /**\n * Fired when the user agent begins looking for media data\n *\n * @private\n * @method handleTechLoadStart_\n */\n handleTechLoadStart_() {\n // TODO: Update to use `emptied` event instead. See #1277.\n\n this.removeClass('vjs-ended');\n\n // reset the error state\n this.error(null);\n\n // If it's already playing we want to trigger a firstplay event now.\n // The firstplay event relies on both the play and loadstart events\n // which can happen in any order for a new source\n if (!this.paused()) {\n this.trigger('loadstart');\n this.trigger('firstplay');\n } else {\n // reset the hasStarted state\n this.hasStarted(false);\n this.trigger('loadstart');\n }\n }\n\n /**\n * Add/remove the vjs-has-started class\n *\n * @param {Boolean} hasStarted The value of true adds the class the value of false remove the class\n * @return {Boolean} Boolean value if has started\n * @private\n * @method hasStarted\n */\n hasStarted(hasStarted) {\n if (hasStarted !== undefined) {\n // only update if this is a new value\n if (this.hasStarted_ !== hasStarted) {\n this.hasStarted_ = hasStarted;\n if (hasStarted) {\n this.addClass('vjs-has-started');\n // trigger the firstplay event if this newly has played\n this.trigger('firstplay');\n } else {\n this.removeClass('vjs-has-started');\n }\n }\n return this;\n }\n return !!this.hasStarted_;\n }\n\n /**\n * Fired whenever the media begins or resumes playback\n *\n * @private\n * @method handleTechPlay_\n */\n handleTechPlay_() {\n this.removeClass('vjs-ended');\n this.removeClass('vjs-paused');\n this.addClass('vjs-playing');\n\n // hide the poster when the user hits play\n // https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-play\n this.hasStarted(true);\n\n this.trigger('play');\n }\n\n /**\n * Fired whenever the media begins waiting\n *\n * @private\n * @method handleTechWaiting_\n */\n handleTechWaiting_() {\n this.addClass('vjs-waiting');\n this.trigger('waiting');\n this.one('timeupdate', () => this.removeClass('vjs-waiting'));\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlay_\n */\n handleTechCanPlay_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplay');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechCanPlayThrough_\n */\n handleTechCanPlayThrough_() {\n this.removeClass('vjs-waiting');\n this.trigger('canplaythrough');\n }\n\n /**\n * A handler for events that signal that waiting has ended\n * which is not consistent between browsers. See #1351\n *\n * @private\n * @method handleTechPlaying_\n */\n handleTechPlaying_() {\n this.removeClass('vjs-waiting');\n this.trigger('playing');\n }\n\n /**\n * Fired whenever the player is jumping to a new time\n *\n * @private\n * @method handleTechSeeking_\n */\n handleTechSeeking_() {\n this.addClass('vjs-seeking');\n this.trigger('seeking');\n }\n\n /**\n * Fired when the player has finished jumping to a new time\n *\n * @private\n * @method handleTechSeeked_\n */\n handleTechSeeked_() {\n this.removeClass('vjs-seeking');\n this.trigger('seeked');\n }\n\n /**\n * Fired the first time a video is played\n * Not part of the HLS spec, and we're not sure if this is the best\n * implementation yet, so use sparingly. If you don't have a reason to\n * prevent playback, use `myPlayer.one('play');` instead.\n *\n * @private\n * @method handleTechFirstPlay_\n */\n handleTechFirstPlay_() {\n //If the first starttime attribute is specified\n //then we will start at the given offset in seconds\n if(this.options_.starttime){\n this.currentTime(this.options_.starttime);\n }\n\n this.addClass('vjs-has-started');\n this.trigger('firstplay');\n }\n\n /**\n * Fired whenever the media has been paused\n *\n * @private\n * @method handleTechPause_\n */\n handleTechPause_() {\n this.removeClass('vjs-playing');\n this.addClass('vjs-paused');\n this.trigger('pause');\n }\n\n /**\n * Fired while the user agent is downloading media data\n *\n * @private\n * @method handleTechProgress_\n */\n handleTechProgress_() {\n this.trigger('progress');\n }\n\n /**\n * Fired when the end of the media resource is reached (currentTime == duration)\n *\n * @private\n * @method handleTechEnded_\n */\n handleTechEnded_() {\n this.addClass('vjs-ended');\n if (this.options_.loop) {\n this.currentTime(0);\n this.play();\n } else if (!this.paused()) {\n this.pause();\n }\n\n this.trigger('ended');\n }\n\n /**\n * Fired when the duration of the media resource is first known or changed\n *\n * @private\n * @method handleTechDurationChange_\n */\n handleTechDurationChange_() {\n this.duration(this.techGet_('duration'));\n }\n\n /**\n * Handle a click on the media element to play/pause\n *\n * @param {Object=} event Event object\n * @private\n * @method handleTechClick_\n */\n handleTechClick_(event) {\n // We're using mousedown to detect clicks thanks to Flash, but mousedown\n // will also be triggered with right-clicks, so we need to prevent that\n if (event.button !== 0) return;\n\n // When controls are disabled a click should not toggle playback because\n // the click is considered a control\n if (this.controls()) {\n if (this.paused()) {\n this.play();\n } else {\n this.pause();\n }\n }\n }\n\n /**\n * Handle a tap on the media element. It will toggle the user\n * activity state, which hides and shows the controls.\n *\n * @private\n * @method handleTechTap_\n */\n handleTechTap_() {\n this.userActive(!this.userActive());\n }\n\n /**\n * Handle touch to start\n *\n * @private\n * @method handleTechTouchStart_\n */\n handleTechTouchStart_() {\n this.userWasActive = this.userActive();\n }\n\n /**\n * Handle touch to move\n *\n * @private\n * @method handleTechTouchMove_\n */\n handleTechTouchMove_() {\n if (this.userWasActive){\n this.reportUserActivity();\n }\n }\n\n /**\n * Handle touch to end\n *\n * @private\n * @method handleTechTouchEnd_\n */\n handleTechTouchEnd_(event) {\n // Stop the mouse events from also happening\n event.preventDefault();\n }\n\n /**\n * Fired when the player switches in or out of fullscreen mode\n *\n * @private\n * @method handleFullscreenChange_\n */\n handleFullscreenChange_() {\n if (this.isFullscreen()) {\n this.addClass('vjs-fullscreen');\n } else {\n this.removeClass('vjs-fullscreen');\n }\n }\n\n /**\n * native click events on the SWF aren't triggered on IE11, Win8.1RT\n * use stageclick events triggered from inside the SWF instead\n *\n * @private\n * @method handleStageClick_\n */\n handleStageClick_() {\n this.reportUserActivity();\n }\n\n /**\n * Handle Tech Fullscreen Change\n *\n * @private\n * @method handleTechFullscreenChange_\n */\n handleTechFullscreenChange_(event, data) {\n if (data) {\n this.isFullscreen(data.isFullscreen);\n }\n this.trigger('fullscreenchange');\n }\n\n /**\n * Fires when an error occurred during the loading of an audio/video\n *\n * @private\n * @method handleTechError_\n */\n handleTechError_() {\n let error = this.tech_.error();\n this.error(error && error.code);\n }\n\n /**\n * Fires when the browser is intentionally not getting media data\n *\n * @private\n * @method handleTechSuspend_\n */\n handleTechSuspend_() {\n this.trigger('suspend');\n }\n\n /**\n * Fires when the loading of an audio/video is aborted\n *\n * @private\n * @method handleTechAbort_\n */\n handleTechAbort_() {\n this.trigger('abort');\n }\n\n /**\n * Fires when the current playlist is empty\n *\n * @private\n * @method handleTechEmptied_\n */\n handleTechEmptied_() {\n this.trigger('emptied');\n }\n\n /**\n * Fires when the browser is trying to get media data, but data is not available\n *\n * @private\n * @method handleTechStalled_\n */\n handleTechStalled_() {\n this.trigger('stalled');\n }\n\n /**\n * Fires when the browser has loaded meta data for the audio/video\n *\n * @private\n * @method handleTechLoadedMetaData_\n */\n handleTechLoadedMetaData_() {\n this.trigger('loadedmetadata');\n }\n\n /**\n * Fires when the browser has loaded the current frame of the audio/video\n *\n * @private\n * @method handleTechLoadedData_\n */\n handleTechLoadedData_() {\n this.trigger('loadeddata');\n }\n\n /**\n * Fires when the current playback position has changed\n *\n * @private\n * @method handleTechTimeUpdate_\n */\n handleTechTimeUpdate_() {\n this.trigger('timeupdate');\n }\n\n /**\n * Fires when the playing speed of the audio/video is changed\n *\n * @private\n * @method handleTechRateChange_\n */\n handleTechRateChange_() {\n this.trigger('ratechange');\n }\n\n /**\n * Fires when the volume has been changed\n *\n * @private\n * @method handleTechVolumeChange_\n */\n handleTechVolumeChange_() {\n this.trigger('volumechange');\n }\n\n /**\n * Fires when the text track has been changed\n *\n * @private\n * @method handleTechTextTrackChange_\n */\n handleTechTextTrackChange_() {\n this.trigger('texttrackchange');\n }\n\n /**\n * Get object for cached values.\n *\n * @return {Object}\n * @method getCache\n */\n getCache() {\n return this.cache_;\n }\n\n /**\n * Pass values to the playback tech\n *\n * @param {String=} method Method\n * @param {Object=} arg Argument\n * @private\n * @method techCall_\n */\n techCall_(method, arg) {\n // If it's not ready yet, call method when it is\n if (this.tech_ && !this.tech_.isReady_) {\n this.tech_.ready(function(){\n this[method](arg);\n }, true);\n\n // Otherwise call method now\n } else {\n try {\n this.tech_[method](arg);\n } catch(e) {\n log(e);\n throw e;\n }\n }\n }\n\n /**\n * Get calls can't wait for the tech, and sometimes don't need to.\n *\n * @param {String} method Tech method\n * @return {Method}\n * @private\n * @method techGet_\n */\n techGet_(method) {\n if (this.tech_ && this.tech_.isReady_) {\n\n // Flash likes to die and reload when you hide or reposition it.\n // In these cases the object methods go away and we get errors.\n // When that happens we'll catch the errors and inform tech that it's not ready any more.\n try {\n return this.tech_[method]();\n } catch(e) {\n // When building additional tech libs, an expected method may not be defined yet\n if (this.tech_[method] === undefined) {\n log(`Video.js: ${method} method not defined for ${this.techName_} playback technology.`, e);\n } else {\n // When a method isn't available on the object it throws a TypeError\n if (e.name === 'TypeError') {\n log(`Video.js: ${method} unavailable on ${this.techName_} playback technology element.`, e);\n this.tech_.isReady_ = false;\n } else {\n log(e);\n }\n }\n throw e;\n }\n }\n\n return;\n }\n\n /**\n * start media playback\n * ```js\n * myPlayer.play();\n * ```\n *\n * @return {Player} self\n * @method play\n */\n play() {\n this.techCall_('play');\n return this;\n }\n\n /**\n * Pause the video playback\n * ```js\n * myPlayer.pause();\n * ```\n *\n * @return {Player} self\n * @method pause\n */\n pause() {\n this.techCall_('pause');\n return this;\n }\n\n /**\n * Check if the player is paused\n * ```js\n * var isPaused = myPlayer.paused();\n * var isPlaying = !myPlayer.paused();\n * ```\n *\n * @return {Boolean} false if the media is currently playing, or true otherwise\n * @method paused\n */\n paused() {\n // The initial state of paused should be true (in Safari it's actually false)\n return (this.techGet_('paused') === false) ? false : true;\n }\n\n /**\n * Returns whether or not the user is \"scrubbing\". Scrubbing is when the user\n * has clicked the progress bar handle and is dragging it along the progress bar.\n *\n * @param {Boolean} isScrubbing True/false the user is scrubbing\n * @return {Boolean} The scrubbing status when getting\n * @return {Object} The player when setting\n * @method scrubbing\n */\n scrubbing(isScrubbing) {\n if (isScrubbing !== undefined) {\n this.scrubbing_ = !!isScrubbing;\n\n if (isScrubbing) {\n this.addClass('vjs-scrubbing');\n } else {\n this.removeClass('vjs-scrubbing');\n }\n\n return this;\n }\n\n return this.scrubbing_;\n }\n\n /**\n * Get or set the current time (in seconds)\n * ```js\n * // get\n * var whereYouAt = myPlayer.currentTime();\n * // set\n * myPlayer.currentTime(120); // 2 minutes into the video\n * ```\n *\n * @param {Number|String=} seconds The time to seek to\n * @return {Number} The time in seconds, when not setting\n * @return {Player} self, when the current time is set\n * @method currentTime\n */\n currentTime(seconds) {\n if (seconds !== undefined) {\n\n this.techCall_('setCurrentTime', seconds);\n\n return this;\n }\n\n // cache last currentTime and return. default to 0 seconds\n //\n // Caching the currentTime is meant to prevent a massive amount of reads on the tech's\n // currentTime when scrubbing, but may not provide much performance benefit afterall.\n // Should be tested. Also something has to read the actual current time or the cache will\n // never get updated.\n return this.cache_.currentTime = (this.techGet_('currentTime') || 0);\n }\n\n /**\n * Get the length in time of the video in seconds\n * ```js\n * var lengthOfVideo = myPlayer.duration();\n * ```\n * **NOTE**: The video must have started loading before the duration can be\n * known, and in the case of Flash, may not be known until the video starts\n * playing.\n *\n * @param {Number} seconds Duration when setting\n * @return {Number} The duration of the video in seconds when getting\n * @method duration\n */\n duration(seconds) {\n if (seconds === undefined) {\n return this.cache_.duration || 0;\n }\n\n seconds = parseFloat(seconds) || 0;\n\n // Standardize on Inifity for signaling video is live\n if (seconds < 0) {\n seconds = Infinity;\n }\n\n if (seconds !== this.cache_.duration) {\n // Cache the last set value for optimized scrubbing (esp. Flash)\n this.cache_.duration = seconds;\n\n if (seconds === Infinity) {\n this.addClass('vjs-live');\n } else {\n this.removeClass('vjs-live');\n }\n\n this.trigger('durationchange');\n }\n\n return this;\n }\n\n /**\n * Calculates how much time is left.\n * ```js\n * var timeLeft = myPlayer.remainingTime();\n * ```\n * Not a native video element function, but useful\n *\n * @return {Number} The time remaining in seconds\n * @method remainingTime\n */\n remainingTime() {\n return this.duration() - this.currentTime();\n }\n\n // http://dev.w3.org/html5/spec/video.html#dom-media-buffered\n // Buffered returns a timerange object.\n // Kind of like an array of portions of the video that have been downloaded.\n\n /**\n * Get a TimeRange object with the times of the video that have been downloaded\n * If you just want the percent of the video that's been downloaded,\n * use bufferedPercent.\n * ```js\n * // Number of different ranges of time have been buffered. Usually 1.\n * numberOfRanges = bufferedTimeRange.length,\n * // Time in seconds when the first range starts. Usually 0.\n * firstRangeStart = bufferedTimeRange.start(0),\n * // Time in seconds when the first range ends\n * firstRangeEnd = bufferedTimeRange.end(0),\n * // Length in seconds of the first time range\n * firstRangeLength = firstRangeEnd - firstRangeStart;\n * ```\n *\n * @return {Object} A mock TimeRange object (following HTML spec)\n * @method buffered\n */\n buffered() {\n var buffered = this.techGet_('buffered');\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0,0);\n }\n\n return buffered;\n }\n\n /**\n * Get the percent (as a decimal) of the video that's been downloaded\n * ```js\n * var howMuchIsDownloaded = myPlayer.bufferedPercent();\n * ```\n * 0 means none, 1 means all.\n * (This method isn't in the HTML5 spec, but it's very convenient)\n *\n * @return {Number} A decimal between 0 and 1 representing the percent\n * @method bufferedPercent\n */\n bufferedPercent() {\n return bufferedPercent(this.buffered(), this.duration());\n }\n\n /**\n * Get the ending time of the last buffered time range\n * This is used in the progress bar to encapsulate all time ranges.\n *\n * @return {Number} The end of the last buffered time range\n * @method bufferedEnd\n */\n bufferedEnd() {\n var buffered = this.buffered(),\n duration = this.duration(),\n end = buffered.end(buffered.length-1);\n\n if (end > duration) {\n end = duration;\n }\n\n return end;\n }\n\n /**\n * Get or set the current volume of the media\n * ```js\n * // get\n * var howLoudIsIt = myPlayer.volume();\n * // set\n * myPlayer.volume(0.5); // Set volume to half\n * ```\n * 0 is off (muted), 1.0 is all the way up, 0.5 is half way.\n *\n * @param {Number} percentAsDecimal The new volume as a decimal percent\n * @return {Number} The current volume when getting\n * @return {Player} self when setting\n * @method volume\n */\n volume(percentAsDecimal) {\n let vol;\n\n if (percentAsDecimal !== undefined) {\n vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1\n this.cache_.volume = vol;\n this.techCall_('setVolume', vol);\n\n return this;\n }\n\n // Default to 1 when returning current volume.\n vol = parseFloat(this.techGet_('volume'));\n return (isNaN(vol)) ? 1 : vol;\n }\n\n\n /**\n * Get the current muted state, or turn mute on or off\n * ```js\n * // get\n * var isVolumeMuted = myPlayer.muted();\n * // set\n * myPlayer.muted(true); // mute the volume\n * ```\n *\n * @param {Boolean=} muted True to mute, false to unmute\n * @return {Boolean} True if mute is on, false if not when getting\n * @return {Player} self when setting mute\n * @method muted\n */\n muted(muted) {\n if (muted !== undefined) {\n this.techCall_('setMuted', muted);\n return this;\n }\n return this.techGet_('muted') || false; // Default to false\n }\n\n // Check if current tech can support native fullscreen\n // (e.g. with built in controls like iOS, so not our flash swf)\n /**\n * Check to see if fullscreen is supported\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return this.techGet_('supportsFullScreen') || false;\n }\n\n /**\n * Check if the player is in fullscreen mode\n * ```js\n * // get\n * var fullscreenOrNot = myPlayer.isFullscreen();\n * // set\n * myPlayer.isFullscreen(true); // tell the player it's in fullscreen\n * ```\n * NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official\n * property and instead document.fullscreenElement is used. But isFullscreen is\n * still a valuable property for internal player workings.\n *\n * @param {Boolean=} isFS Update the player's fullscreen state\n * @return {Boolean} true if fullscreen false if not when getting\n * @return {Player} self when setting\n * @method isFullscreen\n */\n isFullscreen(isFS) {\n if (isFS !== undefined) {\n this.isFullscreen_ = !!isFS;\n return this;\n }\n return !!this.isFullscreen_;\n }\n\n /**\n * Increase the size of the video to full screen\n * ```js\n * myPlayer.requestFullscreen();\n * ```\n * In some browsers, full screen is not supported natively, so it enters\n * \"full window mode\", where the video fills the browser window.\n * In browsers and devices that support native full screen, sometimes the\n * browser's default controls will be shown, and not the Video.js custom skin.\n * This includes most mobile devices (iOS, Android) and older versions of\n * Safari.\n *\n * @return {Player} self\n * @method requestFullscreen\n */\n requestFullscreen() {\n var fsApi = FullscreenApi;\n\n this.isFullscreen(true);\n\n if (fsApi.requestFullscreen) {\n // the browser supports going fullscreen at the element level so we can\n // take the controls fullscreen as well as the video\n\n // Trigger fullscreenchange event after change\n // We have to specifically add this each time, and remove\n // when canceling fullscreen. Otherwise if there's multiple\n // players on a page, they would all be reacting to the same fullscreen\n // events\n Events.on(document, fsApi.fullscreenchange, Fn.bind(this, function documentFullscreenChange(e){\n this.isFullscreen(document[fsApi.fullscreenElement]);\n\n // If cancelling fullscreen, remove event listener.\n if (this.isFullscreen() === false) {\n Events.off(document, fsApi.fullscreenchange, documentFullscreenChange);\n }\n\n this.trigger('fullscreenchange');\n }));\n\n this.el_[fsApi.requestFullscreen]();\n\n } else if (this.tech_.supportsFullScreen()) {\n // we can't take the video.js controls fullscreen but we can go fullscreen\n // with native controls\n this.techCall_('enterFullScreen');\n } else {\n // fullscreen isn't supported so we'll just stretch the video element to\n // fill the viewport\n this.enterFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * Return the video to its normal size after having been in full screen mode\n * ```js\n * myPlayer.exitFullscreen();\n * ```\n *\n * @return {Player} self\n * @method exitFullscreen\n */\n exitFullscreen() {\n var fsApi = FullscreenApi;\n this.isFullscreen(false);\n\n // Check for browser element fullscreen support\n if (fsApi.requestFullscreen) {\n document[fsApi.exitFullscreen]();\n } else if (this.tech_.supportsFullScreen()) {\n this.techCall_('exitFullScreen');\n } else {\n this.exitFullWindow();\n this.trigger('fullscreenchange');\n }\n\n return this;\n }\n\n /**\n * When fullscreen isn't supported we can stretch the video container to as wide as the browser will let us.\n *\n * @method enterFullWindow\n */\n enterFullWindow() {\n this.isFullWindow = true;\n\n // Storing original doc overflow value to return to when fullscreen is off\n this.docOrigOverflow = document.documentElement.style.overflow;\n\n // Add listener for esc key to exit fullscreen\n Events.on(document, 'keydown', Fn.bind(this, this.fullWindowOnEscKey));\n\n // Hide any scroll bars\n document.documentElement.style.overflow = 'hidden';\n\n // Apply fullscreen styles\n Dom.addElClass(document.body, 'vjs-full-window');\n\n this.trigger('enterFullWindow');\n }\n\n /**\n * Check for call to either exit full window or full screen on ESC key\n *\n * @param {String} event Event to check for key press\n * @method fullWindowOnEscKey\n */\n fullWindowOnEscKey(event) {\n if (event.keyCode === 27) {\n if (this.isFullscreen() === true) {\n this.exitFullscreen();\n } else {\n this.exitFullWindow();\n }\n }\n }\n\n /**\n * Exit full window\n *\n * @method exitFullWindow\n */\n exitFullWindow() {\n this.isFullWindow = false;\n Events.off(document, 'keydown', this.fullWindowOnEscKey);\n\n // Unhide scroll bars.\n document.documentElement.style.overflow = this.docOrigOverflow;\n\n // Remove fullscreen styles\n Dom.removeElClass(document.body, 'vjs-full-window');\n\n // Resize the box, controller, and poster to original sizes\n // this.positionAll();\n this.trigger('exitFullWindow');\n }\n\n /**\n * Check whether the player can play a given mimetype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n * @method canPlayType\n */\n canPlayType(type) {\n let can;\n\n // Loop through each playback technology in the options order\n for (let i = 0, j = this.options_.techOrder; i < j.length; i++) {\n let techName = toTitleCase(j[i]);\n let tech = Tech.getTech(techName);\n\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!tech) {\n tech = Component.getComponent(techName);\n }\n\n // Check if the current tech is defined before continuing\n if (!tech) {\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n continue;\n }\n\n // Check if the browser supports this technology\n if (tech.isSupported()) {\n can = tech.canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n }\n\n return '';\n }\n\n /**\n * Select source based on tech-order or source-order\n * Uses source-order selection if `options.sourceOrder` is truthy. Otherwise,\n * defaults to tech-order selection\n *\n * @param {Array} sources The sources for a media asset\n * @return {Object|Boolean} Object of source and tech order, otherwise false\n * @method selectSource\n */\n selectSource(sources) {\n // Get only the techs specified in `techOrder` that exist and are supported by the\n // current platform\n let techs =\n this.options_.techOrder\n .map(toTitleCase)\n .map((techName) => {\n // `Component.getComponent(...)` is for support of old behavior of techs\n // being registered as components.\n // Remove once that deprecated behavior is removed.\n return [techName, Tech.getTech(techName) || Component.getComponent(techName)];\n })\n .filter(([techName, tech]) => {\n // Check if the current tech is defined before continuing\n if (tech) {\n // Check if the browser supports this technology\n return tech.isSupported();\n }\n\n log.error(`The \"${techName}\" tech is undefined. Skipped browser support check for that tech.`);\n return false;\n });\n\n // Iterate over each `innerArray` element once per `outerArray` element and execute\n // `tester` with both. If `tester` returns a non-falsy value, exit early and return\n // that value.\n let findFirstPassingTechSourcePair = function (outerArray, innerArray, tester) {\n let found;\n\n outerArray.some((outerChoice) => {\n return innerArray.some((innerChoice) => {\n found = tester(outerChoice, innerChoice);\n\n if (found) {\n return true;\n }\n });\n });\n\n return found;\n };\n\n let foundSourceAndTech;\n let flip = (fn) => (a, b) => fn(b, a);\n let finder = ([techName, tech], source) => {\n if (tech.canPlaySource(source)) {\n return {source: source, tech: techName};\n }\n };\n\n // Depending on the truthiness of `options.sourceOrder`, we swap the order of techs and sources\n // to select from them based on their priority.\n if (this.options_.sourceOrder) {\n // Source-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(sources, techs, flip(finder));\n } else {\n // Tech-first ordering\n foundSourceAndTech = findFirstPassingTechSourcePair(techs, sources, finder);\n }\n\n return foundSourceAndTech || false;\n }\n\n /**\n * The source function updates the video source\n * There are three types of variables you can pass as the argument.\n * **URL String**: A URL to the the video file. Use this method if you are sure\n * the current playback technology (HTML5/Flash) can support the source you\n * provide. Currently only MP4 files can be used in both HTML5 and Flash.\n * ```js\n * myPlayer.src(\"http://www.example.com/path/to/video.mp4\");\n * ```\n * **Source Object (or element):* * A javascript object containing information\n * about the source file. Use this method if you want the player to determine if\n * it can support the file using the type information.\n * ```js\n * myPlayer.src({ type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" });\n * ```\n * **Array of Source Objects:* * To provide multiple versions of the source so\n * that it can be played using HTML5 across browsers you can use an array of\n * source objects. Video.js will detect which version is supported and load that\n * file.\n * ```js\n * myPlayer.src([\n * { type: \"video/mp4\", src: \"http://www.example.com/path/to/video.mp4\" },\n * { type: \"video/webm\", src: \"http://www.example.com/path/to/video.webm\" },\n * { type: \"video/ogg\", src: \"http://www.example.com/path/to/video.ogv\" }\n * ]);\n * ```\n *\n * @param {String|Object|Array=} source The source URL, object, or array of sources\n * @return {String} The current video source when getting\n * @return {String} The player when setting\n * @method src\n */\n src(source) {\n if (source === undefined) {\n return this.techGet_('src');\n }\n\n let currentTech = Tech.getTech(this.techName_);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!currentTech) {\n currentTech = Component.getComponent(this.techName_);\n }\n\n // case: Array of source objects to choose from and pick the best to play\n if (Array.isArray(source)) {\n this.sourceList_(source);\n\n // case: URL String (http://myvideo...)\n } else if (typeof source === 'string') {\n // create a source object from the string\n this.src({ src: source });\n\n // case: Source object { src: '', type: '' ... }\n } else if (source instanceof Object) {\n // check if the source has a type and the loaded tech cannot play the source\n // if there's no type we'll just try the current tech\n if (source.type && !currentTech.canPlaySource(source)) {\n // create a source list with the current source and send through\n // the tech loop to check for a compatible technology\n this.sourceList_([source]);\n } else {\n this.cache_.src = source.src;\n this.currentType_ = source.type || '';\n\n // wait until the tech is ready to set the source\n this.ready(function(){\n\n // The setSource tech method was added with source handlers\n // so older techs won't support it\n // We need to check the direct prototype for the case where subclasses\n // of the tech do not support source handlers\n if (currentTech.prototype.hasOwnProperty('setSource')) {\n this.techCall_('setSource', source);\n } else {\n this.techCall_('src', source.src);\n }\n\n if (this.options_.preload === 'auto') {\n this.load();\n }\n\n if (this.options_.autoplay) {\n this.play();\n }\n\n // Set the source synchronously if possible (#2326)\n }, true);\n }\n }\n\n return this;\n }\n\n /**\n * Handle an array of source objects\n *\n * @param {Array} sources Array of source objects\n * @private\n * @method sourceList_\n */\n sourceList_(sources) {\n var sourceTech = this.selectSource(sources);\n\n if (sourceTech) {\n if (sourceTech.tech === this.techName_) {\n // if this technology is already loaded, set the source\n this.src(sourceTech.source);\n } else {\n // load this technology with the chosen source\n this.loadTech_(sourceTech.tech, sourceTech.source);\n }\n } else {\n // We need to wrap this in a timeout to give folks a chance to add error event handlers\n this.setTimeout( function() {\n this.error({ code: 4, message: this.localize(this.options_.notSupportedMessage) });\n }, 0);\n\n // we could not find an appropriate tech, but let's still notify the delegate that this is it\n // this needs a better comment about why this is needed\n this.triggerReady();\n }\n }\n\n /**\n * Begin loading the src data.\n *\n * @return {Player} Returns the player\n * @method load\n */\n load() {\n this.techCall_('load');\n return this;\n }\n\n /**\n * Reset the player. Loads the first tech in the techOrder,\n * and calls `reset` on the tech`.\n *\n * @return {Player} Returns the player\n * @method reset\n */\n reset() {\n this.loadTech_(toTitleCase(this.options_.techOrder[0]), null);\n this.techCall_('reset');\n return this;\n }\n\n /**\n * Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4\n * Can be used in conjuction with `currentType` to assist in rebuilding the current source object.\n *\n * @return {String} The current source\n * @method currentSrc\n */\n currentSrc() {\n return this.techGet_('currentSrc') || this.cache_.src || '';\n }\n\n /**\n * Get the current source type e.g. video/mp4\n * This can allow you rebuild the current source object so that you could load the same\n * source and tech later\n *\n * @return {String} The source MIME type\n * @method currentType\n */\n currentType() {\n return this.currentType_ || '';\n }\n\n /**\n * Get or set the preload attribute\n *\n * @param {Boolean} value Boolean to determine if preload should be used\n * @return {String} The preload attribute value when getting\n * @return {Player} Returns the player when setting\n * @method preload\n */\n preload(value) {\n if (value !== undefined) {\n this.techCall_('setPreload', value);\n this.options_.preload = value;\n return this;\n }\n return this.techGet_('preload');\n }\n\n /**\n * Get or set the autoplay attribute.\n *\n * @param {Boolean} value Boolean to determine if video should autoplay\n * @return {String} The autoplay attribute value when getting\n * @return {Player} Returns the player when setting\n * @method autoplay\n */\n autoplay(value) {\n if (value !== undefined) {\n this.techCall_('setAutoplay', value);\n this.options_.autoplay = value;\n return this;\n }\n return this.techGet_('autoplay', value);\n }\n\n /**\n * Get or set the loop attribute on the video element.\n *\n * @param {Boolean} value Boolean to determine if video should loop\n * @return {String} The loop attribute value when getting\n * @return {Player} Returns the player when setting\n * @method loop\n */\n loop(value) {\n if (value !== undefined) {\n this.techCall_('setLoop', value);\n this.options_['loop'] = value;\n return this;\n }\n return this.techGet_('loop');\n }\n\n /**\n * Get or set the poster image source url\n *\n * ##### EXAMPLE:\n * ```js\n * // get\n * var currentPoster = myPlayer.poster();\n * // set\n * myPlayer.poster('http://example.com/myImage.jpg');\n * ```\n *\n * @param {String=} src Poster image source URL\n * @return {String} poster URL when getting\n * @return {Player} self when setting\n * @method poster\n */\n poster(src) {\n if (src === undefined) {\n return this.poster_;\n }\n\n // The correct way to remove a poster is to set as an empty string\n // other falsey values will throw errors\n if (!src) {\n src = '';\n }\n\n // update the internal poster variable\n this.poster_ = src;\n\n // update the tech's poster\n this.techCall_('setPoster', src);\n\n // alert components that the poster has been set\n this.trigger('posterchange');\n\n return this;\n }\n\n /**\n * Some techs (e.g. YouTube) can provide a poster source in an\n * asynchronous way. We want the poster component to use this\n * poster source so that it covers up the tech's controls.\n * (YouTube's play button). However we only want to use this\n * soruce if the player user hasn't set a poster through\n * the normal APIs.\n *\n * @private\n * @method handleTechPosterChange_\n */\n handleTechPosterChange_() {\n if (!this.poster_ && this.tech_ && this.tech_.poster) {\n this.poster_ = this.tech_.poster() || '';\n\n // Let components know the poster has changed\n this.trigger('posterchange');\n }\n }\n\n /**\n * Get or set whether or not the controls are showing.\n *\n * @param {Boolean} bool Set controls to showing or not\n * @return {Boolean} Controls are showing\n * @method controls\n */\n controls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.controls_ !== bool) {\n this.controls_ = bool;\n\n if (this.usingNativeControls()) {\n this.techCall_('setControls', bool);\n }\n\n if (bool) {\n this.removeClass('vjs-controls-disabled');\n this.addClass('vjs-controls-enabled');\n this.trigger('controlsenabled');\n\n if (!this.usingNativeControls()) {\n this.addTechControlsListeners_();\n }\n } else {\n this.removeClass('vjs-controls-enabled');\n this.addClass('vjs-controls-disabled');\n this.trigger('controlsdisabled');\n\n if (!this.usingNativeControls()) {\n this.removeTechControlsListeners_();\n }\n }\n }\n return this;\n }\n return !!this.controls_;\n }\n\n /**\n * Toggle native controls on/off. Native controls are the controls built into\n * devices (e.g. default iPhone controls), Flash, or other techs\n * (e.g. Vimeo Controls)\n * **This should only be set by the current tech, because only the tech knows\n * if it can support native controls**\n *\n * @param {Boolean} bool True signals that native controls are on\n * @return {Player} Returns the player\n * @private\n * @method usingNativeControls\n */\n usingNativeControls(bool) {\n if (bool !== undefined) {\n bool = !!bool; // force boolean\n // Don't trigger a change event unless it actually changed\n if (this.usingNativeControls_ !== bool) {\n this.usingNativeControls_ = bool;\n if (bool) {\n this.addClass('vjs-using-native-controls');\n\n /**\n * player is using the native device controls\n *\n * @event usingnativecontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingnativecontrols');\n } else {\n this.removeClass('vjs-using-native-controls');\n\n /**\n * player is using the custom HTML controls\n *\n * @event usingcustomcontrols\n * @memberof Player\n * @instance\n * @private\n */\n this.trigger('usingcustomcontrols');\n }\n }\n return this;\n }\n return !!this.usingNativeControls_;\n }\n\n /**\n * Set or get the current MediaError\n *\n * @param {*} err A MediaError or a String/Number to be turned into a MediaError\n * @return {MediaError|null} when getting\n * @return {Player} when setting\n * @method error\n */\n error(err) {\n if (err === undefined) {\n return this.error_ || null;\n }\n\n // restoring to default\n if (err === null) {\n this.error_ = err;\n this.removeClass('vjs-error');\n this.errorDisplay.close();\n return this;\n }\n\n // error instance\n if (err instanceof MediaError) {\n this.error_ = err;\n } else {\n this.error_ = new MediaError(err);\n }\n\n // add the vjs-error classname to the player\n this.addClass('vjs-error');\n\n // log the name of the error type and any message\n // ie8 just logs \"[object object]\" if you just log the error object\n log.error(`(CODE:${this.error_.code} ${MediaError.errorTypes[this.error_.code]})`, this.error_.message, this.error_);\n\n // fire an error event on the player\n this.trigger('error');\n\n return this;\n }\n\n /**\n * Returns whether or not the player is in the \"ended\" state.\n *\n * @return {Boolean} True if the player is in the ended state, false if not.\n * @method ended\n */\n ended() { return this.techGet_('ended'); }\n\n /**\n * Returns whether or not the player is in the \"seeking\" state.\n *\n * @return {Boolean} True if the player is in the seeking state, false if not.\n * @method seeking\n */\n seeking() { return this.techGet_('seeking'); }\n\n /**\n * Returns the TimeRanges of the media that are currently available\n * for seeking to.\n *\n * @return {TimeRanges} the seekable intervals of the media timeline\n * @method seekable\n */\n seekable() { return this.techGet_('seekable'); }\n\n /**\n * Report user activity\n *\n * @param {Object} event Event object\n * @method reportUserActivity\n */\n reportUserActivity(event) {\n this.userActivity_ = true;\n }\n\n /**\n * Get/set if user is active\n *\n * @param {Boolean} bool Value when setting\n * @return {Boolean} Value if user is active user when getting\n * @method userActive\n */\n userActive(bool) {\n if (bool !== undefined) {\n bool = !!bool;\n if (bool !== this.userActive_) {\n this.userActive_ = bool;\n if (bool) {\n // If the user was inactive and is now active we want to reset the\n // inactivity timer\n this.userActivity_ = true;\n this.removeClass('vjs-user-inactive');\n this.addClass('vjs-user-active');\n this.trigger('useractive');\n } else {\n // We're switching the state to inactive manually, so erase any other\n // activity\n this.userActivity_ = false;\n\n // Chrome/Safari/IE have bugs where when you change the cursor it can\n // trigger a mousemove event. This causes an issue when you're hiding\n // the cursor when the user is inactive, and a mousemove signals user\n // activity. Making it impossible to go into inactive mode. Specifically\n // this happens in fullscreen when we really need to hide the cursor.\n //\n // When this gets resolved in ALL browsers it can be removed\n // https://code.google.com/p/chromium/issues/detail?id=103041\n if(this.tech_) {\n this.tech_.one('mousemove', function(e){\n e.stopPropagation();\n e.preventDefault();\n });\n }\n\n this.removeClass('vjs-user-active');\n this.addClass('vjs-user-inactive');\n this.trigger('userinactive');\n }\n }\n return this;\n }\n return this.userActive_;\n }\n\n /**\n * Listen for user activity based on timeout value\n *\n * @private\n * @method listenForUserActivity_\n */\n listenForUserActivity_() {\n let mouseInProgress, lastMoveX, lastMoveY;\n\n let handleActivity = Fn.bind(this, this.reportUserActivity);\n\n let handleMouseMove = function(e) {\n // #1068 - Prevent mousemove spamming\n // Chrome Bug: https://code.google.com/p/chromium/issues/detail?id=366970\n if(e.screenX !== lastMoveX || e.screenY !== lastMoveY) {\n lastMoveX = e.screenX;\n lastMoveY = e.screenY;\n handleActivity();\n }\n };\n\n let handleMouseDown = function() {\n handleActivity();\n // For as long as the they are touching the device or have their mouse down,\n // we consider them active even if they're not moving their finger or mouse.\n // So we want to continue to update that they are active\n this.clearInterval(mouseInProgress);\n // Setting userActivity=true now and setting the interval to the same time\n // as the activityCheck interval (250) should ensure we never miss the\n // next activityCheck\n mouseInProgress = this.setInterval(handleActivity, 250);\n };\n\n let handleMouseUp = function(event) {\n handleActivity();\n // Stop the interval that maintains activity if the mouse/touch is down\n this.clearInterval(mouseInProgress);\n };\n\n // Any mouse movement will be considered user activity\n this.on('mousedown', handleMouseDown);\n this.on('mousemove', handleMouseMove);\n this.on('mouseup', handleMouseUp);\n\n // Listen for keyboard navigation\n // Shouldn't need to use inProgress interval because of key repeat\n this.on('keydown', handleActivity);\n this.on('keyup', handleActivity);\n\n // Run an interval every 250 milliseconds instead of stuffing everything into\n // the mousemove/touchmove function itself, to prevent performance degradation.\n // `this.reportUserActivity` simply sets this.userActivity_ to true, which\n // then gets picked up by this loop\n // http://ejohn.org/blog/learning-from-twitter/\n let inactivityTimeout;\n let activityCheck = this.setInterval(function() {\n // Check to see if mouse/touch activity has happened\n if (this.userActivity_) {\n // Reset the activity tracker\n this.userActivity_ = false;\n\n // If the user state was inactive, set the state to active\n this.userActive(true);\n\n // Clear any existing inactivity timeout to start the timer over\n this.clearTimeout(inactivityTimeout);\n\n var timeout = this.options_['inactivityTimeout'];\n if (timeout > 0) {\n // In <timeout> milliseconds, if no more activity has occurred the\n // user will be considered inactive\n inactivityTimeout = this.setTimeout(function () {\n // Protect against the case where the inactivityTimeout can trigger just\n // before the next user activity is picked up by the activityCheck loop\n // causing a flicker\n if (!this.userActivity_) {\n this.userActive(false);\n }\n }, timeout);\n }\n }\n }, 250);\n }\n\n /**\n * Gets or sets the current playback rate. A playback rate of\n * 1.0 represents normal speed and 0.5 would indicate half-speed\n * playback, for instance.\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-playbackrate\n *\n * @param {Number} rate New playback rate to set.\n * @return {Number} Returns the new playback rate when setting\n * @return {Number} Returns the current playback rate when getting\n * @method playbackRate\n */\n playbackRate(rate) {\n if (rate !== undefined) {\n this.techCall_('setPlaybackRate', rate);\n return this;\n }\n\n if (this.tech_ && this.tech_['featuresPlaybackRate']) {\n return this.techGet_('playbackRate');\n } else {\n return 1.0;\n }\n }\n\n /**\n * Gets or sets the audio flag\n *\n * @param {Boolean} bool True signals that this is an audio player.\n * @return {Boolean} Returns true if player is audio, false if not when getting\n * @return {Player} Returns the player if setting\n * @private\n * @method isAudio\n */\n isAudio(bool) {\n if (bool !== undefined) {\n this.isAudio_ = !!bool;\n return this;\n }\n\n return !!this.isAudio_;\n }\n\n /**\n * Returns the current state of network activity for the element, from\n * the codes in the list below.\n * - NETWORK_EMPTY (numeric value 0)\n * The element has not yet been initialised. All attributes are in\n * their initial states.\n * - NETWORK_IDLE (numeric value 1)\n * The element's resource selection algorithm is active and has\n * selected a resource, but it is not actually using the network at\n * this time.\n * - NETWORK_LOADING (numeric value 2)\n * The user agent is actively trying to download data.\n * - NETWORK_NO_SOURCE (numeric value 3)\n * The element's resource selection algorithm is active, but it has\n * not yet found a resource to use.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states\n * @return {Number} the current network activity state\n * @method networkState\n */\n networkState() {\n return this.techGet_('networkState');\n }\n\n /**\n * Returns a value that expresses the current state of the element\n * with respect to rendering the current playback position, from the\n * codes in the list below.\n * - HAVE_NOTHING (numeric value 0)\n * No information regarding the media resource is available.\n * - HAVE_METADATA (numeric value 1)\n * Enough of the resource has been obtained that the duration of the\n * resource is available.\n * - HAVE_CURRENT_DATA (numeric value 2)\n * Data for the immediate current playback position is available.\n * - HAVE_FUTURE_DATA (numeric value 3)\n * Data for the immediate current playback position is available, as\n * well as enough data for the user agent to advance the current\n * playback position in the direction of playback.\n * - HAVE_ENOUGH_DATA (numeric value 4)\n * The user agent estimates that enough data is available for\n * playback to proceed uninterrupted.\n *\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate\n * @return {Number} the current playback rendering state\n * @method readyState\n */\n readyState() {\n return this.techGet_('readyState');\n }\n\n /*\n * Text tracks are tracks of timed text events.\n * Captions - text displayed over the video for the hearing impaired\n * Subtitles - text displayed over the video for those who don't understand language in the video\n * Chapters - text displayed in a menu allowing the user to jump to particular points (chapters) in the video\n * Descriptions (not supported yet) - audio descriptions that are read back to the user by a screen reading device\n */\n\n /**\n * Get an array of associated text tracks. captions, subtitles, chapters, descriptions\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-texttracks\n *\n * @return {Array} Array of track objects\n * @method textTracks\n */\n textTracks() {\n // cannot use techGet_ directly because it checks to see whether the tech is ready.\n // Flash is unlikely to be ready in time but textTracks should still work.\n return this.tech_ && this.tech_['textTracks']();\n }\n\n /**\n * Get an array of remote text tracks\n *\n * @return {Array}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n return this.tech_ && this.tech_['remoteTextTracks']();\n }\n\n /**\n * Get an array of remote html track elements\n *\n * @return {HTMLTrackElement[]}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n return this.tech_ && this.tech_['remoteTextTrackEls']();\n }\n\n /**\n * Add a text track\n * In addition to the W3C settings we allow adding additional info through options.\n * http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#dom-media-addtexttrack\n *\n * @param {String} kind Captions, subtitles, chapters, descriptions, or metadata\n * @param {String=} label Optional label\n * @param {String=} language Optional language\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n return this.tech_ && this.tech_['addTextTrack'](kind, label, language);\n }\n\n /**\n * Add a remote text track\n *\n * @param {Object} options Options for remote text track\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n return this.tech_ && this.tech_['addRemoteTextTrack'](options);\n }\n\n /**\n * Remove a remote text track\n *\n * @param {Object} track Remote text track to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.tech_ && this.tech_['removeRemoteTextTrack'](track);\n }\n\n /**\n * Get video width\n *\n * @return {Number} Video width\n * @method videoWidth\n */\n videoWidth() {\n return this.tech_ && this.tech_.videoWidth && this.tech_.videoWidth() || 0;\n }\n\n /**\n * Get video height\n *\n * @return {Number} Video height\n * @method videoHeight\n */\n videoHeight() {\n return this.tech_ && this.tech_.videoHeight && this.tech_.videoHeight() || 0;\n }\n\n // Methods to add support for\n // initialTime: function(){ return this.techCall_('initialTime'); },\n // startOffsetTime: function(){ return this.techCall_('startOffsetTime'); },\n // played: function(){ return this.techCall_('played'); },\n // videoTracks: function(){ return this.techCall_('videoTracks'); },\n // audioTracks: function(){ return this.techCall_('audioTracks'); },\n // defaultPlaybackRate: function(){ return this.techCall_('defaultPlaybackRate'); },\n // defaultMuted: function(){ return this.techCall_('defaultMuted'); }\n\n /**\n * The player's language code\n * NOTE: The language should be set in the player options if you want the\n * the controls to be built with a specific language. Changing the lanugage\n * later will not update controls text.\n *\n * @param {String} code The locale string\n * @return {String} The locale string when getting\n * @return {Player} self when setting\n * @method language\n */\n language(code) {\n if (code === undefined) {\n return this.language_;\n }\n\n this.language_ = (''+code).toLowerCase();\n return this;\n }\n\n /**\n * Get the player's language dictionary\n * Merge every time, because a newly added plugin might call videojs.addLanguage() at any time\n * Languages specified directly in the player options have precedence\n *\n * @return {Array} Array of languages\n * @method languages\n */\n languages() {\n return mergeOptions(Player.prototype.options_.languages, this.languages_);\n }\n\n /**\n * Converts track info to JSON\n *\n * @return {Object} JSON object of options\n * @method toJSON\n */\n toJSON() {\n let options = mergeOptions(this.options_);\n let tracks = options.tracks;\n\n options.tracks = [];\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n\n // deep merge tracks and null out player so no circular references\n track = mergeOptions(track);\n track.player = undefined;\n options.tracks[i] = track;\n }\n\n return options;\n }\n\n /**\n * Creates a simple modal dialog (an instance of the `ModalDialog`\n * component) that immediately overlays the player with arbitrary\n * content and removes itself when closed.\n *\n * @param {String|Function|Element|Array|Null} content\n * Same as `ModalDialog#content`'s param of the same name.\n *\n * The most straight-forward usage is to provide a string or DOM\n * element.\n *\n * @param {Object} [options]\n * Extra options which will be passed on to the `ModalDialog`.\n *\n * @return {ModalDialog}\n */\n createModal(content, options) {\n let player = this;\n\n options = options || {};\n options.content = content || '';\n\n let modal = new ModalDialog(player, options);\n\n player.addChild(modal);\n modal.on('dispose', function() {\n player.removeChild(modal);\n });\n\n return modal.open();\n }\n\n /**\n * Gets tag settings\n *\n * @param {Element} tag The player tag\n * @return {Array} An array of sources and track objects\n * @static\n * @method getTagSettings\n */\n static getTagSettings(tag) {\n let baseOptions = {\n 'sources': [],\n 'tracks': []\n };\n\n const tagOptions = Dom.getElAttributes(tag);\n const dataSetup = tagOptions['data-setup'];\n\n // Check if data-setup attr exists.\n if (dataSetup !== null){\n // Parse options JSON\n // If empty string, make it a parsable json object.\n const [err, data] = safeParseTuple(dataSetup || '{}');\n if (err) {\n log.error(err);\n }\n assign(tagOptions, data);\n }\n\n assign(baseOptions, tagOptions);\n\n // Get tag children settings\n if (tag.hasChildNodes()) {\n const children = tag.childNodes;\n\n for (let i=0, j=children.length; i<j; i++) {\n const child = children[i];\n // Change case needed: http://ejohn.org/blog/nodename-case-sensitivity/\n const childName = child.nodeName.toLowerCase();\n if (childName === 'source') {\n baseOptions.sources.push(Dom.getElAttributes(child));\n } else if (childName === 'track') {\n baseOptions.tracks.push(Dom.getElAttributes(child));\n }\n }\n }\n\n return baseOptions;\n }\n\n}\n\n/*\n * Global player list\n *\n * @type {Object}\n */\nPlayer.players = {};\n\nlet navigator = window.navigator;\n/*\n * Player instance options, surfaced using options\n * options = Player.prototype.options_\n * Make changes in options, not here.\n *\n * @type {Object}\n * @private\n */\nPlayer.prototype.options_ = {\n // Default order of fallback technology\n techOrder: ['html5','flash'],\n // techOrder: ['flash','html5'],\n\n html5: {},\n flash: {},\n\n // defaultVolume: 0.85,\n defaultVolume: 0.00, // The freakin seaguls are driving me crazy!\n\n // default inactivity timeout\n inactivityTimeout: 2000,\n\n // default playback rates\n playbackRates: [],\n // Add playback rate selection by adding rates\n // 'playbackRates': [0.5, 1, 1.5, 2],\n\n // Included control sets\n children: [\n 'mediaLoader',\n 'posterImage',\n 'textTrackDisplay',\n 'loadingSpinner',\n 'bigPlayButton',\n 'controlBar',\n 'errorDisplay',\n 'textTrackSettings'\n ],\n\n language: document.getElementsByTagName('html')[0].getAttribute('lang') || navigator.languages && navigator.languages[0] || navigator.userLanguage || navigator.language || 'en',\n\n // locales and their language translations\n languages: {},\n\n // Default message to show when a video cannot be played.\n notSupportedMessage: 'No compatible source was found for this media.'\n};\n\n/**\n * Fired when the player has initial duration and dimension information\n *\n * @event loadedmetadata\n */\nPlayer.prototype.handleLoadedMetaData_;\n\n/**\n * Fired when the player has downloaded data at the current playback position\n *\n * @event loadeddata\n */\nPlayer.prototype.handleLoadedData_;\n\n/**\n * Fired when the user is active, e.g. moves the mouse over the player\n *\n * @event useractive\n */\nPlayer.prototype.handleUserActive_;\n\n/**\n * Fired when the user is inactive, e.g. a short delay after the last mouse move or control interaction\n *\n * @event userinactive\n */\nPlayer.prototype.handleUserInactive_;\n\n/**\n * Fired when the current playback position has changed *\n * During playback this is fired every 15-250 milliseconds, depending on the\n * playback technology in use.\n *\n * @event timeupdate\n */\nPlayer.prototype.handleTimeUpdate_;\n\n/**\n * Fired when video playback ends\n *\n * @event ended\n */\nPlayer.prototype.handleTechEnded_;\n\n/**\n * Fired when the volume changes\n *\n * @event volumechange\n */\nPlayer.prototype.handleVolumeChange_;\n\n/**\n * Fired when an error occurs\n *\n * @event error\n */\nPlayer.prototype.handleError_;\n\nPlayer.prototype.flexNotSupported_ = function() {\n var elem = document.createElement('i');\n\n // Note: We don't actually use flexBasis (or flexOrder), but it's one of the more\n // common flex features that we can rely on when checking for flex support.\n return !('flexBasis' in elem.style ||\n 'webkitFlexBasis' in elem.style ||\n 'mozFlexBasis' in elem.style ||\n 'msFlexBasis' in elem.style ||\n 'msFlexOrder' in elem.style /* IE10-specific (2012 flex spec) */);\n};\n\nComponent.registerComponent('Player', Player);\nexport default Player;\n",
"/**\n * @file plugins.js\n */\nimport Player from './player.js';\n\n/**\n * The method for registering a video.js plugin\n *\n * @param {String} name The name of the plugin\n * @param {Function} init The function that is run when the player inits\n * @method plugin\n */\nvar plugin = function(name, init){\n Player.prototype[name] = init;\n};\n\nexport default plugin;\n",
"/**\n * @file popup-button.js\n */\nimport ClickableComponent from '../clickable-component.js';\nimport Component from '../component.js';\nimport Popup from './popup.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * A button class with a popup control\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends ClickableComponent\n * @class PopupButton\n */\nclass PopupButton extends ClickableComponent {\n\n constructor(player, options={}){\n super(player, options);\n\n this.update();\n }\n\n /**\n * Update popup\n *\n * @method update\n */\n update() {\n let popup = this.createPopup();\n\n if (this.popup) {\n this.removeChild(this.popup);\n }\n\n this.popup = popup;\n this.addChild(popup);\n\n if (this.items && this.items.length === 0) {\n this.hide();\n } else if (this.items && this.items.length > 1) {\n this.show();\n }\n }\n\n /**\n * Create popup - Override with specific functionality for component\n *\n * @return {Popup} The constructed popup\n * @method createPopup\n */\n createPopup() {}\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: this.buildCSSClass()\n });\n }\n\n /**\n * Allow sub components to stack CSS class names\n *\n * @return {String} The constructed class name\n * @method buildCSSClass\n */\n buildCSSClass() {\n var menuButtonClass = 'vjs-menu-button';\n\n // If the inline option is passed, we want to use different styles altogether.\n if (this.options_.inline === true) {\n menuButtonClass += '-inline';\n } else {\n menuButtonClass += '-popup';\n }\n\n return `vjs-menu-button ${menuButtonClass} ${super.buildCSSClass()}`;\n }\n\n}\n\nComponent.registerComponent('PopupButton', PopupButton);\nexport default PopupButton;\n",
"/**\n * @file popup.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport * as Fn from '../utils/fn.js';\nimport * as Events from '../utils/events.js';\n\n/**\n * The Popup component is used to build pop up controls.\n *\n * @extends Component\n * @class Popup\n */\nclass Popup extends Component {\n\n /**\n * Add a popup item to the popup\n *\n * @param {Object|String} component Component or component type to add\n * @method addItem\n */\n addItem(component) {\n this.addChild(component);\n component.on('click', Fn.bind(this, function(){\n this.unlockShowing();\n }));\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let contentElType = this.options_.contentElType || 'ul';\n this.contentEl_ = Dom.createEl(contentElType, {\n className: 'vjs-menu-content'\n });\n var el = super.createEl('div', {\n append: this.contentEl_,\n className: 'vjs-menu'\n });\n el.appendChild(this.contentEl_);\n\n // Prevent clicks from bubbling up. Needed for Popup Buttons,\n // where a click on the parent is significant\n Events.on(el, 'click', function(event){\n event.preventDefault();\n event.stopImmediatePropagation();\n });\n\n return el;\n }\n}\n\nComponent.registerComponent('Popup', Popup);\nexport default Popup;\n",
"/**\n * @file poster-image.js\n */\nimport ClickableComponent from './clickable-component.js';\nimport Component from './component.js';\nimport * as Fn from './utils/fn.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\n\n/**\n * The component that handles showing the poster image.\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Button\n * @class PosterImage\n */\nclass PosterImage extends ClickableComponent {\n\n constructor(player, options){\n super(player, options);\n\n this.update();\n player.on('posterchange', Fn.bind(this, this.update));\n }\n\n /**\n * Clean up the poster image\n *\n * @method dispose\n */\n dispose() {\n this.player().off('posterchange', this.update);\n super.dispose();\n }\n\n /**\n * Create the poster's image element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = Dom.createEl('div', {\n className: 'vjs-poster',\n\n // Don't want poster to be tabbable.\n tabIndex: -1\n });\n\n // To ensure the poster image resizes while maintaining its original aspect\n // ratio, use a div with `background-size` when available. For browsers that\n // do not support `background-size` (e.g. IE8), fall back on using a regular\n // img element.\n if (!browser.BACKGROUND_SIZE_SUPPORTED) {\n this.fallbackImg_ = Dom.createEl('img');\n el.appendChild(this.fallbackImg_);\n }\n\n return el;\n }\n\n /**\n * Event handler for updates to the player's poster source\n *\n * @method update\n */\n update() {\n let url = this.player().poster();\n\n this.setSrc(url);\n\n // If there's no poster source we should display:none on this component\n // so it's not still clickable or right-clickable\n if (url) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Set the poster source depending on the display method\n *\n * @param {String} url The URL to the poster source\n * @method setSrc\n */\n setSrc(url) {\n if (this.fallbackImg_) {\n this.fallbackImg_.src = url;\n } else {\n let backgroundImage = '';\n // Any falsey values should stay as an empty string, otherwise\n // this will throw an extra error\n if (url) {\n backgroundImage = `url(\"${url}\")`;\n }\n\n this.el_.style.backgroundImage = backgroundImage;\n }\n }\n\n /**\n * Event handler for clicks on the poster image\n *\n * @method handleClick\n */\n handleClick() {\n // We don't want a click to trigger playback when controls are disabled\n // but CSS should be hiding the poster to prevent that from happening\n if (this.player_.paused()) {\n this.player_.play();\n } else {\n this.player_.pause();\n }\n }\n\n}\n\nComponent.registerComponent('PosterImage', PosterImage);\nexport default PosterImage;\n",
"/**\n * @file setup.js\n *\n * Functions for automatically setting up a player\n * based on the data-setup attribute of the video tag\n */\nimport * as Events from './utils/events.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nlet _windowLoaded = false;\nlet videojs;\n\n\n// Automatically set up any tags that have a data-setup attribute\nvar autoSetup = function(){\n // One day, when we stop supporting IE8, go back to this, but in the meantime...*hack hack hack*\n // var vids = Array.prototype.slice.call(document.getElementsByTagName('video'));\n // var audios = Array.prototype.slice.call(document.getElementsByTagName('audio'));\n // var mediaEls = vids.concat(audios);\n\n // Because IE8 doesn't support calling slice on a node list, we need to loop through each list of elements\n // to build up a new, combined list of elements.\n var vids = document.getElementsByTagName('video');\n var audios = document.getElementsByTagName('audio');\n var mediaEls = [];\n if (vids && vids.length > 0) {\n for(let i=0, e=vids.length; i<e; i++) {\n mediaEls.push(vids[i]);\n }\n }\n if (audios && audios.length > 0) {\n for(let i=0, e=audios.length; i<e; i++) {\n mediaEls.push(audios[i]);\n }\n }\n\n // Check if any media elements exist\n if (mediaEls && mediaEls.length > 0) {\n\n for (let i=0, e=mediaEls.length; i<e; i++) {\n let mediaEl = mediaEls[i];\n\n // Check if element exists, has getAttribute func.\n // IE seems to consider typeof el.getAttribute == 'object' instead of 'function' like expected, at least when loading the player immediately.\n if (mediaEl && mediaEl.getAttribute) {\n\n // Make sure this player hasn't already been set up.\n if (mediaEl['player'] === undefined) {\n let options = mediaEl.getAttribute('data-setup');\n\n // Check if data-setup attr exists.\n // We only auto-setup if they've added the data-setup attr.\n if (options !== null) {\n // Create new video.js instance.\n let player = videojs(mediaEl);\n }\n }\n\n // If getAttribute isn't defined, we need to wait for the DOM.\n } else {\n autoSetupTimeout(1);\n break;\n }\n }\n\n // No videos were found, so keep looping unless page is finished loading.\n } else if (!_windowLoaded) {\n autoSetupTimeout(1);\n }\n};\n\n// Pause to let the DOM keep processing\nvar autoSetupTimeout = function(wait, vjs){\n videojs = vjs;\n setTimeout(autoSetup, wait);\n};\n\nif (document.readyState === 'complete') {\n _windowLoaded = true;\n} else {\n Events.one(window, 'load', function(){\n _windowLoaded = true;\n });\n}\n\nvar hasLoaded = function() {\n return _windowLoaded;\n};\n\nexport { autoSetup, autoSetupTimeout, hasLoaded };\n",
"/**\n * @file slider.js\n */\nimport Component from '../component.js';\nimport * as Dom from '../utils/dom.js';\nimport document from 'global/document';\nimport assign from 'object.assign';\n\n/**\n * The base functionality for sliders like the volume bar and seek bar\n *\n * @param {Player|Object} player\n * @param {Object=} options\n * @extends Component\n * @class Slider\n */\nclass Slider extends Component {\n\n constructor(player, options) {\n super(player, options);\n\n // Set property names to bar to match with the child Slider class is looking for\n this.bar = this.getChild(this.options_.barName);\n\n // Set a horizontal or vertical class on the slider depending on the slider type\n this.vertical(!!this.options_.vertical);\n\n this.on('mousedown', this.handleMouseDown);\n this.on('touchstart', this.handleMouseDown);\n this.on('focus', this.handleFocus);\n this.on('blur', this.handleBlur);\n this.on('click', this.handleClick);\n\n this.on(player, 'controlsvisible', this.update);\n this.on(player, this.playerEvent, this.update);\n }\n\n /**\n * Create the component's DOM element\n *\n * @param {String} type Type of element to create\n * @param {Object=} props List of properties in Object form\n * @return {Element}\n * @method createEl\n */\n createEl(type, props={}, attributes={}) {\n // Add the slider element class to all sub classes\n props.className = props.className + ' vjs-slider';\n props = assign({\n tabIndex: 0\n }, props);\n\n attributes = assign({\n 'role': 'slider',\n 'aria-valuenow': 0,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n tabIndex: 0\n }, attributes);\n\n return super.createEl(type, props, attributes);\n }\n\n /**\n * Handle mouse down on slider\n *\n * @param {Object} event Mouse down event object\n * @method handleMouseDown\n */\n handleMouseDown(event) {\n event.preventDefault();\n Dom.blockTextSelection();\n\n this.addClass('vjs-sliding');\n this.trigger('slideractive');\n\n this.on(document, 'mousemove', this.handleMouseMove);\n this.on(document, 'mouseup', this.handleMouseUp);\n this.on(document, 'touchmove', this.handleMouseMove);\n this.on(document, 'touchend', this.handleMouseUp);\n\n this.handleMouseMove(event);\n }\n\n /**\n * To be overridden by a subclass\n *\n * @method handleMouseMove\n */\n handleMouseMove() {}\n\n /**\n * Handle mouse up on Slider\n *\n * @method handleMouseUp\n */\n handleMouseUp() {\n Dom.unblockTextSelection();\n\n this.removeClass('vjs-sliding');\n this.trigger('sliderinactive');\n\n this.off(document, 'mousemove', this.handleMouseMove);\n this.off(document, 'mouseup', this.handleMouseUp);\n this.off(document, 'touchmove', this.handleMouseMove);\n this.off(document, 'touchend', this.handleMouseUp);\n\n this.update();\n }\n\n /**\n * Update slider\n *\n * @method update\n */\n update() {\n // In VolumeBar init we have a setTimeout for update that pops and update to the end of the\n // execution stack. The player is destroyed before then update will cause an error\n if (!this.el_) return;\n\n // If scrubbing, we could use a cached value to make the handle keep up with the user's mouse.\n // On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later.\n // var progress = (this.player_.scrubbing()) ? this.player_.getCache().currentTime / this.player_.duration() : this.player_.currentTime() / this.player_.duration();\n let progress = this.getPercent();\n let bar = this.bar;\n\n // If there's no bar...\n if (!bar) return;\n\n // Protect against no duration and other division issues\n if (typeof progress !== 'number' ||\n progress !== progress ||\n progress < 0 ||\n progress === Infinity) {\n progress = 0;\n }\n\n // Convert to a percentage for setting\n let percentage = (progress * 100).toFixed(2) + '%';\n\n // Set the new bar width or height\n if (this.vertical()) {\n bar.el().style.height = percentage;\n } else {\n bar.el().style.width = percentage;\n }\n }\n\n /**\n * Calculate distance for slider\n *\n * @param {Object} event Event object\n * @method calculateDistance\n */\n calculateDistance(event){\n let position = Dom.getPointerPosition(this.el_, event);\n if (this.vertical()) {\n return position.y;\n }\n return position.x;\n }\n\n /**\n * Handle on focus for slider\n *\n * @method handleFocus\n */\n handleFocus() {\n this.on(document, 'keydown', this.handleKeyPress);\n }\n\n /**\n * Handle key press for slider\n *\n * @param {Object} event Event object\n * @method handleKeyPress\n */\n handleKeyPress(event) {\n if (event.which === 37 || event.which === 40) { // Left and Down Arrows\n event.preventDefault();\n this.stepBack();\n } else if (event.which === 38 || event.which === 39) { // Up and Right Arrows\n event.preventDefault();\n this.stepForward();\n }\n }\n\n /**\n * Handle on blur for slider\n *\n * @method handleBlur\n */\n handleBlur() {\n this.off(document, 'keydown', this.handleKeyPress);\n }\n\n /**\n * Listener for click events on slider, used to prevent clicks\n * from bubbling up to parent elements like button menus.\n *\n * @param {Object} event Event object\n * @method handleClick\n */\n handleClick(event) {\n event.stopImmediatePropagation();\n event.preventDefault();\n }\n\n /**\n * Get/set if slider is horizontal for vertical\n *\n * @param {Boolean} bool True if slider is vertical, false is horizontal\n * @return {Boolean} True if slider is vertical, false is horizontal\n * @method vertical\n */\n vertical(bool) {\n if (bool === undefined) {\n return this.vertical_ || false;\n }\n\n this.vertical_ = !!bool;\n\n if (this.vertical_) {\n this.addClass('vjs-slider-vertical');\n } else {\n this.addClass('vjs-slider-horizontal');\n }\n\n return this;\n }\n\n}\n\nComponent.registerComponent('Slider', Slider);\nexport default Slider;\n",
"/**\n * @file flash-rtmp.js\n */\nfunction FlashRtmpDecorator(Flash) {\n Flash.streamingFormats = {\n 'rtmp/mp4': 'MP4',\n 'rtmp/flv': 'FLV'\n };\n\n Flash.streamFromParts = function(connection, stream) {\n return connection + '&' + stream;\n };\n\n Flash.streamToParts = function(src) {\n let parts = {\n connection: '',\n stream: ''\n };\n\n if (!src) return parts;\n\n // Look for the normal URL separator we expect, '&'.\n // If found, we split the URL into two pieces around the\n // first '&'.\n let connEnd = src.search(/&(?!\\w+=)/);\n let streamBegin;\n if (connEnd !== -1) {\n streamBegin = connEnd + 1;\n }\n else {\n // If there's not a '&', we use the last '/' as the delimiter.\n connEnd = streamBegin = src.lastIndexOf('/') + 1;\n if (connEnd === 0) {\n // really, there's not a '/'?\n connEnd = streamBegin = src.length;\n }\n }\n parts.connection = src.substring(0, connEnd);\n parts.stream = src.substring(streamBegin, src.length);\n\n return parts;\n };\n\n Flash.isStreamingType = function(srcType) {\n return srcType in Flash.streamingFormats;\n };\n\n // RTMP has four variations, any string starting\n // with one of these protocols should be valid\n Flash.RTMP_RE = /^rtmp[set]?:\\/\\//i;\n\n Flash.isStreamingSrc = function(src) {\n return Flash.RTMP_RE.test(src);\n };\n\n /**\n * A source handler for RTMP urls\n * @type {Object}\n */\n Flash.rtmpSourceHandler = {};\n\n /**\n * Check if Flash can play the given videotype\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n Flash.rtmpSourceHandler.canPlayType = function(type){\n if (Flash.isStreamingType(type)) {\n return 'maybe';\n }\n\n return '';\n };\n\n /**\n * Check if Flash can handle the source natively\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n Flash.rtmpSourceHandler.canHandleSource = function(source){\n let can = Flash.rtmpSourceHandler.canPlayType(source.type);\n\n if (can) {\n return can;\n }\n\n if (Flash.isStreamingSrc(source.src)) {\n return 'maybe';\n }\n\n return '';\n };\n\n /**\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\n Flash.rtmpSourceHandler.handleSource = function(source, tech){\n let srcParts = Flash.streamToParts(source.src);\n\n tech['setRtmpConnection'](srcParts.connection);\n tech['setRtmpStream'](srcParts.stream);\n };\n\n // Register the native source handler\n Flash.registerSourceHandler(Flash.rtmpSourceHandler);\n\n return Flash;\n}\n\nexport default FlashRtmpDecorator;\n",
"/**\n * @file flash.js\n * VideoJS-SWF - Custom Flash Player with HTML5-ish API\n * https://github.com/zencoder/video-js-swf\n * Not using setupTriggers. Using global onEvent func to distribute events\n */\n\nimport Tech from './tech';\nimport * as Dom from '../utils/dom.js';\nimport * as Url from '../utils/url.js';\nimport { createTimeRange } from '../utils/time-ranges.js';\nimport FlashRtmpDecorator from './flash-rtmp';\nimport Component from '../component';\nimport window from 'global/window';\nimport assign from 'object.assign';\n\nlet navigator = window.navigator;\n/**\n * Flash Media Controller - Wrapper for fallback SWF API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Flash\n */\nclass Flash extends Tech {\n\n constructor(options, ready){\n super(options, ready);\n\n // Set the source when ready\n if (options.source) {\n this.ready(function(){\n this.setSource(options.source);\n }, true);\n }\n\n // Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers\n // This allows resetting the playhead when we catch the reload\n if (options.startTime) {\n this.ready(function(){\n this.load();\n this.play();\n this.currentTime(options.startTime);\n }, true);\n }\n\n // Add global window functions that the swf expects\n // A 4.x workflow we weren't able to solve for in 5.0\n // because of the need to hard code these functions\n // into the swf for security reasons\n window.videojs = window.videojs || {};\n window.videojs.Flash = window.videojs.Flash || {};\n window.videojs.Flash.onReady = Flash.onReady;\n window.videojs.Flash.onEvent = Flash.onEvent;\n window.videojs.Flash.onError = Flash.onError;\n\n this.on('seeked', function() {\n this.lastSeekTarget_ = undefined;\n });\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let options = this.options_;\n\n // If video.js is hosted locally you should also set the location\n // for the hosted swf, which should be relative to the page (not video.js)\n // Otherwise this adds a CDN url.\n // The CDN also auto-adds a swf URL for that specific version.\n if (!options.swf) {\n options.swf = '//vjs.zencdn.net/swf/__SWF_VERSION__/video-js.swf';\n }\n\n // Generate ID for swf object\n let objId = options.techId;\n\n // Merge default flashvars with ones passed in to init\n let flashVars = assign({\n\n // SWF Callback Functions\n 'readyFunction': 'videojs.Flash.onReady',\n 'eventProxyFunction': 'videojs.Flash.onEvent',\n 'errorEventProxyFunction': 'videojs.Flash.onError',\n\n // Player Settings\n 'autoplay': options.autoplay,\n 'preload': options.preload,\n 'loop': options.loop,\n 'muted': options.muted\n\n }, options.flashVars);\n\n // Merge default parames with ones passed in\n let params = assign({\n 'wmode': 'opaque', // Opaque is needed to overlay controls, but can affect playback performance\n 'bgcolor': '#000000' // Using bgcolor prevents a white flash when the object is loading\n }, options.params);\n\n // Merge default attributes with ones passed in\n let attributes = assign({\n 'id': objId,\n 'name': objId, // Both ID and Name needed or swf to identify itself\n 'class': 'vjs-tech'\n }, options.attributes);\n\n this.el_ = Flash.embed(options.swf, flashVars, params, attributes);\n this.el_.tech = this;\n\n return this.el_;\n }\n\n /**\n * Play for flash tech\n *\n * @method play\n */\n play() {\n if (this.ended()) {\n this.setCurrentTime(0);\n }\n this.el_.vjs_play();\n }\n\n /**\n * Pause for flash tech\n *\n * @method pause\n */\n pause() {\n this.el_.vjs_pause();\n }\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object\n * @return {Object}\n * @method src\n */\n src(src) {\n if (src === undefined) {\n return this.currentSrc();\n }\n\n // Setting src through `src` not `setSrc` will be deprecated\n return this.setSrc(src);\n }\n\n /**\n * Set video\n *\n * @param {Object=} src Source object\n * @deprecated\n * @method setSrc\n */\n setSrc(src) {\n // Make sure source URL is absolute.\n src = Url.getAbsoluteURL(src);\n this.el_.vjs_src(src);\n\n // Currently the SWF doesn't autoplay if you load a source later.\n // e.g. Load player w/ no source, wait 2s, set src.\n if (this.autoplay()) {\n var tech = this;\n this.setTimeout(function(){ tech.play(); }, 0);\n }\n }\n\n /**\n * Returns true if the tech is currently seeking.\n * @return {boolean} true if seeking\n */\n seeking() {\n return this.lastSeekTarget_ !== undefined;\n }\n\n /**\n * Set current time\n *\n * @param {Number} time Current time of video\n * @method setCurrentTime\n */\n setCurrentTime(time) {\n let seekable = this.seekable();\n if (seekable.length) {\n // clamp to the current seekable range\n time = time > seekable.start(0) ? time : seekable.start(0);\n time = time < seekable.end(seekable.length - 1) ? time : seekable.end(seekable.length - 1);\n\n this.lastSeekTarget_ = time;\n this.trigger('seeking');\n this.el_.vjs_setProperty('currentTime', time);\n super.setCurrentTime();\n }\n }\n\n /**\n * Get current time\n *\n * @param {Number=} time Current time of video\n * @return {Number} Current time\n * @method currentTime\n */\n currentTime(time) {\n // when seeking make the reported time keep up with the requested time\n // by reading the time we're seeking to\n if (this.seeking()) {\n return this.lastSeekTarget_ || 0;\n }\n return this.el_.vjs_getProperty('currentTime');\n }\n\n /**\n * Get current source\n *\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.vjs_getProperty('currentSrc');\n }\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load() {\n this.el_.vjs_load();\n }\n\n /**\n * Get poster\n *\n * @method poster\n */\n poster() {\n this.el_.vjs_getProperty('poster');\n }\n\n /**\n * Poster images are not handled by the Flash tech so make this a no-op\n *\n * @method setPoster\n */\n setPoster() {}\n\n /**\n * Determine if can seek in media\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() {\n const duration = this.duration();\n if (duration === 0) {\n return createTimeRange();\n }\n return createTimeRange(0, duration);\n }\n\n /**\n * Get buffered time range\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() {\n let ranges = this.el_.vjs_getProperty('buffered');\n if (ranges.length === 0) {\n return createTimeRange();\n }\n return createTimeRange(ranges[0][0], ranges[0][1]);\n }\n\n /**\n * Get fullscreen support -\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n return false; // Flash does not allow fullscreen through javascript\n }\n\n /**\n * Request to enter fullscreen\n * Flash does not allow fullscreen through javascript\n * so always returns false\n *\n * @return {Boolean} false\n * @method enterFullScreen\n */\n enterFullScreen() {\n return false;\n }\n\n}\n\n\n// Create setters and getters for attributes\nconst _api = Flash.prototype;\nconst _readWrite = 'rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted'.split(',');\nconst _readOnly = 'networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoTracks,audioTracks,videoWidth,videoHeight'.split(',');\n\nfunction _createSetter(attr){\n var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);\n _api['set'+attrUpper] = function(val){ return this.el_.vjs_setProperty(attr, val); };\n}\nfunction _createGetter(attr) {\n _api[attr] = function(){ return this.el_.vjs_getProperty(attr); };\n}\n\n// Create getter and setters for all read/write attributes\nfor (let i = 0; i < _readWrite.length; i++) {\n _createGetter(_readWrite[i]);\n _createSetter(_readWrite[i]);\n}\n\n// Create getters for read-only attributes\nfor (let i = 0; i < _readOnly.length; i++) {\n _createGetter(_readOnly[i]);\n}\n\n/* Flash Support Testing -------------------------------------------------------- */\n\nFlash.isSupported = function(){\n return Flash.version()[0] >= 10;\n // return swfobject.hasFlashPlayerVersion('10');\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Flash);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler = {};\n\n/**\n * Check if Flash can play the given videotype\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canPlayType = function(type){\n if (type in Flash.formats) {\n return 'maybe';\n }\n\n return '';\n};\n\n/*\n * Check Flash can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nFlash.nativeSourceHandler.canHandleSource = function(source){\n var type;\n\n function guessMimeType(src) {\n var ext = Url.getFileExtension(src);\n if (ext) {\n return `video/${ext}`;\n }\n return '';\n }\n\n if (!source.type) {\n type = guessMimeType(source.src);\n } else {\n // Strip code information from the type because we don't get that specific\n type = source.type.replace(/;.*/, '').toLowerCase();\n }\n\n return Flash.nativeSourceHandler.canPlayType(type);\n};\n\n/*\n * Pass the source to the flash object\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Flash} tech The instance of the Flash tech\n */\nFlash.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n * Clean up the source handler when disposing the player or switching sources..\n * (no cleanup is needed when supporting the format natively)\n */\nFlash.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nFlash.registerSourceHandler(Flash.nativeSourceHandler);\n\nFlash.formats = {\n 'video/flv': 'FLV',\n 'video/x-flv': 'FLV',\n 'video/mp4': 'MP4',\n 'video/m4v': 'MP4'\n};\n\nFlash.onReady = function(currSwf){\n let el = Dom.getEl(currSwf);\n let tech = el && el.tech;\n\n // if there is no el then the tech has been disposed\n // and the tech element was removed from the player div\n if (tech && tech.el()) {\n // check that the flash object is really ready\n Flash.checkReady(tech);\n }\n};\n\n// The SWF isn't always ready when it says it is. Sometimes the API functions still need to be added to the object.\n// If it's not ready, we set a timeout to check again shortly.\nFlash.checkReady = function(tech){\n // stop worrying if the tech has been disposed\n if (!tech.el()) {\n return;\n }\n\n // check if API property exists\n if (tech.el().vjs_getProperty) {\n // tell tech it's ready\n tech.triggerReady();\n } else {\n // wait longer\n this.setTimeout(function(){\n Flash['checkReady'](tech);\n }, 50);\n }\n};\n\n// Trigger events from the swf on the player\nFlash.onEvent = function(swfID, eventName){\n let tech = Dom.getEl(swfID).tech;\n tech.trigger(eventName);\n};\n\n// Log errors from the swf\nFlash.onError = function(swfID, err){\n const tech = Dom.getEl(swfID).tech;\n\n // trigger MEDIA_ERR_SRC_NOT_SUPPORTED\n if (err === 'srcnotfound') {\n return tech.error(4);\n }\n\n // trigger a custom error\n tech.error('FLASH: ' + err);\n};\n\n// Flash Version Check\nFlash.version = function(){\n let version = '0,0,0';\n\n // IE\n try {\n version = new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n\n // other browsers\n } catch(e) {\n try {\n if (navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin){\n version = (navigator.plugins['Shockwave Flash 2.0'] || navigator.plugins['Shockwave Flash']).description.replace(/\\D+/g, ',').match(/^,?(.+),?$/)[1];\n }\n } catch(err) {}\n }\n return version.split(',');\n};\n\n// Flash embedding method. Only used in non-iframe mode\nFlash.embed = function(swf, flashVars, params, attributes){\n const code = Flash.getEmbedCode(swf, flashVars, params, attributes);\n\n // Get element by embedding code and retrieving created element\n const obj = Dom.createEl('div', { innerHTML: code }).childNodes[0];\n\n return obj;\n};\n\nFlash.getEmbedCode = function(swf, flashVars, params, attributes){\n const objTag = '<object type=\"application/x-shockwave-flash\" ';\n let flashVarsString = '';\n let paramsString = '';\n let attrsString = '';\n\n // Convert flash vars to string\n if (flashVars) {\n Object.getOwnPropertyNames(flashVars).forEach(function(key){\n flashVarsString += `${key}=${flashVars[key]}&`;\n });\n }\n\n // Add swf, flashVars, and other default params\n params = assign({\n 'movie': swf,\n 'flashvars': flashVarsString,\n 'allowScriptAccess': 'always', // Required to talk to swf\n 'allowNetworking': 'all' // All should be default, but having security issues.\n }, params);\n\n // Create param tags string\n Object.getOwnPropertyNames(params).forEach(function(key){\n paramsString += `<param name=\"${key}\" value=\"${params[key]}\" />`;\n });\n\n attributes = assign({\n // Add swf to attributes (need both for IE and Others to work)\n 'data': swf,\n\n // Default to 100% width/height\n 'width': '100%',\n 'height': '100%'\n\n }, attributes);\n\n // Create Attributes string\n Object.getOwnPropertyNames(attributes).forEach(function(key){\n attrsString += `${key}=\"${attributes[key]}\" `;\n });\n\n return `${objTag}${attrsString}>${paramsString}</object>`;\n};\n\n// Run Flash through the RTMP decorator\nFlashRtmpDecorator(Flash);\n\nComponent.registerComponent('Flash', Flash);\nTech.registerTech('Flash', Flash);\nexport default Flash;\n",
"/**\n * @file html5.js\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n */\n\nimport Tech from './tech.js';\nimport Component from '../component';\nimport * as Dom from '../utils/dom.js';\nimport * as Url from '../utils/url.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport window from 'global/window';\nimport assign from 'object.assign';\nimport mergeOptions from '../utils/merge-options.js';\n\n/**\n * HTML5 Media Controller - Wrapper for HTML5 Media API\n *\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Tech\n * @class Html5\n */\nclass Html5 extends Tech {\n\n constructor(options, ready){\n super(options, ready);\n\n const source = options.source;\n\n // Set the source if one is provided\n // 1) Check if the source is new (if not, we want to keep the original so playback isn't interrupted)\n // 2) Check to see if the network state of the tag was failed at init, and if so, reset the source\n // anyway so the error gets fired.\n if (source && (this.el_.currentSrc !== source.src || (options.tag && options.tag.initNetworkState_ === 3))) {\n this.setSource(source);\n } else {\n this.handleLateInit_(this.el_);\n }\n\n if (this.el_.hasChildNodes()) {\n\n let nodes = this.el_.childNodes;\n let nodesLength = nodes.length;\n let removeNodes = [];\n\n while (nodesLength--) {\n let node = nodes[nodesLength];\n let nodeName = node.nodeName.toLowerCase();\n\n if (nodeName === 'track') {\n if (!this.featuresNativeTextTracks) {\n // Empty video tag tracks so the built-in player doesn't use them also.\n // This may not be fast enough to stop HTML5 browsers from reading the tags\n // so we'll need to turn off any default tracks if we're manually doing\n // captions and subtitles. videoElement.textTracks\n removeNodes.push(node);\n } else {\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(node);\n this.remoteTextTracks().addTrack_(node.track);\n }\n }\n }\n\n for (let i=0; i<removeNodes.length; i++) {\n this.el_.removeChild(removeNodes[i]);\n }\n }\n\n if (this.featuresNativeTextTracks) {\n this.handleTextTrackChange_ = Fn.bind(this, this.handleTextTrackChange);\n this.handleTextTrackAdd_ = Fn.bind(this, this.handleTextTrackAdd);\n this.handleTextTrackRemove_ = Fn.bind(this, this.handleTextTrackRemove);\n this.proxyNativeTextTracks_();\n }\n\n // Determine if native controls should be used\n // Our goal should be to get the custom controls on mobile solid everywhere\n // so we can remove this all together. Right now this will block custom\n // controls on touch enabled laptops like the Chrome Pixel\n if (browser.TOUCH_ENABLED && options.nativeControlsForTouch === true ||\n browser.IS_IPHONE ||\n browser.IS_NATIVE_ANDROID) {\n this.setControls(true);\n }\n\n this.triggerReady();\n }\n\n /**\n * Dispose of html5 media element\n *\n * @method dispose\n */\n dispose() {\n let tt = this.el().textTracks;\n let emulatedTt = this.textTracks();\n\n // remove native event listeners\n if (tt && tt.removeEventListener) {\n tt.removeEventListener('change', this.handleTextTrackChange_);\n tt.removeEventListener('addtrack', this.handleTextTrackAdd_);\n tt.removeEventListener('removetrack', this.handleTextTrackRemove_);\n }\n\n // clearout the emulated text track list.\n let i = emulatedTt.length;\n\n while (i--) {\n emulatedTt.removeTrack_(emulatedTt[i]);\n }\n\n\n Html5.disposeMediaElement(this.el_);\n super.dispose();\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n let el = this.options_.tag;\n\n // Check if this browser supports moving the element into the box.\n // On the iPhone video will break if you move the element,\n // So we have to create a brand new element.\n if (!el || this['movingMediaElementInDOM'] === false) {\n\n // If the original tag is still there, clone and remove it.\n if (el) {\n const clone = el.cloneNode(true);\n el.parentNode.insertBefore(clone, el);\n Html5.disposeMediaElement(el);\n el = clone;\n } else {\n el = document.createElement('video');\n\n // determine if native controls should be used\n let tagAttributes = this.options_.tag && Dom.getElAttributes(this.options_.tag);\n let attributes = mergeOptions({}, tagAttributes);\n if (!browser.TOUCH_ENABLED || this.options_.nativeControlsForTouch !== true) {\n delete attributes.controls;\n }\n\n Dom.setElAttributes(el,\n assign(attributes, {\n id: this.options_.techId,\n class: 'vjs-tech'\n })\n );\n }\n }\n\n // Update specific tag settings, in case they were overridden\n let settingsAttrs = ['autoplay','preload','loop','muted'];\n for (let i = settingsAttrs.length - 1; i >= 0; i--) {\n const attr = settingsAttrs[i];\n let overwriteAttrs = {};\n if (typeof this.options_[attr] !== 'undefined') {\n overwriteAttrs[attr] = this.options_[attr];\n }\n Dom.setElAttributes(el, overwriteAttrs);\n }\n\n return el;\n // jenniisawesome = true;\n }\n\n // If we're loading the playback object after it has started loading\n // or playing the video (often with autoplay on) then the loadstart event\n // has already fired and we need to fire it manually because many things\n // rely on it.\n handleLateInit_(el) {\n if (el.networkState === 0 || el.networkState === 3) {\n // The video element hasn't started loading the source yet\n // or didn't find a source\n return;\n }\n\n if (el.readyState === 0) {\n // NetworkState is set synchronously BUT loadstart is fired at the\n // end of the current stack, usually before setInterval(fn, 0).\n // So at this point we know loadstart may have already fired or is\n // about to fire, and either way the player hasn't seen it yet.\n // We don't want to fire loadstart prematurely here and cause a\n // double loadstart so we'll wait and see if it happens between now\n // and the next loop, and fire it if not.\n // HOWEVER, we also want to make sure it fires before loadedmetadata\n // which could also happen between now and the next loop, so we'll\n // watch for that also.\n let loadstartFired = false;\n let setLoadstartFired = function() {\n loadstartFired = true;\n };\n this.on('loadstart', setLoadstartFired);\n\n let triggerLoadstart = function() {\n // We did miss the original loadstart. Make sure the player\n // sees loadstart before loadedmetadata\n if (!loadstartFired) {\n this.trigger('loadstart');\n }\n };\n this.on('loadedmetadata', triggerLoadstart);\n\n this.ready(function(){\n this.off('loadstart', setLoadstartFired);\n this.off('loadedmetadata', triggerLoadstart);\n\n if (!loadstartFired) {\n // We did miss the original native loadstart. Fire it now.\n this.trigger('loadstart');\n }\n });\n\n return;\n }\n\n // From here on we know that loadstart already fired and we missed it.\n // The other readyState events aren't as much of a problem if we double\n // them, so not going to go to as much trouble as loadstart to prevent\n // that unless we find reason to.\n let eventsToTrigger = ['loadstart'];\n\n // loadedmetadata: newly equal to HAVE_METADATA (1) or greater\n eventsToTrigger.push('loadedmetadata');\n\n // loadeddata: newly increased to HAVE_CURRENT_DATA (2) or greater\n if (el.readyState >= 2) {\n eventsToTrigger.push('loadeddata');\n }\n\n // canplay: newly increased to HAVE_FUTURE_DATA (3) or greater\n if (el.readyState >= 3) {\n eventsToTrigger.push('canplay');\n }\n\n // canplaythrough: newly equal to HAVE_ENOUGH_DATA (4)\n if (el.readyState >= 4) {\n eventsToTrigger.push('canplaythrough');\n }\n\n // We still need to give the player time to add event listeners\n this.ready(function(){\n eventsToTrigger.forEach(function(type){\n this.trigger(type);\n }, this);\n });\n }\n\n proxyNativeTextTracks_() {\n let tt = this.el().textTracks;\n\n if (tt) {\n // Add tracks - if player is initialised after DOM loaded, textTracks\n // will not trigger addtrack\n for (let i = 0; i < tt.length; i++) {\n this.textTracks().addTrack_(tt[i]);\n }\n\n if (tt.addEventListener) {\n tt.addEventListener('change', this.handleTextTrackChange_);\n tt.addEventListener('addtrack', this.handleTextTrackAdd_);\n tt.addEventListener('removetrack', this.handleTextTrackRemove_);\n }\n }\n }\n\n handleTextTrackChange(e) {\n let tt = this.textTracks();\n this.textTracks().trigger({\n type: 'change',\n target: tt,\n currentTarget: tt,\n srcElement: tt\n });\n }\n\n handleTextTrackAdd(e) {\n this.textTracks().addTrack_(e.track);\n }\n\n handleTextTrackRemove(e) {\n this.textTracks().removeTrack_(e.track);\n }\n\n /**\n * Play for html5 tech\n *\n * @method play\n */\n play() { this.el_.play(); }\n\n /**\n * Pause for html5 tech\n *\n * @method pause\n */\n pause() { this.el_.pause(); }\n\n /**\n * Paused for html5 tech\n *\n * @return {Boolean}\n * @method paused\n */\n paused() { return this.el_.paused; }\n\n /**\n * Get current time\n *\n * @return {Number}\n * @method currentTime\n */\n currentTime() { return this.el_.currentTime; }\n\n /**\n * Set current time\n *\n * @param {Number} seconds Current time of video\n * @method setCurrentTime\n */\n setCurrentTime(seconds) {\n try {\n this.el_.currentTime = seconds;\n } catch(e) {\n log(e, 'Video is not ready. (Video.js)');\n // this.warning(VideoJS.warnings.videoNotReady);\n }\n }\n\n /**\n * Get duration\n *\n * @return {Number}\n * @method duration\n */\n duration() { return this.el_.duration || 0; }\n\n /**\n * Get a TimeRange object that represents the intersection\n * of the time ranges for which the user agent has all\n * relevant media\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() { return this.el_.buffered; }\n\n /**\n * Get volume level\n *\n * @return {Number}\n * @method volume\n */\n volume() { return this.el_.volume; }\n\n /**\n * Set volume level\n *\n * @param {Number} percentAsDecimal Volume percent as a decimal\n * @method setVolume\n */\n setVolume(percentAsDecimal) { this.el_.volume = percentAsDecimal; }\n\n /**\n * Get if muted\n *\n * @return {Boolean}\n * @method muted\n */\n muted() { return this.el_.muted; }\n\n /**\n * Set muted\n *\n * @param {Boolean} If player is to be muted or note\n * @method setMuted\n */\n setMuted(muted) { this.el_.muted = muted; }\n\n /**\n * Get player width\n *\n * @return {Number}\n * @method width\n */\n width() { return this.el_.offsetWidth; }\n\n /**\n * Get player height\n *\n * @return {Number}\n * @method height\n */\n height() { return this.el_.offsetHeight; }\n\n /**\n * Get if there is fullscreen support\n *\n * @return {Boolean}\n * @method supportsFullScreen\n */\n supportsFullScreen() {\n if (typeof this.el_.webkitEnterFullScreen === 'function') {\n let userAgent = window.navigator.userAgent;\n // Seems to be broken in Chromium/Chrome && Safari in Leopard\n if (/Android/.test(userAgent) || !/Chrome|Mac OS X 10.5/.test(userAgent)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Request to enter fullscreen\n *\n * @method enterFullScreen\n */\n enterFullScreen() {\n var video = this.el_;\n\n if ('webkitDisplayingFullscreen' in video) {\n this.one('webkitbeginfullscreen', function() {\n this.one('webkitendfullscreen', function() {\n this.trigger('fullscreenchange', { isFullscreen: false });\n });\n\n this.trigger('fullscreenchange', { isFullscreen: true });\n });\n }\n\n if (video.paused && video.networkState <= video.HAVE_METADATA) {\n // attempt to prime the video element for programmatic access\n // this isn't necessary on the desktop but shouldn't hurt\n this.el_.play();\n\n // playing and pausing synchronously during the transition to fullscreen\n // can get iOS ~6.1 devices into a play/pause loop\n this.setTimeout(function(){\n video.pause();\n video.webkitEnterFullScreen();\n }, 0);\n } else {\n video.webkitEnterFullScreen();\n }\n }\n\n /**\n * Request to exit fullscreen\n *\n * @method exitFullScreen\n */\n exitFullScreen() {\n this.el_.webkitExitFullScreen();\n }\n\n /**\n * Get/set video\n *\n * @param {Object=} src Source object\n * @return {Object}\n * @method src\n */\n src(src) {\n if (src === undefined) {\n return this.el_.src;\n } else {\n // Setting src through `src` instead of `setSrc` will be deprecated\n this.setSrc(src);\n }\n }\n\n /**\n * Set video\n *\n * @param {Object} src Source object\n * @deprecated\n * @method setSrc\n */\n setSrc(src) {\n this.el_.src = src;\n }\n\n /**\n * Load media into player\n *\n * @method load\n */\n load(){\n this.el_.load();\n }\n\n /**\n * Reset the tech. Removes all sources and calls `load`.\n *\n * @method reset\n */\n reset() {\n Html5.resetMediaElement(this.el_);\n }\n\n /**\n * Get current source\n *\n * @return {Object}\n * @method currentSrc\n */\n currentSrc() {\n if (this.currentSource_) {\n return this.currentSource_.src;\n } else {\n return this.el_.currentSrc;\n }\n }\n\n /**\n * Get poster\n *\n * @return {String}\n * @method poster\n */\n poster() { return this.el_.poster; }\n\n /**\n * Set poster\n *\n * @param {String} val URL to poster image\n * @method\n */\n setPoster(val) { this.el_.poster = val; }\n\n /**\n * Get preload attribute\n *\n * @return {String}\n * @method preload\n */\n preload() { return this.el_.preload; }\n\n /**\n * Set preload attribute\n *\n * @param {String} val Value for preload attribute\n * @method setPreload\n */\n setPreload(val) { this.el_.preload = val; }\n\n /**\n * Get autoplay attribute\n *\n * @return {String}\n * @method autoplay\n */\n autoplay() { return this.el_.autoplay; }\n\n /**\n * Set autoplay attribute\n *\n * @param {String} val Value for preload attribute\n * @method setAutoplay\n */\n setAutoplay(val) { this.el_.autoplay = val; }\n\n /**\n * Get controls attribute\n *\n * @return {String}\n * @method controls\n */\n controls() { return this.el_.controls; }\n\n /**\n * Set controls attribute\n *\n * @param {String} val Value for controls attribute\n * @method setControls\n */\n setControls(val) { this.el_.controls = !!val; }\n\n /**\n * Get loop attribute\n *\n * @return {String}\n * @method loop\n */\n loop() { return this.el_.loop; }\n\n /**\n * Set loop attribute\n *\n * @param {String} val Value for loop attribute\n * @method setLoop\n */\n setLoop(val) { this.el_.loop = val; }\n\n /**\n * Get error value\n *\n * @return {String}\n * @method error\n */\n error() { return this.el_.error; }\n\n /**\n * Get whether or not the player is in the \"seeking\" state\n *\n * @return {Boolean}\n * @method seeking\n */\n seeking() { return this.el_.seeking; }\n\n /**\n * Get a TimeRanges object that represents the\n * ranges of the media resource to which it is possible\n * for the user agent to seek.\n *\n * @return {TimeRangeObject}\n * @method seekable\n */\n seekable() { return this.el_.seekable; }\n\n /**\n * Get if video ended\n *\n * @return {Boolean}\n * @method ended\n */\n ended() { return this.el_.ended; }\n\n /**\n * Get the value of the muted content attribute\n * This attribute has no dynamic effect, it only\n * controls the default state of the element\n *\n * @return {Boolean}\n * @method defaultMuted\n */\n defaultMuted() { return this.el_.defaultMuted; }\n\n /**\n * Get desired speed at which the media resource is to play\n *\n * @return {Number}\n * @method playbackRate\n */\n playbackRate() { return this.el_.playbackRate; }\n\n /**\n * Returns a TimeRanges object that represents the ranges of the\n * media resource that the user agent has played.\n * @return {TimeRangeObject} the range of points on the media\n * timeline that has been reached through normal playback\n * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-played\n */\n played() { return this.el_.played; }\n\n /**\n * Set desired speed at which the media resource is to play\n *\n * @param {Number} val Speed at which the media resource is to play\n * @method setPlaybackRate\n */\n setPlaybackRate(val) { this.el_.playbackRate = val; }\n\n /**\n * Get the current state of network activity for the element, from\n * the list below\n * NETWORK_EMPTY (numeric value 0)\n * NETWORK_IDLE (numeric value 1)\n * NETWORK_LOADING (numeric value 2)\n * NETWORK_NO_SOURCE (numeric value 3)\n *\n * @return {Number}\n * @method networkState\n */\n networkState() { return this.el_.networkState; }\n\n /**\n * Get a value that expresses the current state of the element\n * with respect to rendering the current playback position, from\n * the codes in the list below\n * HAVE_NOTHING (numeric value 0)\n * HAVE_METADATA (numeric value 1)\n * HAVE_CURRENT_DATA (numeric value 2)\n * HAVE_FUTURE_DATA (numeric value 3)\n * HAVE_ENOUGH_DATA (numeric value 4)\n *\n * @return {Number}\n * @method readyState\n */\n readyState() { return this.el_.readyState; }\n\n /**\n * Get width of video\n *\n * @return {Number}\n * @method videoWidth\n */\n videoWidth() { return this.el_.videoWidth; }\n\n /**\n * Get height of video\n *\n * @return {Number}\n * @method videoHeight\n */\n videoHeight() { return this.el_.videoHeight; }\n\n /**\n * Get text tracks\n *\n * @return {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n return super.textTracks();\n }\n\n /**\n * Creates and returns a text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!this['featuresNativeTextTracks']) {\n return super.addTextTrack(kind, label, language);\n }\n\n return this.el_.addTextTrack(kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options={}) {\n if (!this['featuresNativeTextTracks']) {\n return super.addRemoteTextTrack(options);\n }\n\n let htmlTrackElement = document.createElement('track');\n\n if (options.kind) {\n htmlTrackElement.kind = options.kind;\n }\n if (options.label) {\n htmlTrackElement.label = options.label;\n }\n if (options.language || options.srclang) {\n htmlTrackElement.srclang = options.language || options.srclang;\n }\n if (options.default) {\n htmlTrackElement.default = options.default;\n }\n if (options.id) {\n htmlTrackElement.id = options.id;\n }\n if (options.src) {\n htmlTrackElement.src = options.src;\n }\n\n this.el().appendChild(htmlTrackElement);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote text track from TextTrackList object\n *\n * @param {TextTrackObject} track Texttrack object to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n if (!this['featuresNativeTextTracks']) {\n return super.removeRemoteTextTrack(track);\n }\n\n let tracks, i;\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n\n tracks = this.$$('track');\n\n i = tracks.length;\n while (i--) {\n if (track === tracks[i] || track === tracks[i].track) {\n this.el().removeChild(tracks[i]);\n }\n }\n }\n\n}\n\n\n/* HTML5 Support Testing ---------------------------------------------------- */\n\n/*\n* Element for testing browser HTML5 video capabilities\n*\n* @type {Element}\n* @constant\n* @private\n*/\nHtml5.TEST_VID = document.createElement('video');\nlet track = document.createElement('track');\ntrack.kind = 'captions';\ntrack.srclang = 'en';\ntrack.label = 'English';\nHtml5.TEST_VID.appendChild(track);\n\n/*\n * Check if HTML5 video is supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.isSupported = function(){\n // IE9 with no Media Player is a LIAR! (#984)\n try {\n Html5.TEST_VID['volume'] = 0.5;\n } catch (e) {\n return false;\n }\n\n return !!Html5.TEST_VID.canPlayType;\n};\n\n// Add Source Handler pattern functions to this tech\nTech.withSourceHandlers(Html5);\n\n/*\n * The default native source handler.\n * This simply passes the source to the video element. Nothing fancy.\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the HTML5 tech\n */\nHtml5.nativeSourceHandler = {};\n\n/*\n * Check if the video element can play the given videotype\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canPlayType = function(type){\n // IE9 on Windows 7 without MediaPlayer throws an error here\n // https://github.com/videojs/video.js/issues/519\n try {\n return Html5.TEST_VID.canPlayType(type);\n } catch(e) {\n return '';\n }\n};\n\n/*\n * Check if the video element can handle the source natively\n *\n * @param {Object} source The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\nHtml5.nativeSourceHandler.canHandleSource = function(source){\n var match, ext;\n\n // If a type was provided we should rely on that\n if (source.type) {\n return Html5.nativeSourceHandler.canPlayType(source.type);\n } else if (source.src) {\n // If no type, fall back to checking 'video/[EXTENSION]'\n ext = Url.getFileExtension(source.src);\n\n return Html5.nativeSourceHandler.canPlayType(`video/${ext}`);\n }\n\n return '';\n};\n\n/*\n * Pass the source to the video element\n * Adaptive source handlers will have more complicated workflows before passing\n * video data to the video element\n *\n * @param {Object} source The source object\n * @param {Html5} tech The instance of the Html5 tech\n */\nHtml5.nativeSourceHandler.handleSource = function(source, tech){\n tech.setSrc(source.src);\n};\n\n/*\n* Clean up the source handler when disposing the player or switching sources..\n* (no cleanup is needed when supporting the format natively)\n*/\nHtml5.nativeSourceHandler.dispose = function(){};\n\n// Register the native source handler\nHtml5.registerSourceHandler(Html5.nativeSourceHandler);\n\n/*\n * Check if the volume can be changed in this browser/device.\n * Volume cannot be changed in a lot of mobile devices.\n * Specifically, it can't be changed from 1 on iOS.\n *\n * @return {Boolean}\n */\nHtml5.canControlVolume = function(){\n var volume = Html5.TEST_VID.volume;\n Html5.TEST_VID.volume = (volume / 2) + 0.1;\n return volume !== Html5.TEST_VID.volume;\n};\n\n/*\n * Check if playbackRate is supported in this browser/device.\n *\n * @return {Number} [description]\n */\nHtml5.canControlPlaybackRate = function(){\n var playbackRate = Html5.TEST_VID.playbackRate;\n Html5.TEST_VID.playbackRate = (playbackRate / 2) + 0.1;\n return playbackRate !== Html5.TEST_VID.playbackRate;\n};\n\n/*\n * Check to see if native text tracks are supported by this browser/device\n *\n * @return {Boolean}\n */\nHtml5.supportsNativeTextTracks = function() {\n var supportsTextTracks;\n\n // Figure out native text track support\n // If mode is a number, we cannot change it because it'll disappear from view.\n // Browsers with numeric modes include IE10 and older (<=2013) samsung android models.\n // Firefox isn't playing nice either with modifying the mode\n // TODO: Investigate firefox: https://github.com/videojs/video.js/issues/1862\n supportsTextTracks = !!Html5.TEST_VID.textTracks;\n if (supportsTextTracks && Html5.TEST_VID.textTracks.length > 0) {\n supportsTextTracks = typeof Html5.TEST_VID.textTracks[0]['mode'] !== 'number';\n }\n if (supportsTextTracks && browser.IS_FIREFOX) {\n supportsTextTracks = false;\n }\n if (supportsTextTracks && !('onremovetrack' in Html5.TEST_VID.textTracks)) {\n supportsTextTracks = false;\n }\n\n return supportsTextTracks;\n};\n\n/**\n * An array of events available on the Html5 tech.\n *\n * @private\n * @type {Array}\n */\nHtml5.Events = [\n 'loadstart',\n 'suspend',\n 'abort',\n 'error',\n 'emptied',\n 'stalled',\n 'loadedmetadata',\n 'loadeddata',\n 'canplay',\n 'canplaythrough',\n 'playing',\n 'waiting',\n 'seeking',\n 'seeked',\n 'ended',\n 'durationchange',\n 'timeupdate',\n 'progress',\n 'play',\n 'pause',\n 'ratechange',\n 'volumechange'\n];\n\n/*\n * Set the tech's volume control support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresVolumeControl'] = Html5.canControlVolume();\n\n/*\n * Set the tech's playbackRate support status\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresPlaybackRate'] = Html5.canControlPlaybackRate();\n\n/*\n * Set the tech's status on moving the video element.\n * In iOS, if you move a video element in the DOM, it breaks video playback.\n *\n * @type {Boolean}\n */\nHtml5.prototype['movingMediaElementInDOM'] = !browser.IS_IOS;\n\n/*\n * Set the the tech's fullscreen resize support status.\n * HTML video is able to automatically resize when going to fullscreen.\n * (No longer appears to be used. Can probably be removed.)\n */\nHtml5.prototype['featuresFullscreenResize'] = true;\n\n/*\n * Set the tech's progress event support status\n * (this disables the manual progress events of the Tech)\n */\nHtml5.prototype['featuresProgressEvents'] = true;\n\n/*\n * Sets the tech's status on native text track support\n *\n * @type {Boolean}\n */\nHtml5.prototype['featuresNativeTextTracks'] = Html5.supportsNativeTextTracks();\n\n// HTML5 Feature detection and Device Fixes --------------------------------- //\nlet canPlayType;\nconst mpegurlRE = /^application\\/(?:x-|vnd\\.apple\\.)mpegurl/i;\nconst mp4RE = /^video\\/mp4/i;\n\nHtml5.patchCanPlayType = function() {\n // Android 4.0 and above can play HLS to some extent but it reports being unable to do so\n if (browser.ANDROID_VERSION >= 4.0) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type) {\n if (type && mpegurlRE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n\n // Override Android 2.2 and less canPlayType method which is broken\n if (browser.IS_OLD_ANDROID) {\n if (!canPlayType) {\n canPlayType = Html5.TEST_VID.constructor.prototype.canPlayType;\n }\n\n Html5.TEST_VID.constructor.prototype.canPlayType = function(type){\n if (type && mp4RE.test(type)) {\n return 'maybe';\n }\n return canPlayType.call(this, type);\n };\n }\n};\n\nHtml5.unpatchCanPlayType = function() {\n var r = Html5.TEST_VID.constructor.prototype.canPlayType;\n Html5.TEST_VID.constructor.prototype.canPlayType = canPlayType;\n canPlayType = null;\n return r;\n};\n\n// by default, patch the video element\nHtml5.patchCanPlayType();\n\nHtml5.disposeMediaElement = function(el){\n if (!el) { return; }\n\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n\n // remove any child track or source nodes to prevent their loading\n while(el.hasChildNodes()) {\n el.removeChild(el.firstChild);\n }\n\n // remove any src reference. not setting `src=''` because that causes a warning\n // in firefox\n el.removeAttribute('src');\n\n // force the media element to update its loading state by calling load()\n // however IE on Windows 7N has a bug that throws an error so need a try/catch (#793)\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {\n // not supported\n }\n })();\n }\n};\n\nHtml5.resetMediaElement = function(el){\n if (!el) { return; }\n\n let sources = el.querySelectorAll('source');\n let i = sources.length;\n while (i--) {\n el.removeChild(sources[i]);\n }\n\n // remove any src reference.\n // not setting `src=''` because that throws an error\n el.removeAttribute('src');\n\n if (typeof el.load === 'function') {\n // wrapping in an iife so it's not deoptimized (#1060#discussion_r10324473)\n (function() {\n try {\n el.load();\n } catch (e) {}\n })();\n }\n};\n\nComponent.registerComponent('Html5', Html5);\nTech.registerTech('Html5', Html5);\nexport default Html5;\n",
"/**\n * @file loader.js\n */\nimport Component from '../component.js';\nimport Tech from './tech.js';\nimport window from 'global/window';\nimport toTitleCase from '../utils/to-title-case.js';\n\n/**\n * The Media Loader is the component that decides which playback technology to load\n * when the player is initialized.\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class MediaLoader\n */\nclass MediaLoader extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n // If there are no sources when the player is initialized,\n // load the first supported playback technology.\n\n if (!options.playerOptions['sources'] || options.playerOptions['sources'].length === 0) {\n for (let i=0, j=options.playerOptions['techOrder']; i<j.length; i++) {\n let techName = toTitleCase(j[i]);\n let tech = Tech.getTech(techName);\n // Support old behavior of techs being registered as components.\n // Remove once that deprecated behavior is removed.\n if (!techName) {\n tech = Component.getComponent(techName);\n }\n\n // Check if the browser supports this technology\n if (tech && tech.isSupported()) {\n player.loadTech_(techName);\n break;\n }\n }\n } else {\n // // Loop through playback technologies (HTML5, Flash) and check for support.\n // // Then load the best source.\n // // A few assumptions here:\n // // All playback technologies respect preload false.\n player.src(options.playerOptions['sources']);\n }\n }\n}\n\nComponent.registerComponent('MediaLoader', MediaLoader);\nexport default MediaLoader;\n",
"/**\n * @file tech.js\n * Media Technology Controller - Base class for media playback\n * technology controllers like Flash and HTML5\n */\n\nimport Component from '../component';\nimport HTMLTrackElement from '../tracks/html-track-element';\nimport HTMLTrackElementList from '../tracks/html-track-element-list';\nimport mergeOptions from '../utils/merge-options.js';\nimport TextTrack from '../tracks/text-track';\nimport TextTrackList from '../tracks/text-track-list';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport { createTimeRange } from '../utils/time-ranges.js';\nimport { bufferedPercent } from '../utils/buffer.js';\nimport MediaError from '../media-error.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * Base class for media (HTML5 Video, Flash) controllers\n *\n * @param {Object=} options Options object\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class Tech\n */\nclass Tech extends Component {\n\n constructor(options={}, ready=function(){}){\n // we don't want the tech to report user activity automatically.\n // This is done manually in addControlsListeners\n options.reportTouchActivity = false;\n super(null, options, ready);\n\n // keep track of whether the current source has played at all to\n // implement a very limited played()\n this.hasStarted_ = false;\n this.on('playing', function() {\n this.hasStarted_ = true;\n });\n this.on('loadstart', function() {\n this.hasStarted_ = false;\n });\n\n this.textTracks_ = options.textTracks;\n\n // Manually track progress in cases where the browser/flash player doesn't report it.\n if (!this.featuresProgressEvents) {\n this.manualProgressOn();\n }\n\n // Manually track timeupdates in cases where the browser/flash player doesn't report it.\n if (!this.featuresTimeupdateEvents) {\n this.manualTimeUpdatesOn();\n }\n\n if (options.nativeCaptions === false || options.nativeTextTracks === false) {\n this.featuresNativeTextTracks = false;\n }\n\n if (!this.featuresNativeTextTracks) {\n this.on('ready', this.emulateTextTracks);\n }\n\n this.initTextTrackListeners();\n\n // Turn on component tap events\n this.emitTapEvents();\n }\n\n /* Fallbacks for unsupported event types\n ================================================================================ */\n // Manually trigger progress events based on changes to the buffered amount\n // Many flash players and older HTML5 browsers don't send progress or progress-like events\n /**\n * Turn on progress events\n *\n * @method manualProgressOn\n */\n manualProgressOn() {\n this.on('durationchange', this.onDurationChange);\n\n this.manualProgress = true;\n\n // Trigger progress watching when a source begins loading\n this.one('ready', this.trackProgress);\n }\n\n /**\n * Turn off progress events\n *\n * @method manualProgressOff\n */\n manualProgressOff() {\n this.manualProgress = false;\n this.stopTrackingProgress();\n\n this.off('durationchange', this.onDurationChange);\n }\n\n /**\n * Track progress\n *\n * @method trackProgress\n */\n trackProgress() {\n this.stopTrackingProgress();\n this.progressInterval = this.setInterval(Fn.bind(this, function(){\n // Don't trigger unless buffered amount is greater than last time\n\n let numBufferedPercent = this.bufferedPercent();\n\n if (this.bufferedPercent_ !== numBufferedPercent) {\n this.trigger('progress');\n }\n\n this.bufferedPercent_ = numBufferedPercent;\n\n if (numBufferedPercent === 1) {\n this.stopTrackingProgress();\n }\n }), 500);\n }\n\n /**\n * Update duration\n *\n * @method onDurationChange\n */\n onDurationChange() {\n this.duration_ = this.duration();\n }\n\n /**\n * Create and get TimeRange object for buffering\n *\n * @return {TimeRangeObject}\n * @method buffered\n */\n buffered() {\n return createTimeRange(0, 0);\n }\n\n /**\n * Get buffered percent\n *\n * @return {Number}\n * @method bufferedPercent\n */\n bufferedPercent() {\n return bufferedPercent(this.buffered(), this.duration_);\n }\n\n /**\n * Stops tracking progress by clearing progress interval\n *\n * @method stopTrackingProgress\n */\n stopTrackingProgress() {\n this.clearInterval(this.progressInterval);\n }\n\n /*! Time Tracking -------------------------------------------------------------- */\n /**\n * Set event listeners for on play and pause and tracking current time\n *\n * @method manualTimeUpdatesOn\n */\n manualTimeUpdatesOn() {\n this.manualTimeUpdates = true;\n\n this.on('play', this.trackCurrentTime);\n this.on('pause', this.stopTrackingCurrentTime);\n }\n\n /**\n * Remove event listeners for on play and pause and tracking current time\n *\n * @method manualTimeUpdatesOff\n */\n manualTimeUpdatesOff() {\n this.manualTimeUpdates = false;\n this.stopTrackingCurrentTime();\n this.off('play', this.trackCurrentTime);\n this.off('pause', this.stopTrackingCurrentTime);\n }\n\n /**\n * Tracks current time\n *\n * @method trackCurrentTime\n */\n trackCurrentTime() {\n if (this.currentTimeInterval) { this.stopTrackingCurrentTime(); }\n this.currentTimeInterval = this.setInterval(function(){\n this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });\n }, 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15\n }\n\n /**\n * Turn off play progress tracking (when paused or dragging)\n *\n * @method stopTrackingCurrentTime\n */\n stopTrackingCurrentTime() {\n this.clearInterval(this.currentTimeInterval);\n\n // #1002 - if the video ends right before the next timeupdate would happen,\n // the progress bar won't make it all the way to the end\n this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true });\n }\n\n /**\n * Turn off any manual progress or timeupdate tracking\n *\n * @method dispose\n */\n dispose() {\n // clear out text tracks because we can't reuse them between techs\n let textTracks = this.textTracks();\n\n if (textTracks) {\n let i = textTracks.length;\n while(i--) {\n this.removeRemoteTextTrack(textTracks[i]);\n }\n }\n\n // Turn off any manual progress or timeupdate tracking\n if (this.manualProgress) { this.manualProgressOff(); }\n\n if (this.manualTimeUpdates) { this.manualTimeUpdatesOff(); }\n\n super.dispose();\n }\n\n /**\n * Reset the tech. Removes all sources and resets readyState.\n *\n * @method reset\n */\n reset() {}\n\n /**\n * When invoked without an argument, returns a MediaError object\n * representing the current error state of the player or null if\n * there is no error. When invoked with an argument, set the current\n * error state of the player.\n * @param {MediaError=} err Optional an error object\n * @return {MediaError} the current error object or null\n * @method error\n */\n error(err) {\n if (err !== undefined) {\n if (err instanceof MediaError) {\n this.error_ = err;\n } else {\n this.error_ = new MediaError(err);\n }\n this.trigger('error');\n }\n return this.error_;\n }\n\n /**\n * Return the time ranges that have been played through for the\n * current source. This implementation is incomplete. It does not\n * track the played time ranges, only whether the source has played\n * at all or not.\n * @return {TimeRangeObject} a single time range if this video has\n * played or an empty set of ranges if not.\n * @method played\n */\n played() {\n if (this.hasStarted_) {\n return createTimeRange(0, 0);\n }\n return createTimeRange();\n }\n\n /**\n * Set current time\n *\n * @method setCurrentTime\n */\n setCurrentTime() {\n // improve the accuracy of manual timeupdates\n if (this.manualTimeUpdates) { this.trigger({ type: 'timeupdate', target: this, manuallyTriggered: true }); }\n }\n\n /**\n * Initialize texttrack listeners\n *\n * @method initTextTrackListeners\n */\n initTextTrackListeners() {\n let textTrackListChanges = Fn.bind(this, function() {\n this.trigger('texttrackchange');\n });\n\n let tracks = this.textTracks();\n\n if (!tracks) return;\n\n tracks.addEventListener('removetrack', textTrackListChanges);\n tracks.addEventListener('addtrack', textTrackListChanges);\n\n this.on('dispose', Fn.bind(this, function() {\n tracks.removeEventListener('removetrack', textTrackListChanges);\n tracks.removeEventListener('addtrack', textTrackListChanges);\n }));\n }\n\n /**\n * Emulate texttracks\n *\n * @method emulateTextTracks\n */\n emulateTextTracks() {\n let tracks = this.textTracks();\n if (!tracks) {\n return;\n }\n\n if (!window['WebVTT'] && this.el().parentNode != null) {\n let script = document.createElement('script');\n script.src = this.options_['vtt.js'] || '../node_modules/videojs-vtt.js/dist/vtt.js';\n script.onload = () => {\n this.trigger('vttjsloaded');\n };\n script.onerror = () => {\n this.trigger('vttjserror');\n };\n this.on('dispose', () => {\n script.onload = null;\n script.onerror = null;\n });\n this.el().parentNode.appendChild(script);\n window['WebVTT'] = true;\n }\n\n let updateDisplay = () => this.trigger('texttrackchange');\n let textTracksChanges = () => {\n updateDisplay();\n\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n track.removeEventListener('cuechange', updateDisplay);\n if (track.mode === 'showing') {\n track.addEventListener('cuechange', updateDisplay);\n }\n }\n };\n\n textTracksChanges();\n tracks.addEventListener('change', textTracksChanges);\n\n this.on('dispose', function() {\n tracks.removeEventListener('change', textTracksChanges);\n });\n }\n\n /*\n * Provide default methods for text tracks.\n *\n * Html5 tech overrides these.\n */\n\n /**\n * Get texttracks\n *\n * @returns {TextTrackList}\n * @method textTracks\n */\n textTracks() {\n this.textTracks_ = this.textTracks_ || new TextTrackList();\n return this.textTracks_;\n }\n\n /**\n * Get remote texttracks\n *\n * @returns {TextTrackList}\n * @method remoteTextTracks\n */\n remoteTextTracks() {\n this.remoteTextTracks_ = this.remoteTextTracks_ || new TextTrackList();\n return this.remoteTextTracks_;\n }\n\n /**\n * Get remote htmltrackelements\n *\n * @returns {HTMLTrackElementList}\n * @method remoteTextTrackEls\n */\n remoteTextTrackEls() {\n this.remoteTextTrackEls_ = this.remoteTextTrackEls_ || new HTMLTrackElementList();\n return this.remoteTextTrackEls_;\n }\n\n /**\n * Creates and returns a remote text track object\n *\n * @param {String} kind Text track kind (subtitles, captions, descriptions\n * chapters and metadata)\n * @param {String=} label Label to identify the text track\n * @param {String=} language Two letter language abbreviation\n * @return {TextTrackObject}\n * @method addTextTrack\n */\n addTextTrack(kind, label, language) {\n if (!kind) {\n throw new Error('TextTrack kind is required but was not provided');\n }\n\n return createTrackHelper(this, kind, label, language);\n }\n\n /**\n * Creates a remote text track object and returns a emulated html track element\n *\n * @param {Object} options The object should contain values for\n * kind, language, label and src (location of the WebVTT file)\n * @return {HTMLTrackElement}\n * @method addRemoteTextTrack\n */\n addRemoteTextTrack(options) {\n let track = mergeOptions(options, {\n tech: this\n });\n\n let htmlTrackElement = new HTMLTrackElement(track);\n\n // store HTMLTrackElement and TextTrack to remote list\n this.remoteTextTrackEls().addTrackElement_(htmlTrackElement);\n this.remoteTextTracks().addTrack_(htmlTrackElement.track);\n\n // must come after remoteTextTracks()\n this.textTracks().addTrack_(htmlTrackElement.track);\n\n return htmlTrackElement;\n }\n\n /**\n * Remove remote texttrack\n *\n * @param {TextTrackObject} track Texttrack to remove\n * @method removeRemoteTextTrack\n */\n removeRemoteTextTrack(track) {\n this.textTracks().removeTrack_(track);\n\n let trackElement = this.remoteTextTrackEls().getTrackElementByTrack_(track);\n\n // remove HTMLTrackElement and TextTrack from remote list\n this.remoteTextTrackEls().removeTrackElement_(trackElement);\n this.remoteTextTracks().removeTrack_(track);\n }\n\n /**\n * Provide a default setPoster method for techs\n * Poster support for techs should be optional, so we don't want techs to\n * break if they don't have a way to set a poster.\n *\n * @method setPoster\n */\n setPoster() {}\n\n /*\n * Check if the tech can support the given type\n *\n * The base tech does not support any type, but source handlers might\n * overwrite this.\n *\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n canPlayType() {\n return '';\n }\n\n /*\n * Return whether the argument is a Tech or not.\n * Can be passed either a Class like `Html5` or a instance like `player.tech_`\n *\n * @param {Object} component An item to check\n * @return {Boolean} Whether it is a tech or not\n */\n static isTech(component) {\n return component.prototype instanceof Tech ||\n component instanceof Tech ||\n component === Tech;\n }\n\n /**\n * Registers a Tech\n *\n * @param {String} name Name of the Tech to register\n * @param {Object} tech The tech to register\n * @static\n * @method registerComponent\n */\n static registerTech(name, tech) {\n if (!Tech.techs_) {\n Tech.techs_ = {};\n }\n\n if (!Tech.isTech(tech)) {\n throw new Error(`Tech ${name} must be a Tech`);\n }\n\n Tech.techs_[name] = tech;\n return tech;\n }\n\n /**\n * Gets a component by name\n *\n * @param {String} name Name of the component to get\n * @return {Component}\n * @static\n * @method getComponent\n */\n static getTech(name) {\n if (Tech.techs_ && Tech.techs_[name]) {\n return Tech.techs_[name];\n }\n\n if (window && window.videojs && window.videojs[name]) {\n log.warn(`The ${name} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`);\n return window.videojs[name];\n }\n }\n}\n\n/*\n * List of associated text tracks\n *\n * @type {Array}\n * @private\n */\nTech.prototype.textTracks_;\n\nvar createTrackHelper = function(self, kind, label, language, options={}) {\n let tracks = self.textTracks();\n\n options.kind = kind;\n\n if (label) {\n options.label = label;\n }\n if (language) {\n options.language = language;\n }\n options.tech = self;\n\n let track = new TextTrack(options);\n tracks.addTrack_(track);\n\n return track;\n};\n\nTech.prototype.featuresVolumeControl = true;\n\n// Resizing plugins using request fullscreen reloads the plugin\nTech.prototype.featuresFullscreenResize = false;\nTech.prototype.featuresPlaybackRate = false;\n\n// Optional events that we can manually mimic with timers\n// currently not triggered by video-js-swf\nTech.prototype.featuresProgressEvents = false;\nTech.prototype.featuresTimeupdateEvents = false;\n\nTech.prototype.featuresNativeTextTracks = false;\n\n/*\n * A functional mixin for techs that want to use the Source Handler pattern.\n *\n * ##### EXAMPLE:\n *\n * Tech.withSourceHandlers.call(MyTech);\n *\n */\nTech.withSourceHandlers = function(_Tech){\n /*\n * Register a source handler\n * Source handlers are scripts for handling specific formats.\n * The source handler pattern is used for adaptive formats (HLS, DASH) that\n * manually load video data and feed it into a Source Buffer (Media Source Extensions)\n * @param {Function} handler The source handler\n * @param {Boolean} first Register it before any existing handlers\n */\n _Tech.registerSourceHandler = function(handler, index){\n let handlers = _Tech.sourceHandlers;\n\n if (!handlers) {\n handlers = _Tech.sourceHandlers = [];\n }\n\n if (index === undefined) {\n // add to the end of the list\n index = handlers.length;\n }\n\n handlers.splice(index, 0, handler);\n };\n\n /*\n * Check if the tech can support the given type\n * @param {String} type The mimetype to check\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlayType = function(type){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canPlayType(type);\n\n if (can) {\n return can;\n }\n }\n\n return '';\n };\n\n /*\n * Return the first source handler that supports the source\n * TODO: Answer question: should 'probably' be prioritized over 'maybe'\n * @param {Object} source The source object\n * @returns {Object} The first source handler that supports the source\n * @returns {null} Null if no source handler is found\n */\n _Tech.selectSourceHandler = function(source){\n let handlers = _Tech.sourceHandlers || [];\n let can;\n\n for (let i = 0; i < handlers.length; i++) {\n can = handlers[i].canHandleSource(source);\n\n if (can) {\n return handlers[i];\n }\n }\n\n return null;\n };\n\n /*\n * Check if the tech can support the given source\n * @param {Object} srcObj The source object\n * @return {String} 'probably', 'maybe', or '' (empty string)\n */\n _Tech.canPlaySource = function(srcObj){\n let sh = _Tech.selectSourceHandler(srcObj);\n\n if (sh) {\n return sh.canHandleSource(srcObj);\n }\n\n return '';\n };\n\n /*\n * When using a source handler, prefer its implementation of\n * any function normally provided by the tech.\n */\n let deferrable = [\n 'seekable',\n 'duration'\n ];\n\n deferrable.forEach(function (fnName) {\n let originalFn = this[fnName];\n\n if (typeof originalFn !== 'function') {\n return;\n }\n\n this[fnName] = function() {\n if (this.sourceHandler_ && this.sourceHandler_[fnName]) {\n return this.sourceHandler_[fnName].apply(this.sourceHandler_, arguments);\n }\n return originalFn.apply(this, arguments);\n };\n }, _Tech.prototype);\n\n /*\n * Create a function for setting the source using a source object\n * and source handlers.\n * Should never be called unless a source handler was found.\n * @param {Object} source A source object with src and type keys\n * @return {Tech} self\n */\n _Tech.prototype.setSource = function(source){\n let sh = _Tech.selectSourceHandler(source);\n\n if (!sh) {\n // Fall back to a native source hander when unsupported sources are\n // deliberately set\n if (_Tech.nativeSourceHandler) {\n sh = _Tech.nativeSourceHandler;\n } else {\n log.error('No source hander found for the current source.');\n }\n }\n\n // Dispose any existing source handler\n this.disposeSourceHandler();\n this.off('dispose', this.disposeSourceHandler);\n\n this.currentSource_ = source;\n this.sourceHandler_ = sh.handleSource(source, this);\n this.on('dispose', this.disposeSourceHandler);\n\n return this;\n };\n\n /*\n * Clean up any existing source handler\n */\n _Tech.prototype.disposeSourceHandler = function(){\n if (this.sourceHandler_ && this.sourceHandler_.dispose) {\n this.sourceHandler_.dispose();\n }\n };\n\n};\n\nComponent.registerComponent('Tech', Tech);\n// Old name for Tech\nComponent.registerComponent('MediaTechController', Tech);\nTech.registerTech('Tech', Tech);\nexport default Tech;\n",
"/**\n * @file html-track-element-list.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\nclass HtmlTrackElementList {\n constructor(trackElements = []) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in HtmlTrackElementList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = HtmlTrackElementList.prototype[prop];\n }\n }\n }\n\n list.trackElements_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.trackElements_.length;\n }\n });\n\n for (let i = 0, length = trackElements.length; i < length; i++) {\n list.addTrackElement_(trackElements[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n addTrackElement_(trackElement) {\n this.trackElements_.push(trackElement);\n }\n\n getTrackElementByTrack_(track) {\n let trackElement_;\n\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (track === this.trackElements_[i].track) {\n trackElement_ = this.trackElements_[i];\n\n break;\n }\n }\n\n return trackElement_;\n }\n\n removeTrackElement_(trackElement) {\n for (let i = 0, length = this.trackElements_.length; i < length; i++) {\n if (trackElement === this.trackElements_[i]) {\n this.trackElements_.splice(i, 1);\n\n break;\n }\n }\n }\n}\n\nexport default HtmlTrackElementList;\n",
"/**\n * @file html-track-element.js\n */\n\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\nimport EventTarget from '../event-target';\nimport TextTrack from '../tracks/text-track';\n\nconst NONE = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst ERROR = 3;\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#htmltrackelement\n *\n * interface HTMLTrackElement : HTMLElement {\n * attribute DOMString kind;\n * attribute DOMString src;\n * attribute DOMString srclang;\n * attribute DOMString label;\n * attribute boolean default;\n *\n * const unsigned short NONE = 0;\n * const unsigned short LOADING = 1;\n * const unsigned short LOADED = 2;\n * const unsigned short ERROR = 3;\n * readonly attribute unsigned short readyState;\n *\n * readonly attribute TextTrack track;\n * };\n *\n * @param {Object} options TextTrack configuration\n * @class HTMLTrackElement\n */\n\nclass HTMLTrackElement extends EventTarget {\n constructor(options = {}) {\n super();\n\n let readyState,\n trackElement = this;\n\n if (browser.IS_IE8) {\n trackElement = document.createElement('custom');\n\n for (let prop in HTMLTrackElement.prototype) {\n if (prop !== 'constructor') {\n trackElement[prop] = HTMLTrackElement.prototype[prop];\n }\n }\n }\n\n let track = new TextTrack(options);\n\n trackElement.kind = track.kind;\n trackElement.src = track.src;\n trackElement.srclang = track.language;\n trackElement.label = track.label;\n trackElement.default = track.default;\n\n Object.defineProperty(trackElement, 'readyState', {\n get() {\n return readyState;\n }\n });\n\n Object.defineProperty(trackElement, 'track', {\n get() {\n return track;\n }\n });\n\n readyState = NONE;\n\n track.addEventListener('loadeddata', function() {\n readyState = LOADED;\n\n trackElement.trigger({\n type: 'load',\n target: trackElement\n });\n });\n\n if (browser.IS_IE8) {\n return trackElement;\n }\n }\n}\n\nHTMLTrackElement.prototype.allowedEvents_ = {\n load: 'load'\n};\n\nHTMLTrackElement.NONE = NONE;\nHTMLTrackElement.LOADING = LOADING;\nHTMLTrackElement.LOADED = LOADED;\nHTMLTrackElement.ERROR = ERROR;\n\nexport default HTMLTrackElement;\n",
"/**\n * @file text-track-cue-list.js\n */\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A List of text track cues as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackcuelist\n *\n * interface TextTrackCueList {\n * readonly attribute unsigned long length;\n * getter TextTrackCue (unsigned long index);\n * TextTrackCue? getCueById(DOMString id);\n * };\n *\n * @param {Array} cues A list of cues to be initialized with\n * @class TextTrackCueList\n */\n\nclass TextTrackCueList {\n constructor(cues) {\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackCueList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackCueList.prototype[prop];\n }\n }\n }\n\n TextTrackCueList.prototype.setCues_.call(list, cues);\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.length_;\n }\n });\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * A setter for cues in this list\n *\n * @param {Array} cues an array of cues\n * @method setCues_\n * @private\n */\n setCues_(cues) {\n let oldLength = this.length || 0;\n let i = 0;\n let l = cues.length;\n\n this.cues_ = cues;\n this.length_ = cues.length;\n\n let defineProp = function(index) {\n if (!('' + index in this)) {\n Object.defineProperty(this, '' + index, {\n get() {\n return this.cues_[index];\n }\n });\n }\n };\n\n if (oldLength < l) {\n i = oldLength;\n\n for (; i < l; i++) {\n defineProp.call(this, i);\n }\n }\n }\n\n /**\n * Get a cue that is currently in the Cue list by id\n *\n * @param {String} id\n * @method getCueById\n * @return {Object} a single cue\n */\n getCueById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let cue = this[i];\n\n if (cue.id === id) {\n result = cue;\n break;\n }\n }\n\n return result;\n }\n}\n\nexport default TextTrackCueList;\n",
"/**\n * @file text-track-display.js\n */\nimport Component from '../component';\nimport Menu from '../menu/menu.js';\nimport MenuItem from '../menu/menu-item.js';\nimport MenuButton from '../menu/menu-button.js';\nimport * as Fn from '../utils/fn.js';\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst darkGray = '#222';\nconst lightGray = '#ccc';\nconst fontMap = {\n monospace: 'monospace',\n sansSerif: 'sans-serif',\n serif: 'serif',\n monospaceSansSerif: '\"Andale Mono\", \"Lucida Console\", monospace',\n monospaceSerif: '\"Courier New\", monospace',\n proportionalSansSerif: 'sans-serif',\n proportionalSerif: 'serif',\n casual: '\"Comic Sans MS\", Impact, fantasy',\n script: '\"Monotype Corsiva\", cursive',\n smallcaps: '\"Andale Mono\", \"Lucida Console\", monospace, sans-serif'\n};\n\n/**\n * The component for displaying text track cues\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @param {Function=} ready Ready callback function\n * @extends Component\n * @class TextTrackDisplay\n */\nclass TextTrackDisplay extends Component {\n\n constructor(player, options, ready){\n super(player, options, ready);\n\n player.on('loadstart', Fn.bind(this, this.toggleDisplay));\n player.on('texttrackchange', Fn.bind(this, this.updateDisplay));\n\n // This used to be called during player init, but was causing an error\n // if a track should show by default and the display hadn't loaded yet.\n // Should probably be moved to an external track loader when we support\n // tracks that don't need a display.\n player.ready(Fn.bind(this, function() {\n if (player.tech_ && player.tech_['featuresNativeTextTracks']) {\n this.hide();\n return;\n }\n\n player.on('fullscreenchange', Fn.bind(this, this.updateDisplay));\n\n let tracks = this.options_.playerOptions['tracks'] || [];\n for (let i = 0; i < tracks.length; i++) {\n let track = tracks[i];\n this.player_.addRemoteTextTrack(track);\n }\n }));\n }\n\n /**\n * Toggle display texttracks\n *\n * @method toggleDisplay\n */\n toggleDisplay() {\n if (this.player_.tech_ && this.player_.tech_['featuresNativeTextTracks']) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-text-track-display'\n });\n }\n\n /**\n * Clear display texttracks\n *\n * @method clearDisplay\n */\n clearDisplay() {\n if (typeof window['WebVTT'] === 'function') {\n window['WebVTT']['processCues'](window, [], this.el_);\n }\n }\n\n /**\n * Update display texttracks\n *\n * @method updateDisplay\n */\n updateDisplay() {\n var tracks = this.player_.textTracks();\n\n this.clearDisplay();\n\n if (!tracks) {\n return;\n }\n\n for (let i=0; i < tracks.length; i++) {\n let track = tracks[i];\n if (track['mode'] === 'showing') {\n this.updateForTrack(track);\n }\n }\n }\n\n /**\n * Add texttrack to texttrack list\n *\n * @param {TextTrackObject} track Texttrack object to be added to list\n * @method updateForTrack\n */\n updateForTrack(track) {\n if (typeof window['WebVTT'] !== 'function' || !track['activeCues']) {\n return;\n }\n\n let overrides = this.player_['textTrackSettings'].getValues();\n\n let cues = [];\n for (let i = 0; i < track['activeCues'].length; i++) {\n cues.push(track['activeCues'][i]);\n }\n\n window['WebVTT']['processCues'](window, track['activeCues'], this.el_);\n\n let i = cues.length;\n while (i--) {\n let cue = cues[i];\n if (!cue) {\n continue;\n }\n\n let cueDiv = cue.displayState;\n if (overrides.color) {\n cueDiv.firstChild.style.color = overrides.color;\n }\n if (overrides.textOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'color',\n constructColor(overrides.color || '#fff',\n overrides.textOpacity));\n }\n if (overrides.backgroundColor) {\n cueDiv.firstChild.style.backgroundColor = overrides.backgroundColor;\n }\n if (overrides.backgroundOpacity) {\n tryUpdateStyle(cueDiv.firstChild,\n 'backgroundColor',\n constructColor(overrides.backgroundColor || '#000',\n overrides.backgroundOpacity));\n }\n if (overrides.windowColor) {\n if (overrides.windowOpacity) {\n tryUpdateStyle(cueDiv,\n 'backgroundColor',\n constructColor(overrides.windowColor, overrides.windowOpacity));\n } else {\n cueDiv.style.backgroundColor = overrides.windowColor;\n }\n }\n if (overrides.edgeStyle) {\n if (overrides.edgeStyle === 'dropshadow') {\n cueDiv.firstChild.style.textShadow = `2px 2px 3px ${darkGray}, 2px 2px 4px ${darkGray}, 2px 2px 5px ${darkGray}`;\n } else if (overrides.edgeStyle === 'raised') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${darkGray}, 2px 2px ${darkGray}, 3px 3px ${darkGray}`;\n } else if (overrides.edgeStyle === 'depressed') {\n cueDiv.firstChild.style.textShadow = `1px 1px ${lightGray}, 0 1px ${lightGray}, -1px -1px ${darkGray}, 0 -1px ${darkGray}`;\n } else if (overrides.edgeStyle === 'uniform') {\n cueDiv.firstChild.style.textShadow = `0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}, 0 0 4px ${darkGray}`;\n }\n }\n if (overrides.fontPercent && overrides.fontPercent !== 1) {\n const fontSize = window.parseFloat(cueDiv.style.fontSize);\n cueDiv.style.fontSize = (fontSize * overrides.fontPercent) + 'px';\n cueDiv.style.height = 'auto';\n cueDiv.style.top = 'auto';\n cueDiv.style.bottom = '2px';\n }\n if (overrides.fontFamily && overrides.fontFamily !== 'default') {\n if (overrides.fontFamily === 'small-caps') {\n cueDiv.firstChild.style.fontVariant = 'small-caps';\n } else {\n cueDiv.firstChild.style.fontFamily = fontMap[overrides.fontFamily];\n }\n }\n }\n }\n\n}\n\n/**\n* Add cue HTML to display\n*\n* @param {Number} color Hex number for color, like #f0e\n* @param {Number} opacity Value for opacity,0.0 - 1.0\n* @return {RGBAColor} In the form 'rgba(255, 0, 0, 0.3)'\n* @method constructColor\n*/\nfunction constructColor(color, opacity) {\n return 'rgba(' +\n // color looks like \"#f0e\"\n parseInt(color[1] + color[1], 16) + ',' +\n parseInt(color[2] + color[2], 16) + ',' +\n parseInt(color[3] + color[3], 16) + ',' +\n opacity + ')';\n}\n\n/**\n * Try to update style\n * Some style changes will throw an error, particularly in IE8. Those should be noops.\n *\n * @param {Element} el The element to be styles\n * @param {CSSProperty} style The CSS property to be styled\n * @param {CSSStyle} rule The actual style to be applied to the property\n * @method tryUpdateStyle\n */\nfunction tryUpdateStyle(el, style, rule) {\n //\n try {\n el.style[style] = rule;\n } catch (e) {}\n}\n\nComponent.registerComponent('TextTrackDisplay', TextTrackDisplay);\nexport default TextTrackDisplay;\n",
"/**\n * @file text-track-enums.js\n */\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackmode\n *\n * enum TextTrackMode { \"disabled\", \"hidden\", \"showing\" };\n */\nconst TextTrackMode = {\n disabled: 'disabled',\n hidden: 'hidden',\n showing: 'showing'\n};\n\n/**\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrackkind\n *\n * enum TextTrackKind {\n * \"subtitles\",\n * \"captions\",\n * \"descriptions\",\n * \"chapters\",\n * \"metadata\"\n * };\n */\nconst TextTrackKind = {\n subtitles: 'subtitles',\n captions: 'captions',\n descriptions: 'descriptions',\n chapters: 'chapters',\n metadata: 'metadata'\n};\n\n/* jshint ignore:start */\n// we ignore jshint here because it does not see\n// TextTrackMode or TextTrackKind as defined here somehow...\nexport { TextTrackMode, TextTrackKind };\n/* jshint ignore:end */\n",
"/**\n * Utilities for capturing text track state and re-creating tracks\n * based on a capture.\n *\n * @file text-track-list-converter.js\n */\n\n/**\n * Examine a single text track and return a JSON-compatible javascript\n * object that represents the text track's state.\n * @param track {TextTrackObject} the text track to query\n * @return {Object} a serializable javascript representation of the\n * @private\n */\nlet trackToJson_ = function(track) {\n let ret = ['kind', 'label', 'language', 'id',\n 'inBandMetadataTrackDispatchType',\n 'mode', 'src'].reduce((acc, prop, i) => {\n if (track[prop]) {\n acc[prop] = track[prop];\n }\n \n return acc;\n }, {\n cues: track.cues && Array.prototype.map.call(track.cues, function(cue) {\n return {\n startTime: cue.startTime,\n endTime: cue.endTime,\n text: cue.text,\n id: cue.id\n };\n })\n });\n\n return ret;\n};\n\n/**\n * Examine a tech and return a JSON-compatible javascript array that\n * represents the state of all text tracks currently configured. The\n * return array is compatible with `jsonToTextTracks`.\n * @param tech {tech} the tech object to query\n * @return {Array} a serializable javascript representation of the\n * @function textTracksToJson\n */\nlet textTracksToJson = function(tech) {\n\n let trackEls = tech.$$('track');\n\n let trackObjs = Array.prototype.map.call(trackEls, (t) => t.track);\n let tracks = Array.prototype.map.call(trackEls, function(trackEl) {\n let json = trackToJson_(trackEl.track);\n if (trackEl.src) {\n json.src = trackEl.src;\n }\n return json;\n });\n\n return tracks.concat(Array.prototype.filter.call(tech.textTracks(), function(track) {\n return trackObjs.indexOf(track) === -1;\n }).map(trackToJson_));\n};\n\n/**\n * Creates a set of remote text tracks on a tech based on an array of\n * javascript text track representations.\n * @param json {Array} an array of text track representation objects,\n * like those that would be produced by `textTracksToJson`\n * @param tech {tech} the tech to create text tracks on\n * @function jsonToTextTracks\n */\nlet jsonToTextTracks = function(json, tech) {\n json.forEach(function(track) {\n let addedTrack = tech.addRemoteTextTrack(track).track;\n if (!track.src && track.cues) {\n track.cues.forEach((cue) => addedTrack.addCue(cue));\n }\n });\n\n return tech.textTracks();\n};\n\nexport default {textTracksToJson, jsonToTextTracks, trackToJson_};\n",
"/**\n * @file text-track-list.js\n */\nimport EventTarget from '../event-target';\nimport * as Fn from '../utils/fn.js';\nimport * as browser from '../utils/browser.js';\nimport document from 'global/document';\n\n/**\n * A text track list as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttracklist\n *\n * interface TextTrackList : EventTarget {\n * readonly attribute unsigned long length;\n * getter TextTrack (unsigned long index);\n * TextTrack? getTrackById(DOMString id);\n *\n * attribute EventHandler onchange;\n * attribute EventHandler onaddtrack;\n * attribute EventHandler onremovetrack;\n * };\n *\n * @param {Track[]} tracks A list of tracks to initialize the list with\n * @extends EventTarget\n * @class TextTrackList\n */\n\nclass TextTrackList extends EventTarget {\n constructor(tracks = []) {\n super();\n let list = this;\n\n if (browser.IS_IE8) {\n list = document.createElement('custom');\n\n for (let prop in TextTrackList.prototype) {\n if (prop !== 'constructor') {\n list[prop] = TextTrackList.prototype[prop];\n }\n }\n }\n\n list.tracks_ = [];\n\n Object.defineProperty(list, 'length', {\n get() {\n return this.tracks_.length;\n }\n });\n\n for (let i = 0; i < tracks.length; i++) {\n list.addTrack_(tracks[i]);\n }\n\n if (browser.IS_IE8) {\n return list;\n }\n }\n\n /**\n * Add TextTrack from TextTrackList\n *\n * @param {TextTrack} track\n * @method addTrack_\n * @private\n */\n addTrack_(track) {\n let index = this.tracks_.length;\n\n if (!('' + index in this)) {\n Object.defineProperty(this, index, {\n get() {\n return this.tracks_[index];\n }\n });\n }\n\n track.addEventListener('modechange', Fn.bind(this, function() {\n this.trigger('change');\n }));\n\n // Do not add duplicate tracks\n if (this.tracks_.indexOf(track) === -1) {\n this.tracks_.push(track);\n this.trigger({\n track,\n type: 'addtrack'\n });\n }\n\n }\n\n /**\n * Remove TextTrack from TextTrackList\n * NOTE: Be mindful of what is passed in as it may be a HTMLTrackElement\n *\n * @param {TextTrack} rtrack\n * @method removeTrack_\n * @private\n */\n removeTrack_(rtrack) {\n let track;\n\n for (let i = 0, l = this.length; i < l; i++) {\n if (this[i] === rtrack) {\n track = this[i];\n if (track.off) {\n track.off();\n }\n\n this.tracks_.splice(i, 1);\n\n break;\n }\n }\n\n if (!track) {\n return;\n }\n\n this.trigger({\n track,\n type: 'removetrack'\n });\n }\n\n /**\n * Get a TextTrack from TextTrackList by a tracks id\n *\n * @param {String} id - the id of the track to get\n * @method getTrackById\n * @return {TextTrack}\n * @private\n */\n getTrackById(id) {\n let result = null;\n\n for (let i = 0, l = this.length; i < l; i++) {\n let track = this[i];\n\n if (track.id === id) {\n result = track;\n break;\n }\n }\n\n return result;\n }\n}\n\n/**\n * change - One or more tracks in the track list have been enabled or disabled.\n * addtrack - A track has been added to the track list.\n * removetrack - A track has been removed from the track list.\n */\nTextTrackList.prototype.allowedEvents_ = {\n change: 'change',\n addtrack: 'addtrack',\n removetrack: 'removetrack'\n};\n\n// emulate attribute EventHandler support to allow for feature detection\nfor (let event in TextTrackList.prototype.allowedEvents_) {\n TextTrackList.prototype['on' + event] = null;\n}\n\nexport default TextTrackList;\n",
"/**\n * @file text-track-settings.js\n */\nimport Component from '../component';\nimport * as Events from '../utils/events.js';\nimport * as Fn from '../utils/fn.js';\nimport log from '../utils/log.js';\nimport safeParseTuple from 'safe-json-parse/tuple';\nimport window from 'global/window';\n\n/**\n * Manipulate settings of texttracks\n *\n * @param {Object} player Main Player\n * @param {Object=} options Object of option names and values\n * @extends Component\n * @class TextTrackSettings\n */\nclass TextTrackSettings extends Component {\n\n constructor(player, options) {\n super(player, options);\n this.hide();\n\n // Grab `persistTextTrackSettings` from the player options if not passed in child options\n if (options.persistTextTrackSettings === undefined) {\n this.options_.persistTextTrackSettings = this.options_.playerOptions.persistTextTrackSettings;\n }\n\n Events.on(this.$('.vjs-done-button'), 'click', Fn.bind(this, function() {\n this.saveSettings();\n this.hide();\n }));\n\n Events.on(this.$('.vjs-default-button'), 'click', Fn.bind(this, function() {\n this.$('.vjs-fg-color > select').selectedIndex = 0;\n this.$('.vjs-bg-color > select').selectedIndex = 0;\n this.$('.window-color > select').selectedIndex = 0;\n this.$('.vjs-text-opacity > select').selectedIndex = 0;\n this.$('.vjs-bg-opacity > select').selectedIndex = 0;\n this.$('.vjs-window-opacity > select').selectedIndex = 0;\n this.$('.vjs-edge-style select').selectedIndex = 0;\n this.$('.vjs-font-family select').selectedIndex = 0;\n this.$('.vjs-font-percent select').selectedIndex = 2;\n this.updateDisplay();\n }));\n\n Events.on(this.$('.vjs-fg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.window-color > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-text-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-bg-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-window-opacity > select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-percent select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-edge-style select'), 'change', Fn.bind(this, this.updateDisplay));\n Events.on(this.$('.vjs-font-family select'), 'change', Fn.bind(this, this.updateDisplay));\n\n if (this.options_.persistTextTrackSettings) {\n this.restoreSettings();\n }\n }\n\n /**\n * Create the component's DOM element\n *\n * @return {Element}\n * @method createEl\n */\n createEl() {\n return super.createEl('div', {\n className: 'vjs-caption-settings vjs-modal-overlay',\n innerHTML: captionOptionsMenuTemplate()\n });\n }\n\n /**\n * Get texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @return {Object}\n * @method getValues\n */\n getValues() {\n const textEdge = getSelectedOptionValue(this.$('.vjs-edge-style select'));\n const fontFamily = getSelectedOptionValue(this.$('.vjs-font-family select'));\n const fgColor = getSelectedOptionValue(this.$('.vjs-fg-color > select'));\n const textOpacity = getSelectedOptionValue(this.$('.vjs-text-opacity > select'));\n const bgColor = getSelectedOptionValue(this.$('.vjs-bg-color > select'));\n const bgOpacity = getSelectedOptionValue(this.$('.vjs-bg-opacity > select'));\n const windowColor = getSelectedOptionValue(this.$('.window-color > select'));\n const windowOpacity = getSelectedOptionValue(this.$('.vjs-window-opacity > select'));\n const fontPercent = window['parseFloat'](getSelectedOptionValue(this.$('.vjs-font-percent > select')));\n\n let result = {\n 'backgroundOpacity': bgOpacity,\n 'textOpacity': textOpacity,\n 'windowOpacity': windowOpacity,\n 'edgeStyle': textEdge,\n 'fontFamily': fontFamily,\n 'color': fgColor,\n 'backgroundColor': bgColor,\n 'windowColor': windowColor,\n 'fontPercent': fontPercent\n };\n for (let name in result) {\n if (result[name] === '' || result[name] === 'none' || (name === 'fontPercent' && result[name] === 1.00)) {\n delete result[name];\n }\n }\n return result;\n }\n\n /**\n * Set texttrack settings\n * Settings are\n * .vjs-edge-style\n * .vjs-font-family\n * .vjs-fg-color\n * .vjs-text-opacity\n * .vjs-bg-color\n * .vjs-bg-opacity\n * .window-color\n * .vjs-window-opacity\n *\n * @param {Object} values Object with texttrack setting values\n * @method setValues\n */\n setValues(values) {\n setSelectedOption(this.$('.vjs-edge-style select'), values.edgeStyle);\n setSelectedOption(this.$('.vjs-font-family select'), values.fontFamily);\n setSelectedOption(this.$('.vjs-fg-color > select'), values.color);\n setSelectedOption(this.$('.vjs-text-opacity > select'), values.textOpacity);\n setSelectedOption(this.$('.vjs-bg-color > select'), values.backgroundColor);\n setSelectedOption(this.$('.vjs-bg-opacity > select'), values.backgroundOpacity);\n setSelectedOption(this.$('.window-color > select'), values.windowColor);\n setSelectedOption(this.$('.vjs-window-opacity > select'), values.windowOpacity);\n\n let fontPercent = values.fontPercent;\n\n if (fontPercent) {\n fontPercent = fontPercent.toFixed(2);\n }\n\n setSelectedOption(this.$('.vjs-font-percent > select'), fontPercent);\n }\n\n /**\n * Restore texttrack settings\n *\n * @method restoreSettings\n */\n restoreSettings() {\n let err, values;\n\n try {\n [err, values] = safeParseTuple(window.localStorage.getItem('vjs-text-track-settings'));\n\n if (err) {\n log.error(err);\n }\n } catch (e) {\n log.warn(e);\n }\n\n if (values) {\n this.setValues(values);\n }\n }\n\n /**\n * Save texttrack settings to local storage\n *\n * @method saveSettings\n */\n saveSettings() {\n if (!this.options_.persistTextTrackSettings) {\n return;\n }\n\n let values = this.getValues();\n try {\n if (Object.getOwnPropertyNames(values).length > 0) {\n window.localStorage.setItem('vjs-text-track-settings', JSON.stringify(values));\n } else {\n window.localStorage.removeItem('vjs-text-track-settings');\n }\n } catch (e) {\n log.warn(e);\n }\n }\n\n /**\n * Update display of texttrack settings\n *\n * @method updateDisplay\n */\n updateDisplay() {\n let ttDisplay = this.player_.getChild('textTrackDisplay');\n if (ttDisplay) {\n ttDisplay.updateDisplay();\n }\n }\n\n}\n\nComponent.registerComponent('TextTrackSettings', TextTrackSettings);\n\nfunction getSelectedOptionValue(target) {\n let selectedOption;\n // not all browsers support selectedOptions, so, fallback to options\n if (target.selectedOptions) {\n selectedOption = target.selectedOptions[0];\n } else if (target.options) {\n selectedOption = target.options[target.options.selectedIndex];\n }\n\n return selectedOption.value;\n}\n\nfunction setSelectedOption(target, value) {\n if (!value) {\n return;\n }\n\n let i;\n for (i = 0; i < target.options.length; i++) {\n const option = target.options[i];\n if (option.value === value) {\n break;\n }\n }\n\n target.selectedIndex = i;\n}\n\nfunction captionOptionsMenuTemplate() {\n let template = `<div class=\"vjs-tracksettings\">\n <div class=\"vjs-tracksettings-colors\">\n <div class=\"vjs-fg-color vjs-tracksetting\">\n <label class=\"vjs-label\">Foreground</label>\n <select>\n <option value=\"\">---</option>\n <option value=\"#FFF\">White</option>\n <option value=\"#000\">Black</option>\n <option value=\"#F00\">Red</option>\n <option value=\"#0F0\">Green</option>\n <option value=\"#00F\">Blue</option>\n <option value=\"#FF0\">Yellow</option>\n <option value=\"#F0F\">Magenta</option>\n <option value=\"#0FF\">Cyan</option>\n </select>\n <span class=\"vjs-text-opacity vjs-opacity\">\n <select>\n <option value=\"\">---</option>\n <option value=\"1\">Opaque</option>\n <option value=\"0.5\">Semi-Opaque</option>\n </select>\n </span>\n </div> <!-- vjs-fg-color -->\n <div class=\"vjs-bg-color vjs-tracksetting\">\n <label class=\"vjs-label\">Background</label>\n <select>\n <option value=\"\">---</option>\n <option value=\"#FFF\">White</option>\n <option value=\"#000\">Black</option>\n <option value=\"#F00\">Red</option>\n <option value=\"#0F0\">Green</option>\n <option value=\"#00F\">Blue</option>\n <option value=\"#FF0\">Yellow</option>\n <option value=\"#F0F\">Magenta</option>\n <option value=\"#0FF\">Cyan</option>\n </select>\n <span class=\"vjs-bg-opacity vjs-opacity\">\n <select>\n <option value=\"\">---</option>\n <option value=\"1\">Opaque</option>\n <option value=\"0.5\">Semi-Transparent</option>\n <option value=\"0\">Transparent</option>\n </select>\n </span>\n </div> <!-- vjs-bg-color -->\n <div class=\"window-color vjs-tracksetting\">\n <label class=\"vjs-label\">Window</label>\n <select>\n <option value=\"\">---</option>\n <option value=\"#FFF\">White</option>\n <option value=\"#000\">Black</option>\n <option value=\"#F00\">Red</option>\n <option value=\"#0F0\">Green</option>\n <option value=\"#00F\">Blue</option>\n <option value=\"#FF0\">Yellow</option>\n <option value=\"#F0F\">Magenta</option>\n <option value=\"#0FF\">Cyan</option>\n </select>\n <span class=\"vjs-window-opacity vjs-opacity\">\n <select>\n <option value=\"\">---</option>\n <option value=\"1\">Opaque</option>\n <option value=\"0.5\">Semi-Transparent</option>\n <option value=\"0\">Transparent</option>\n </select>\n </span>\n </div> <!-- vjs-window-color -->\n </div> <!-- vjs-tracksettings -->\n <div class=\"vjs-tracksettings-font\">\n <div class=\"vjs-font-percent vjs-tracksetting\">\n <label class=\"vjs-label\">Font Size</label>\n <select>\n <option value=\"0.50\">50%</option>\n <option value=\"0.75\">75%</option>\n <option value=\"1.00\" selected>100%</option>\n <option value=\"1.25\">125%</option>\n <option value=\"1.50\">150%</option>\n <option value=\"1.75\">175%</option>\n <option value=\"2.00\">200%</option>\n <option value=\"3.00\">300%</option>\n <option value=\"4.00\">400%</option>\n </select>\n </div> <!-- vjs-font-percent -->\n <div class=\"vjs-edge-style vjs-tracksetting\">\n <label class=\"vjs-label\">Text Edge Style</label>\n <select>\n <option value=\"none\">None</option>\n <option value=\"raised\">Raised</option>\n <option value=\"depressed\">Depressed</option>\n <option value=\"uniform\">Uniform</option>\n <option value=\"dropshadow\">Dropshadow</option>\n </select>\n </div> <!-- vjs-edge-style -->\n <div class=\"vjs-font-family vjs-tracksetting\">\n <label class=\"vjs-label\">Font Family</label>\n <select>\n <option value=\"\">Default</option>\n <option value=\"monospaceSerif\">Monospace Serif</option>\n <option value=\"proportionalSerif\">Proportional Serif</option>\n <option value=\"monospaceSansSerif\">Monospace Sans-Serif</option>\n <option value=\"proportionalSansSerif\">Proportional Sans-Serif</option>\n <option value=\"casual\">Casual</option>\n <option value=\"script\">Script</option>\n <option value=\"small-caps\">Small Caps</option>\n </select>\n </div> <!-- vjs-font-family -->\n </div>\n </div>\n <div class=\"vjs-tracksettings-controls\">\n <button class=\"vjs-default-button\">Defaults</button>\n <button class=\"vjs-done-button\">Done</button>\n </div>`;\n\n return template;\n}\n\nexport default TextTrackSettings;\n",
"/**\n * @file text-track.js\n */\nimport TextTrackCueList from './text-track-cue-list';\nimport * as Fn from '../utils/fn.js';\nimport * as Guid from '../utils/guid.js';\nimport * as browser from '../utils/browser.js';\nimport * as TextTrackEnum from './text-track-enums';\nimport log from '../utils/log.js';\nimport EventTarget from '../event-target';\nimport document from 'global/document';\nimport window from 'global/window';\nimport { isCrossOrigin } from '../utils/url.js';\nimport XHR from 'xhr';\n\n/**\n * takes a webvtt file contents and parses it into cues\n *\n * @param {String} srcContent webVTT file contents\n * @param {Track} track track to addcues to\n */\nconst parseCues = function(srcContent, track) {\n let parser = new window.WebVTT.Parser(window,\n window.vttjs,\n window.WebVTT.StringDecoder());\n\n parser.oncue = function(cue) {\n track.addCue(cue);\n };\n\n parser.onparsingerror = function(error) {\n log.error(error);\n };\n\n parser.onflush = function() {\n track.trigger({\n type: 'loadeddata',\n target: track\n });\n };\n\n parser.parse(srcContent);\n parser.flush();\n};\n\n\n/**\n * load a track from a specifed url\n *\n * @param {String} src url to load track from\n * @param {Track} track track to addcues to\n */\nconst loadTrack = function(src, track) {\n let opts = {\n uri: src\n };\n let crossOrigin = isCrossOrigin(src);\n\n if (crossOrigin) {\n opts.cors = crossOrigin;\n }\n\n XHR(opts, Fn.bind(this, function(err, response, responseBody) {\n if (err) {\n return log.error(err, response);\n }\n\n track.loaded_ = true;\n\n // Make sure that vttjs has loaded, otherwise, wait till it finished loading\n // NOTE: this is only used for the alt/video.novtt.js build\n if (typeof window.WebVTT !== 'function') {\n if (track.tech_) {\n let loadHandler = () => parseCues(responseBody, track);\n track.tech_.on('vttjsloaded', loadHandler);\n track.tech_.on('vttjserror', () => {\n log.error(`vttjs failed to load, stopping trying to process ${track.src}`);\n track.tech_.off('vttjsloaded', loadHandler);\n });\n\n }\n } else {\n parseCues(responseBody, track);\n }\n\n }));\n};\n\n/**\n * A single text track as defined in:\n * https://html.spec.whatwg.org/multipage/embedded-content.html#texttrack\n *\n * interface TextTrack : EventTarget {\n * readonly attribute TextTrackKind kind;\n * readonly attribute DOMString label;\n * readonly attribute DOMString language;\n *\n * readonly attribute DOMString id;\n * readonly attribute DOMString inBandMetadataTrackDispatchType;\n *\n * attribute TextTrackMode mode;\n *\n * readonly attribute TextTrackCueList? cues;\n * readonly attribute TextTrackCueList? activeCues;\n *\n * void addCue(TextTrackCue cue);\n * void removeCue(TextTrackCue cue);\n *\n * attribute EventHandler oncuechange;\n * };\n *\n * @param {Object=} options Object of option names and values\n * @extends EventTarget\n * @class TextTrack\n */\nclass TextTrack extends EventTarget {\n constructor(options = {}) {\n super();\n if (!options.tech) {\n throw new Error('A tech was not provided.');\n }\n\n let tt = this;\n\n if (browser.IS_IE8) {\n tt = document.createElement('custom');\n\n for (let prop in TextTrack.prototype) {\n if (prop !== 'constructor') {\n tt[prop] = TextTrack.prototype[prop];\n }\n }\n }\n\n tt.tech_ = options.tech;\n\n let mode = TextTrackEnum.TextTrackMode[options.mode] || 'disabled';\n let kind = TextTrackEnum.TextTrackKind[options.kind] || 'subtitles';\n let label = options.label || '';\n let language = options.language || options.srclang || '';\n let id = options.id || 'vjs_text_track_' + Guid.newGUID();\n\n if (kind === 'metadata' || kind === 'chapters') {\n mode = 'hidden';\n }\n\n tt.cues_ = [];\n tt.activeCues_ = [];\n\n let cues = new TextTrackCueList(tt.cues_);\n let activeCues = new TextTrackCueList(tt.activeCues_);\n let changed = false;\n let timeupdateHandler = Fn.bind(tt, function() {\n this.activeCues;\n if (changed) {\n this.trigger('cuechange');\n changed = false;\n }\n });\n\n if (mode !== 'disabled') {\n tt.tech_.on('timeupdate', timeupdateHandler);\n }\n\n Object.defineProperty(tt, 'kind', {\n get() {\n return kind;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'label', {\n get() {\n return label;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'language', {\n get() {\n return language;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'id', {\n get() {\n return id;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'mode', {\n get() {\n return mode;\n },\n set(newMode) {\n if (!TextTrackEnum.TextTrackMode[newMode]) {\n return;\n }\n mode = newMode;\n if (mode === 'showing') {\n this.tech_.on('timeupdate', timeupdateHandler);\n }\n this.trigger('modechange');\n }\n });\n\n Object.defineProperty(tt, 'cues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n return cues;\n },\n set() {}\n });\n\n Object.defineProperty(tt, 'activeCues', {\n get() {\n if (!this.loaded_) {\n return null;\n }\n\n // nothing to do\n if (this.cues.length === 0) {\n return activeCues;\n }\n\n let ct = this.tech_.currentTime();\n let active = [];\n\n for (let i = 0, l = this.cues.length; i < l; i++) {\n let cue = this.cues[i];\n\n if (cue.startTime <= ct && cue.endTime >= ct) {\n active.push(cue);\n } else if (cue.startTime === cue.endTime &&\n cue.startTime <= ct &&\n cue.startTime + 0.5 >= ct) {\n active.push(cue);\n }\n }\n\n changed = false;\n\n if (active.length !== this.activeCues_.length) {\n changed = true;\n } else {\n for (let i = 0; i < active.length; i++) {\n if (this.activeCues_.indexOf(active[i]) === -1) {\n changed = true;\n }\n }\n }\n\n this.activeCues_ = active;\n activeCues.setCues_(this.activeCues_);\n\n return activeCues;\n },\n set() {}\n });\n\n if (options.src) {\n tt.src = options.src;\n loadTrack(options.src, tt);\n } else {\n tt.loaded_ = true;\n }\n\n if (browser.IS_IE8) {\n return tt;\n }\n }\n\n /**\n * add a cue to the internal list of cues\n *\n * @param {Object} cue the cue to add to our internal list\n * @method addCue\n */\n addCue(cue) {\n let tracks = this.tech_.textTracks();\n\n if (tracks) {\n for (let i = 0; i < tracks.length; i++) {\n if (tracks[i] !== this) {\n tracks[i].removeCue(cue);\n }\n }\n }\n\n this.cues_.push(cue);\n this.cues.setCues_(this.cues_);\n }\n\n /**\n * remvoe a cue from our internal list\n *\n * @param {Object} removeCue the cue to remove from our internal list\n * @method removeCue\n */\n removeCue(removeCue) {\n let removed = false;\n\n for (let i = 0, l = this.cues_.length; i < l; i++) {\n let cue = this.cues_[i];\n\n if (cue === removeCue) {\n this.cues_.splice(i, 1);\n removed = true;\n }\n }\n\n if (removed) {\n this.cues.setCues_(this.cues_);\n }\n }\n}\n\n/**\n * cuechange - One or more cues in the track have become active or stopped being active.\n */\nTextTrack.prototype.allowedEvents_ = {\n cuechange: 'cuechange'\n};\n\nexport default TextTrack;\n",
"/**\n * @file browser.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\nconst USER_AGENT = window.navigator.userAgent;\nconst webkitVersionMap = (/AppleWebKit\\/([\\d.]+)/i).exec(USER_AGENT);\nconst appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\n\n/*\n * Device is an iPhone\n *\n * @type {Boolean}\n * @constant\n * @private\n */\nexport const IS_IPAD = (/iPad/i).test(USER_AGENT);\n\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\n// to identify iPhones, we need to exclude iPads.\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\nexport const IS_IPHONE = (/iPhone/i).test(USER_AGENT) && !IS_IPAD;\nexport const IS_IPOD = (/iPod/i).test(USER_AGENT);\nexport const IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\n\nexport const IOS_VERSION = (function(){\n var match = USER_AGENT.match(/OS (\\d+)_/i);\n if (match && match[1]) { return match[1]; }\n})();\n\nexport const IS_ANDROID = (/Android/i).test(USER_AGENT);\nexport const ANDROID_VERSION = (function() {\n // This matches Android Major.Minor.Patch versions\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\n var match = USER_AGENT.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i),\n major,\n minor;\n\n if (!match) {\n return null;\n }\n\n major = match[1] && parseFloat(match[1]);\n minor = match[2] && parseFloat(match[2]);\n\n if (major && minor) {\n return parseFloat(match[1] + '.' + match[2]);\n } else if (major) {\n return major;\n } else {\n return null;\n }\n})();\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\nexport const IS_OLD_ANDROID = IS_ANDROID && (/webkit/i).test(USER_AGENT) && ANDROID_VERSION < 2.3;\nexport const IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION < 5 && appleWebkitVersion < 537;\n\nexport const IS_FIREFOX = (/Firefox/i).test(USER_AGENT);\nexport const IS_CHROME = (/Chrome/i).test(USER_AGENT);\nexport const IS_IE8 = (/MSIE\\s8\\.0/).test(USER_AGENT);\n\nexport const TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);\nexport const BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in document.createElement('video').style;\n",
"/**\n * @file buffer.js\n */\nimport { createTimeRange } from './time-ranges.js';\n\n/**\n * Compute how much your video has been buffered\n *\n * @param {Object} Buffered object\n * @param {Number} Total duration\n * @return {Number} Percent buffered of the total duration\n * @private\n * @function bufferedPercent\n */\nexport function bufferedPercent(buffered, duration) {\n var bufferedDuration = 0,\n start, end;\n\n if (!duration) {\n return 0;\n }\n\n if (!buffered || !buffered.length) {\n buffered = createTimeRange(0, 0);\n }\n\n for (let i = 0; i < buffered.length; i++){\n start = buffered.start(i);\n end = buffered.end(i);\n\n // buffered end can be bigger than duration by a very small fraction\n if (end > duration) {\n end = duration;\n }\n\n bufferedDuration += end - start;\n }\n\n return bufferedDuration / duration;\n}\n",
"import log from './log.js';\n\n/**\n * Object containing the default behaviors for available handler methods.\n *\n * @private\n * @type {Object}\n */\nconst defaultBehaviors = {\n get(obj, key) {\n return obj[key];\n },\n set(obj, key, value) {\n obj[key] = value;\n return true;\n }\n};\n\n/**\n * Expose private objects publicly using a Proxy to log deprecation warnings.\n *\n * Browsers that do not support Proxy objects will simply return the `target`\n * object, so it can be directly exposed.\n *\n * @param {Object} target The target object.\n * @param {Object} messages Messages to display from a Proxy. Only operations\n * with an associated message will be proxied.\n * @param {String} [messages.get]\n * @param {String} [messages.set]\n * @return {Object} A Proxy if supported or the `target` argument.\n */\nexport default (target, messages={}) => {\n if (typeof Proxy === 'function') {\n let handler = {};\n\n // Build a handler object based on those keys that have both messages\n // and default behaviors.\n Object.keys(messages).forEach(key => {\n if (defaultBehaviors.hasOwnProperty(key)) {\n handler[key] = function() {\n log.warn(messages[key]);\n return defaultBehaviors[key].apply(this, arguments);\n };\n }\n });\n\n return new Proxy(target, handler);\n }\n return target;\n};\n",
"/**\n * @file dom.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\nimport * as Guid from './guid.js';\nimport log from './log.js';\nimport tsml from 'tsml';\n\n/**\n * Detect if a value is a string with any non-whitespace characters.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction isNonBlankString(str) {\n return typeof str === 'string' && /\\S/.test(str);\n}\n\n/**\n * Throws an error if the passed string has whitespace. This is used by\n * class methods to be relatively consistent with the classList API.\n *\n * @param {String} str\n * @return {Boolean}\n */\nfunction throwIfWhitespace(str) {\n if (/\\s/.test(str)) {\n throw new Error('class has illegal whitespace characters');\n }\n}\n\n/**\n * Produce a regular expression for matching a class name.\n *\n * @param {String} className\n * @return {RegExp}\n */\nfunction classRegExp(className) {\n return new RegExp('(^|\\\\s)' + className + '($|\\\\s)');\n}\n\n/**\n * Creates functions to query the DOM using a given method.\n *\n * @function createQuerier\n * @private\n * @param {String} method\n * @return {Function}\n */\nfunction createQuerier(method) {\n return function (selector, context) {\n if (!isNonBlankString(selector)) {\n return document[method](null);\n }\n if (isNonBlankString(context)) {\n context = document.querySelector(context);\n }\n return (isEl(context) ? context : document)[method](selector);\n };\n}\n\n/**\n * Shorthand for document.getElementById()\n * Also allows for CSS (jQuery) ID syntax. But nothing other than IDs.\n *\n * @param {String} id Element ID\n * @return {Element} Element with supplied ID\n * @function getEl\n */\nexport function getEl(id){\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n return document.getElementById(id);\n}\n\n/**\n * Creates an element and applies properties.\n *\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n * @function createEl\n */\nexport function createEl(tagName='div', properties={}, attributes={}){\n let el = document.createElement(tagName);\n\n Object.getOwnPropertyNames(properties).forEach(function(propName){\n let val = properties[propName];\n\n // See #2176\n // We originally were accepting both properties and attributes in the\n // same object, but that doesn't work so well.\n if (propName.indexOf('aria-') !== -1 || propName === 'role' || propName === 'type') {\n log.warn(tsml`Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set ${propName} to ${val}.`);\n el.setAttribute(propName, val);\n } else {\n el[propName] = val;\n }\n });\n\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let val = attributes[attrName];\n el.setAttribute(attrName, attributes[attrName]);\n });\n\n return el;\n}\n\n/**\n * Injects text into an element, replacing any existing contents entirely.\n *\n * @param {Element} el\n * @param {String} text\n * @return {Element}\n * @function textContent\n */\nexport function textContent(el, text) {\n if (typeof el.textContent === 'undefined') {\n el.innerText = text;\n } else {\n el.textContent = text;\n }\n}\n\n/**\n * Insert an element as the first child node of another\n *\n * @param {Element} child Element to insert\n * @param {Element} parent Element to insert child into\n * @private\n * @function insertElFirst\n */\nexport function insertElFirst(child, parent){\n if (parent.firstChild) {\n parent.insertBefore(child, parent.firstChild);\n } else {\n parent.appendChild(child);\n }\n}\n\n/**\n * Element Data Store. Allows for binding data to an element without putting it directly on the element.\n * Ex. Event listeners are stored here.\n * (also from jsninja.com, slightly modified and updated for closure compiler)\n *\n * @type {Object}\n * @private\n */\nconst elData = {};\n\n/*\n * Unique attribute name to store an element's guid in\n *\n * @type {String}\n * @constant\n * @private\n */\nconst elIdAttr = 'vdata' + (new Date()).getTime();\n\n/**\n * Returns the cache object where data for an element is stored\n *\n * @param {Element} el Element to store data for.\n * @return {Object}\n * @function getElData\n */\nexport function getElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n id = el[elIdAttr] = Guid.newGUID();\n }\n\n if (!elData[id]) {\n elData[id] = {};\n }\n\n return elData[id];\n}\n\n/**\n * Returns whether or not an element has cached data\n *\n * @param {Element} el A dom element\n * @return {Boolean}\n * @private\n * @function hasElData\n */\nexport function hasElData(el) {\n const id = el[elIdAttr];\n\n if (!id) {\n return false;\n }\n\n return !!Object.getOwnPropertyNames(elData[id]).length;\n}\n\n/**\n * Delete data for the element from the cache and the guid attr from getElementById\n *\n * @param {Element} el Remove data for an element\n * @private\n * @function removeElData\n */\nexport function removeElData(el) {\n let id = el[elIdAttr];\n\n if (!id) {\n return;\n }\n\n // Remove all stored data\n delete elData[id];\n\n // Remove the elIdAttr property from the DOM node\n try {\n delete el[elIdAttr];\n } catch(e) {\n if (el.removeAttribute) {\n el.removeAttribute(elIdAttr);\n } else {\n // IE doesn't appear to support removeAttribute on the document element\n el[elIdAttr] = null;\n }\n }\n}\n\n/**\n * Check if an element has a CSS class\n *\n * @function hasElClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nexport function hasElClass(element, classToCheck) {\n if (element.classList) {\n return element.classList.contains(classToCheck);\n } else {\n throwIfWhitespace(classToCheck);\n return classRegExp(classToCheck).test(element.className);\n }\n}\n\n/**\n * Add a CSS class name to an element\n *\n * @function addElClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nexport function addElClass(element, classToAdd) {\n if (element.classList) {\n element.classList.add(classToAdd);\n\n // Don't need to `throwIfWhitespace` here because `hasElClass` will do it\n // in the case of classList not being supported.\n } else if (!hasElClass(element, classToAdd)) {\n element.className = (element.className + ' ' + classToAdd).trim();\n }\n\n return element;\n}\n\n/**\n * Remove a CSS class name from an element\n *\n * @function removeElClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nexport function removeElClass(element, classToRemove) {\n if (element.classList) {\n element.classList.remove(classToRemove);\n } else {\n throwIfWhitespace(classToRemove);\n element.className = element.className.split(/\\s+/).filter(function(c) {\n return c !== classToRemove;\n }).join(' ');\n }\n\n return element;\n}\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @function toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nexport function toggleElClass(element, classToToggle, predicate) {\n\n // This CANNOT use `classList` internally because IE does not support the\n // second parameter to the `classList.toggle()` method! Which is fine because\n // `classList` will be used by the add/remove functions.\n let has = hasElClass(element, classToToggle);\n\n if (typeof predicate === 'function') {\n predicate = predicate(element, classToToggle);\n }\n\n if (typeof predicate !== 'boolean') {\n predicate = !has;\n }\n\n // If the necessary class operation matches the current state of the\n // element, no action is required.\n if (predicate === has) {\n return;\n }\n\n if (predicate) {\n addElClass(element, classToToggle);\n } else {\n removeElClass(element, classToToggle);\n }\n\n return element;\n}\n\n/**\n * Apply attributes to an HTML element.\n *\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n * @private\n * @function setElAttributes\n */\nexport function setElAttributes(el, attributes) {\n Object.getOwnPropertyNames(attributes).forEach(function(attrName){\n let attrValue = attributes[attrName];\n\n if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) {\n el.removeAttribute(attrName);\n } else {\n el.setAttribute(attrName, (attrValue === true ? '' : attrValue));\n }\n });\n}\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n * @private\n * @function getElAttributes\n */\nexport function getElAttributes(tag) {\n var obj, knownBooleans, attrs, attrName, attrVal;\n\n obj = {};\n\n // known boolean attributes\n // we can check for matching boolean properties, but older browsers\n // won't know about HTML5 boolean attributes that we still read from\n knownBooleans = ','+'autoplay,controls,loop,muted,default'+',';\n\n if (tag && tag.attributes && tag.attributes.length > 0) {\n attrs = tag.attributes;\n\n for (var i = attrs.length - 1; i >= 0; i--) {\n attrName = attrs[i].name;\n attrVal = attrs[i].value;\n\n // check for known booleans\n // the matching element property will return a value for typeof\n if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) {\n // the value of an included boolean attribute is typically an empty\n // string ('') which would equal false if we just check for a false value.\n // we also don't want support bad code like autoplay='false'\n attrVal = (attrVal !== null) ? true : false;\n }\n\n obj[attrName] = attrVal;\n }\n }\n\n return obj;\n}\n\n/**\n * Attempt to block the ability to select text while dragging controls\n *\n * @return {Boolean}\n * @function blockTextSelection\n */\nexport function blockTextSelection() {\n document.body.focus();\n document.onselectstart = function() {\n return false;\n };\n}\n\n/**\n * Turn off text selection blocking\n *\n * @return {Boolean}\n * @function unblockTextSelection\n */\nexport function unblockTextSelection() {\n document.onselectstart = function() {\n return true;\n };\n}\n\n/**\n * Offset Left\n * getBoundingClientRect technique from\n * John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/\n *\n * @function findElPosition\n * @param {Element} el Element from which to get offset\n * @return {Object}\n */\nexport function findElPosition(el) {\n let box;\n\n if (el.getBoundingClientRect && el.parentNode) {\n box = el.getBoundingClientRect();\n }\n\n if (!box) {\n return {\n left: 0,\n top: 0\n };\n }\n\n const docEl = document.documentElement;\n const body = document.body;\n\n const clientLeft = docEl.clientLeft || body.clientLeft || 0;\n const scrollLeft = window.pageXOffset || body.scrollLeft;\n const left = box.left + scrollLeft - clientLeft;\n\n const clientTop = docEl.clientTop || body.clientTop || 0;\n const scrollTop = window.pageYOffset || body.scrollTop;\n const top = box.top + scrollTop - clientTop;\n\n // Android sometimes returns slightly off decimal values, so need to round\n return {\n left: Math.round(left),\n top: Math.round(top)\n };\n}\n\n/**\n * Get pointer position in element\n * Returns an object with x and y coordinates.\n * The base on the coordinates are the bottom left of the element.\n *\n * @function getPointerPosition\n * @param {Element} el Element on which to get the pointer position on\n * @param {Event} event Event object\n * @return {Object} This object will have x and y coordinates corresponding to the mouse position\n */\nexport function getPointerPosition(el, event) {\n let position = {};\n let box = findElPosition(el);\n let boxW = el.offsetWidth;\n let boxH = el.offsetHeight;\n\n let boxY = box.top;\n let boxX = box.left;\n let pageY = event.pageY;\n let pageX = event.pageX;\n\n if (event.changedTouches) {\n pageX = event.changedTouches[0].pageX;\n pageY = event.changedTouches[0].pageY;\n }\n\n position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));\n position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));\n\n return position;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @function isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isEl(value) {\n return !!value && typeof value === 'object' && value.nodeType === 1;\n}\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @param {Mixed} value\n * @return {Boolean}\n */\nexport function isTextNode(value) {\n return !!value && typeof value === 'object' && value.nodeType === 3;\n}\n\n/**\n * Empties the contents of an element.\n *\n * @function emptyEl\n * @param {Element} el\n * @return {Element}\n */\nexport function emptyEl(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n return el;\n}\n\n/**\n * Normalizes content for eventual insertion into the DOM.\n *\n * This allows a wide range of content definition methods, but protects\n * from falling into the trap of simply writing to `innerHTML`, which is\n * an XSS concern.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @function normalizeContent\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Array}\n */\nexport function normalizeContent(content) {\n\n // First, invoke content if it is a function. If it produces an array,\n // that needs to happen before normalization.\n if (typeof content === 'function') {\n content = content();\n }\n\n // Next up, normalize to an array, so one or many items can be normalized,\n // filtered, and returned.\n return (Array.isArray(content) ? content : [content]).map(value => {\n\n // First, invoke value if it is a function to produce a new value,\n // which will be subsequently normalized to a Node of some kind.\n if (typeof value === 'function') {\n value = value();\n }\n\n if (isEl(value) || isTextNode(value)) {\n return value;\n }\n\n if (typeof value === 'string' && /\\S/.test(value)) {\n return document.createTextNode(value);\n }\n }).filter(value => value);\n}\n\n/**\n * Normalizes and appends content to an element.\n *\n * @function appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function appendContent(el, content) {\n normalizeContent(content).forEach(node => el.appendChild(node));\n return el;\n}\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * @function insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * See: `normalizeContent`\n * @return {Element}\n */\nexport function insertContent(el, content) {\n return appendContent(emptyEl(el), content);\n}\n\n/**\n * Finds a single DOM element matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelector`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {Element|null}\n */\nexport const $ = createQuerier('querySelector');\n\n/**\n * Finds a all DOM elements matching `selector` within the optional\n * `context` of another DOM element (defaulting to `document`).\n *\n * @function $$\n * @param {String} selector\n * A valid CSS selector, which will be passed to `querySelectorAll`.\n *\n * @param {Element|String} [context=document]\n * A DOM element within which to query. Can also be a selector\n * string in which case the first matching element will be used\n * as context. If missing (or no element matches selector), falls\n * back to `document`.\n *\n * @return {NodeList}\n */\nexport const $$ = createQuerier('querySelectorAll');\n",
"/**\n * @file events.js\n *\n * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)\n * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)\n * This should work very similarly to jQuery's events, however it's based off the book version which isn't as\n * robust as jquery's, so there's probably some differences.\n */\n\nimport * as Dom from './dom.js';\nimport * as Guid from './guid.js';\nimport window from 'global/window';\nimport document from 'global/document';\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nexport function on(elem, type, fn){\n if (Array.isArray(type)) {\n return _handleMultipleEvents(on, elem, type, fn);\n }\n\n let data = Dom.getElData(elem);\n\n // We need a place to store all our handler data\n if (!data.handlers) data.handlers = {};\n\n if (!data.handlers[type]) data.handlers[type] = [];\n\n if (!fn.guid) fn.guid = Guid.newGUID();\n\n data.handlers[type].push(fn);\n\n if (!data.dispatcher) {\n data.disabled = false;\n\n data.dispatcher = function (event, hash){\n\n if (data.disabled) return;\n event = fixEvent(event);\n\n var handlers = data.handlers[event.type];\n\n if (handlers) {\n // Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.\n var handlersCopy = handlers.slice(0);\n\n for (var m = 0, n = handlersCopy.length; m < n; m++) {\n if (event.isImmediatePropagationStopped()) {\n break;\n } else {\n handlersCopy[m].call(elem, event, hash);\n }\n }\n }\n };\n }\n\n if (data.handlers[type].length === 1) {\n if (elem.addEventListener) {\n elem.addEventListener(type, data.dispatcher, false);\n } else if (elem.attachEvent) {\n elem.attachEvent('on' + type, data.dispatcher);\n }\n }\n}\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nexport function off(elem, type, fn) {\n // Don't want to add a cache object through getElData if not needed\n if (!Dom.hasElData(elem)) return;\n\n let data = Dom.getElData(elem);\n\n // If no events exist, nothing to unbind\n if (!data.handlers) { return; }\n\n if (Array.isArray(type)) {\n return _handleMultipleEvents(off, elem, type, fn);\n }\n\n // Utility function\n var removeType = function(t){\n data.handlers[t] = [];\n _cleanUpEvents(elem,t);\n };\n\n // Are we removing all bound events?\n if (!type) {\n for (let t in data.handlers) removeType(t);\n return;\n }\n\n var handlers = data.handlers[type];\n\n // If no handlers exist, nothing to unbind\n if (!handlers) return;\n\n // If no listener was provided, remove all listeners for type\n if (!fn) {\n removeType(type);\n return;\n }\n\n // We're only removing a single handler\n if (fn.guid) {\n for (let n = 0; n < handlers.length; n++) {\n if (handlers[n].guid === fn.guid) {\n handlers.splice(n--, 1);\n }\n }\n }\n\n _cleanUpEvents(elem, type);\n}\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nexport function trigger(elem, event, hash) {\n // Fetches element data and a reference to the parent (for bubbling).\n // Don't want to add a data object to cache for every parent,\n // so checking hasElData first.\n var elemData = (Dom.hasElData(elem)) ? Dom.getElData(elem) : {};\n var parent = elem.parentNode || elem.ownerDocument;\n // type = event.type || event,\n // handler;\n\n // If an event name was passed as a string, creates an event out of it\n if (typeof event === 'string') {\n event = { type:event, target:elem };\n }\n // Normalizes the event properties.\n event = fixEvent(event);\n\n // If the passed element has a dispatcher, executes the established handlers.\n if (elemData.dispatcher) {\n elemData.dispatcher.call(elem, event, hash);\n }\n\n // Unless explicitly stopped or the event does not bubble (e.g. media events)\n // recursively calls this function to bubble the event up the DOM.\n if (parent && !event.isPropagationStopped() && event.bubbles === true) {\n trigger.call(null, parent, event, hash);\n\n // If at the top of the DOM, triggers the default action unless disabled.\n } else if (!parent && !event.defaultPrevented) {\n var targetData = Dom.getElData(event.target);\n\n // Checks if the target has a default action for this event.\n if (event.target[event.type]) {\n // Temporarily disables event dispatching on the target as we have already executed the handler.\n targetData.disabled = true;\n // Executes the default action.\n if (typeof event.target[event.type] === 'function') {\n event.target[event.type]();\n }\n // Re-enables event dispatching.\n targetData.disabled = false;\n }\n }\n\n // Inform the triggerer if the default was prevented by returning false\n return !event.defaultPrevented;\n}\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nexport function one(elem, type, fn) {\n if (Array.isArray(type)) {\n return _handleMultipleEvents(one, elem, type, fn);\n }\n var func = function(){\n off(elem, type, func);\n fn.apply(this, arguments);\n };\n // copy the guid to the new function so it can removed using the original function's ID\n func.guid = fn.guid = fn.guid || Guid.newGUID();\n on(elem, type, func);\n}\n\n/**\n * Fix a native event to have standard property values\n *\n * @param {Object} event Event object to fix\n * @return {Object}\n * @private\n * @method fixEvent\n */\nexport function fixEvent(event) {\n\n function returnTrue() { return true; }\n function returnFalse() { return false; }\n\n // Test if fixing up is needed\n // Used to check if !event.stopPropagation instead of isPropagationStopped\n // But native events return true for stopPropagation, but don't have\n // other expected methods like isPropagationStopped. Seems to be a problem\n // with the Javascript Ninja code. So we're just overriding all events now.\n if (!event || !event.isPropagationStopped) {\n var old = event || window.event;\n\n event = {};\n // Clone the old object so that we can modify the values event = {};\n // IE8 Doesn't like when you mess with native event properties\n // Firefox returns false for event.hasOwnProperty('type') and other props\n // which makes copying more difficult.\n // TODO: Probably best to create a whitelist of event props\n for (var key in old) {\n // Safari 6.0.3 warns you if you try to copy deprecated layerX/Y\n // Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation\n // and webkitMovementX/Y\n if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&\n key !== 'webkitMovementX' && key !== 'webkitMovementY') {\n // Chrome 32+ warns if you try to copy deprecated returnValue, but\n // we still want to if preventDefault isn't supported (IE8).\n if (!(key === 'returnValue' && old.preventDefault)) {\n event[key] = old[key];\n }\n }\n }\n\n // The event occurred on this element\n if (!event.target) {\n event.target = event.srcElement || document;\n }\n\n // Handle which other element the event is related to\n if (!event.relatedTarget) {\n event.relatedTarget = event.fromElement === event.target ?\n event.toElement :\n event.fromElement;\n }\n\n // Stop the default browser action\n event.preventDefault = function () {\n if (old.preventDefault) {\n old.preventDefault();\n }\n event.returnValue = false;\n old.returnValue = false;\n event.defaultPrevented = true;\n };\n\n event.defaultPrevented = false;\n\n // Stop the event from bubbling\n event.stopPropagation = function () {\n if (old.stopPropagation) {\n old.stopPropagation();\n }\n event.cancelBubble = true;\n old.cancelBubble = true;\n event.isPropagationStopped = returnTrue;\n };\n\n event.isPropagationStopped = returnFalse;\n\n // Stop the event from bubbling and executing other handlers\n event.stopImmediatePropagation = function () {\n if (old.stopImmediatePropagation) {\n old.stopImmediatePropagation();\n }\n event.isImmediatePropagationStopped = returnTrue;\n event.stopPropagation();\n };\n\n event.isImmediatePropagationStopped = returnFalse;\n\n // Handle mouse position\n if (event.clientX != null) {\n var doc = document.documentElement, body = document.body;\n\n event.pageX = event.clientX +\n (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\n (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = event.clientY +\n (doc && doc.scrollTop || body && body.scrollTop || 0) -\n (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // Handle key presses\n event.which = event.charCode || event.keyCode;\n\n // Fix button for mouse clicks:\n // 0 == left; 1 == middle; 2 == right\n if (event.button != null) {\n event.button = (event.button & 1 ? 0 :\n (event.button & 4 ? 1 :\n (event.button & 2 ? 2 : 0)));\n }\n }\n\n // Returns fixed-up instance\n return event;\n}\n\n/**\n * Clean up the listener cache and dispatchers\n*\n * @param {Element|Object} elem Element to clean up\n * @param {String} type Type of event to clean up\n * @private\n * @method _cleanUpEvents\n */\nfunction _cleanUpEvents(elem, type) {\n var data = Dom.getElData(elem);\n\n // Remove the events of a particular type if there are none left\n if (data.handlers[type].length === 0) {\n delete data.handlers[type];\n // data.handlers[type] = null;\n // Setting to null was causing an error with data.handlers\n\n // Remove the meta-handler from the element\n if (elem.removeEventListener) {\n elem.removeEventListener(type, data.dispatcher, false);\n } else if (elem.detachEvent) {\n elem.detachEvent('on' + type, data.dispatcher);\n }\n }\n\n // Remove the events object if there are no types left\n if (Object.getOwnPropertyNames(data.handlers).length <= 0) {\n delete data.handlers;\n delete data.dispatcher;\n delete data.disabled;\n }\n\n // Finally remove the element data if there is no data left\n if (Object.getOwnPropertyNames(data).length === 0) {\n Dom.removeElData(elem);\n }\n}\n\n/**\n * Loops through an array of event types and calls the requested method for each type.\n *\n * @param {Function} fn The event method we want to use.\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String} type Type of event to bind to.\n * @param {Function} callback Event listener.\n * @private\n * @function _handleMultipleEvents\n */\nfunction _handleMultipleEvents(fn, elem, types, callback) {\n types.forEach(function(type) {\n //Call the event method for each one of the types\n fn(elem, type, callback);\n });\n}\n",
"/**\n * @file fn.js\n */\nimport { newGUID } from './guid.js';\n\n/**\n * Bind (a.k.a proxy or Context). A simple method for changing the context of a function\n * It also stores a unique id on the function so it can be easily removed from events\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n * @private\n * @method bind\n */\nexport const bind = function(context, fn, uid) {\n // Make sure the function has a unique ID\n if (!fn.guid) { fn.guid = newGUID(); }\n\n // Create the new function that changes the context\n let ret = function() {\n return fn.apply(context, arguments);\n };\n\n // Allow for the ability to individualize this function\n // Needed in the case where multiple objects might share the same prototype\n // IF both items add an event listener with the same function, then you try to remove just one\n // it will remove both because they both have the same guid.\n // when using this, you need to use the bind method when you remove the listener as well.\n // currently used in text tracks\n ret.guid = (uid) ? uid + '_' + fn.guid : fn.guid;\n\n return ret;\n};\n",
"/**\n * @file format-time.js\n *\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @private\n * @function formatTime\n */\nfunction formatTime(seconds, guide=seconds) {\n seconds = seconds < 0 ? 0 : seconds;\n let s = Math.floor(seconds % 60);\n let m = Math.floor(seconds / 60 % 60);\n let h = Math.floor(seconds / 3600);\n const gm = Math.floor(guide / 60 % 60);\n const gh = Math.floor(guide / 3600);\n\n // handle invalid times\n if (isNaN(seconds) || seconds === Infinity) {\n // '-' is false for all relational operators (e.g. <, >=) so this setting\n // will add the minimum number of fields specified by the guide\n h = m = s = '-';\n }\n\n // Check if we need to show hours\n h = (h > 0 || gh > 0) ? h + ':' : '';\n\n // If hours are showing, we may need to add a leading zero.\n // Always show at least one digit of minutes.\n m = (((h || gm >= 10) && m < 10) ? '0' + m : m) + ':';\n\n // Check if leading zero is need for seconds\n s = (s < 10) ? '0' + s : s;\n\n return h + m + s;\n}\n\nexport default formatTime;\n",
"/**\n * @file guid.js\n *\n * Unique ID for an element or function\n * @type {Number}\n * @private\n */\nlet _guid = 1;\n\n/**\n * Get the next unique ID\n *\n * @return {String} \n * @function newGUID\n */\nexport function newGUID() {\n return _guid++;\n}\n",
"/**\n * @file log.js\n */\nimport window from 'global/window';\n\n/**\n * Log plain debug messages\n */\nconst log = function(){\n _logType(null, arguments);\n};\n\n/**\n * Keep a history of log messages\n * @type {Array}\n */\nlog.history = [];\n\n/**\n * Log error messages\n */\nlog.error = function(){\n _logType('error', arguments);\n};\n\n/**\n * Log warning messages\n */\nlog.warn = function(){\n _logType('warn', arguments);\n};\n\n/**\n * Log messages to the console and history based on the type of message\n *\n * @param {String} type The type of message, or `null` for `log`\n * @param {Object} args The args to be passed to the log\n * @private\n * @method _logType\n */\nfunction _logType(type, args){\n // convert args to an array to get array functions\n let argsArray = Array.prototype.slice.call(args);\n // if there's no console then don't try to output messages\n // they will still be stored in log.history\n // Was setting these once outside of this function, but containing them\n // in the function makes it easier to test cases where console doesn't exist\n let noop = function(){};\n\n let console = window['console'] || {\n 'log': noop,\n 'warn': noop,\n 'error': noop\n };\n\n if (type) {\n // add the type to the front of the message\n argsArray.unshift(type.toUpperCase()+':');\n } else {\n // default to log with no prefix\n type = 'log';\n }\n\n // add to history\n log.history.push(argsArray);\n\n // add console prefix after adding to history\n argsArray.unshift('VIDEOJS:');\n\n // call appropriate log function\n if (console[type].apply) {\n console[type].apply(console, argsArray);\n } else {\n // ie8 doesn't allow error.apply, but it will just join() the array anyway\n console[type](argsArray.join(' '));\n }\n}\n\nexport default log;\n",
"/**\n * @file merge-options.js\n */\nimport merge from 'lodash-compat/object/merge';\n\nfunction isPlain(obj) {\n return !!obj\n && typeof obj === 'object'\n && obj.toString() === '[object Object]'\n && obj.constructor === Object;\n}\n\n/**\n * Merge customizer. video.js simply overwrites non-simple objects\n * (like arrays) instead of attempting to overlay them.\n * @see https://lodash.com/docs#merge\n */\nconst customizer = function(destination, source) {\n // If we're not working with a plain object, copy the value as is\n // If source is an array, for instance, it will replace destination\n if (!isPlain(source)) {\n return source;\n }\n\n // If the new value is a plain object but the first object value is not\n // we need to create a new object for the first object to merge with.\n // This makes it consistent with how merge() works by default\n // and also protects from later changes the to first object affecting\n // the second object's values.\n if (!isPlain(destination)) {\n return mergeOptions(source);\n }\n};\n\n/**\n * Merge one or more options objects, recursively merging **only**\n * plain object properties. Previously `deepMerge`.\n *\n * @param {...Object} source One or more objects to merge\n * @returns {Object} a new object that is the union of all\n * provided objects\n * @function mergeOptions\n */\nexport default function mergeOptions() {\n // contruct the call dynamically to handle the variable number of\n // objects to merge\n let args = Array.prototype.slice.call(arguments);\n\n // unshift an empty object into the front of the call as the target\n // of the merge\n args.unshift({});\n\n // customize conflict resolution to match our historical merge behavior\n args.push(customizer);\n\n merge.apply(null, args);\n\n // return the mutated result object\n return args[0];\n}\n",
"import document from 'global/document';\n\nexport let createStyleElement = function(className) {\n let style = document.createElement('style');\n style.className = className;\n\n return style;\n};\n\nexport let setTextContent = function(el, content) {\n if (el.styleSheet) {\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n }\n};\n",
"import log from './log.js';\n\n/**\n * @file time-ranges.js\n *\n * Should create a fake TimeRange object\n * Mimics an HTML5 time range instance, which has functions that\n * return the start and end times for a range\n * TimeRanges are returned by the buffered() method\n *\n * @param {(Number|Array)} Start of a single range or an array of ranges\n * @param {Number} End of a single range\n * @private\n * @method createTimeRanges\n */\nexport function createTimeRanges(start, end){\n if (Array.isArray(start)) {\n return createTimeRangesObj(start);\n } else if (start === undefined || end === undefined) {\n return createTimeRangesObj();\n }\n return createTimeRangesObj([[start, end]]);\n}\n\nexport { createTimeRanges as createTimeRange };\n\nfunction createTimeRangesObj(ranges){\n if (ranges === undefined || ranges.length === 0) {\n return {\n length: 0,\n start: function() {\n throw new Error('This TimeRanges object is empty');\n },\n end: function() {\n throw new Error('This TimeRanges object is empty');\n }\n };\n }\n return {\n length: ranges.length,\n start: getRange.bind(null, 'start', 0, ranges),\n end: getRange.bind(null, 'end', 1, ranges)\n };\n}\n\nfunction getRange(fnName, valueIndex, ranges, rangeIndex){\n if (rangeIndex === undefined) {\n log.warn(`DEPRECATED: Function '${fnName}' on 'TimeRanges' called without an index argument.`);\n rangeIndex = 0;\n }\n rangeCheck(fnName, rangeIndex, ranges.length - 1);\n return ranges[rangeIndex][valueIndex];\n}\n\nfunction rangeCheck(fnName, index, maxIndex){\n if (index < 0 || index > maxIndex) {\n throw new Error(`Failed to execute '${fnName}' on 'TimeRanges': The index provided (${index}) is greater than or equal to the maximum bound (${maxIndex}).`);\n }\n}\n",
"/**\n * @file to-title-case.js\n *\n * Uppercase the first letter of a string\n *\n * @param {String} string String to be uppercased\n * @return {String}\n * @private\n * @method toTitleCase\n */\nfunction toTitleCase(string){\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport default toTitleCase;\n",
"/**\n * @file url.js\n */\nimport document from 'global/document';\nimport window from 'global/window';\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nexport const parseUrl = function(url) {\n const props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host'];\n\n // add the url to an anchor and let the browser parse the URL\n let a = document.createElement('a');\n a.href = url;\n\n // IE8 (and 9?) Fix\n // ie8 doesn't parse the URL correctly until the anchor is actually\n // added to the body, and an innerHTML is needed to trigger the parsing\n let addToBody = (a.host === '' && a.protocol !== 'file:');\n let div;\n if (addToBody) {\n div = document.createElement('div');\n div.innerHTML = `<a href=\"${url}\"></a>`;\n a = div.firstChild;\n // prevent the div from affecting layout\n div.setAttribute('style', 'display:none; position:absolute;');\n document.body.appendChild(div);\n }\n\n // Copy the specific URL properties to a new object\n // This is also needed for IE8 because the anchor loses its\n // properties when it's removed from the dom\n let details = {};\n for (var i = 0; i < props.length; i++) {\n details[props[i]] = a[props[i]];\n }\n\n // IE9 adds the port to the host property unlike everyone else. If\n // a port identifier is added for standard ports, strip it.\n if (details.protocol === 'http:') {\n details.host = details.host.replace(/:80$/, '');\n }\n if (details.protocol === 'https:') {\n details.host = details.host.replace(/:443$/, '');\n }\n\n if (addToBody) {\n document.body.removeChild(div);\n }\n\n return details;\n};\n\n/**\n * Get absolute version of relative URL. Used to tell flash correct URL.\n * http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n *\n * @param {String} url URL to make absolute\n * @return {String} Absolute URL\n * @private\n * @method getAbsoluteURL\n */\nexport const getAbsoluteURL = function(url){\n // Check if absolute URL\n if (!url.match(/^https?:\\/\\//)) {\n // Convert to absolute URL. Flash hosted off-site needs an absolute URL.\n let div = document.createElement('div');\n div.innerHTML = `<a href=\"${url}\">x</a>`;\n url = div.firstChild.href;\n }\n\n return url;\n};\n\n/**\n * Returns the extension of the passed file name. It will return an empty string if you pass an invalid path\n *\n * @param {String} path The fileName path like '/path/to/file.mp4'\n * @returns {String} The extension in lower case or an empty string if no extension could be found.\n * @method getFileExtension\n */\nexport const getFileExtension = function(path) {\n if(typeof path === 'string'){\n let splitPathRe = /^(\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?)(\\.([^\\.\\/\\?]+)))(?:[\\/]*|[\\?].*)$/i;\n let pathParts = splitPathRe.exec(path);\n\n if (pathParts) {\n return pathParts.pop().toLowerCase();\n }\n }\n\n return '';\n};\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nexport const isCrossOrigin = function(url) {\n let winLoc = window.location;\n let urlInfo = parseUrl(url);\n\n // IE8 protocol relative urls will return ':' for protocol\n let srcProtocol = urlInfo.protocol === ':' ? winLoc.protocol : urlInfo.protocol;\n\n // Check if url is for another domain/origin\n // IE8 doesn't know location.origin, so we won't rely on it here\n let crossOrigin = (srcProtocol + urlInfo.host) !== (winLoc.protocol + winLoc.host);\n\n return crossOrigin;\n};\n",
"/**\n * @file video.js\n */\nimport document from 'global/document';\nimport * as setup from './setup';\nimport * as stylesheet from './utils/stylesheet.js';\nimport Component from './component';\nimport EventTarget from './event-target';\nimport * as Events from './utils/events.js';\nimport Player from './player';\nimport plugin from './plugins.js';\nimport mergeOptions from '../../src/js/utils/merge-options.js';\nimport * as Fn from './utils/fn.js';\nimport TextTrack from './tracks/text-track.js';\n\nimport assign from 'object.assign';\nimport { createTimeRanges } from './utils/time-ranges.js';\nimport formatTime from './utils/format-time.js';\nimport log from './utils/log.js';\nimport * as Dom from './utils/dom.js';\nimport * as browser from './utils/browser.js';\nimport * as Url from './utils/url.js';\nimport extendFn from './extend.js';\nimport merge from 'lodash-compat/object/merge';\nimport createDeprecationProxy from './utils/create-deprecation-proxy.js';\nimport xhr from 'xhr';\n\n// Include the built-in techs\nimport Tech from './tech/tech.js';\nimport Html5 from './tech/html5.js';\nimport Flash from './tech/flash.js';\n\n// HTML5 Element Shim for IE8\nif (typeof HTMLVideoElement === 'undefined') {\n document.createElement('video');\n document.createElement('audio');\n document.createElement('track');\n}\n\n/**\n * Doubles as the main function for users to create a player instance and also\n * the main library object.\n * The `videojs` function can be used to initialize or retrieve a player.\n * ```js\n * var myPlayer = videojs('my_video_id');\n * ```\n *\n * @param {String|Element} id Video element or video element ID\n * @param {Object=} options Optional options object for config/settings\n * @param {Function=} ready Optional ready callback\n * @return {Player} A player instance\n * @mixes videojs\n * @method videojs\n */\nlet videojs = function(id, options, ready){\n let tag; // Element of ID\n\n // Allow for element or ID to be passed in\n // String ID\n if (typeof id === 'string') {\n\n // Adjust for jQuery ID syntax\n if (id.indexOf('#') === 0) {\n id = id.slice(1);\n }\n\n // If a player instance has already been created for this ID return it.\n if (videojs.getPlayers()[id]) {\n\n // If options or ready funtion are passed, warn\n if (options) {\n log.warn(`Player \"${id}\" is already initialised. Options will not be applied.`);\n }\n\n if (ready) {\n videojs.getPlayers()[id].ready(ready);\n }\n\n return videojs.getPlayers()[id];\n\n // Otherwise get element for ID\n } else {\n tag = Dom.getEl(id);\n }\n\n // ID is a media element\n } else {\n tag = id;\n }\n\n // Check for a useable element\n if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also\n throw new TypeError('The element or ID supplied is not valid. (videojs)'); // Returns\n }\n\n // Element may have a player attr referring to an already created player instance.\n // If not, set up a new player and return the instance.\n return tag['player'] || Player.players[tag.playerId] || new Player(tag, options, ready);\n};\n\n// Add default styles\nlet style = Dom.$('.vjs-styles-defaults');\nif (!style) {\n style = stylesheet.createStyleElement('vjs-styles-defaults');\n let head = Dom.$('head');\n head.insertBefore(style, head.firstChild);\n stylesheet.setTextContent(style, `\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n `);\n}\n\n// Run Auto-load players\n// You have to wait at least once in case this script is loaded after your video in the DOM (weird behavior only with minified version)\nsetup.autoSetupTimeout(1, videojs);\n\n/*\n * Current software version (semver)\n *\n * @type {String}\n */\nvideojs.VERSION = '__VERSION__';\n\n/**\n * The global options object. These are the settings that take effect\n * if no overrides are specified when the player is created.\n *\n * ```js\n * videojs.options.autoplay = true\n * // -> all players will autoplay by default\n * ```\n *\n * @type {Object}\n */\nvideojs.options = Player.prototype.options_;\n\n/**\n * Get an object with the currently created players, keyed by player ID\n *\n * @return {Object} The created players\n * @mixes videojs\n * @method getPlayers\n */\nvideojs.getPlayers = function() {\n return Player.players;\n};\n\n/**\n * For backward compatibility, expose players object.\n *\n * @deprecated\n * @memberOf videojs\n * @property {Object|Proxy} players\n */\nvideojs.players = createDeprecationProxy(Player.players, {\n get: 'Access to videojs.players is deprecated; use videojs.getPlayers instead',\n set: 'Modification of videojs.players is deprecated'\n});\n\n/**\n * Get a component class object by name\n * ```js\n * var VjsButton = videojs.getComponent('Button');\n * // Create a new instance of the component\n * var myButton = new VjsButton(myPlayer);\n * ```\n *\n * @return {Component} Component identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getComponent = Component.getComponent;\n\n/**\n * Register a component so it can referred to by name\n * Used when adding to other\n * components, either through addChild\n * `component.addChild('myComponent')`\n * or through default children options\n * `{ children: ['myComponent'] }`.\n * ```js\n * // Get a component to subclass\n * var VjsButton = videojs.getComponent('Button');\n * // Subclass the component (see 'extend' doc for more info)\n * var MySpecialButton = videojs.extend(VjsButton, {});\n * // Register the new component\n * VjsButton.registerComponent('MySepcialButton', MySepcialButton);\n * // (optionally) add the new component as a default player child\n * myPlayer.addChild('MySepcialButton');\n * ```\n * NOTE: You could also just initialize the component before adding.\n * `component.addChild(new MyComponent());`\n *\n * @param {String} The class name of the component\n * @param {Component} The component class\n * @return {Component} The newly registered component\n * @mixes videojs\n * @method registerComponent\n */\nvideojs.registerComponent = (name, comp) => {\n if (Tech.isTech(comp)) {\n log.warn(`The ${name} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`);\n }\n\n Component.registerComponent.call(Component, name, comp);\n};\n\n/**\n * Get a Tech class object by name\n * ```js\n * var Html5 = videojs.getTech('Html5');\n * // Create a new instance of the component\n * var html5 = new Html5(options);\n * ```\n *\n * @return {Tech} Tech identified by name\n * @mixes videojs\n * @method getComponent\n */\nvideojs.getTech = Tech.getTech;\n\n/**\n * Register a Tech so it can referred to by name.\n * This is used in the tech order for the player.\n *\n * ```js\n * // get the Html5 Tech\n * var Html5 = videojs.getTech('Html5');\n * var MyTech = videojs.extend(Html5, {});\n * // Register the new Tech\n * VjsButton.registerTech('Tech', MyTech);\n * var player = videojs('myplayer', {\n * techOrder: ['myTech', 'html5']\n * });\n * ```\n *\n * @param {String} The class name of the tech\n * @param {Tech} The tech class\n * @return {Tech} The newly registered Tech\n * @mixes videojs\n * @method registerTech\n */\nvideojs.registerTech = Tech.registerTech;\n\n/**\n * A suite of browser and device tests\n *\n * @type {Object}\n * @private\n */\nvideojs.browser = browser;\n\n/**\n * Whether or not the browser supports touch events. Included for backward\n * compatibility with 4.x, but deprecated. Use `videojs.browser.TOUCH_ENABLED`\n * instead going forward.\n *\n * @deprecated\n * @type {Boolean}\n */\nvideojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;\n\n/**\n * Subclass an existing class\n * Mimics ES6 subclassing with the `extend` keyword\n * ```js\n * // Create a basic javascript 'class'\n * function MyClass(name){\n * // Set a property at initialization\n * this.myName = name;\n * }\n * // Create an instance method\n * MyClass.prototype.sayMyName = function(){\n * alert(this.myName);\n * };\n * // Subclass the exisitng class and change the name\n * // when initializing\n * var MySubClass = videojs.extend(MyClass, {\n * constructor: function(name) {\n * // Call the super class constructor for the subclass\n * MyClass.call(this, name)\n * }\n * });\n * // Create an instance of the new sub class\n * var myInstance = new MySubClass('John');\n * myInstance.sayMyName(); // -> should alert \"John\"\n * ```\n *\n * @param {Function} The Class to subclass\n * @param {Object} An object including instace methods for the new class\n * Optionally including a `constructor` function\n * @return {Function} The newly created subclass\n * @mixes videojs\n * @method extend\n */\nvideojs.extend = extendFn;\n\n/**\n * Merge two options objects recursively\n * Performs a deep merge like lodash.merge but **only merges plain objects**\n * (not arrays, elements, anything else)\n * Other values will be copied directly from the second object.\n * ```js\n * var defaultOptions = {\n * foo: true,\n * bar: {\n * a: true,\n * b: [1,2,3]\n * }\n * };\n * var newOptions = {\n * foo: false,\n * bar: {\n * b: [4,5,6]\n * }\n * };\n * var result = videojs.mergeOptions(defaultOptions, newOptions);\n * // result.foo = false;\n * // result.bar.a = true;\n * // result.bar.b = [4,5,6];\n * ```\n *\n * @param {Object} defaults The options object whose values will be overriden\n * @param {Object} overrides The options object with values to override the first\n * @param {Object} etc Any number of additional options objects\n *\n * @return {Object} a new object with the merged values\n * @mixes videojs\n * @method mergeOptions\n */\nvideojs.mergeOptions = mergeOptions;\n\n/**\n * Change the context (this) of a function\n *\n * videojs.bind(newContext, function(){\n * this === newContext\n * });\n *\n * NOTE: as of v5.0 we require an ES5 shim, so you should use the native\n * `function(){}.bind(newContext);` instead of this.\n *\n * @param {*} context The object to bind as scope\n * @param {Function} fn The function to be bound to a scope\n * @param {Number=} uid An optional unique ID for the function to be set\n * @return {Function}\n */\nvideojs.bind = Fn.bind;\n\n/**\n * Create a Video.js player plugin\n * Plugins are only initialized when options for the plugin are included\n * in the player options, or the plugin function on the player instance is\n * called.\n * **See the plugin guide in the docs for a more detailed example**\n * ```js\n * // Make a plugin that alerts when the player plays\n * videojs.plugin('myPlugin', function(myPluginOptions) {\n * myPluginOptions = myPluginOptions || {};\n *\n * var player = this;\n * var alertText = myPluginOptions.text || 'Player is playing!'\n *\n * player.on('play', function(){\n * alert(alertText);\n * });\n * });\n * // USAGE EXAMPLES\n * // EXAMPLE 1: New player with plugin options, call plugin immediately\n * var player1 = videojs('idOne', {\n * myPlugin: {\n * text: 'Custom text!'\n * }\n * });\n * // Click play\n * // --> Should alert 'Custom text!'\n * // EXAMPLE 3: New player, initialize plugin later\n * var player3 = videojs('idThree');\n * // Click play\n * // --> NO ALERT\n * // Click pause\n * // Initialize plugin using the plugin function on the player instance\n * player3.myPlugin({\n * text: 'Plugin added later!'\n * });\n * // Click play\n * // --> Should alert 'Plugin added later!'\n * ```\n *\n * @param {String} name The plugin name\n * @param {Function} fn The plugin function that will be called with options\n * @mixes videojs\n * @method plugin\n */\nvideojs.plugin = plugin;\n\n/**\n * Adding languages so that they're available to all players.\n * ```js\n * videojs.addLanguage('es', { 'Hello': 'Hola' });\n * ```\n *\n * @param {String} code The language code or dictionary property\n * @param {Object} data The data values to be translated\n * @return {Object} The resulting language dictionary object\n * @mixes videojs\n * @method addLanguage\n */\nvideojs.addLanguage = function(code, data){\n code = ('' + code).toLowerCase();\n return merge(videojs.options.languages, { [code]: data })[code];\n};\n\n/**\n * Log debug messages.\n *\n * @param {...Object} messages One or more messages to log\n */\nvideojs.log = log;\n\n/**\n * Creates an emulated TimeRange object.\n *\n * @param {Number|Array} start Start time in seconds or an array of ranges\n * @param {Number} end End time in seconds\n * @return {Object} Fake TimeRange object\n * @method createTimeRange\n */\nvideojs.createTimeRange = videojs.createTimeRanges = createTimeRanges;\n\n/**\n * Format seconds as a time string, H:MM:SS or M:SS\n * Supplying a guide (in seconds) will force a number of leading zeros\n * to cover the length of the guide\n *\n * @param {Number} seconds Number of seconds to be turned into a string\n * @param {Number} guide Number (in seconds) to model the string after\n * @return {String} Time formatted as H:MM:SS or M:SS\n * @method formatTime\n */\nvideojs.formatTime = formatTime;\n\n/**\n * Resolve and parse the elements of a URL\n *\n * @param {String} url The url to parse\n * @return {Object} An object of url details\n * @method parseUrl\n */\nvideojs.parseUrl = Url.parseUrl;\n\n/**\n * Returns whether the url passed is a cross domain request or not.\n *\n * @param {String} url The url to check\n * @return {Boolean} Whether it is a cross domain request or not\n * @method isCrossOrigin\n */\nvideojs.isCrossOrigin = Url.isCrossOrigin;\n\n/**\n * Event target class.\n *\n * @type {Function}\n */\nvideojs.EventTarget = EventTarget;\n\n/**\n * Add an event listener to element\n * It stores the handler function in a separate cache object\n * and adds a generic handler to the element's event,\n * along with a unique id (guid) to the element.\n *\n * @param {Element|Object} elem Element or object to bind listeners to\n * @param {String|Array} type Type of event to bind to.\n * @param {Function} fn Event listener.\n * @method on\n */\nvideojs.on = Events.on;\n\n/**\n * Trigger a listener only once for an event\n *\n * @param {Element|Object} elem Element or object to\n * @param {String|Array} type Name/type of event\n * @param {Function} fn Event handler function\n * @method one\n */\nvideojs.one = Events.one;\n\n/**\n * Removes event listeners from an element\n *\n * @param {Element|Object} elem Object to remove listeners from\n * @param {String|Array=} type Type of listener to remove. Don't include to remove all events from element.\n * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type.\n * @method off\n */\nvideojs.off = Events.off;\n\n/**\n * Trigger an event for an element\n *\n * @param {Element|Object} elem Element to trigger an event on\n * @param {Event|Object|String} event A string (the type) or an event object with a type attribute\n * @param {Object} [hash] data hash to pass along with the event\n * @return {Boolean=} Returned only if default was prevented\n * @method trigger\n */\nvideojs.trigger = Events.trigger;\n\n/**\n * A cross-browser XMLHttpRequest wrapper. Here's a simple example:\n *\n * videojs.xhr({\n * body: someJSONString,\n * uri: \"/foo\",\n * headers: {\n * \"Content-Type\": \"application/json\"\n * }\n * }, function (err, resp, body) {\n * // check resp.statusCode\n * });\n *\n * Check out the [full\n * documentation](https://github.com/Raynos/xhr/blob/v2.1.0/README.md)\n * for more options.\n *\n * @param {Object} options settings for the request.\n * @return {XMLHttpRequest|XDomainRequest} the request object.\n * @see https://github.com/Raynos/xhr\n */\nvideojs.xhr = xhr;\n\n/**\n * TextTrack class\n *\n * @type {Function}\n */\nvideojs.TextTrack = TextTrack;\n\n/**\n * Determines, via duck typing, whether or not a value is a DOM element.\n *\n * @method isEl\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isEl = Dom.isEl;\n\n/**\n * Determines, via duck typing, whether or not a value is a text node.\n *\n * @method isTextNode\n * @param {Mixed} value\n * @return {Boolean}\n */\nvideojs.isTextNode = Dom.isTextNode;\n\n/**\n * Creates an element and applies properties.\n *\n * @method createEl\n * @param {String} [tagName='div'] Name of tag to be created.\n * @param {Object} [properties={}] Element properties to be applied.\n * @param {Object} [attributes={}] Element attributes to be applied.\n * @return {Element}\n */\nvideojs.createEl = Dom.createEl;\n\n/**\n * Check if an element has a CSS class\n *\n * @method hasClass\n * @param {Element} element Element to check\n * @param {String} classToCheck Classname to check\n */\nvideojs.hasClass = Dom.hasElClass;\n\n/**\n * Add a CSS class name to an element\n *\n * @method addClass\n * @param {Element} element Element to add class name to\n * @param {String} classToAdd Classname to add\n */\nvideojs.addClass = Dom.addElClass;\n\n/**\n * Remove a CSS class name from an element\n *\n * @method removeClass\n * @param {Element} element Element to remove from class name\n * @param {String} classToRemove Classname to remove\n */\nvideojs.removeClass = Dom.removeElClass;\n\n/**\n * Adds or removes a CSS class name on an element depending on an optional\n * condition or the presence/absence of the class name.\n *\n * @method toggleElClass\n * @param {Element} element\n * @param {String} classToToggle\n * @param {Boolean|Function} [predicate]\n * Can be a function that returns a Boolean. If `true`, the class\n * will be added; if `false`, the class will be removed. If not\n * given, the class will be added if not present and vice versa.\n */\nvideojs.toggleClass = Dom.toggleElClass;\n\n/**\n * Apply attributes to an HTML element.\n *\n * @method setAttributes\n * @param {Element} el Target element.\n * @param {Object=} attributes Element attributes to be applied.\n */\nvideojs.setAttributes = Dom.setElAttributes;\n\n/**\n * Get an element's attribute values, as defined on the HTML tag\n * Attributes are not the same as properties. They're defined on the tag\n * or with setAttribute (which shouldn't be used with HTML)\n * This will return true or false for boolean attributes.\n *\n * @method getAttributes\n * @param {Element} tag Element from which to get tag attributes\n * @return {Object}\n */\nvideojs.getAttributes = Dom.getElAttributes;\n\n/**\n * Empties the contents of an element.\n *\n * @method emptyEl\n * @param {Element} el\n * @return {Element}\n */\nvideojs.emptyEl = Dom.emptyEl;\n\n/**\n * Normalizes and appends content to an element.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method appendContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.appendContent = Dom.appendContent;\n\n/**\n * Normalizes and inserts content into an element; this is identical to\n * `appendContent()`, except it empties the element first.\n *\n * The content for an element can be passed in multiple types and\n * combinations, whose behavior is as follows:\n *\n * - String\n * Normalized into a text node.\n *\n * - Element, TextNode\n * Passed through.\n *\n * - Array\n * A one-dimensional array of strings, elements, nodes, or functions (which\n * return single strings, elements, or nodes).\n *\n * - Function\n * If the sole argument, is expected to produce a string, element,\n * node, or array.\n *\n * @method insertContent\n * @param {Element} el\n * @param {String|Element|TextNode|Array|Function} content\n * @return {Element}\n */\nvideojs.insertContent = Dom.insertContent;\n\n/*\n * Custom Universal Module Definition (UMD)\n *\n * Video.js will never be a non-browser lib so we can simplify UMD a bunch and\n * still support requirejs and browserify. This also needs to be closure\n * compiler compatible, so string keys are used.\n */\nif (typeof define === 'function' && define['amd']) {\n define('videojs', [], function(){ return videojs; });\n\n// checking that module is an object too because of umdjs/umd#35\n} else if (typeof exports === 'object' && typeof module === 'object') {\n module['exports'] = videojs;\n}\n\nexport default videojs;\n"
]
}